getCommerceStoreByStoreidVariantByKey method

Future<void> getCommerceStoreByStoreidVariantByKey(
  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.

Parameters:

Implementation

Future<void> getCommerceStoreByStoreidVariantByKey(String storeid, String key,) async {
  final response = await getCommerceStoreByStoreidVariantByKeyWithHttpInfo(storeid, key,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
}