Interface CartActionCreators
interface CartActionCreators { emitCartActionEvent( payload: CartActionDetails, ): AsyncThunkAction< void, CartActionDetails, AsyncThunkCommerceOptions<CommerceEngineState>, >; emitPurchaseEvent( payload: Transaction, ): AsyncThunkAction< void, Transaction, AsyncThunkCommerceOptions<CommerceEngineState>, >; purchase(): { payload: void; type: string }; setItems( payload: SetItemsPayload, ): { payload: SetItemsPayload; type: string }; updateItemQuantity( payload: CartItemWithMetadata, ): { payload: CartItemWithMetadata; type: string };} Methods
emitCartActionEvent
- emitCartActionEvent(
payload: CartActionDetails,
): AsyncThunkAction<
void,
CartActionDetails,
AsyncThunkCommerceOptions<CommerceEngineState>,
> Parameters
- payload: CartActionDetails
Returns AsyncThunkAction<
void,
CartActionDetails,
AsyncThunkCommerceOptions<CommerceEngineState>,
>
A dispatchable action.
emitPurchaseEvent
- emitPurchaseEvent(
payload: Transaction,
): AsyncThunkAction<
void,
Transaction,
AsyncThunkCommerceOptions<CommerceEngineState>,
> Returns AsyncThunkAction<
void,
Transaction,
AsyncThunkCommerceOptions<CommerceEngineState>,
>
A dispatchable action.
purchase
- purchase(): { payload: void; type: string }
Returns { payload: void; type: string }
A dispatchable action.
setItems
- setItems(payload: SetItemsPayload): { payload: SetItemsPayload; type: string }
Returns { payload: SetItemsPayload; type: string }
A dispatchable action.
updateItemQuantity
- updateItemQuantity(
payload: CartItemWithMetadata,
): { payload: CartItemWithMetadata; type: string } Parameters
- payload: CartItemWithMetadata
Returns { payload: CartItemWithMetadata; type: string }
A dispatchable action.
The cart action creators.