Home > @poq/sdk-sfcc > ICartContractMigrator > generateCartResponse
Method transforms the salesforce basket object into Cart with Products contract of the Poq.
Signature:
generateCartResponse(authInfo: AuthInfo, customerId: string, appIdentifier: string, poqUserId: string, basket: Basket, currencyCode: string, isGuest: boolean, locale?: string): Promise<PoqResponse<CartWithProductsResponse>>;
Parameter | Type | Description |
---|---|---|
authInfo | AuthInfo | The auth info to make request (credentials or token). |
customerId | string | The customer id. |
appIdentifier | string | The unique guid v4 app identifier. |
poqUserId | string | The unique identifier of the poq user. |
basket | Basket | Basket item of the salesforce platform. |
currencyCode | string | The ISO currency code is the three-letter alphabetic code that represent the various currencies used throughout the world. |
isGuest | boolean | The flag indicates whether user is guest. |
locale | string | (Optional) The indicator carries information about locale. |
Returns:
Promise<PoqResponse<CartWithProductsResponse>>
Transformed Cart Response.