/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; let accountingRefundsList$module: | Promise | undefined; const accountingRefundsList = (( ...args: Parameters< typeof import("../funcs/accountingRefundsList.js").accountingRefundsList > ) => new APIPromise( (accountingRefundsList$module ??= import( "../funcs/accountingRefundsList.js" ).catch((error: unknown) => { accountingRefundsList$module = undefined; throw error; })).then((module) => module.accountingRefundsList(...args).$inspect()), )) as typeof import("../funcs/accountingRefundsList.js").accountingRefundsList; let accountingRefundsCreate$module: | Promise | undefined; const accountingRefundsCreate = (( ...args: Parameters< typeof import("../funcs/accountingRefundsCreate.js").accountingRefundsCreate > ) => new APIPromise( (accountingRefundsCreate$module ??= import( "../funcs/accountingRefundsCreate.js" ).catch((error: unknown) => { accountingRefundsCreate$module = undefined; throw error; })).then((module) => module.accountingRefundsCreate(...args).$inspect()), )) as typeof import("../funcs/accountingRefundsCreate.js").accountingRefundsCreate; let accountingRefundsGet$module: | Promise | undefined; const accountingRefundsGet = (( ...args: Parameters< typeof import("../funcs/accountingRefundsGet.js").accountingRefundsGet > ) => new APIPromise( (accountingRefundsGet$module ??= import( "../funcs/accountingRefundsGet.js" ).catch((error: unknown) => { accountingRefundsGet$module = undefined; throw error; })).then((module) => module.accountingRefundsGet(...args).$inspect()), )) as typeof import("../funcs/accountingRefundsGet.js").accountingRefundsGet; let accountingRefundsUpdate$module: | Promise | undefined; const accountingRefundsUpdate = (( ...args: Parameters< typeof import("../funcs/accountingRefundsUpdate.js").accountingRefundsUpdate > ) => new APIPromise( (accountingRefundsUpdate$module ??= import( "../funcs/accountingRefundsUpdate.js" ).catch((error: unknown) => { accountingRefundsUpdate$module = undefined; throw error; })).then((module) => module.accountingRefundsUpdate(...args).$inspect()), )) as typeof import("../funcs/accountingRefundsUpdate.js").accountingRefundsUpdate; let accountingRefundsDelete$module: | Promise | undefined; const accountingRefundsDelete = (( ...args: Parameters< typeof import("../funcs/accountingRefundsDelete.js").accountingRefundsDelete > ) => new APIPromise( (accountingRefundsDelete$module ??= import( "../funcs/accountingRefundsDelete.js" ).catch((error: unknown) => { accountingRefundsDelete$module = undefined; throw error; })).then((module) => module.accountingRefundsDelete(...args).$inspect()), )) as typeof import("../funcs/accountingRefundsDelete.js").accountingRefundsDelete; export class Refunds extends ClientSDK { /** * List Refunds * * @remarks * List Refunds */ async list( request: operations.AccountingRefundsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingRefundsList( this, request, options, )); } /** * Create Refund * * @remarks * Create Refund */ async create( request: operations.AccountingRefundsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingRefundsCreate( this, request, options, )); } /** * Get Refund * * @remarks * Get Refund */ async get( request: operations.AccountingRefundsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingRefundsGet( this, request, options, )); } /** * Update Refund * * @remarks * Update Refund */ async update( request: operations.AccountingRefundsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingRefundsUpdate( this, request, options, )); } /** * Delete Refund * * @remarks * Delete Refund */ async delete( request: operations.AccountingRefundsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingRefundsDelete( this, request, options, )); } }