/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountingPaymentsCreate } from "../funcs/accountingPaymentsCreate.js"; import { accountingPaymentsCreateBatch } from "../funcs/accountingPaymentsCreateBatch.js"; import { accountingPaymentsDelete } from "../funcs/accountingPaymentsDelete.js"; import { accountingPaymentsGet } from "../funcs/accountingPaymentsGet.js"; import { accountingPaymentsList } from "../funcs/accountingPaymentsList.js"; import { accountingPaymentsUpdate } from "../funcs/accountingPaymentsUpdate.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 Payments extends ClientSDK { /** * List Payments * * @remarks * List Payments */ async list( request: operations.AccountingPaymentsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingPaymentsList( this, request, options, )); } /** * Create Payment * * @remarks * Create Payment */ async create( request: operations.AccountingPaymentsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentsCreate( this, request, options, )); } /** * Get Payment * * @remarks * Get Payment */ async get( request: operations.AccountingPaymentsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentsGet( this, request, options, )); } /** * Update Payment * * @remarks * Update Payment */ async update( request: operations.AccountingPaymentsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentsUpdate( this, request, options, )); } /** * Delete Payment * * @remarks * Delete Payment */ async delete( request: operations.AccountingPaymentsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentsDelete( this, request, options, )); } /** * Create Payments in batch * * @remarks * Create multiple payments 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.AccountingPaymentsBatchAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingPaymentsCreateBatch( this, request, options, )); } }