airtimeCatalogWithHttpInfo method
Airtime catalog
Returns the operator directory, page by page, for partner inventory. Returns { items: [{ id, name, countryCode, category, logoUrl }], nextCursor }, ordered by operator ID. Pass nextCursor back as cursor with the same countryCode until it is null; a page can hold fewer items than limit, and the cursor does not expire. A cursor reused with another countryCode, or a blank or invalid countryCode, gives 400 / 10001. Offers are not exported: they depend on whether the operator is detected or chosen, so read them with operators/{id}?phoneNumber=.
Note: This method returns the HTTP Response.
Parameters:
-
String countryCode: Optional ISO 3166-1 alpha-2 country filter, in either case; every country when omitted. A blank or invalid value gives 400 / 10001.
-
String cursor: The
nextCursorof the previous page; omit it for the first page. Reuse it only with the samecountryCode. -
int limit: Page size, 1 to 100; default 100.
Implementation
Future<Response> airtimeCatalogWithHttpInfo({ String? countryCode, String? cursor, int? limit, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/airtime/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 (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,
);
}