getCartWithHttpInfo method
Read one cart with its lines and totals
Reads one cart: its lines, its status and what it comes to. This is what a storefront calls to render the basket, and what a support agent calls to see what a shopper is looking at. The totals are the cart's STORED tally — shipping and tax stay zero until checkout resolves a shipping option and a tax region, so a cart total before checkout is the merchandise total and is meant to be. The org scopes the read by construction: the store is namespaced to it, so a cart id belonging to another tenant is simply not found rather than found and then filtered, and answers 404 rather than 403 so the id space cannot be probed. A named handler, not a closure, so zipdoc can lift this prose into the registry.
Note: This method returns the HTTP Response.
Parameters:
- String id (required): ID is the cart's id, as the open call answered it.
Implementation
Future<Response> getCartWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/v1/commerce/cart/{id}'
.replaceAll('{id}', id);
// 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,
);
}