/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { threeDsScenariosCreate } from "../funcs/threeDsScenariosCreate.js"; import { threeDsScenariosDelete } from "../funcs/threeDsScenariosDelete.js"; import { threeDsScenariosList } from "../funcs/threeDsScenariosList.js"; import { threeDsScenariosUpdate } from "../funcs/threeDsScenariosUpdate.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"; export class ThreeDsScenarios extends ClientSDK { /** * Create a 3DS scenario * * @remarks * Create a new 3DS scenario for a merchant account. Only available in sandbox environments. */ async create( threeDSecureScenarioCreate: components.ThreeDSecureScenarioCreate, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(threeDsScenariosCreate( this, threeDSecureScenarioCreate, merchantAccountId, options, )); } /** * List 3DS scenario * * @remarks * List all 3DS scenarios for a merchant account. Only available in sandbox environments. */ async list( cursor?: string | null | undefined, limit?: number | undefined, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(threeDsScenariosList( this, cursor, limit, merchantAccountId, options, )); } /** * Update a 3DS scenario * * @remarks * Update a 3DS scenario. Only available in sandbox environments. */ async update( threeDSecureScenarioUpdate: components.ThreeDSecureScenarioUpdate, threeDsScenarioId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(threeDsScenariosUpdate( this, threeDSecureScenarioUpdate, threeDsScenarioId, merchantAccountId, options, )); } /** * Delete a 3DS scenario * * @remarks * Removes a 3DS scenario from our system. Only available in sandbox environments. */ async delete( threeDsScenarioId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(threeDsScenariosDelete( this, threeDsScenarioId, merchantAccountId, options, )); } }