esimsGetUsageWithHttpInfo method

Future<Response> esimsGetUsageWithHttpInfo(
  1. String iccid, {
  2. Future<void>? abortTrigger,
})

Get eSIM usage

Returns the current data, SMS and voice usage of an eSIM. Reads the live usage when the request is made and returns the allowed and remaining data (MB), SMS and voice (seconds), including top-ups. When the usage cannot be read live, or the plan does not report live usage, it returns the last known usage. 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.

Implementation

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

  // ignore: prefer_final_locals
  Object? postBody;

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

  const contentTypes = <String>[];


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