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