/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { feePlansCreateFeePlanAgreements } from "../funcs/feePlansCreateFeePlanAgreements.js"; import { feePlansGetResidual } from "../funcs/feePlansGetResidual.js"; import { feePlansListFeePlanAgreements } from "../funcs/feePlansListFeePlanAgreements.js"; import { feePlansListFeePlans } from "../funcs/feePlansListFeePlans.js"; import { feePlansListFeeRevenue } from "../funcs/feePlansListFeeRevenue.js"; import { feePlansListFeesFetch } from "../funcs/feePlansListFeesFetch.js"; import { feePlansListPartnerPricingAgreements } from "../funcs/feePlansListPartnerPricingAgreements.js"; import { feePlansListResidualFees } from "../funcs/feePlansListResidualFees.js"; import { feePlansListResiduals } from "../funcs/feePlansListResiduals.js"; import { feePlansRetrieveFees } from "../funcs/feePlansRetrieveFees.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class FeePlans extends ClientSDK { /** * List all fee plan agreements associated with an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async listFeePlanAgreements( request: operations.ListFeePlanAgreementsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListFeePlanAgreements( this, request, options, )); } /** * Creates the subscription of a fee plan to a merchant account. Merchants are required to accept the fee plan terms prior to activation. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.write` scope. */ async createFeePlanAgreements( request: operations.CreateFeePlanAgreementsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansCreateFeePlanAgreements( this, request, options, )); } /** * List all fee plans available for use by an account. This is intended to be used by an account when * selecting a fee plan to apply to a connected account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async listFeePlans( request: operations.ListFeePlansRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListFeePlans( this, request, options, )); } /** * Used by a partner. Retrieve revenue generated from merchant fees. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async listFeeRevenue( request: operations.ListFeeRevenueRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListFeeRevenue( this, request, options, )); } /** * Retrieve fees assessed to an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.read` scope. */ async retrieveFees( request: operations.RetrieveFeesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansRetrieveFees( this, request, options, )); } /** * List fees associated with an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.read` scope. */ async listFeesFetch( request: operations.ListFeesFetchRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListFeesFetch( this, request, options, )); } /** * List all partner pricing agreements associated with an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async listPartnerPricingAgreements( request: operations.ListPartnerPricingAgreementsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListPartnerPricingAgreements( this, request, options, )); } /** * List all residuals associated with an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async listResiduals( request: operations.ListResidualsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListResiduals( this, request, options, )); } /** * Get a residual associated with an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async getResidual( request: operations.GetResidualRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansGetResidual( this, request, options, )); } /** * List all fees associated with a residual. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/profile.read` scope. */ async listResidualFees( request: operations.ListResidualFeesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(feePlansListResidualFees( this, request, options, )); } }