/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Mercoa from "../../../index.js"; export declare namespace CustomPaymentMethodSchema { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token: core.Supplier; /** Override the X-API-Version header */ xApiVersion?: "2024-08-01"; /** Additional headers to include in requests. */ headers?: Record | undefined>; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; /** Override the X-API-Version header */ xApiVersion?: "2024-08-01"; } } export declare class CustomPaymentMethodSchema { protected readonly _options: CustomPaymentMethodSchema.Options; constructor(_options: CustomPaymentMethodSchema.Options); /** * Get all custom payment method schemas * * @param {CustomPaymentMethodSchema.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.customPaymentMethodSchema.getAll() */ getAll(requestOptions?: CustomPaymentMethodSchema.RequestOptions): core.HttpResponsePromise; private __getAll; /** * Create custom payment method schema * * @param {Mercoa.CustomPaymentMethodSchemaRequest} request * @param {CustomPaymentMethodSchema.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.customPaymentMethodSchema.create({ * name: "Wire", * isSource: false, * isDestination: true, * supportedCurrencies: ["USD", "EUR"], * fields: [{ * name: "bankName", * displayName: "Bank Name", * type: "text", * optional: false * }, { * name: "recipientName", * displayName: "Recipient Name", * type: "text", * optional: false * }, { * name: "accountNumber", * displayName: "Account Number", * type: "usBankAccountNumber", * optional: false, * useAsAccountNumber: true * }, { * name: "routingNumber", * displayName: "Routing Number", * type: "usBankRoutingNumber", * optional: false * }], * estimatedProcessingTime: 0, * maxAmount: 100000, * minAmount: 1 * }) * * @example * await client.customPaymentMethodSchema.create({ * name: "Check", * isSource: false, * isDestination: true, * supportedCurrencies: ["USD"], * fields: [{ * name: "payToTheOrderOf", * displayName: "Pay To The Order Of", * type: "text", * optional: false * }, { * name: "accountNumber", * displayName: "Account Number", * type: "usBankAccountNumber", * optional: false, * useAsAccountNumber: true * }, { * name: "routingNumber", * displayName: "Routing Number", * type: "usBankRoutingNumber", * optional: false * }, { * name: "address", * displayName: "Address", * type: "address", * optional: false * }], * estimatedProcessingTime: 7, * maxAmount: 50000, * minAmount: 1 * }) */ create(request: Mercoa.CustomPaymentMethodSchemaRequest, requestOptions?: CustomPaymentMethodSchema.RequestOptions): core.HttpResponsePromise; private __create; /** * Update custom payment method schema * * @param {Mercoa.CustomPaymentMethodSchemaId} schemaId * @param {Mercoa.CustomPaymentMethodSchemaRequest} request * @param {CustomPaymentMethodSchema.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.customPaymentMethodSchema.update("cpms_14f78dcd-4614-426e-a37a-7af262431d41", { * name: "Check", * isSource: false, * isDestination: true, * supportedCurrencies: ["USD"], * fields: [{ * name: "payToTheOrderOf", * displayName: "Pay To The Order Of", * type: "text", * optional: false * }, { * name: "accountNumber", * displayName: "Account Number", * type: "usBankAccountNumber", * optional: false, * useAsAccountNumber: true * }, { * name: "routingNumber", * displayName: "Routing Number", * type: "usBankRoutingNumber", * optional: false * }, { * name: "address", * displayName: "Address", * type: "address", * optional: false * }], * estimatedProcessingTime: 7, * maxAmount: 50000, * minAmount: 1 * }) * * @example * await client.customPaymentMethodSchema.update("cpms_14f78dcd-4614-426e-a37a-7af262431d41", { * name: "Wire", * isSource: false, * isDestination: true, * supportedCurrencies: ["USD", "EUR"], * fields: [{ * name: "bankName", * displayName: "Bank Name", * type: "text", * optional: false * }, { * name: "recipientName", * displayName: "Recipient Name", * type: "text", * optional: false * }, { * name: "accountNumber", * displayName: "Account Number", * type: "usBankAccountNumber", * optional: false, * useAsAccountNumber: true * }, { * name: "routingNumber", * displayName: "Routing Number", * type: "usBankRoutingNumber", * optional: false * }], * estimatedProcessingTime: 0, * maxAmount: 100000, * minAmount: 1 * }) */ update(schemaId: Mercoa.CustomPaymentMethodSchemaId, request: Mercoa.CustomPaymentMethodSchemaRequest, requestOptions?: CustomPaymentMethodSchema.RequestOptions): core.HttpResponsePromise; private __update; /** * Get custom payment method schema * * @param {Mercoa.CustomPaymentMethodSchemaId} schemaId * @param {CustomPaymentMethodSchema.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.customPaymentMethodSchema.get("cpms_14f78dcd-4614-426e-a37a-7af262431d41") */ get(schemaId: Mercoa.CustomPaymentMethodSchemaId, requestOptions?: CustomPaymentMethodSchema.RequestOptions): core.HttpResponsePromise; private __get; /** * Delete custom payment method schema. Schema that have been used in an invoice cannot be deleted. * * @param {Mercoa.CustomPaymentMethodSchemaId} schemaId * @param {CustomPaymentMethodSchema.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.customPaymentMethodSchema.delete("cpms_14f78dcd-4614-426e-a37a-7af262431d41") */ delete(schemaId: Mercoa.CustomPaymentMethodSchemaId, requestOptions?: CustomPaymentMethodSchema.RequestOptions): core.HttpResponsePromise; private __delete; protected _getAuthorizationHeader(): Promise; }