GitHub

DaffOrderFacade

Facade

import { DaffOrderFacade } from '@daffodil/order/state'

@Injectable()
class DaffOrderFacade<<T extends DaffOrder = DaffOrder>>  implements DaffOrderFacadeInterface<T> {
  loading$: Observable<boolean>
  errors$: Observable<DaffStateError[]>
  loadingState$: Observable<DaffState>
  resolving$: Observable<boolean>
  mutating$: Observable<boolean>
  hasErrors$: Observable<boolean>
  orders$: Observable<T[]>
  orderIds$: Observable<T['id'][]>
  orderCount$: Observable<number>
  orderEntities$: Observable<Dictionary<T>>
  _order: (orderId: T["id"]) => any
  _totals: (orderId: T["id"]) => any
  _appliedCodes: (orderId: T["id"]) => any
  _items: (orderId: T["id"]) => any
  _billingAddresses: (orderId: T["id"]) => any
  _shippingAddresses: (orderId: T["id"]) => any
  _shipments: (orderId: T["id"]) => any
  _payment: (orderId: T["id"]) => any
  _invoices: (orderId: T["id"]) => any
  _credits: (orderId: T["id"]) => any
  _grandTotal: (orderId: T["id"]) => any
  _subtotal: (orderId: T["id"]) => any
  _shipping: (orderId: T["id"]) => any
  _discount: (orderId: T["id"]) => any
  _hasDiscount: (orderId: T["id"]) => any
  _tax: (orderId: T["id"]) => any

  getOrder$(orderId: T["id"]): any
  getTotals$(orderId: T["id"]): any
  getAppliedCodes$(orderId: T["id"]): any
  getItems$(orderId: T["id"]): any
  getBillingAddresses$(orderId: T["id"]): any
  getShippingAddresses$(orderId: T["id"]): any
  getShipments$(orderId: T["id"]): any
  getPayment$(orderId: T["id"]): any
  getInvoices$(orderId: T["id"]): any
  getCredits$(orderId: T["id"]): any
  getGrandTotal$(orderId: T["id"]): any
  getSubtotal$(orderId: T["id"]): any
  getShippingTotal$(orderId: T["id"]): any
  getDiscountTotal$(orderId: T["id"]): any
  hasDiscount$(orderId: T["id"]): any
  getTaxTotal$(orderId: T["id"]): any
  dispatch(action: Action<string>): void
}

() Methods

getOrder$
any
Parameters
ParameterorderId: T["id"]
Description
getTotals$
any
Parameters
ParameterorderId: T["id"]
Description
getAppliedCodes$
any
Parameters
ParameterorderId: T["id"]
Description
getItems$
any
Parameters
ParameterorderId: T["id"]
Description
getBillingAddresses$
any
Parameters
ParameterorderId: T["id"]
Description
getShippingAddresses$
any
Parameters
ParameterorderId: T["id"]
Description
getShipments$
any
Parameters
ParameterorderId: T["id"]
Description
getPayment$
any
Parameters
ParameterorderId: T["id"]
Description
getInvoices$
any
Parameters
ParameterorderId: T["id"]
Description
getCredits$
any
Parameters
ParameterorderId: T["id"]
Description
getGrandTotal$
any

The specified order's grand total.

Parameters
ParameterorderId: T["id"]
Description
getSubtotal$
any

The specified order's subtotal.

Parameters
ParameterorderId: T["id"]
Description
getShippingTotal$
any

The specified order's shipping total.

Parameters
ParameterorderId: T["id"]
Description
getDiscountTotal$
any

The specified order's discount total.

Parameters
ParameterorderId: T["id"]
Description
hasDiscount$
any

Whether the specified order has a discount.

Parameters
ParameterorderId: T["id"]
Description
getTaxTotal$
any

The specified order's tax total.

Parameters
ParameterorderId: T["id"]
Description
dispatch
void
Parameters
Parameteraction: Action<string>
Description