/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountingInvoicesCreate } from "../funcs/accountingInvoicesCreate.js"; import { accountingInvoicesCreateBatch } from "../funcs/accountingInvoicesCreateBatch.js"; import { accountingInvoicesDelete } from "../funcs/accountingInvoicesDelete.js"; import { accountingInvoicesGet } from "../funcs/accountingInvoicesGet.js"; import { accountingInvoicesList } from "../funcs/accountingInvoicesList.js"; import { accountingInvoicesUpdate } from "../funcs/accountingInvoicesUpdate.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 Invoices extends ClientSDK { /** * List Invoices * * @remarks * List Invoices */ async list( request: operations.AccountingInvoicesAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingInvoicesList( this, request, options, )); } /** * Create Invoice * * @remarks * Create Invoice */ async create( request: operations.AccountingInvoicesAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingInvoicesCreate( this, request, options, )); } /** * Get Invoice * * @remarks * Get Invoice */ async get( request: operations.AccountingInvoicesOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingInvoicesGet( this, request, options, )); } /** * Update Invoice * * @remarks * Update Invoice */ async update( request: operations.AccountingInvoicesUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingInvoicesUpdate( this, request, options, )); } /** * Delete Invoice * * @remarks * Delete Invoice */ async delete( request: operations.AccountingInvoicesDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingInvoicesDelete( this, request, options, )); } /** * Create Invoices in batch * * @remarks * Create multiple invoices 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.AccountingInvoicesBatchAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingInvoicesCreateBatch( this, request, options, )); } }