esimsGetStatusEventsWithHttpInfo method

Future<Response> esimsGetStatusEventsWithHttpInfo(
  1. String iccid, {
  2. int? page,
  3. int? limit,
  4. DateTime? from,
  5. DateTime? to,
  6. Future<void>? abortTrigger,
})

List eSIM status events

Lists the status changes of an eSIM, newest first. Returns { items, pagination }, one item per status change with the eSIM status, the profile status and occurredAt. from and to limit the events by occurredAt, both inclusive. 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.

  • int page: Page number, from 1; default 1.

  • int limit: Page size, 1 to 100; default 10.

  • DateTime from: Only events that occurred at or after this UTC time.

  • DateTime to: Only events that occurred at or before this UTC time.

Implementation

Future<Response> esimsGetStatusEventsWithHttpInfo(String iccid, { int? page, int? limit, DateTime? from, DateTime? to, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/esims/{iccid}/status-events'
    .replaceAll('{iccid}', iccid);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (from != null) {
    queryParams.addAll(_queryParams('', 'from', from));
  }
  if (to != null) {
    queryParams.addAll(_queryParams('', 'to', to));
  }

  const contentTypes = <String>[];


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