### File

`src/app/checkout/actions/checkout.actions.ts`

### Methods

fetchCurrentOrder
`fetchCurrentOrder()`
Defined in src/app/checkout/actions/checkout.actions.ts:20
Returns: `void`

fetchCurrentOrderSuccess
`fetchCurrentOrderSuccess(order: Order)`
Defined in src/app/checkout/actions/checkout.actions.ts:24
Returns: `void`

addToCart
`addToCart(variant_id: number)`
Defined in src/app/checkout/actions/checkout.actions.ts:31
Returns: `Action`

addToCartSuccess
`addToCartSuccess(lineItem: LineItem)`
Defined in src/app/checkout/actions/checkout.actions.ts:38
Returns: `Action`

removeLineItem
`removeLineItem(lineItemId: number)`
Defined in src/app/checkout/actions/checkout.actions.ts:45
Returns: `Action`

removeLineItemSuccess
`removeLineItemSuccess(lineItem: LineItem)`
Defined in src/app/checkout/actions/checkout.actions.ts:52
Returns: `Action`

changeLineItemQuantity
`changeLineItemQuantity(quantity: number, lineItemId: number)`
Defined in src/app/checkout/actions/checkout.actions.ts:59
Returns: `Action`

placeOrder
`placeOrder()`
Defined in src/app/checkout/actions/checkout.actions.ts:66
Returns: `Action`

changeOrderState
`changeOrderState()`
Defined in src/app/checkout/actions/checkout.actions.ts:70
Returns: `Action`

changeOrderStateSuccess
`changeOrderStateSuccess(order: Order)`
Defined in src/app/checkout/actions/checkout.actions.ts:74
Returns: `Action`

updateOrder
`updateOrder()`
Defined in src/app/checkout/actions/checkout.actions.ts:81
Returns: `Action`

updateOrderSuccess
`updateOrderSuccess(order: Order)`
Defined in src/app/checkout/actions/checkout.actions.ts:85
Returns: `Action`

orderCompleteSuccess
`orderCompleteSuccess()`
Defined in src/app/checkout/actions/checkout.actions.ts:92
Returns: `void`

### Properties

Static ADD_TO_CART
`ADD_TO_CART: `string``
Default value: `ADD_TO_CART`
Defined in src/app/checkout/actions/checkout.actions.ts:8

Static ADD_TO_CART_SUCCESS
`ADD_TO_CART_SUCCESS: `string``
Default value: `ADD_TO_CART_SUCCESS`
Defined in src/app/checkout/actions/checkout.actions.ts:9

Static CHANGE_LINE_ITEM_QUANTITY
`CHANGE_LINE_ITEM_QUANTITY: `string``
Default value: `CHANGE_LINE_ITEM_QUANTITY`
Defined in src/app/checkout/actions/checkout.actions.ts:12

Static CHANGE_ORDER_STATE
`CHANGE_ORDER_STATE: `string``
Default value: `CHANGE_ORDER_STATE`
Defined in src/app/checkout/actions/checkout.actions.ts:14

Static CHANGE_ORDER_STATE_SUCCESS
`CHANGE_ORDER_STATE_SUCCESS: `string``
Default value: `CHANGE_ORDER_STATE_SUCCESS`
Defined in src/app/checkout/actions/checkout.actions.ts:15

Static FETCH_CURRENT_ORDER
`FETCH_CURRENT_ORDER: `string``
Default value: `FETCH_CURRENT_ORDER`
Defined in src/app/checkout/actions/checkout.actions.ts:6

Static FETCH_CURRENT_ORDER_SUCCESS
`FETCH_CURRENT_ORDER_SUCCESS: `string``
Default value: `FETCH_CURRENT_ORDER_SUCCESS`
Defined in src/app/checkout/actions/checkout.actions.ts:7

Static ORDER_COMPLETE_SUCCESS
`ORDER_COMPLETE_SUCCESS: `string``
Default value: `ORDER_COMPLETE_SUCCESS`
Defined in src/app/checkout/actions/checkout.actions.ts:18

Static PLACE_ORDER
`PLACE_ORDER: `string``
Default value: `PLACE_ORDER`
Defined in src/app/checkout/actions/checkout.actions.ts:13

