/* * 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 accountingLocationsList$module: | Promise | undefined; const accountingLocationsList = (( ...args: Parameters< typeof import("../funcs/accountingLocationsList.js").accountingLocationsList > ) => new APIPromise( (accountingLocationsList$module ??= import( "../funcs/accountingLocationsList.js" ).catch((error: unknown) => { accountingLocationsList$module = undefined; throw error; })).then((module) => module.accountingLocationsList(...args).$inspect()), )) as typeof import("../funcs/accountingLocationsList.js").accountingLocationsList; let accountingLocationsCreate$module: | Promise | undefined; const accountingLocationsCreate = (( ...args: Parameters< typeof import("../funcs/accountingLocationsCreate.js").accountingLocationsCreate > ) => new APIPromise( (accountingLocationsCreate$module ??= import( "../funcs/accountingLocationsCreate.js" ).catch((error: unknown) => { accountingLocationsCreate$module = undefined; throw error; })).then((module) => module.accountingLocationsCreate(...args).$inspect() ), )) as typeof import("../funcs/accountingLocationsCreate.js").accountingLocationsCreate; let accountingLocationsGet$module: | Promise | undefined; const accountingLocationsGet = (( ...args: Parameters< typeof import("../funcs/accountingLocationsGet.js").accountingLocationsGet > ) => new APIPromise( (accountingLocationsGet$module ??= import( "../funcs/accountingLocationsGet.js" ).catch((error: unknown) => { accountingLocationsGet$module = undefined; throw error; })).then((module) => module.accountingLocationsGet(...args).$inspect()), )) as typeof import("../funcs/accountingLocationsGet.js").accountingLocationsGet; let accountingLocationsUpdate$module: | Promise | undefined; const accountingLocationsUpdate = (( ...args: Parameters< typeof import("../funcs/accountingLocationsUpdate.js").accountingLocationsUpdate > ) => new APIPromise( (accountingLocationsUpdate$module ??= import( "../funcs/accountingLocationsUpdate.js" ).catch((error: unknown) => { accountingLocationsUpdate$module = undefined; throw error; })).then((module) => module.accountingLocationsUpdate(...args).$inspect() ), )) as typeof import("../funcs/accountingLocationsUpdate.js").accountingLocationsUpdate; let accountingLocationsDelete$module: | Promise | undefined; const accountingLocationsDelete = (( ...args: Parameters< typeof import("../funcs/accountingLocationsDelete.js").accountingLocationsDelete > ) => new APIPromise( (accountingLocationsDelete$module ??= import( "../funcs/accountingLocationsDelete.js" ).catch((error: unknown) => { accountingLocationsDelete$module = undefined; throw error; })).then((module) => module.accountingLocationsDelete(...args).$inspect() ), )) as typeof import("../funcs/accountingLocationsDelete.js").accountingLocationsDelete; export class Locations extends ClientSDK { /** * List Locations * * @remarks * List Locations */ async list( request: operations.AccountingLocationsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingLocationsList( this, request, options, )); } /** * Create Location * * @remarks * Create Location */ async create( request: operations.AccountingLocationsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLocationsCreate( this, request, options, )); } /** * Get Location * * @remarks * Get Location */ async get( request: operations.AccountingLocationsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLocationsGet( this, request, options, )); } /** * Update Location * * @remarks * Update Location */ async update( request: operations.AccountingLocationsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLocationsUpdate( this, request, options, )); } /** * Delete Location * * @remarks * Delete Location */ async delete( request: operations.AccountingLocationsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLocationsDelete( this, request, options, )); } }