/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ordersCreate } from "../funcs/ordersCreate.js"; import { ordersGet } from "../funcs/ordersGet.js"; import { ordersList } from "../funcs/ordersList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Orders extends ClientSDK { /** * List all orders * * @remarks * Returns a list of all order objects. */ async list( request: operations.ListOrdersRequest, options?: RequestOptions, ): Promise { return unwrapAsync(ordersList( this, request, options, )); } /** * Create a new order * * @remarks * Creates a new order object. */ async create( request: components.OrderCreateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(ordersCreate( this, request, options, )); } /** * Retrieve an order * * @remarks * Retrieves an existing order using an object ID. */ async get( orderId: string, options?: RequestOptions, ): Promise { return unwrapAsync(ordersGet( this, orderId, options, )); } }