/* * 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 accountingExpensesList$module: | Promise | undefined; const accountingExpensesList = (( ...args: Parameters< typeof import("../funcs/accountingExpensesList.js").accountingExpensesList > ) => new APIPromise( (accountingExpensesList$module ??= import( "../funcs/accountingExpensesList.js" ).catch((error: unknown) => { accountingExpensesList$module = undefined; throw error; })).then((module) => module.accountingExpensesList(...args).$inspect()), )) as typeof import("../funcs/accountingExpensesList.js").accountingExpensesList; let accountingExpensesCreate$module: | Promise | undefined; const accountingExpensesCreate = (( ...args: Parameters< typeof import("../funcs/accountingExpensesCreate.js").accountingExpensesCreate > ) => new APIPromise( (accountingExpensesCreate$module ??= import( "../funcs/accountingExpensesCreate.js" ).catch((error: unknown) => { accountingExpensesCreate$module = undefined; throw error; })).then((module) => module.accountingExpensesCreate(...args).$inspect()), )) as typeof import("../funcs/accountingExpensesCreate.js").accountingExpensesCreate; let accountingExpensesGet$module: | Promise | undefined; const accountingExpensesGet = (( ...args: Parameters< typeof import("../funcs/accountingExpensesGet.js").accountingExpensesGet > ) => new APIPromise( (accountingExpensesGet$module ??= import( "../funcs/accountingExpensesGet.js" ).catch((error: unknown) => { accountingExpensesGet$module = undefined; throw error; })).then((module) => module.accountingExpensesGet(...args).$inspect()), )) as typeof import("../funcs/accountingExpensesGet.js").accountingExpensesGet; let accountingExpensesUpdate$module: | Promise | undefined; const accountingExpensesUpdate = (( ...args: Parameters< typeof import("../funcs/accountingExpensesUpdate.js").accountingExpensesUpdate > ) => new APIPromise( (accountingExpensesUpdate$module ??= import( "../funcs/accountingExpensesUpdate.js" ).catch((error: unknown) => { accountingExpensesUpdate$module = undefined; throw error; })).then((module) => module.accountingExpensesUpdate(...args).$inspect()), )) as typeof import("../funcs/accountingExpensesUpdate.js").accountingExpensesUpdate; let accountingExpensesDelete$module: | Promise | undefined; const accountingExpensesDelete = (( ...args: Parameters< typeof import("../funcs/accountingExpensesDelete.js").accountingExpensesDelete > ) => new APIPromise( (accountingExpensesDelete$module ??= import( "../funcs/accountingExpensesDelete.js" ).catch((error: unknown) => { accountingExpensesDelete$module = undefined; throw error; })).then((module) => module.accountingExpensesDelete(...args).$inspect()), )) as typeof import("../funcs/accountingExpensesDelete.js").accountingExpensesDelete; export class Expenses extends ClientSDK { /** * List Expenses * * @remarks * List Expenses */ async list( request: operations.AccountingExpensesAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingExpensesList( this, request, options, )); } /** * Create Expense * * @remarks * Create Expense */ async create( request: operations.AccountingExpensesAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpensesCreate( this, request, options, )); } /** * Get Expense * * @remarks * Get Expense */ async get( request: operations.AccountingExpensesOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpensesGet( this, request, options, )); } /** * Update Expense * * @remarks * Update Expense */ async update( request: operations.AccountingExpensesUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpensesUpdate( this, request, options, )); } /** * Delete Expense * * @remarks * Delete Expense */ async delete( request: operations.AccountingExpensesDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpensesDelete( this, request, options, )); } }