File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,11 +171,11 @@ export default class Cart {
171171 }
172172
173173 /**
174- * @method removeGiftCards( ): Promise<FullOrder>
175- * Removes all gift cards payment methods of the cart.
174+ * @method removeGiftCard(giftCardCode: string ): Promise<FullOrder>
175+ * Removes gift card with provided code payment method from the cart.
176176 */
177- removeGiftCards ( ) {
178- return this . api . delete ( endpoints . cartPaymentGiftCards ) . then ( normalizeResponse ) ;
177+ removeGiftCard ( giftCardCode ) {
178+ return this . api . delete ( endpoints . cartPaymentGiftCardsWithCode ( giftCardCode ) ) . then ( normalizeResponse ) ;
179179 }
180180
181181 /**
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const shippingAddressId = id => `${shippingAddress}/${id}`;
2222export const cartLineItems = '/v1/my/cart/line-items' ;
2323export const cartPaymentCreditCarts = '/v1/my/cart/payment-methods/credit-cards' ;
2424export const cartPaymentGiftCards = '/v1/my/cart/payment-methods/gift-cards' ;
25+ export const cartPaymentGiftCardsWithCode = giftCardCode => `/v1/my/cart/payment-methods/gift-cards/${ giftCardCode } ` ;
2526export const cartPaymentStoreCredits = '/v1/my/cart/payment-methods/store-credits' ;
2627export const cartPaymentCouponCode = '/v1/my/cart/coupon' ;
2728export const cartPaymentCouponCodeWithCode = code => `/v1/my/cart/coupon/${ code } ` ;
You can’t perform that action at this time.
0 commit comments