getCommerceStoreByStoreidVariantByKeyWithHttpInfo method

Future<Response> getCommerceStoreByStoreidVariantByKeyWithHttpInfo(
  1. String storeid,
  2. String key
)

Fetch a variant as this storefront sells it

Returns the stored variant with the store's listing for it overlaid — non-empty listing fields replace the catalog values and the currency is forced to the store's own — which is what makes per-storefront pricing of a shared variant possible. The overlay is keyed by the variant's ID, never by its slug or SKU. An unknown store or key is 404. Readable with an admin token or the anonymous published storefront key.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> getCommerceStoreByStoreidVariantByKeyWithHttpInfo(String storeid, String key,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/commerce/store/{storeid}/variant/{key}'
    .replaceAll('{storeid}', storeid)
    .replaceAll('{key}', key);

  // ignore: prefer_final_locals
  Object? postBody;

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

  const contentTypes = <String>[];


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