Class Mms


  • public class Mms
    extends java.lang.Object
    • Method Detail

      • async

        public AsyncMms async()
        Switches to the async SDK.
        Returns:
        The async SDK
      • getPrice

        public GetMmsPriceRequestBuilder getPrice()
        Check the price of MMS Messages



        Check the price of single or multiple MMS messages at the same time before sending them. You can pass a single MmsMessage object using GetMmsPriceRequestBody.of(MmsMessage) method (for single message) or List<SmsMessage> using GetMmsPriceRequestBody.of(List.of(MmsMessage,...)) method (for multiple messages).

        Each MmsMessage object has several properties, describing message parameters such recipient phone number, content of the message, attachments, etc. Please use builder style:

        
         GetMmsPriceResponse res = sdk.outgoing().mms().getPrice()
            .request(req) // here pass GetMmsPriceRequestBody.of(...) object
            .call();
         

        The method will accept maximum 50 messages in one call.

        As a successful result a GetMmsPriceResponse object will be returned with prices property of type List<Price> containing a Price objects, one object per each single message. You should check the error property of each Price object to make sure which messages were priced successfully and which finished with an error. Successfully priced messages will have null value of error property.

        GetMmsPriceResponse object will include also headers property with X-Success-Count (a count of messages which were processed successfully) and X-Error-Count (count of messages which were rejected) elements.
        Returns:
        The call builder
      • getPrice

        public GetMmsPriceResponse getPrice​(GetMmsPriceRequestBody request)
                                     throws java.lang.Exception
        Check the price of MMS Messages



        Check the price of single or multiple MMS messages at the same time before sending them. You can pass a single MmsMessage object using GetMmsPriceRequestBody.of(MmsMessage) method (for single message) or List<SmsMessage> using GetMmsPriceRequestBody.of(List.of(MmsMessage,...)) method (for multiple messages).

        Each MmsMessage object has several properties, describing message parameters such recipient phone number, content of the message, attachments, etc. Please use builder style:

        
         GetMmsPriceResponse res = sdk.outgoing().mms().getPrice()
            .request(req) // here pass GetMmsPriceRequestBody.of(...) object
            .call();
         

        The method will accept maximum 50 messages in one call.

        As a successful result a GetMmsPriceResponse object will be returned with prices property of type List<Price> containing a Price objects, one object per each single message. You should check the error property of each Price object to make sure which messages were priced successfully and which finished with an error. Successfully priced messages will have null value of error property.

        GetMmsPriceResponse object will include also headers property with X-Success-Count (a count of messages which were processed successfully) and X-Error-Count (count of messages which were rejected) elements.
        Parameters:
        request - The request object containing all the parameters for the API call.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • getPrice

        public GetMmsPriceResponse getPrice​(GetMmsPriceRequestBody request,
                                            java.util.Optional<Options> options)
                                     throws java.lang.Exception
        Check the price of MMS Messages



        Check the price of single or multiple MMS messages at the same time before sending them. You can pass a single MmsMessage object using GetMmsPriceRequestBody.of(MmsMessage) method (for single message) or List<SmsMessage> using GetMmsPriceRequestBody.of(List.of(MmsMessage,...)) method (for multiple messages).

        Each MmsMessage object has several properties, describing message parameters such recipient phone number, content of the message, attachments, etc. Please use builder style:

        
         GetMmsPriceResponse res = sdk.outgoing().mms().getPrice()
            .request(req) // here pass GetMmsPriceRequestBody.of(...) object
            .call();
         

        The method will accept maximum 50 messages in one call.

        As a successful result a GetMmsPriceResponse object will be returned with prices property of type List<Price> containing a Price objects, one object per each single message. You should check the error property of each Price object to make sure which messages were priced successfully and which finished with an error. Successfully priced messages will have null value of error property.

        GetMmsPriceResponse object will include also headers property with X-Success-Count (a count of messages which were processed successfully) and X-Error-Count (count of messages which were rejected) elements.
        Parameters:
        request - The request object containing all the parameters for the API call.
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • send

        public SendMmsRequestBuilder send()
        Send MMS Messages



        Send single or multiple MMS messages at the same time. You can pass a single MmsMessage object using SendMmsRequestBody.of(MmsMessage) method (for single message) or List<MmsMessage> using SendMmsRequestBody.of(List.of(MmsMessage,...)) method (for multiple messages). Each MmsMessage object has several properties, describing message parameters such recipient phone number, content of the message, attachments or scheduled sending date, etc. Please use builder style:

        
         SendMmsResponse res = sdk.outgoing().mms().send()
            .request(req) // here pass GetMmsPriceRequestBody.of(...) object
            .call();
         

        This method will accept maximum 50 messages in one call.

        As a successful result a SendMmsResponse object will be returned with messages property of type List<Message> containing Message objects, one object per each single message. You should check the statusCode property of each Message object to make sure which messages were accepted by gateway (queued) and which were rejected. In case of rejection, statusDescription property will include a reason.

        SendMmsResponse will also include headers property with X-Success-Count (a count of messages which were processed successfully), X-Error-Count (count of messages which were rejected) and X-Sandbox (if a request was made in Sandbox or Production system) elements.
        Returns:
        The call builder
      • send

        public SendMmsResponse send​(SendMmsRequestBody request)
                             throws java.lang.Exception
        Send MMS Messages



        Send single or multiple MMS messages at the same time. You can pass a single MmsMessage object using SendMmsRequestBody.of(MmsMessage) method (for single message) or List<MmsMessage> using SendMmsRequestBody.of(List.of(MmsMessage,...)) method (for multiple messages). Each MmsMessage object has several properties, describing message parameters such recipient phone number, content of the message, attachments or scheduled sending date, etc. Please use builder style:

        
         SendMmsResponse res = sdk.outgoing().mms().send()
            .request(req) // here pass GetMmsPriceRequestBody.of(...) object
            .call();
         

        This method will accept maximum 50 messages in one call.

        As a successful result a SendMmsResponse object will be returned with messages property of type List<Message> containing Message objects, one object per each single message. You should check the statusCode property of each Message object to make sure which messages were accepted by gateway (queued) and which were rejected. In case of rejection, statusDescription property will include a reason.

        SendMmsResponse will also include headers property with X-Success-Count (a count of messages which were processed successfully), X-Error-Count (count of messages which were rejected) and X-Sandbox (if a request was made in Sandbox or Production system) elements.
        Parameters:
        request - The request object containing all the parameters for the API call.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • send

        public SendMmsResponse send​(SendMmsRequestBody request,
                                    java.util.Optional<Options> options)
                             throws java.lang.Exception
        Send MMS Messages



        Send single or multiple MMS messages at the same time. You can pass a single MmsMessage object using SendMmsRequestBody.of(MmsMessage) method (for single message) or List<MmsMessage> using SendMmsRequestBody.of(List.of(MmsMessage,...)) method (for multiple messages). Each MmsMessage object has several properties, describing message parameters such recipient phone number, content of the message, attachments or scheduled sending date, etc. Please use builder style:

        
         SendMmsResponse res = sdk.outgoing().mms().send()
            .request(req) // here pass GetMmsPriceRequestBody.of(...) object
            .call();
         

        This method will accept maximum 50 messages in one call.

        As a successful result a SendMmsResponse object will be returned with messages property of type List<Message> containing Message objects, one object per each single message. You should check the statusCode property of each Message object to make sure which messages were accepted by gateway (queued) and which were rejected. In case of rejection, statusDescription property will include a reason.

        SendMmsResponse will also include headers property with X-Success-Count (a count of messages which were processed successfully), X-Error-Count (count of messages which were rejected) and X-Sandbox (if a request was made in Sandbox or Production system) elements.
        Parameters:
        request - The request object containing all the parameters for the API call.
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails