Zum Hauptinhalt springen

Interface: OrderProvider

Implement this interface for implementing an api which can provide orders.

See

AppFeature

Methods

queryOrders

queryOrders(request): Promise<{ data?: { attributeValues?: Record<string, unknown> = ZAttributeValues; customer?: { id?: string; mailAddress?: string; phoneNumber?: string; vatId?: string; attributeValues?: Record<string, unknown>; } ; deliveryAddress?: { id?: string; company?: string; firstName?: string; surname?: string; line2?: string; street?: string; houseNumber?: string; zipCode?: string; city?: string; countryCode?: string; state?: string; attributeValues?: Record<...>; } ; id?: string ; invoiceAddress?: { id?: string; company?: string; firstName?: string; surname?: string; line2?: string; street?: string; houseNumber?: string; zipCode?: string; city?: string; countryCode?: string; state?: string; attributeValues?: Record<...>; } ; items?: { id?: string; name?: string; description?: string; sku?: string; amount?: number; singleNetPrice?: { value?: number; divisor?: number; currencyCode?: string; }; singleGrossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; taxRate?: number; attributeValues?: Record<...>; }[] ; orderDate?: string = ZDateTimeString; orderNumber?: string ; paymentStatus?: "OPEN" | "IN_PROGRESS" | "PARTIALLY_PAID" | "PAID" | "PARTIALLY_REFUNDED" | "REFUNDED" = ZPaymentStatus; shipments?: { id?: string; date?: string; sourceCountryCode?: string; method?: string; netPrice?: { value?: number; divisor?: number; currencyCode?: string; }; grossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; taxRate?: number; attributeValues?: Record<...>; }[] ; status?: "OPEN" | "CONFIRMED" | "PROCESSING" | "CANCELED" | "COMPLETED" = ZOrderStatus; transactions?: { id?: string; date?: string; type?: "PAYMENT" | "REFUND"; method?: string; amount?: { value?: number; divisor?: number; currencyCode?: string; }; attributeValues?: Record<string, unknown>; }[] }[] ; nextPageToken?: string ; pageSize?: number ; pageToken?: string }>

Handle the request and return the queried orders in a unified form.

Parameters

NameTypeDefault value
requestObjectundefined
request.attributeValues?Record<string, unknown>ZAttributeValues
request.filters?{ value?: unknown; field?: string; operation?: FilterOperation; }[]undefined
request.pageSize?numberundefined
request.pageToken?stringundefined

Returns

Promise<{ data?: { attributeValues?: Record<string, unknown> = ZAttributeValues; customer?: { id?: string; mailAddress?: string; phoneNumber?: string; vatId?: string; attributeValues?: Record<string, unknown>; } ; deliveryAddress?: { id?: string; company?: string; firstName?: string; surname?: string; line2?: string; street?: string; houseNumber?: string; zipCode?: string; city?: string; countryCode?: string; state?: string; attributeValues?: Record<...>; } ; id?: string ; invoiceAddress?: { id?: string; company?: string; firstName?: string; surname?: string; line2?: string; street?: string; houseNumber?: string; zipCode?: string; city?: string; countryCode?: string; state?: string; attributeValues?: Record<...>; } ; items?: { id?: string; name?: string; description?: string; sku?: string; amount?: number; singleNetPrice?: { value?: number; divisor?: number; currencyCode?: string; }; singleGrossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; taxRate?: number; attributeValues?: Record<...>; }[] ; orderDate?: string = ZDateTimeString; orderNumber?: string ; paymentStatus?: "OPEN" | "IN_PROGRESS" | "PARTIALLY_PAID" | "PAID" | "PARTIALLY_REFUNDED" | "REFUNDED" = ZPaymentStatus; shipments?: { id?: string; date?: string; sourceCountryCode?: string; method?: string; netPrice?: { value?: number; divisor?: number; currencyCode?: string; }; grossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; taxRate?: number; attributeValues?: Record<...>; }[] ; status?: "OPEN" | "CONFIRMED" | "PROCESSING" | "CANCELED" | "COMPLETED" = ZOrderStatus; transactions?: { id?: string; date?: string; type?: "PAYMENT" | "REFUND"; method?: string; amount?: { value?: number; divisor?: number; currencyCode?: string; }; attributeValues?: Record<string, unknown>; }[] }[] ; nextPageToken?: string ; pageSize?: number ; pageToken?: string }>

Defined in

src/contracts/pull-orders/handler/order-provider.ts:13