/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { buyersShippingDetailsCreate } from "../funcs/buyersShippingDetailsCreate.js"; import { buyersShippingDetailsDelete } from "../funcs/buyersShippingDetailsDelete.js"; import { buyersShippingDetailsGet } from "../funcs/buyersShippingDetailsGet.js"; import { buyersShippingDetailsList } from "../funcs/buyersShippingDetailsList.js"; import { buyersShippingDetailsUpdate } from "../funcs/buyersShippingDetailsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ShippingDetails extends ClientSDK { /** * Add buyer shipping details * * @remarks * Associate shipping details to a buyer. */ async create( shippingDetailsCreate: components.ShippingDetailsCreate, buyerId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(buyersShippingDetailsCreate( this, shippingDetailsCreate, buyerId, merchantAccountId, options, )); } /** * List a buyer's shipping details * * @remarks * List all the shipping details associated to a specific buyer. */ async list( buyerId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(buyersShippingDetailsList( this, buyerId, merchantAccountId, options, )); } /** * Get buyer shipping details * * @remarks * Get a buyer's shipping details. */ async get( buyerId: string, shippingDetailsId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(buyersShippingDetailsGet( this, buyerId, shippingDetailsId, merchantAccountId, options, )); } /** * Update a buyer's shipping details * * @remarks * Update the shipping details associated to a specific buyer. */ async update( shippingDetailsUpdate: components.ShippingDetailsUpdate, buyerId: string, shippingDetailsId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(buyersShippingDetailsUpdate( this, shippingDetailsUpdate, buyerId, shippingDetailsId, merchantAccountId, options, )); } /** * Delete a buyer's shipping details * * @remarks * Delete the shipping details associated to a specific buyer. */ async delete( buyerId: string, shippingDetailsId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(buyersShippingDetailsDelete( this, buyerId, shippingDetailsId, merchantAccountId, options, )); } }