Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetRequiredDataForOrder

Implements GetRequiredDataForOrder fetch for the Redux store

export

Hierarchy

Index

Constructors

constructor

Properties

actions

actions: {}

The actions for the fetchable data

memberof

StoreFetchableData

Type declaration

  • [key: string]: any

Protected dispatchCount

dispatchCount: number = 0

The dispatch count. Used for the dispatchId

memberof

StoreFetchableData

Protected Optional fetchOptions

fetchOptions: any

name

name: string

The store section name Used to name the rootState member and postfixed to all actions

memberof

StoreFetchableData

reducer

The reducers for the fetchable data

memberof

StoreFetchableData

Protected Optional requestOptions

Protected theRequiredFor

theRequiredFor: RequiredFor = 7

Default required for level Can be overridden for each fetch call Changing will trigger a fetch if needed Fetching with a different value will update it

Default level is: 7 (placeOrder + Payment + Ship)

PlaceOrder = 1, Payment = 2, Ship = 4, Invoice = 8, All = 15,

memberof

GetRequiredDataForOrder

Protected url

url: string

Accessors

initialState

requiredFor

Methods

createFetchAction

  • Create a fetch action using the class request type This helper will setup and add promises for the fetch call and any chain that is triggered

    TODO: If typings provide optional-ness correctly we can remove the Partial

    NOTE: omitSessionId is deprecated but remains to not mess up parameter ordering

    memberof

    StoreFetchableData

    Parameters

    • Optional request: Partial<GetRequiredDataForOrder>
    • Default value chainStarter: string = this.name
    • Optional timeout: undefined | number
    • Default value omitSessionIdDeprecated: boolean = false
    • Optional elevationToken: undefined | string
    • Optional serviceContext: undefined | string
    • Optional chainContext: undefined | string

    Returns [AnyAction, Promise<GetRequiredDataForOrderResponse>, Promise<TGetRequiredDataForOrderChainData>]

createResponseAction

  • createResponseAction(response?: RES): any

fetchData

getError$

  • getError$(): Observable<Error | null>

getPropertyState$

  • getPropertyState$(propertyPath: string | string[]): Observable<any>

Protected getReducerFunctions

  • getReducerFunctions(): {}

getRequest$

getResponse$

getState

getState$

getUrl

  • getUrl(): string

isFetching$

  • isFetching$(): Observable<boolean>

saga

  • saga(): Generator<ForkEffect, void, unknown>

timeout

  • timeout(ms: number): Promise<any>