Class MessengerRequest
java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.messages.MessageRequest
com.vonage.client.messages.messenger.MessengerRequest
- All Implemented Interfaces:
Jsonable
- Direct Known Subclasses:
MessengerAudioRequest,MessengerFileRequest,MessengerImageRequest,MessengerTextRequest,MessengerVideoRequest
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classMessengerRequest.Builder<M extends MessengerRequest,B extends MessengerRequest.Builder<? extends M, ? extends B>> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMessengerRequest(MessengerRequest.Builder<?, ?> builder, MessageType messageType) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvalidateSenderAndRecipient(String from, String to) This method is used to validate the format of sender and recipient fields.Methods inherited from class com.vonage.client.messages.MessageRequest
getChannel, getClientRef, getCustom, getFrom, getMessageType, getText, getTo, getTtl, getWebhookUrl, getWebhookVersion, maxTextLength, validateClientReferenceMethods inherited from class com.vonage.client.JsonableBaseObject
createJsonObjectMapper, equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
toJson, updateFromJson
-
Field Details
-
messenger
-
-
Constructor Details
-
MessengerRequest
-
-
Method Details
-
validateSenderAndRecipient
Description copied from class:MessageRequestThis method is used to validate the format of sender and recipient fields. By default, this method checks that the recipient is an E164-compliant number and that the sender is not blank. Subclasses may re-assign the sender and recipient fields to be well-formed / standardised / compliant.- Overrides:
validateSenderAndRecipientin classMessageRequest- Parameters:
from- The sender number or ID passed in from the builder.to- The recipient number or ID passed in from the builder.
-
getMessenger
-