putCommerceStoreByStoreidListingByKeyWithHttpInfo method
Upsert a listing override
Decodes the body over the existing listing when the key is present, so fields it omits keep their stored values, and builds the listing from the body alone when the key is new. Answers 200 when it replaced something and 201 with a Location header when it created it; either way the body is the store's entire listing map, not the single entry. Unlike creation, this path does NOT restamp the listing's currency from the store. Admin-gated, with the store resolved inside the caller org's namespace.
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> putCommerceStoreByStoreidListingByKeyWithHttpInfo(String storeid, String key,) async {
// ignore: prefer_const_declarations
final path = r'/v1/commerce/store/{storeid}/listing/{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,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}