@shopgate/pwa-common-commerce
Version:
Commerce library for the Shopgate Connect PWA.
6 lines • 607 B
JavaScript
import{ERROR_ADD_COUPONS_TO_CART}from"../constants";/**
* Creates the dispatched ERROR_ADD_COUPONS_TO_CART action object.
* @param {Array} couponsIds The coupon ids from the failed ADD_COUPONS_TO_CART action.
* @param {PipelineErrorElement[]} [errors] A list of errors messages for the coupons.
* @returns {Object} The dispatched action object.
*/var errorAddCouponsToCart=function errorAddCouponsToCart(couponsIds){var errors=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return{type:ERROR_ADD_COUPONS_TO_CART,couponsIds:couponsIds,errors:errors};};export default errorAddCouponsToCart;