esimsProvisionWithHttpInfo method
- String id,
- String idempotencyKey, {
- EsimProvisioningRequest? esimProvisioningRequest,
- Future<
void> ? abortTrigger,
Provision a deferred eSIM
Provisions a deferred eSIM bought with inputs.isInstant: false and returns it. Creates the eSIM for an order item that delivered an entitlement, and returns it as GET /esims/{iccid} does. The item's result moves to provisioning.status processing and then ready, and each change sends an order.fulfillment.updated webhook. An Idempotency-Key header with a UUID is required; a key already used for a completed call gives 409 / 12000. The optional body { travelStartDate } is needed when the plan requires the first day of travel and the order did not send it (400 / 10001 without it); a date other than the one recorded, or a new date once provisioning has started, gives 409 / 10005. An instant eSIM gives 400 / 10001, and an ID that names no eSIM purchase of yours, such as a top-up item, gives 404 / 10004.
Note: This method returns the HTTP Response.
Parameters:
-
String id (required): The order item ID of the deferred eSIM purchase.
-
String idempotencyKey (required): UUID idempotency key for safe retries of this operation.
-
EsimProvisioningRequest esimProvisioningRequest: Optional:
{ travelStartDate }, the first day of travel.
Implementation
Future<Response> esimsProvisionWithHttpInfo(String id, String idempotencyKey, { EsimProvisioningRequest? esimProvisioningRequest, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/esims/{id}/provisioning'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = esimProvisioningRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
headerParams[r'Idempotency-Key'] = parameterToString(idempotencyKey);
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,
);
}