/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { paymentServiceDefinitionsGet } from "../funcs/paymentServiceDefinitionsGet.js"; import { paymentServiceDefinitionsList } from "../funcs/paymentServiceDefinitionsList.js"; import { paymentServiceDefinitionsSession } from "../funcs/paymentServiceDefinitionsSession.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 PaymentServiceDefinitions extends ClientSDK { /** * List payment service definitions * * @remarks * List the definitions of each payment service that can be configured. */ async list( cursor?: string | null | undefined, limit?: number | undefined, options?: RequestOptions, ): Promise< PageIterator< operations.ListPaymentServiceDefinitionsResponse, { cursor: string } > > { return unwrapResultIterator(paymentServiceDefinitionsList( this, cursor, limit, options, )); } /** * Get a payment service definition * * @remarks * Get the definition of a payment service that can be configured. */ async get( paymentServiceDefinitionId: string, options?: RequestOptions, ): Promise { return unwrapAsync(paymentServiceDefinitionsGet( this, paymentServiceDefinitionId, options, )); } /** * Create a session for a payment service definition * * @remarks * Creates a session for a payment service that supports sessions. */ async session( requestBody: { [k: string]: any }, paymentServiceDefinitionId: string, options?: RequestOptions, ): Promise { return unwrapAsync(paymentServiceDefinitionsSession( this, requestBody, paymentServiceDefinitionId, options, )); } }