esimsGetCatalogWithHttpInfo method
eSIM catalog
Returns every destination with its plans, page by page, for partner inventory. Returns { items, nextCursor }, ordered by destination ID, with the search filters except iccid. Continue with nextCursor as cursor, the same filters and the same currency until it is null. A cursor reused with other filters or another currency gives 400 / 10001. Quote confirms the final price and availability.
Note: This method returns the HTTP Response.
Parameters:
-
String countryCode: Optional ISO 3166-1 alpha-2 country, in either case: keeps the destinations whose coverage includes it, regional and global ones too. A blank value is rejected.
-
String category: Keep
local,regionalorglobaldestinations. -
String region: Keep the destinations of this region, in display or slug form, for example
North Americaornorth-america. -
int validityDays: Keep the plans valid for exactly this many days; at least 1.
-
bool isUnlimited: Keep the unlimited (
true) or the limited (false) plans. -
String currency: Price currency, three letters in either case; the API key's currency when omitted. An unsupported code gives 404 / 10004.
-
String cursor: The
nextCursorof the previous page; omit it for the first page. Reuse it only with the same filters and currency. -
int limit: Page size, 1 to 100; default 100.
Implementation
Future<Response> esimsGetCatalogWithHttpInfo({ String? countryCode, String? category, String? region, int? validityDays, bool? isUnlimited, String? currency, String? cursor, int? limit, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/esims/catalog';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (countryCode != null) {
queryParams.addAll(_queryParams('', 'countryCode', countryCode));
}
if (category != null) {
queryParams.addAll(_queryParams('', 'category', category));
}
if (region != null) {
queryParams.addAll(_queryParams('', 'region', region));
}
if (validityDays != null) {
queryParams.addAll(_queryParams('', 'validityDays', validityDays));
}
if (isUnlimited != null) {
queryParams.addAll(_queryParams('', 'isUnlimited', isUnlimited));
}
if (currency != null) {
queryParams.addAll(_queryParams('', 'currency', currency));
}
if (cursor != null) {
queryParams.addAll(_queryParams('', 'cursor', cursor));
}
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
abortTrigger: abortTrigger,
);
}