/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; let accountingPaymentMethodsList$module: | Promise | undefined; const accountingPaymentMethodsList = (( ...args: Parameters< typeof import("../funcs/accountingPaymentMethodsList.js").accountingPaymentMethodsList > ) => new APIPromise( (accountingPaymentMethodsList$module ??= import( "../funcs/accountingPaymentMethodsList.js" ).catch((error: unknown) => { accountingPaymentMethodsList$module = undefined; throw error; })).then((module) => module.accountingPaymentMethodsList(...args).$inspect() ), )) as typeof import("../funcs/accountingPaymentMethodsList.js").accountingPaymentMethodsList; let accountingPaymentMethodsCreate$module: | Promise | undefined; const accountingPaymentMethodsCreate = (( ...args: Parameters< typeof import("../funcs/accountingPaymentMethodsCreate.js").accountingPaymentMethodsCreate > ) => new APIPromise( (accountingPaymentMethodsCreate$module ??= import( "../funcs/accountingPaymentMethodsCreate.js" ).catch((error: unknown) => { accountingPaymentMethodsCreate$module = undefined; throw error; })).then((module) => module.accountingPaymentMethodsCreate(...args).$inspect() ), )) as typeof import("../funcs/accountingPaymentMethodsCreate.js").accountingPaymentMethodsCreate; let accountingPaymentMethodsGet$module: | Promise | undefined; const accountingPaymentMethodsGet = (( ...args: Parameters< typeof import("../funcs/accountingPaymentMethodsGet.js").accountingPaymentMethodsGet > ) => new APIPromise( (accountingPaymentMethodsGet$module ??= import( "../funcs/accountingPaymentMethodsGet.js" ).catch((error: unknown) => { accountingPaymentMethodsGet$module = undefined; throw error; })).then((module) => module.accountingPaymentMethodsGet(...args).$inspect() ), )) as typeof import("../funcs/accountingPaymentMethodsGet.js").accountingPaymentMethodsGet; let accountingPaymentMethodsUpdate$module: | Promise | undefined; const accountingPaymentMethodsUpdate = (( ...args: Parameters< typeof import("../funcs/accountingPaymentMethodsUpdate.js").accountingPaymentMethodsUpdate > ) => new APIPromise( (accountingPaymentMethodsUpdate$module ??= import( "../funcs/accountingPaymentMethodsUpdate.js" ).catch((error: unknown) => { accountingPaymentMethodsUpdate$module = undefined; throw error; })).then((module) => module.accountingPaymentMethodsUpdate(...args).$inspect() ), )) as typeof import("../funcs/accountingPaymentMethodsUpdate.js").accountingPaymentMethodsUpdate; let accountingPaymentMethodsDelete$module: | Promise | undefined; const accountingPaymentMethodsDelete = (( ...args: Parameters< typeof import("../funcs/accountingPaymentMethodsDelete.js").accountingPaymentMethodsDelete > ) => new APIPromise( (accountingPaymentMethodsDelete$module ??= import( "../funcs/accountingPaymentMethodsDelete.js" ).catch((error: unknown) => { accountingPaymentMethodsDelete$module = undefined; throw error; })).then((module) => module.accountingPaymentMethodsDelete(...args).$inspect() ), )) as typeof import("../funcs/accountingPaymentMethodsDelete.js").accountingPaymentMethodsDelete; export class PaymentMethods extends ClientSDK { /** * List Payment Methods * * @remarks * List Payment Methods */ async list( request: operations.AccountingPaymentMethodsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingPaymentMethodsAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingPaymentMethodsList( this, request, options, )); } /** * Create Payment Method * * @remarks * Create Payment Method */ async create( request: operations.AccountingPaymentMethodsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentMethodsCreate( this, request, options, )); } /** * Get Payment Method * * @remarks * Get Payment Method */ async get( request: operations.AccountingPaymentMethodsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentMethodsGet( this, request, options, )); } /** * Update Payment Method * * @remarks * Update Payment Method */ async update( request: operations.AccountingPaymentMethodsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentMethodsUpdate( this, request, options, )); } /** * Delete Payment Method * * @remarks * Delete Payment Method */ async delete( request: operations.AccountingPaymentMethodsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentMethodsDelete( this, request, options, )); } }