UNPKG

@shopgate/pwa-common-commerce

Version:

Commerce library for the Shopgate Connect PWA.

6 lines 656 B
import{SUCCESS_ADD_COUPONS_TO_CART}from"../constants";/** * Creates the dispatched SUCCESS_ADD_COUPONS_TO_CART action object. * @param {Array} couponsIds The coupon ids from the successful ADD_COUPONS_TO_CART action. * @param {boolean} [userInteracted=true] Was the action dispatched due to a user interaction * @returns {Object} The dispatched action object. */var successAddCouponsToCart=function successAddCouponsToCart(couponsIds){var userInteracted=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;return{type:SUCCESS_ADD_COUPONS_TO_CART,couponsIds:couponsIds,userInteracted:userInteracted};};export default successAddCouponsToCart;