Suggestions

close search

ChatRequest

public class ChatRequest
extends StringeeObject



Represents a ChatRequest.



Summary


Public Constructors
ChatRequest()

Construct a new ChatRequest

Public methods
String getId()

Return chat request id.

void setId(String id)

Set chat request id.

String getConversationId()

Return conversation id.

void setConversationId(String conversationId)

Set conversation id.

int getState()

Return chat request state.

void setState(int state)

Set chat request state.

long getCreatedAt()

Return chat request create time in milliseconds.

void setCreatedAt(long createdAt)

Set chat request create time in milliseconds.

long getUpdatedAt()

Return chat request update time in milliseconds.

void setUpdatedAt(long updatedAt)

Set chat request update time in milliseconds.

List<User> getParticipants()

Return chat request participant.

void setParticipants(List<User> participants)

Set chat request participant.

String getUserId()

Return user id.

void setUserId(String userId)

Set user id.

String getName()

Return chat request name.

void setName(String name)

Set chat request name.

String getCustomerId()

Return customer id.

void setCustomerId(String customerId)

Set customer id.

int getChannelType()

Return chat request channel type.

void setChannelType(int channelType)

Set chat request channel type.

int getRequestType()

Return chat request type.

void setRequestType(int requestType)

Set chat request type.

String getTransferFrom()

Return id of user who transfer this chat request.

void setTransferFrom(String transferFrom)

Set id of user who transfer this chat request.

void addParticipants(User participant)

Add participant to chat request.

void addParticipants(List<User> participants)

Add list of participants to chat request.

void getLastMessages(StringeeClient client, int count, CallbackListener<List<Message>> listener)

Return last messages of chat request.

void deleteMessages(StringeeClient client, List<Message> messages, StatusListener listener)

Delete list of messages.


Public constructors


ChatRequest

ChatRequest()

Construct a new ChatRequest.



Public methods


getId

String getId()

Return chat request id.



setId

void setId(String id)

Set chat request id.

Parameters
id

The chat request id.



getConversationId

String getConversationId()

Return conversation id.



setConversationId

void setConversationId(String conversationId)

Set conversation id.

Parameters
conversationId

The conversation id.



getState

int getState()

Return chat request state: - 1 : STATE_PENDING
- 2 : STATE_SERVING
- 3 : STATE_SERVED
- 4 : STATE_REJECTED



setState

void setState(int state)

Set chat request state.

Parameters
state

The chat request state.



getCreatedAt

long getCreatedAt()

Return chat request create time in milliseconds.



setCreatedAt

void setCreatedAt(long createdAt)

Set chat request create time in milliseconds.

Parameters
createdAt

The chat request create time in milliseconds.



getUpdatedAt

long getUpdatedAt()

Return chat request update time in milliseconds.



setUpdatedAt

void setUpdatedAt(long updatedAt)

Set chat request update time in milliseconds.

Parameters
updatedAt

The chat request update time in milliseconds.



getParticipants

List<User> getParticipants()

Return chat request participant.



setParticipants

void setParticipants(List<User> participants)

Set chat request participant.

Parameters
participants

The list of participants.



getUserId

String getUserId()

Return user id.



setUserId

void setUserId(String userId)

Set user id.

Parameters
userId

The user id.



getName

String getName()

Return chat request name.



setName

void setName(String name)

Set chat request name.

Parameters
name

The chat request name.



getCustomerId

String getCustomerId()

Return customer id.



setCustomerId

void setCustomerId(String customerId)

Set customer id.

Parameters
customerId

The customer id.



getChannelType

int getChannelType()

Return chat request channel type: - 1 : CHANNEL_TYPE_SUPPORT
- 2 : CHANNEL_TYPE_FACEBOOK
- 3 : CHANNEL_TYPE_ZALO



setChannelType

void setChannelType(int channelType)

Set chat request channel type.

Parameters
channelType

The chat request channel type.



getRequestType()

int getRequestType()

Return chat request type: - 0 : REQUEST_TYPE_NORMAL
- 1 : REQUEST_TYPE_TRANSFER



setRequestType

void setRequestType(int requestType)

Set chat request type.

Parameters
requestType

The chat request type.



getTransferFrom

String getTransferFrom()

Return id of user who transfer this chat request.



setTransferFrom

void setTransferFrom(String transferFrom)

Set id of user who transfer this chat request.

Parameters
transferFrom

The id of user who transfer this chat request.



addParticipants

void addParticipants(User participant)

Add participant to chat request.

Parameters
participant

The participant.



addParticipants

void addParticipants(List<User> participants)

Add list of participants to chat request.

Parameters
participants

The list of participants.



getLastMessages

void getLastMessages(StringeeClient client, int count, CallbackListener<List<Message>> listener)

Return last messages of chat request.

Parameters
client

The StringeeClient instance.

count

The number of messages.

listener

The CallbackListener instance.



deleteMessages

void deleteMessages(StringeeClient client, List<Message> messages, StatusListener listener)

Delete list of messages.

Parameters
client

The StringeeClient instance.

messages

The list of messages.

listener

The StatusListener instance.