esimsQuote method

Future<EsimQuote?> esimsQuote({
  1. EsimOrderRequest? esimOrderRequest,
  2. Future<void>? abortTrigger,
})

Quote eSIMs

Prices the order body with current prices, without placing an order. Takes the same body as order and, as the order does, checks each item completely (its inputs, its publicId and its price) before the next one, in request order. The first failure aborts the quote, and an item error is named at items[i], for example 409 / 11002 at items[i].inputs.maxPrice when the current price is above it. An eSIM has no monetary value, so inputs.value is an unknown member (400 / 10001). An unknown or foreign inputs.iccid gives 404 / 10004. A quote reserves nothing and does not expire.

Parameters:

Implementation

Future<EsimQuote?> esimsQuote({ EsimOrderRequest? esimOrderRequest, Future<void>? abortTrigger, }) async {
  final response = await esimsQuoteWithHttpInfo(esimOrderRequest: esimOrderRequest, abortTrigger: abortTrigger,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'EsimQuote',) as EsimQuote;

  }
  return null;
}