utilityQuoteWithHttpInfo method

Future<Response> utilityQuoteWithHttpInfo({
  1. UtilityOrderRequest? utilityOrderRequest,
  2. Future<void>? abortTrigger,
})

Quote utility payments

Prices the order body with current prices, without placing an order. Takes the same body as order, with offer public IDs; a biller's own ID is not an offer (400 / 11004). 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. A quote reserves nothing, does not expire, submits no payment and does not check the customer's account with the biller.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> utilityQuoteWithHttpInfo({ UtilityOrderRequest? utilityOrderRequest, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/utility/quote';

  // ignore: prefer_final_locals
  Object? postBody = utilityOrderRequest;

  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,
  );
}