Class RCSBusinessMessaging.Phones.AgentMessages
- java.lang.Object
-
- com.google.api.services.rcsbusinessmessaging.v1.RCSBusinessMessaging.Phones.AgentMessages
-
- Enclosing class:
- RCSBusinessMessaging.Phones
public class RCSBusinessMessaging.Phones.AgentMessages extends java.lang.ObjectThe "agentMessages" collection of methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRCSBusinessMessaging.Phones.AgentMessages.CreateclassRCSBusinessMessaging.Phones.AgentMessages.Delete
-
Constructor Summary
Constructors Constructor Description AgentMessages()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RCSBusinessMessaging.Phones.AgentMessages.Createcreate(java.lang.String parent, AgentMessage content)Sends a message from the agent to a user.RCSBusinessMessaging.Phones.AgentMessages.Deletedelete(java.lang.String name)Revokes an agent message that has been sent but not yet delivered.
-
-
-
Method Detail
-
create
public RCSBusinessMessaging.Phones.AgentMessages.Create create(java.lang.String parent, AgentMessage content) throws java.io.IOException
Sends a message from the agent to a user. The user must be RCS enabled and reachable by the RBM platform in order for the agent to successfully send a message. When the message has been successfully sent, the call returns with no error. Otherwise, the agent receives an error code. If the user is online, the RBM platform delivers the message right away. Otherwise, the RBM platform queues the message and delivered it when the user is next online. The RBM platform ignores any agent message sent with an ID that was used by an earlier message or event sent from the same agent. Agent messages can be revoked between the time that they are sent and the time that they are delivered. Create a request for the method "agentMessages.create". This request holds the parameters needed by the rcsbusinessmessaging server. After setting any optional parameters, call theAbstractGoogleClientRequest.execute()method to invoke the remote operation.- Parameters:
parent- "phones/{E.164}", where {E.164} is the user's phone number in E.164 format. For example, with the US phone number +1-222-333-4444, the value would be phones/+12223334444, and the resulting endpoint would be https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages.content- theAgentMessage- Returns:
- the request
- Throws:
java.io.IOException
-
delete
public RCSBusinessMessaging.Phones.AgentMessages.Delete delete(java.lang.String name) throws java.io.IOException
Revokes an agent message that has been sent but not yet delivered. If the RBM platform successfully revokes a message, then the message is deleted from the user’s message queue and is never delivered. This method immediately returns 200 OK, whether or not the message was successfully revoked. There is a small chance that the agent may initiate a revocation while the RBM platform is in the process of delivering the message. In these rare cases, the agent receives a DELIVERED user event for the message shortly after initiating the revocation request. Create a request for the method "agentMessages.delete". This request holds the parameters needed by the rcsbusinessmessaging server. After setting any optional parameters, call theAbstractGoogleClientRequest.execute()method to invoke the remote operation.- Parameters:
name- "phones/{E.164}/agentMessages/{messageId}", where {E.164} is the user's phone number in E.164 format and {messageId} is the agent-assigned ID of the agent message that should be revoked. For example, with the US phone number +1-222-333-4444 and an agent message with the ID "12345xyz", the resulting endpoint would be https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz.- Returns:
- the request
- Throws:
java.io.IOException
-
-