SmsSendResult Class

  • java.lang.Object
    • com.azure.communication.sms.models.SmsSendResult

public final class SmsSendResult

The SmsSendResult model.

Constructor Summary

Constructor Description
SmsSendResult(String to, String messageId, int httpStatusCode, boolean isSuccessful, String errorMessage)

Constructor to wrap the smsSendResponseItem

Method Summary

Modifier and Type Method and Description
String getErrorMessage()

Get the errorMessage property: Optional error message in case of 4xx/5xx/repeatable errors.

int getHttpStatusCode()

Get the httpStatusCode property: HTTP Status code.

String getMessageId()

Get the messageId property: The identifier of the outgoing Sms message.

String getTo()

Get the to property: The recipient's phone number in E.164 format.

boolean isSuccessful()

Get the successful property: Indicates if the message is processed successfully or not.

Methods inherited from java.lang.Object

Constructor Details

SmsSendResult

public SmsSendResult(String to, String messageId, int httpStatusCode, boolean isSuccessful, String errorMessage)

Constructor to wrap the smsSendResponseItem

Parameters:

to - The recipient's phone number in E.164 format.
messageId - The identifier of the outgoing Sms message. Only present if message processed.
httpStatusCode - The httpStatusCode property: HTTP Status code.
isSuccessful - The successful property: Indicates if the message is processed successfully or not.
errorMessage - Optional error message in case of 4xx/5xx/repeatable errors.

Method Details

getErrorMessage

public String getErrorMessage()

Get the errorMessage property: Optional error message in case of 4xx/5xx/repeatable errors.

Returns:

the errorMessage value.

getHttpStatusCode

public int getHttpStatusCode()

Get the httpStatusCode property: HTTP Status code.

Returns:

the httpStatusCode value.

getMessageId

public String getMessageId()

Get the messageId property: The identifier of the outgoing Sms message. Only present if message processed.

Returns:

the messageId value.

getTo

public String getTo()

Get the to property: The recipient's phone number in E.164 format.

Returns:

the to value.

isSuccessful

public boolean isSuccessful()

Get the successful property: Indicates if the message is processed successfully or not.

Returns:

the successful value.

Applies to