Frontend API
Methods to apply and remove coupon codes from the cart.
Use to apply one coupon per cart. Codes are not case-sensitive.
Returns the updated cart object if the code is valid. Otherwise, it returns a validation error.
Apply a coupon
await swell.cart.applyCoupon('SUMMERTIME')
Use to remove the coupon code from the cart, if one was applied.
Remove a coupon
await swell.cart.removeCoupon()