airtimeQuoteWithHttpInfo method

Future<Response> airtimeQuoteWithHttpInfo({
  1. AirtimeOrderRequest? airtimeOrderRequest,
  2. Future<void>? abortTrigger,
})

Quote airtime

Prices the order body with current prices, without placing an order. Takes the same body as order and resolves the number's operator as the order does, with a carrier lookup per item. Each item is priced on its own, in request order; the first failing item aborts the quote and is named at items[i], for example 409 / 11002 at items[i].inputs.maxPrice when the current price is above it. 409 / 20000 means the lookup shows that the offer's operator cannot be the number's: search again. A carrier lookup that fails gives 503 / 10007. A quote reserves nothing and does not expire; to hold the quoted price, send it as inputs.maxPrice in the order.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> airtimeQuoteWithHttpInfo({ AirtimeOrderRequest? airtimeOrderRequest, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/airtime/quote';

  // ignore: prefer_final_locals
  Object? postBody = airtimeOrderRequest;

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

  const contentTypes = <String>['application/json', 'text/json', 'application/*+json'];


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