esimsSendSmsWithHttpInfo method
Future<Response>
esimsSendSmsWithHttpInfo(
- String iccid, {
- EsimSmsRequest? esimSmsRequest,
- Future<
void> ? abortTrigger,
Send an SMS to an eSIM
Sends a text message to one of your eSIMs. Takes { message }, which must not be empty, and returns { iccid, success, isSupported }. isSupported is false when the eSIM's plan cannot receive messages this way, and success is false when the message was not sent. An ICCID that is not one of your eSIMs gives 404 / 10004.
Note: This method returns the HTTP Response.
Parameters:
-
String iccid (required): The eSIM's ICCID, from the order item's
fulfillment.result.details.iccid. -
EsimSmsRequest esimSmsRequest: The message to send.
Implementation
Future<Response> esimsSendSmsWithHttpInfo(String iccid, { EsimSmsRequest? esimSmsRequest, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/esims/{iccid}/sms'
.replaceAll('{iccid}', iccid);
// ignore: prefer_final_locals
Object? postBody = esimSmsRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json', 'text/json', 'application/*+json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
abortTrigger: abortTrigger,
);
}