/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountingBillCreditNotesCreate } from "../funcs/accountingBillCreditNotesCreate.js"; import { accountingBillCreditNotesCreateBatch } from "../funcs/accountingBillCreditNotesCreateBatch.js"; import { accountingBillCreditNotesDelete } from "../funcs/accountingBillCreditNotesDelete.js"; import { accountingBillCreditNotesGet } from "../funcs/accountingBillCreditNotesGet.js"; import { accountingBillCreditNotesList } from "../funcs/accountingBillCreditNotesList.js"; import { accountingBillCreditNotesUpdate } from "../funcs/accountingBillCreditNotesUpdate.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 BillCreditNotes extends ClientSDK { /** * List Bill Credit Notes * * @remarks * List Bill Credit Notes */ async list( request: operations.AccountingBillCreditNotesAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingBillCreditNotesAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingBillCreditNotesList( this, request, options, )); } /** * Create Bill Credit Note * * @remarks * Create Bill Credit Note */ async create( request: operations.AccountingBillCreditNotesAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillCreditNotesCreate( this, request, options, )); } /** * Get Bill Credit Note * * @remarks * Get Bill Credit Note */ async get( request: operations.AccountingBillCreditNotesOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillCreditNotesGet( this, request, options, )); } /** * Update Bill Credit Note * * @remarks * Update Bill Credit Note */ async update( request: operations.AccountingBillCreditNotesUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillCreditNotesUpdate( this, request, options, )); } /** * Delete Bill Credit Note * * @remarks * Delete Bill Credit Note */ async delete( request: operations.AccountingBillCreditNotesDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillCreditNotesDelete( this, request, options, )); } /** * Create Bill Credit Notes in batch * * @remarks * Create multiple bill credit notes 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.AccountingBillCreditNotesBatchAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingBillCreditNotesCreateBatch( this, request, options, )); } }