import { MockDaffOrderFacade } from '@daffodil/order/state/testing'
@Injectable()
class MockDaffOrderFacade implements DaffOrderFacadeInterface {
loading$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(null)
errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject<DaffStateError[]>([])
loadingState$: BehaviorSubject<DaffState> = new BehaviorSubject<DaffState>(DaffState.Stable)
resolving$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false)
mutating$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false)
hasErrors$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false)
orders$: BehaviorSubject<DaffOrder[]> = new BehaviorSubject([])
orderIds$: BehaviorSubject<DaffOrder['id'][]> = new BehaviorSubject([])
orderCount$: BehaviorSubject<number> = new BehaviorSubject(null)
orderEntities$: BehaviorSubject<Dictionary<DaffOrder>> = new BehaviorSubject({})
placedOrder$: BehaviorSubject<DaffOrder> = new BehaviorSubject(null)
hasPlacedOrder$: BehaviorSubject<boolean> = new BehaviorSubject(false)
getOrder$(orderId: string): BehaviorSubject<DaffOrder>
getTotals$(orderId: string): BehaviorSubject<DaffOrder['totals']>
getAppliedCodes$(orderId: string): BehaviorSubject<DaffOrder['applied_codes']>
getItems$(orderId: string): BehaviorSubject<DaffOrder['items']>
getBillingAddresses$(orderId: string): BehaviorSubject<DaffOrder['billing_addresses']>
getShippingAddresses$(orderId: string): BehaviorSubject<DaffOrder['shipping_addresses']>
getShipments$(orderId: string): BehaviorSubject<DaffOrder['shipments']>
getPayment$(orderId: string): BehaviorSubject<DaffOrder['payment']>
getInvoices$(orderId: string): BehaviorSubject<DaffOrder['invoices']>
getCredits$(orderId: string): BehaviorSubject<DaffOrder['credits']>
getGrandTotal$(orderId: string): BehaviorSubject<DaffOrderTotal>
getSubtotal$(orderId: string): BehaviorSubject<DaffOrderTotal>
getShippingTotal$(orderId: string): BehaviorSubject<DaffOrderTotal>
getDiscountTotal$(orderId: string): BehaviorSubject<DaffOrderTotal>
hasDiscount$(orderId: string): BehaviorSubject<boolean>
getTaxTotal$(orderId: string): BehaviorSubject<DaffOrderTotal>
dispatch(action: Action<string>): void
}
BehaviorSubject<DaffOrder>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['totals']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['applied_codes']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['items']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['billing_addresses']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['shipping_addresses']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['shipments']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['payment']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['invoices']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrder['credits']>
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrderTotal>
The specified order's grand total.
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrderTotal>
The specified order's subtotal.
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrderTotal>
The specified order's shipping total.
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrderTotal>
The specified order's discount total.
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<boolean>
Whether the specified order has a discount.
Parameter | orderId: string |
---|---|
Description |
BehaviorSubject<DaffOrderTotal>
The specified order's tax total.
Parameter | orderId: string |
---|---|
Description |
void
Parameter | action: Action |
---|---|
Description |