UNPKG

@spree/storefront-api-v2-sdk

Version:

Node module to easily integrate your JavaScript or TypeScript application with Spree Storefront API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on.

36 lines (35 loc) 1.13 kB
import { Http } from '@spree/core-api-v2-sdk'; import type { IQuery, IToken } from '@spree/core-api-v2-sdk'; import type { IOrderResult, StatusOptions } from '../interfaces/Order'; export default class Order extends Http { /** * Returns a placed Order. * * **Required token:** [Order token](../pages/tokens.html#order-token) * * **Options schema:** * ```ts * interface options { * order_number: string * } * ``` * * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema) * * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema) * * **Example:** * ```ts * const response = await client.order.status({ * order_token: '7381273269536713689562374856', * order_number: 'R653163382' * }) * ``` */ status(options: StatusOptions): Promise<IOrderResult>; /** * @hidden * @deprecated Use the combined options signature instead. */ status(token: IToken, orderNumber: string, params?: IQuery): Promise<IOrderResult>; }