esimsGetDestinationWithHttpInfo method

Future<Response> esimsGetDestinationWithHttpInfo(
  1. String id, {
  2. String? currency,
  3. Future<void>? abortTrigger,
})

Get an eSIM destination

Returns one destination with its plans, in the item shape that search returns. An unknown ID, or a destination that search does not list, gives 404 / 10004. After a purchase, the order item's purchasedProduct.details.destination.id gives the coverage of the destination the eSIM was bought for.

Note: This method returns the HTTP Response.

Parameters:

  • String id (required): The destination id from search, the destination list or the catalog.

  • String currency: Price currency, three letters in either case; the API key's currency when omitted. An unsupported code gives 404 / 10004.

Implementation

Future<Response> esimsGetDestinationWithHttpInfo(String id, { String? currency, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/esims/destinations/{id}'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (currency != null) {
    queryParams.addAll(_queryParams('', 'currency', currency));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
    abortTrigger: abortTrigger,
  );
}