giftCardsQuoteWithHttpInfo method

Future<Response> giftCardsQuoteWithHttpInfo({
  1. GiftCardOrderRequest? giftCardOrderRequest,
  2. Future<void>? abortTrigger,
})

Quote gift cards

Prices the order body with current prices, without placing an order. Takes the same body as order and checks it the same way: each item completely (its inputs, then its publicId, then its price) before the next, in request order. The first failure aborts the quote and is named at items[i], as the order names it, for example 409 / 11002 at items[i].inputs.maxPrice when the current price is above it. A range offer may be quoted on an equivalent offer of the same card that sells the same value for less: the item then returns that offer's publicId, which the order should use.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> giftCardsQuoteWithHttpInfo({ GiftCardOrderRequest? giftCardOrderRequest, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/giftcards/quote';

  // ignore: prefer_final_locals
  Object? postBody = giftCardOrderRequest;

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