/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { merchantAccountsCreate } from "../funcs/merchantAccountsCreate.js"; import { merchantAccountsGet } from "../funcs/merchantAccountsGet.js"; import { merchantAccountsList } from "../funcs/merchantAccountsList.js"; import { merchantAccountsUpdate } from "../funcs/merchantAccountsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; import { ThreeDsConfiguration } from "./threedsconfiguration.js"; export class MerchantAccounts extends ClientSDK { private _threeDsConfiguration?: ThreeDsConfiguration; get threeDsConfiguration(): ThreeDsConfiguration { return (this._threeDsConfiguration ??= new ThreeDsConfiguration( this._options, )); } /** * List all merchant accounts * * @remarks * List all merchant accounts in an instance. */ async list( cursor?: string | null | undefined, limit?: number | undefined, search?: string | null | undefined, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(merchantAccountsList( this, cursor, limit, search, options, )); } /** * Create a merchant account * * @remarks * Create a new merchant account in an instance. */ async create( request: components.MerchantAccountCreate, options?: RequestOptions, ): Promise { return unwrapAsync(merchantAccountsCreate( this, request, options, )); } /** * Get a merchant account * * @remarks * Get info about a merchant account in an instance. */ async get( merchantAccountId: string, options?: RequestOptions, ): Promise { return unwrapAsync(merchantAccountsGet( this, merchantAccountId, options, )); } /** * Update a merchant account * * @remarks * Update info for a merchant account in an instance. */ async update( merchantAccountUpdate: components.MerchantAccountUpdate, merchantAccountId: string, options?: RequestOptions, ): Promise { return unwrapAsync(merchantAccountsUpdate( this, merchantAccountUpdate, merchantAccountId, options, )); } }