/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountingLedgerAccountsCreate } from "../funcs/accountingLedgerAccountsCreate.js"; import { accountingLedgerAccountsCreateBatch } from "../funcs/accountingLedgerAccountsCreateBatch.js"; import { accountingLedgerAccountsDelete } from "../funcs/accountingLedgerAccountsDelete.js"; import { accountingLedgerAccountsGet } from "../funcs/accountingLedgerAccountsGet.js"; import { accountingLedgerAccountsList } from "../funcs/accountingLedgerAccountsList.js"; import { accountingLedgerAccountsUpdate } from "../funcs/accountingLedgerAccountsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class LedgerAccounts extends ClientSDK { /** * List Ledger Accounts * * @remarks * List Ledger Accounts */ async list( request: operations.AccountingLedgerAccountsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingLedgerAccountsAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingLedgerAccountsList( this, request, options, )); } /** * Create Ledger Account * * @remarks * Create Ledger Account */ async create( request: operations.AccountingLedgerAccountsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLedgerAccountsCreate( this, request, options, )); } /** * Get Ledger Account * * @remarks * Get Ledger Account */ async get( request: operations.AccountingLedgerAccountsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLedgerAccountsGet( this, request, options, )); } /** * Update Ledger Account * * @remarks * Update Ledger Account */ async update( request: operations.AccountingLedgerAccountsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLedgerAccountsUpdate( this, request, options, )); } /** * Delete Ledger Account * * @remarks * Delete Ledger Account */ async delete( request: operations.AccountingLedgerAccountsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLedgerAccountsDelete( this, request, options, )); } /** * Create Ledger Accounts in batch * * @remarks * Create multiple ledger accounts in a single request. Each item is processed independently, so some may be created while others fail; the response returns `200` with one result per item, in the order the items were sent. The maximum number of items accepted per request depends on the connector. */ async createBatch( request: operations.AccountingLedgerAccountsBatchAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingLedgerAccountsCreateBatch( this, request, options, )); } }