/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountingBillsCreate } from "../funcs/accountingBillsCreate.js"; import { accountingBillsCreateBatch } from "../funcs/accountingBillsCreateBatch.js"; import { accountingBillsDelete } from "../funcs/accountingBillsDelete.js"; import { accountingBillsGet } from "../funcs/accountingBillsGet.js"; import { accountingBillsList } from "../funcs/accountingBillsList.js"; import { accountingBillsUpdate } from "../funcs/accountingBillsUpdate.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 Bills extends ClientSDK { /** * List Bills * * @remarks * List Bills */ async list( request: operations.AccountingBillsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingBillsList( this, request, options, )); } /** * Create Bill * * @remarks * Create Bill */ async create( request: operations.AccountingBillsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillsCreate( this, request, options, )); } /** * Get Bill * * @remarks * Get Bill */ async get( request: operations.AccountingBillsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillsGet( this, request, options, )); } /** * Update Bill * * @remarks * Update Bill */ async update( request: operations.AccountingBillsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillsUpdate( this, request, options, )); } /** * Delete Bill * * @remarks * Delete Bill */ async delete( request: operations.AccountingBillsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillsDelete( this, request, options, )); } /** * Create Bills in batch * * @remarks * Create multiple bills 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.AccountingBillsBatchAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillsCreateBatch( this, request, options, )); } }