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): any
getTotals$(orderId: string): any
getAppliedCodes$(orderId: string): any
getItems$(orderId: string): any
getBillingAddresses$(orderId: string): any
getShippingAddresses$(orderId: string): any
getShipments$(orderId: string): any
getPayment$(orderId: string): any
getInvoices$(orderId: string): any
getCredits$(orderId: string): any
getGrandTotal$(orderId: string): any
getSubtotal$(orderId: string): any
getShippingTotal$(orderId: string): any
getDiscountTotal$(orderId: string): any
hasDiscount$(orderId: string): any
getTaxTotal$(orderId: string): any
dispatch(action: Action<string>): void
}
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
any| Parameter | orderId: string |
|---|---|
| Description |
anyThe specified order's grand total.
| Parameter | orderId: string |
|---|---|
| Description |
anyThe specified order's subtotal.
| Parameter | orderId: string |
|---|---|
| Description |
anyThe specified order's shipping total.
| Parameter | orderId: string |
|---|---|
| Description |
anyThe specified order's discount total.
| Parameter | orderId: string |
|---|---|
| Description |
anyWhether the specified order has a discount.
| Parameter | orderId: string |
|---|---|
| Description |
anyThe specified order's tax total.
| Parameter | orderId: string |
|---|---|
| Description |
void| Parameter | action: Action |
|---|---|
| Description |