/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { parcelsCreate } from "../funcs/parcelsCreate.js"; import { parcelsGet } from "../funcs/parcelsGet.js"; import { parcelsList } from "../funcs/parcelsList.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 Parcels extends ClientSDK { /** * List all parcels * * @remarks * Returns a list of all parcel objects. */ async list( page?: number | undefined, results?: number | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(parcelsList( this, page, results, options, )); } /** * Create a new parcel * * @remarks * Creates a new parcel object. */ async create( request: operations.CreateParcelRequestBody, options?: RequestOptions, ): Promise { return unwrapAsync(parcelsCreate( this, request, options, )); } /** * Retrieve an existing parcel * * @remarks * Returns parcel details using an existing parcel object ID (this will not return parcel details associated with un-purchased shipment/rate parcel object IDs). */ async get( parcelId: string, options?: RequestOptions, ): Promise { return unwrapAsync(parcelsGet( this, parcelId, options, )); } }