/* * 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 accountingBankAccountsList$module: | Promise | undefined; const accountingBankAccountsList = (( ...args: Parameters< typeof import("../funcs/accountingBankAccountsList.js").accountingBankAccountsList > ) => new APIPromise( (accountingBankAccountsList$module ??= import( "../funcs/accountingBankAccountsList.js" ).catch((error: unknown) => { accountingBankAccountsList$module = undefined; throw error; })).then((module) => module.accountingBankAccountsList(...args).$inspect() ), )) as typeof import("../funcs/accountingBankAccountsList.js").accountingBankAccountsList; let accountingBankAccountsCreate$module: | Promise | undefined; const accountingBankAccountsCreate = (( ...args: Parameters< typeof import("../funcs/accountingBankAccountsCreate.js").accountingBankAccountsCreate > ) => new APIPromise( (accountingBankAccountsCreate$module ??= import( "../funcs/accountingBankAccountsCreate.js" ).catch((error: unknown) => { accountingBankAccountsCreate$module = undefined; throw error; })).then((module) => module.accountingBankAccountsCreate(...args).$inspect() ), )) as typeof import("../funcs/accountingBankAccountsCreate.js").accountingBankAccountsCreate; let accountingBankAccountsGet$module: | Promise | undefined; const accountingBankAccountsGet = (( ...args: Parameters< typeof import("../funcs/accountingBankAccountsGet.js").accountingBankAccountsGet > ) => new APIPromise( (accountingBankAccountsGet$module ??= import( "../funcs/accountingBankAccountsGet.js" ).catch((error: unknown) => { accountingBankAccountsGet$module = undefined; throw error; })).then((module) => module.accountingBankAccountsGet(...args).$inspect() ), )) as typeof import("../funcs/accountingBankAccountsGet.js").accountingBankAccountsGet; let accountingBankAccountsUpdate$module: | Promise | undefined; const accountingBankAccountsUpdate = (( ...args: Parameters< typeof import("../funcs/accountingBankAccountsUpdate.js").accountingBankAccountsUpdate > ) => new APIPromise( (accountingBankAccountsUpdate$module ??= import( "../funcs/accountingBankAccountsUpdate.js" ).catch((error: unknown) => { accountingBankAccountsUpdate$module = undefined; throw error; })).then((module) => module.accountingBankAccountsUpdate(...args).$inspect() ), )) as typeof import("../funcs/accountingBankAccountsUpdate.js").accountingBankAccountsUpdate; let accountingBankAccountsDelete$module: | Promise | undefined; const accountingBankAccountsDelete = (( ...args: Parameters< typeof import("../funcs/accountingBankAccountsDelete.js").accountingBankAccountsDelete > ) => new APIPromise( (accountingBankAccountsDelete$module ??= import( "../funcs/accountingBankAccountsDelete.js" ).catch((error: unknown) => { accountingBankAccountsDelete$module = undefined; throw error; })).then((module) => module.accountingBankAccountsDelete(...args).$inspect() ), )) as typeof import("../funcs/accountingBankAccountsDelete.js").accountingBankAccountsDelete; export class BankAccounts extends ClientSDK { /** * List Bank Accounts * * @remarks * List Bank Accounts */ async list( request: operations.AccountingBankAccountsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingBankAccountsAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingBankAccountsList( this, request, options, )); } /** * Create Bank Account * * @remarks * Create Bank Account */ async create( request: operations.AccountingBankAccountsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBankAccountsCreate( this, request, options, )); } /** * Get Bank Account * * @remarks * Get Bank Account */ async get( request: operations.AccountingBankAccountsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBankAccountsGet( this, request, options, )); } /** * Update Bank Account * * @remarks * Update Bank Account */ async update( request: operations.AccountingBankAccountsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBankAccountsUpdate( this, request, options, )); } /** * Delete Bank Account * * @remarks * Delete Bank Account */ async delete( request: operations.AccountingBankAccountsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBankAccountsDelete( this, request, options, )); } }