Methods to apply and remove gift cards from the cart.

Use to apply a gift card code to the cart. A cart can have multiple gift card codes applied at once. Codes are not case-sensitive.

Returns the updated cart object if the gift card code is valid. Otherwise, it returns a validation error.

Apply a gift card
await swell.cart.applyGiftcard('BUYS SFX4 BMZH YY7N')

Use to remove a gift card from the cart; pass the ID that was assigned to cart.giftcards.id.

Remove a gift card
await swell.cart.removeGiftcard('5c15505200c7d14d851e51af')