Poq.SDK.Node

Home > @poq/sdk-sfcc > ICartService

ICartService interface

Service aims to provide an abstraction over Sfcc Basket operations and handles guest baskets alongside with.

Signature:

export interface ICartService 

Methods

Method Description
addCoupon(authInfo, customerId, appIdentifier, poqUserId, couponCode, isGuest, locale) Adds coupon code to coupon codes collection.
addToCart(authInfo, customerId, appIdentifier, poqUserId, addToCartPayload, isGuest, locale) Method adds item to cart.
getCart(authInfo, customerId, appIdentifier, poqUserId, currencyCode, isGuest, locale) Method returns user cart or new when cart does not exist.
removeCoupon(authInfo, customerId, appIdentifier, poqUserId, couponItemId, isGuest, locale) Removes coupon code from coupon codes collection
syncCart(guestAuthInfo, guestCustomerId, loggedUserAuthInfo, loggedCustomerId, appIdentifier, poqUserId, locale) Synchronizes PoqCart with existing SfccBasket. If SfccBasket does not exist it will be created and filled in the content of PoqCart.
updateCart(authInfo, customerId, appIdentifier, poqUserId, currencyCode, updateCartPayload, isGuest, locale) Method update the cart.