Static REMOVE_LINE_ITEM
`REMOVE_LINE_ITEM: `string``
Default value: `REMOVE_LINE_ITEM`
Defined in src/app/checkout/actions/checkout.actions.ts:10

Static REMOVE_LINE_ITEM_SUCCESS
`REMOVE_LINE_ITEM_SUCCESS: `string``
Default value: `REMOVE_LINE_ITEM_SUCCESS`
Defined in src/app/checkout/actions/checkout.actions.ts:11

Static UPDATE_ORDER
`UPDATE_ORDER: `string``
Default value: `UPDATE_ORDER`
Defined in src/app/checkout/actions/checkout.actions.ts:16

Static UPDATE_ORDER_SUCCESS
`UPDATE_ORDER_SUCCESS: `string``
Default value: `UPDATE_ORDER_SUCCESS`
Defined in src/app/checkout/actions/checkout.actions.ts:17

    import { LineItem } from './../../core/models/line_item';
    import { Order } from './../../core/models/order';
    import { Action } from '@ngrx/store';

    export class CheckoutActions {
      static FETCH_CURRENT_ORDER = 'FETCH_CURRENT_ORDER';
      static FETCH_CURRENT_ORDER_SUCCESS = 'FETCH_CURRENT_ORDER_SUCCESS';
      static ADD_TO_CART = 'ADD_TO_CART';
      static ADD_TO_CART_SUCCESS = 'ADD_TO_CART_SUCCESS';
      static REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM';
      static REMOVE_LINE_ITEM_SUCCESS = 'REMOVE_LINE_ITEM_SUCCESS';
      static CHANGE_LINE_ITEM_QUANTITY = 'CHANGE_LINE_ITEM_QUANTITY';
      static PLACE_ORDER = 'PLACE_ORDER';
      static CHANGE_ORDER_STATE = 'CHANGE_ORDER_STATE';
      static CHANGE_ORDER_STATE_SUCCESS = 'CHANGE_ORDER_STATE_SUCCESS';
      static UPDATE_ORDER = 'UPDATE_ORDER';
      static UPDATE_ORDER_SUCCESS = 'UPDATE_ORDER_SUCCESS';
      static ORDER_COMPLETE_SUCCESS = 'ORDER_COMPLETE_SUCCESS';

      fetchCurrentOrder() {
        return { type: CheckoutActions.FETCH_CURRENT_ORDER };
      }

      fetchCurrentOrderSuccess(order: Order) {
        return {
          type: CheckoutActions.FETCH_CURRENT_ORDER_SUCCESS,
          payload: order
        };
      }

      addToCart(variant_id: number): Action {
        return {
          type: CheckoutActions.ADD_TO_CART,
          payload: variant_id
        };
      }

      addToCartSuccess(lineItem: LineItem): Action {
        return {
          type: CheckoutActions.ADD_TO_CART_SUCCESS,
          payload: lineItem
        };
      }

      removeLineItem(lineItemId: number): Action {
        return {
          type: CheckoutActions.REMOVE_LINE_ITEM,
          payload: lineItemId
        };
      }

      removeLineItemSuccess(lineItem: LineItem): Action {
        return {
          type: CheckoutActions.REMOVE_LINE_ITEM_SUCCESS,
          payload: lineItem
        };
      }

      changeLineItemQuantity(quantity: number, lineItemId: number): Action {
        return {
          type: CheckoutActions.CHANGE_LINE_ITEM_QUANTITY,
          payload: { quantity, lineItemId }
        };
      }

      placeOrder(): Action {
        return { type: CheckoutActions.PLACE_ORDER };
      }

      changeOrderState(): Action {
        return { type: CheckoutActions.CHANGE_ORDER_STATE };
      }

      changeOrderStateSuccess(order: Order): Action {
        return {
          type: CheckoutActions.CHANGE_ORDER_STATE_SUCCESS,
          payload: order
        };
      }

      updateOrder(): Action {
        return { type: CheckoutActions.UPDATE_ORDER };
      }

      updateOrderSuccess(order: Order): Action {
        return {
          type: CheckoutActions.UPDATE_ORDER_SUCCESS,
          payload: order
        };
      }

      orderCompleteSuccess() {
        return { type: CheckoutActions.ORDER_COMPLETE_SUCCESS };
      }

    }

# results matching ""

# No results matching ""