Zum Hauptinhalt springen

Interface: SingleOrderProvider

Implement this interface for implementing an api which can provide a single order.

See

AppFeature

Methods

queryOrder

queryOrder(request): Promise<{ 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>; }[] }>

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

Parameters

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

Returns

Promise<{ 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>; }[] }>

Defined in

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