giftCardsGetCardWithHttpInfo method

Future<Response> giftCardsGetCardWithHttpInfo(
  1. String id, {
  2. String? currency,
  3. Future<void>? abortTrigger,
})

Get a gift card

Returns one gift card with its offers, in the item shape that search returns. An unknown or unparseable ID, or a card without an orderable offer, gives 404 / 10004.

Note: This method returns the HTTP Response.

Parameters:

  • String id (required): The card's id (its SKU) from search or the catalog, for example amazon-us.

  • String currency: Price currency, three letters in either case; the API key's currency when omitted. An unsupported code gives 404 / 10004.

Implementation

Future<Response> giftCardsGetCardWithHttpInfo(String id, { String? currency, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/giftcards/cards/{id}'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (currency != null) {
    queryParams.addAll(_queryParams('', 'currency', currency));
  }

  const contentTypes = <String>[];


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