diff --git a/api.ts b/api.ts index 47bf7e9..a21a2f7 100644 --- a/api.ts +++ b/api.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * MX Platform API - * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/). * - * The version of the OpenAPI document: 0.1.0 + * The version of the OpenAPI document: 20111101 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,6 +23,335 @@ import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; +/** + * + * @export + * @interface ACHResponse + */ +export interface ACHResponse { + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'account_guid'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'account_number_last_four'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'account_type'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'ach_initiated_at'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'client_guid'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'corrected_account_number'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'corrected_routing_number'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'created_at'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'guid'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'id'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'institution_guid'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'investigation_notes'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'member_guid'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'processing_errors'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'resolution_code'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'resolution_detail'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'resolved_status_at'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'return_code'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'return_notes'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'return_account_number'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'return_routing_number'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'return_status'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'returned_at'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'sec_code'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'started_processing_at'?: string | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'submitted_at'?: string | null; + /** + * + * @type {number} + * @memberof ACHResponse + */ + 'transaction_amount'?: number | null; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof ACHResponse + */ + 'user_guid'?: string; +} +/** + * + * @export + * @interface ACHReturnCreateRequest + */ +export interface ACHReturnCreateRequest { + /** + * The unique identifier for the account associated with the transaction. Defined by MX. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'account_guid': string; + /** + * The last 4 digits of the account number used for the transaction by the Originating Depository Financial Institution (ODFI). + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'account_number_last_four'?: string; + /** + * The date and time when the transaction was initiated by the Originating Depository Financial Institution (ODFI) in ISO 8601 format without timestamp. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'ach_initiated_at'?: string; + /** + * The account number correction reported by the RDFI. Populate only if the `resolution_code` is `NOTICE_OF_CHANGE`. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'corrected_account_number'?: string; + /** + * The routing number correction reported by the RDFI. Populate only if the `resolution_code` is `NOTICE_OF_CHANGE`. Must be a valid 9-digit routing number format. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'corrected_routing_number'?: string; + /** + * Client-defined identifier for this specific return submission. Allows you to track and reference you requests. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'id': string; + /** + * The unique identifier for the member associated with the transaction. Defined by MX. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'member_guid': string; + /** + * Incorrect account number used in the ACH transaction. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'return_account_number'?: string; + /** + * The associated ACH return code and notice of change code (for example, R02, R03, R04, R05, R20, NOC). See [Return Codes](/api-reference/platform-api/reference/ach-return-fields#return-codes) for a complete list. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'return_code': string; + /** + * Notes that you set to inform MX on internal ACH processing. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'return_notes'?: string; + /** + * Incorrect routing number used in the ACH transaction. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'return_routing_number'?: string; + /** + * The date and time when the return was reported by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'returned_at'?: string; + /** + * The SEC code (Standard Entry Class Code)–a three-letter code describing how a payment was authorized (for example, `WEB`). See [SEC Codes](/api-reference/platform-api/reference/ach-return-fields#sec-codes) for a complete list. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'sec_code'?: string; + /** + * The amount of the transaction. + * @type {number} + * @memberof ACHReturnCreateRequest + */ + 'transaction_amount'?: number; + /** + * The transaction amount range, used for impact assessment. + * @type {number} + * @memberof ACHReturnCreateRequest + */ + 'transaction_amount_range'?: number; + /** + * MX-defined identifier for the user associated with the ACH return. + * @type {string} + * @memberof ACHReturnCreateRequest + */ + 'user_guid': string; +} +/** + * + * @export + * @interface ACHReturnCreateRequestBody + */ +export interface ACHReturnCreateRequestBody { + /** + * + * @type {ACHReturnCreateRequest} + * @memberof ACHReturnCreateRequestBody + */ + 'ach_return'?: ACHReturnCreateRequest; +} +/** + * + * @export + * @interface ACHReturnResponseBody + */ +export interface ACHReturnResponseBody { + /** + * + * @type {ACHResponse} + * @memberof ACHReturnResponseBody + */ + 'ach_return'?: ACHResponse; +} +/** + * + * @export + * @interface ACHReturnsResponseBody + */ +export interface ACHReturnsResponseBody { + /** + * + * @type {Array} + * @memberof ACHReturnsResponseBody + */ + 'ach_returns'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof ACHReturnsResponseBody + */ + 'pagination'?: PaginationResponse; +} /** * * @export @@ -198,19 +527,19 @@ export interface AccountNumberResponse { * @type {string} * @memberof AccountNumberResponse */ - 'loan_guarantor'?: string | null; + 'institution_number'?: string | null; /** * * @type {string} * @memberof AccountNumberResponse */ - 'loan_reference_number'?: string | null; + 'loan_guarantor'?: string | null; /** * * @type {string} * @memberof AccountNumberResponse */ - 'institution_number'?: string | null; + 'loan_reference_number'?: string | null; /** * * @type {string} @@ -1142,127 +1471,127 @@ export interface AccountResponseBody { */ export interface AccountUpdateRequest { /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'account_subtype'?: string; /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'account_type'?: string; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'apr'?: number; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'apy'?: number; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'available_balance'?: number; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'balance'?: number; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'cash_surrender_value'?: number; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'credit_limit'?: number; /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'currency_code'?: string; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'death_benefit'?: number; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'interest_rate'?: number; /** - * + * Can be updated for manual accounts and aggregated accounts. * @type {boolean} * @memberof AccountUpdateRequest */ 'is_business'?: boolean; /** - * + * Can only be updated for manual accounts. * @type {boolean} * @memberof AccountUpdateRequest */ 'is_closed'?: boolean; /** - * + * Can be updated for manual accounts and aggregated accounts. * @type {boolean} * @memberof AccountUpdateRequest */ 'is_hidden'?: boolean; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'loan_amount'?: number; /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'metadata'?: string; /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'name'?: string; /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'nickname'?: string; /** - * + * Can only be updated for manual accounts. * @type {number} * @memberof AccountUpdateRequest */ 'original_balance'?: number; /** - * + * Can only be updated for manual accounts. * @type {string} * @memberof AccountUpdateRequest */ 'property_type'?: string; /** - * + * If set to true, prevents sending an account webhook for the update if that webhook type is enabled for you. * @type {boolean} * @memberof AccountUpdateRequest */ @@ -1347,10 +1676,10 @@ export interface AuthorizationCodeResponse { export interface AuthorizationCodeResponseBody { /** * - * @type {Array} + * @type {AuthorizationCodeResponse} * @memberof AuthorizationCodeResponseBody */ - 'authorization_code'?: Array; + 'authorization_code'?: AuthorizationCodeResponse; } /** * @@ -1598,7 +1927,7 @@ export interface CategoryCreateRequest { * @type {string} * @memberof CategoryCreateRequest */ - 'parent_guid'?: string; + 'parent_guid': string; } /** * @@ -1620,7 +1949,7 @@ export interface CategoryCreateRequestBody { */ export interface CategoryResponse { /** - * + * Category creation date-time. * @type {string} * @memberof CategoryResponse */ @@ -1823,6 +2152,12 @@ export interface ConnectWidgetRequest { * @memberof ConnectWidgetRequest */ 'disable_institution_search'?: boolean; + /** + * This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, the widget will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. + * @type {boolean} + * @memberof ConnectWidgetRequest + */ + 'enable_app2app'?: boolean; /** * * @type {boolean} @@ -2015,13 +2350,13 @@ export interface CreditCardProduct { * @type {number} * @memberof CreditCardProduct */ - 'duration_of_introductory_rate_on_balance_transfer'?: number; + 'duration_of_introductory_rate_on_balance_transfer'?: number | null; /** * * @type {number} * @memberof CreditCardProduct */ - 'duration_of_introductory_rate_on_purchases'?: number; + 'duration_of_introductory_rate_on_purchases'?: number | null; /** * * @type {string} @@ -2649,178 +2984,19 @@ export interface GoalsResponseBody { /** * * @export - * @interface HoldingResponse + * @interface ImageOptionResponse */ -export interface HoldingResponse { +export interface ImageOptionResponse { /** * * @type {string} - * @memberof HoldingResponse + * @memberof ImageOptionResponse */ - 'account_guid'?: string | null; + 'data_uri'?: string | null; /** * - * @type {number} - * @memberof HoldingResponse - */ - 'cost_basis'?: number | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'created_at'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'currency_code'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'cusip'?: string | null; - /** - * - * @type {number} - * @memberof HoldingResponse - */ - 'daily_change'?: number | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'guid'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'holding_type'?: string | null; - /** - * - * @type {number} - * @memberof HoldingResponse - */ - 'holding_type_id'?: number | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'id'?: string | null; - /** - * - * @type {number} - * @memberof HoldingResponse - */ - 'market_value'?: number | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'member_guid'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'metadata'?: string | null; - /** - * - * @type {number} - * @memberof HoldingResponse - */ - 'purchase_price'?: number | null; - /** - * - * @type {number} - * @memberof HoldingResponse - */ - 'shares'?: number | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'symbol'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'updated_at'?: string | null; - /** - * - * @type {string} - * @memberof HoldingResponse - */ - 'user_guid'?: string | null; -} -/** - * - * @export - * @interface HoldingResponseBody - */ -export interface HoldingResponseBody { - /** - * - * @type {HoldingResponse} - * @memberof HoldingResponseBody - */ - 'holding'?: HoldingResponse; -} -/** - * - * @export - * @interface HoldingsResponseBody - */ -export interface HoldingsResponseBody { - /** - * - * @type {Array} - * @memberof HoldingsResponseBody - */ - 'holdings'?: Array; - /** - * - * @type {PaginationResponse} - * @memberof HoldingsResponseBody - */ - 'pagination'?: PaginationResponse; -} -/** - * - * @export - * @interface ImageOptionResponse - */ -export interface ImageOptionResponse { - /** - * - * @type {string} - * @memberof ImageOptionResponse - */ - 'data_uri'?: string | null; - /** - * - * @type {string} - * @memberof ImageOptionResponse - */ - 'guid'?: string | null; - /** - * - * @type {string} - * @memberof ImageOptionResponse + * @type {string} + * @memberof ImageOptionResponse */ 'label'?: string | null; /** @@ -2878,6 +3054,12 @@ export interface InsightResponse { * @memberof InsightResponse */ 'has_associated_accounts'?: boolean | null; + /** + * + * @type {boolean} + * @memberof InsightResponse + */ + 'has_associated_categories'?: boolean | null; /** * * @type {boolean} @@ -2965,10 +3147,10 @@ export interface InsightResponse { export interface InsightResponseBody { /** * - * @type {Array} + * @type {InsightResponse} * @memberof InsightResponseBody */ - 'insight'?: Array; + 'insight'?: InsightResponse; } /** * @@ -2989,6 +3171,19 @@ export interface InsightUpdateRequest { */ 'is_dismissed'?: boolean; } +/** + * + * @export + * @interface InsightUpdateRequestBody + */ +export interface InsightUpdateRequestBody { + /** + * + * @type {InsightUpdateRequest} + * @memberof InsightUpdateRequestBody + */ + 'insight'?: InsightUpdateRequest; +} /** * * @export @@ -3038,6 +3233,24 @@ export interface InstitutionResponse { * @memberof InstitutionResponse */ 'instructional_text'?: string | null; + /** + * An array of instructional steps that may contain html elements. + * @type {Array} + * @memberof InstitutionResponse + */ + 'instructional_text_steps'?: Array | null; + /** + * + * @type {boolean} + * @memberof InstitutionResponse + */ + 'is_disabled_by_client'?: boolean | null; + /** + * + * @type {string} + * @memberof InstitutionResponse + */ + 'iso_country_code'?: string; /** * * @type {string} @@ -3140,183 +3353,463 @@ export interface InstitutionsResponseBody { /** * * @export - * @interface ManagedAccountCreateRequest + * @interface InvestmentHoldingResponse */ -export interface ManagedAccountCreateRequest { +export interface InvestmentHoldingResponse { /** * * @type {string} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'account_number'?: string; + 'account_guid'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'apr'?: number; + 'cost_basis'?: number | null; /** * - * @type {number} - * @memberof ManagedAccountCreateRequest + * @type {string} + * @memberof InvestmentHoldingResponse */ - 'apy'?: number; + 'coupon_yield'?: string | null; /** * - * @type {number} - * @memberof ManagedAccountCreateRequest + * @type {string} + * @memberof InvestmentHoldingResponse */ - 'available_balance'?: number; + 'currency_code'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'available_credit'?: number; + 'current_price'?: number | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'balance': number; + 'daily_change'?: number | null; /** * - * @type {number} - * @memberof ManagedAccountCreateRequest + * @type {string} + * @memberof InvestmentHoldingResponse */ - 'cash_surrender_value'?: number; + 'description'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'expiration'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'credit_limit'?: number; + 'face_value'?: number | null; /** * * @type {string} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'currency_code'?: string; + 'frequency'?: string | null; /** * - * @type {number} - * @memberof ManagedAccountCreateRequest + * @type {string} + * @memberof InvestmentHoldingResponse */ - 'day_payment_is_due'?: number; + 'guid'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'death_benefit'?: number; + 'market_value'?: number | null; /** * * @type {string} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'id'?: string; + 'maturity_date'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'interest_rate'?: number; + 'percentage_change'?: number | null; /** * - * @type {boolean} - * @memberof ManagedAccountCreateRequest + * @type {number} + * @memberof InvestmentHoldingResponse */ - 'is_closed'?: boolean; + 'purchase_price'?: number | null; /** * - * @type {boolean} - * @memberof ManagedAccountCreateRequest + * @type {string} + * @memberof InvestmentHoldingResponse */ - 'is_hidden'?: boolean; + 'quantity'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'last_payment'?: number; + 'rate'?: number | null; /** * - * @type {string} - * @memberof ManagedAccountCreateRequest + * @type {number} + * @memberof InvestmentHoldingResponse */ - 'last_payment_at'?: string; + 'strike_price'?: number | null; /** * - * @type {number} - * @memberof ManagedAccountCreateRequest + * @type {string} + * @memberof InvestmentHoldingResponse */ - 'loan_amount'?: number; + 'symbol'?: string | null; /** * * @type {string} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'matures_on'?: string; + 'term'?: string | null; /** * - * @type {string} - * @memberof ManagedAccountCreateRequest + * @type {number} + * @memberof InvestmentHoldingResponse */ - 'metadata'?: string; + 'today_ugl_amount'?: number | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'minimum_balance'?: number; + 'today_ugl_percentage'?: number | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'minimum_payment'?: number; + 'total_ugl_amount'?: number | null; /** * - * @type {string} - * @memberof ManagedAccountCreateRequest + * @type {number} + * @memberof InvestmentHoldingResponse */ - 'name': string; + 'total_ugl_percentage'?: number | null; /** * - * @type {string} - * @memberof ManagedAccountCreateRequest + * @type {number} + * @memberof InvestmentHoldingResponse */ - 'nickname'?: string; + 'unvested_quantity'?: number | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'original_balance'?: number; + 'unvested_value'?: number | null; /** * * @type {string} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'payment_due_at'?: string; + 'user_guid'?: string | null; /** * * @type {number} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'payoff_balance'?: number; + 'vested_quantity'?: number | null; /** * - * @type {string} - * @memberof ManagedAccountCreateRequest + * @type {number} + * @memberof InvestmentHoldingResponse */ - 'routing_number'?: string; + 'vested_value'?: number | null; /** * * @type {string} - * @memberof ManagedAccountCreateRequest + * @memberof InvestmentHoldingResponse */ - 'started_on'?: string; + 'created_at'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'current_price_as_of'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'issue_date'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'vesting_start_date'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'vesting_end_date'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'put_or_call'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'holding_type'?: string | null; + /** + * + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'term_unit'?: string | null; +} +/** + * + * @export + * @interface InvestmentHoldingResponseBody + */ +export interface InvestmentHoldingResponseBody { + /** + * + * @type {InvestmentHoldingResponse} + * @memberof InvestmentHoldingResponseBody + */ + 'investment_holding'?: InvestmentHoldingResponse; +} +/** + * + * @export + * @interface InvestmentHoldingsDeactivation + */ +export interface InvestmentHoldingsDeactivation { + /** + * + * @type {any} + * @memberof InvestmentHoldingsDeactivation + */ + 'message'?: any; + /** + * + * @type {any} + * @memberof InvestmentHoldingsDeactivation + */ + 'status'?: any; +} +/** + * + * @export + * @interface InvestmentHoldingsResponseBody + */ +export interface InvestmentHoldingsResponseBody { + /** + * + * @type {Array} + * @memberof InvestmentHoldingsResponseBody + */ + 'investment_holdings'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof InvestmentHoldingsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface ManagedAccountCreateRequest + */ +export interface ManagedAccountCreateRequest { + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'account_number'?: string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'apr'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'apy'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'available_balance'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'available_credit'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'balance': number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'cash_surrender_value'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'credit_limit'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'currency_code'?: string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'day_payment_is_due'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'death_benefit'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'id': string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'interest_rate'?: number; + /** + * + * @type {boolean} + * @memberof ManagedAccountCreateRequest + */ + 'is_closed'?: boolean; + /** + * + * @type {boolean} + * @memberof ManagedAccountCreateRequest + */ + 'is_hidden'?: boolean; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'last_payment'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'last_payment_at'?: string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'loan_amount'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'matures_on'?: string; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'metadata'?: string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'minimum_balance'?: number; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'minimum_payment'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'name': string; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'nickname'?: string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'original_balance'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'payment_due_at'?: string; + /** + * + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'payoff_balance'?: number; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'routing_number'?: string; + /** + * + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'started_on'?: string; /** * * @type {string} @@ -3738,7 +4231,7 @@ export interface ManagedTransactionCreateRequest { * @type {string} * @memberof ManagedTransactionCreateRequest */ - 'posted_at'?: string; + 'posted_at': string; /** * * @type {string} @@ -3959,21 +4452,35 @@ export interface MemberCreateRequest { * @memberof MemberCreateRequest */ 'skip_aggregation'?: boolean; -} -/** - * - * @export - * @interface MemberCreateRequestBody - */ -export interface MemberCreateRequestBody { /** - * - * @type {string} - * @memberof MemberCreateRequestBody + * The use case associated with the member. Valid values are `PFM` and/or `MONEY_MOVEMENT`. Only set this if you\'ve met with MX and have opted in to using this field. + * @type {Array} + * @memberof MemberCreateRequest */ - 'client_redirect_url'?: string; + 'use_cases'?: Array; +} + +export const MemberCreateRequestUseCasesEnum = { + MoneyMovement: 'MONEY_MOVEMENT', + Pfm: 'PFM' +} as const; + +export type MemberCreateRequestUseCasesEnum = typeof MemberCreateRequestUseCasesEnum[keyof typeof MemberCreateRequestUseCasesEnum]; + +/** + * + * @export + * @interface MemberCreateRequestBody + */ +export interface MemberCreateRequestBody { /** * + * @type {string} + * @memberof MemberCreateRequestBody + */ + 'client_redirect_url'?: string; + /** + * This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, any `oauth_window_uri` generated will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. * @type {boolean} * @memberof MemberCreateRequestBody */ @@ -3997,6 +4504,31 @@ export interface MemberCreateRequestBody { */ 'ui_message_webview_url_scheme'?: string; } +/** + * + * @export + * @interface MemberElements + */ +export interface MemberElements { + /** + * + * @type {string} + * @memberof MemberElements + */ + 'account_guid'?: string; + /** + * + * @type {string} + * @memberof MemberElements + */ + 'member_guid'?: string; + /** + * + * @type {string} + * @memberof MemberElements + */ + 'user_guid'?: string; +} /** * * @export @@ -4027,12 +4559,6 @@ export interface MemberResponse { * @memberof MemberResponse */ 'connection_status_message'?: string | null; - /** - * - * @type {string} - * @memberof MemberResponse - */ - 'error'?: string | null; /** * * @type {string} @@ -4230,13 +4756,13 @@ export interface MemberStatusResponse { * @type {boolean} * @memberof MemberStatusResponse */ - 'has_processed_accounts'?: boolean | null; + 'has_processed_account_numbers'?: boolean | null; /** * * @type {boolean} * @memberof MemberStatusResponse */ - 'has_processed_account_numbers'?: boolean | null; + 'has_processed_accounts'?: boolean | null; /** * * @type {boolean} @@ -4311,7 +4837,21 @@ export interface MemberUpdateRequest { * @memberof MemberUpdateRequest */ 'skip_aggregation'?: boolean; + /** + * The use case associated with the member. Valid values are `PFM` and/or `MONEY_MOVEMENT`. Only set this if you\'ve met with MX and have opted in to using this field. + * @type {Array} + * @memberof MemberUpdateRequest + */ + 'use_cases'?: Array; } + +export const MemberUpdateRequestUseCasesEnum = { + MoneyMovement: 'MONEY_MOVEMENT', + Pfm: 'PFM' +} as const; + +export type MemberUpdateRequestUseCasesEnum = typeof MemberUpdateRequestUseCasesEnum[keyof typeof MemberUpdateRequestUseCasesEnum]; + /** * * @export @@ -4514,51 +5054,51 @@ export interface MerchantsResponseBody { /** * * @export - * @interface MicrodepositRequest + * @interface MicrodepositElements */ -export interface MicrodepositRequest { +export interface MicrodepositElements { /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'account_number': string; + 'account_name'?: string; /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'account_type': string; + 'account_number': string; /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'routing_number': string; + 'account_type': string; /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'account_name'?: string; + 'email'?: string; /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'email'?: string; + 'first_name'?: string; /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'first_name'?: string; + 'last_name'?: string; /** * * @type {string} - * @memberof MicrodepositRequest + * @memberof MicrodepositElements */ - 'last_name'?: string; + 'routing_number': string; } /** * @@ -4568,10 +5108,10 @@ export interface MicrodepositRequest { export interface MicrodepositRequestBody { /** * - * @type {MicrodepositRequest} + * @type {MicrodepositElements} * @memberof MicrodepositRequestBody */ - 'micro_deposit'?: MicrodepositRequest; + 'micro_deposit'?: MicrodepositElements; } /** * @@ -4584,98 +5124,147 @@ export interface MicrodepositResponse { * @type {string} * @memberof MicrodepositResponse */ - 'account_name'?: string; + 'error_message'?: string | null; /** * * @type {string} * @memberof MicrodepositResponse */ - 'account_number'?: string; + 'guid'?: string; /** * * @type {string} * @memberof MicrodepositResponse */ - 'account_type'?: string; + 'institution_code'?: string; /** * * @type {string} * @memberof MicrodepositResponse */ - 'email'?: string; + 'institution_name'?: string; /** * * @type {string} * @memberof MicrodepositResponse */ - 'first_name'?: string; + 'status'?: string; /** * * @type {string} * @memberof MicrodepositResponse */ - 'last_name'?: string; + 'updated_at'?: string; /** * * @type {string} * @memberof MicrodepositResponse */ - 'routing_number'?: string; + 'verified_at'?: string | null; +} +/** + * + * @export + * @interface MicrodepositResponseBody + */ +export interface MicrodepositResponseBody { + /** + * + * @type {Array} + * @memberof MicrodepositResponseBody + */ + 'micro_deposit'?: Array; +} +/** + * + * @export + * @interface MicrodepositResponseBodyMicroDepositInner + */ +export interface MicrodepositResponseBodyMicroDepositInner { /** * * @type {string} - * @memberof MicrodepositResponse + * @memberof MicrodepositResponseBodyMicroDepositInner */ - 'error_message'?: string; + 'account_name'?: string; /** * * @type {string} - * @memberof MicrodepositResponse + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'account_number': string; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'account_type': string; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'first_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'last_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'routing_number': string; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'error_message'?: string | null; + /** + * + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner */ 'guid'?: string; /** * * @type {string} - * @memberof MicrodepositResponse + * @memberof MicrodepositResponseBodyMicroDepositInner */ 'institution_code'?: string; /** * * @type {string} - * @memberof MicrodepositResponse + * @memberof MicrodepositResponseBodyMicroDepositInner */ 'institution_name'?: string; /** * * @type {string} - * @memberof MicrodepositResponse + * @memberof MicrodepositResponseBodyMicroDepositInner */ 'status'?: string; /** * * @type {string} - * @memberof MicrodepositResponse + * @memberof MicrodepositResponseBodyMicroDepositInner */ 'updated_at'?: string; /** * * @type {string} - * @memberof MicrodepositResponse - */ - 'verified_at'?: string; -} -/** - * - * @export - * @interface MicrodepositResponseBody - */ -export interface MicrodepositResponseBody { - /** - * - * @type {MicrodepositResponse} - * @memberof MicrodepositResponseBody + * @memberof MicrodepositResponseBodyMicroDepositInner */ - 'micro_deposit'?: MicrodepositResponse; + 'verified_at'?: string | null; } /** * @@ -4801,7 +5390,7 @@ export interface MonthlyCashFlowResponse { * @type {number} * @memberof MonthlyCashFlowResponse */ - 'estimated_goals_contribution'?: number; + 'estimated_goals_contribution'?: number | null; /** * * @type {boolean} @@ -4822,6 +5411,99 @@ export interface MonthlyCashFlowResponseBody { */ 'monthly_cash_flow_profile'?: MonthlyCashFlowResponse; } +/** + * + * @export + * @interface NotificationResponse + */ +export interface NotificationResponse { + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'guid'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'content'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'deep_link_guid'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'delivered_at'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'entity_guid'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'has_been_delivered'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'has_been_viewed'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'notification_type'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'subject'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'channel'?: any; +} +/** + * + * @export + * @interface NotificationResponseBody + */ +export interface NotificationResponseBody { + /** + * + * @type {NotificationResponse} + * @memberof NotificationResponseBody + */ + 'notification'?: NotificationResponse; +} +/** + * + * @export + * @interface NotificationsResponseBody + */ +export interface NotificationsResponseBody { + /** + * + * @type {Array} + * @memberof NotificationsResponseBody + */ + 'notifications'?: Array; +} /** * * @export @@ -4860,12 +5542,6 @@ export interface OAuthWindowResponseBody { * @interface OptionResponse */ export interface OptionResponse { - /** - * - * @type {string} - * @memberof OptionResponse - */ - 'guid'?: string | null; /** * * @type {string} @@ -4913,2644 +5589,3516 @@ export interface PaginationResponse { /** * * @export - * @interface PaymentProcessorAuthorizationCodeRequest + * @interface PaymentAccount */ -export interface PaymentProcessorAuthorizationCodeRequest { +export interface PaymentAccount { /** * - * @type {string} - * @memberof PaymentProcessorAuthorizationCodeRequest + * @type {any} + * @memberof PaymentAccount */ - 'account_guid'?: string | null; + 'account_name'?: any; /** * - * @type {string} - * @memberof PaymentProcessorAuthorizationCodeRequest + * @type {any} + * @memberof PaymentAccount */ - 'member_guid'?: string | null; + 'account_number'?: any; /** * - * @type {string} - * @memberof PaymentProcessorAuthorizationCodeRequest + * @type {any} + * @memberof PaymentAccount */ - 'user_guid'?: string | null; -} -/** - * - * @export - * @interface PaymentProcessorAuthorizationCodeRequestBody - */ -export interface PaymentProcessorAuthorizationCodeRequestBody { + 'account_type'?: any; /** * - * @type {PaymentProcessorAuthorizationCodeRequest} - * @memberof PaymentProcessorAuthorizationCodeRequestBody + * @type {any} + * @memberof PaymentAccount */ - 'payment_processor_authorization_code'?: PaymentProcessorAuthorizationCodeRequest; -} -/** - * - * @export - * @interface PaymentProcessorAuthorizationCodeResponse - */ -export interface PaymentProcessorAuthorizationCodeResponse { + 'available_balance'?: any; /** * - * @type {string} - * @memberof PaymentProcessorAuthorizationCodeResponse + * @type {any} + * @memberof PaymentAccount */ - 'authorization_code'?: string | null; -} -/** - * - * @export - * @interface PaymentProcessorAuthorizationCodeResponseBody - */ -export interface PaymentProcessorAuthorizationCodeResponseBody { + 'balance'?: any; /** * - * @type {PaymentProcessorAuthorizationCodeResponse} - * @memberof PaymentProcessorAuthorizationCodeResponseBody + * @type {any} + * @memberof PaymentAccount */ - 'payment_processor_authorization_code'?: PaymentProcessorAuthorizationCodeResponse; -} -/** - * - * @export - * @interface RepositionRequest - */ -export interface RepositionRequest { + 'created_at'?: any; /** - * The unique identifier for the goal. Defined by MX. - * @type {string} - * @memberof RepositionRequest + * + * @type {any} + * @memberof PaymentAccount */ - 'guid': string; + 'routing_number'?: any; /** - * The priority of the goal in relation to multiple goals. - * @type {number} - * @memberof RepositionRequest + * + * @type {any} + * @memberof PaymentAccount */ - 'position': number; -} -/** - * - * @export - * @interface RepositionRequestBody - */ -export interface RepositionRequestBody { + 'transit_number'?: any; /** * - * @type {Array} - * @memberof RepositionRequestBody + * @type {any} + * @memberof PaymentAccount */ - 'goals'?: Array; + 'updated_at'?: any; } /** * * @export - * @interface RepositionResponseBody + * @interface PaymentAccountBody */ -export interface RepositionResponseBody { +export interface PaymentAccountBody { /** * - * @type {Array} - * @memberof RepositionResponseBody + * @type {PaymentAccountBodyPaymentAccount} + * @memberof PaymentAccountBody */ - 'goals'?: Array; + 'payment_account'?: PaymentAccountBodyPaymentAccount; } /** * * @export - * @interface RewardResponse + * @interface PaymentAccountBodyPaymentAccount */ -export interface RewardResponse { +export interface PaymentAccountBodyPaymentAccount { /** * * @type {string} - * @memberof RewardResponse + * @memberof PaymentAccountBodyPaymentAccount */ 'account_guid'?: string; /** * * @type {string} - * @memberof RewardResponse + * @memberof PaymentAccountBodyPaymentAccount */ - 'balance_type'?: string; + 'member_guid'?: string; /** * - * @type {number} - * @memberof RewardResponse + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount */ - 'balance'?: number; + 'user_guid'?: string; /** * - * @type {string} - * @memberof RewardResponse + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount */ - 'created_at'?: string; + 'account_name'?: any; /** * - * @type {string} - * @memberof RewardResponse + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount */ - 'description'?: string; + 'account_number'?: any; /** * - * @type {string} - * @memberof RewardResponse + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount */ - 'expires_on'?: string; + 'account_type'?: any; /** * - * @type {string} - * @memberof RewardResponse + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount */ - 'guid'?: string; + 'available_balance'?: any; /** * - * @type {string} - * @memberof RewardResponse + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount */ - 'member_guid'?: string; + 'balance'?: any; + /** + * + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'created_at'?: any; + /** + * + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'routing_number'?: any; + /** + * + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'transit_number'?: any; + /** + * + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'updated_at'?: any; +} +/** + * + * @export + * @interface PaymentProcessorAuthorizationCodeRequest + */ +export interface PaymentProcessorAuthorizationCodeRequest { /** * * @type {string} - * @memberof RewardResponse + * @memberof PaymentProcessorAuthorizationCodeRequest */ - 'unit_type'?: string; + 'account_guid': string; /** * * @type {string} - * @memberof RewardResponse + * @memberof PaymentProcessorAuthorizationCodeRequest */ - 'updated_at'?: string; + 'member_guid': string; /** * * @type {string} - * @memberof RewardResponse + * @memberof PaymentProcessorAuthorizationCodeRequest */ - 'user_guid'?: string; + 'user_guid': string; } /** * * @export - * @interface RewardResponseBody + * @interface PaymentProcessorAuthorizationCodeRequestBody */ -export interface RewardResponseBody { +export interface PaymentProcessorAuthorizationCodeRequestBody { /** * - * @type {RewardResponse} - * @memberof RewardResponseBody + * @type {PaymentProcessorAuthorizationCodeRequest} + * @memberof PaymentProcessorAuthorizationCodeRequestBody */ - 'reward'?: RewardResponse; + 'payment_processor_authorization_code'?: PaymentProcessorAuthorizationCodeRequest; } /** * * @export - * @interface RewardsResponse + * @interface PaymentProcessorAuthorizationCodeResponse */ -export interface RewardsResponse { +export interface PaymentProcessorAuthorizationCodeResponse { /** * * @type {string} - * @memberof RewardsResponse + * @memberof PaymentProcessorAuthorizationCodeResponse */ - 'account_guid'?: string; + 'authorization_code'?: string | null; +} +/** + * + * @export + * @interface PaymentProcessorAuthorizationCodeResponseBody + */ +export interface PaymentProcessorAuthorizationCodeResponseBody { /** * - * @type {string} - * @memberof RewardsResponse + * @type {PaymentProcessorAuthorizationCodeResponse} + * @memberof PaymentProcessorAuthorizationCodeResponseBody */ - 'balance_type'?: string; + 'payment_processor_authorization_code'?: PaymentProcessorAuthorizationCodeResponse; +} +/** + * + * @export + * @interface ProcessorAccountNumber + */ +export interface ProcessorAccountNumber { /** * * @type {number} - * @memberof RewardsResponse + * @memberof ProcessorAccountNumber */ - 'balance'?: number; + 'account_number'?: number; /** * * @type {string} - * @memberof RewardsResponse + * @memberof ProcessorAccountNumber */ - 'created_at'?: string; + 'guid'?: string; /** * - * @type {string} - * @memberof RewardsResponse + * @type {any} + * @memberof ProcessorAccountNumber */ - 'description'?: string; + 'institution_number'?: any; /** * - * @type {string} - * @memberof RewardsResponse + * @type {any} + * @memberof ProcessorAccountNumber */ - 'expires_on'?: string; + 'loan_guarantor'?: any; /** * - * @type {string} - * @memberof RewardsResponse + * @type {any} + * @memberof ProcessorAccountNumber */ - 'guid'?: string; + 'loan_reference_number'?: any; /** * - * @type {string} - * @memberof RewardsResponse + * @type {any} + * @memberof ProcessorAccountNumber */ - 'member_guid'?: string; + 'passed_validation'?: any; /** * - * @type {string} - * @memberof RewardsResponse + * @type {number} + * @memberof ProcessorAccountNumber */ - 'unit_type'?: string; + 'routing_number'?: number; /** * - * @type {string} - * @memberof RewardsResponse + * @type {any} + * @memberof ProcessorAccountNumber */ - 'updated_at'?: string; + 'sequence_number'?: any; /** * - * @type {string} - * @memberof RewardsResponse + * @type {any} + * @memberof ProcessorAccountNumber */ - 'user_guid'?: string; + 'transit_number'?: any; } /** * * @export - * @interface RewardsResponseBody + * @interface ProcessorAccountNumberBody */ -export interface RewardsResponseBody { - /** - * - * @type {Array} - * @memberof RewardsResponseBody - */ - 'rewards'?: Array; +export interface ProcessorAccountNumberBody { /** * - * @type {PaginationResponse} - * @memberof RewardsResponseBody + * @type {Array} + * @memberof ProcessorAccountNumberBody */ - 'pagination'?: PaginationResponse; + 'account_numbers'?: Array; } /** * * @export - * @interface ScheduledPaymentResponse + * @interface ProcessorAccountNumberBodyAccountNumbersInner */ -export interface ScheduledPaymentResponse { - /** - * - * @type {number} - * @memberof ScheduledPaymentResponse - */ - 'amount'?: number; +export interface ProcessorAccountNumberBodyAccountNumbersInner { /** * * @type {string} - * @memberof ScheduledPaymentResponse + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'created_at'?: string; + 'account_guid'?: string; /** * * @type {string} - * @memberof ScheduledPaymentResponse + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'description'?: string; + 'member_guid'?: string; /** * * @type {string} - * @memberof ScheduledPaymentResponse + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'guid'?: string; + 'user_guid'?: string; /** * - * @type {boolean} - * @memberof ScheduledPaymentResponse + * @type {number} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'is_completed'?: boolean; + 'account_number'?: number; /** * - * @type {boolean} - * @memberof ScheduledPaymentResponse + * @type {string} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'is_recurring'?: boolean; + 'guid'?: string; /** * - * @type {string} - * @memberof ScheduledPaymentResponse + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'merchant_guid'?: string; + 'institution_number'?: any; /** * - * @type {string} - * @memberof ScheduledPaymentResponse + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'occurs_on'?: string; + 'loan_guarantor'?: any; /** * - * @type {number} - * @memberof ScheduledPaymentResponse + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'recurrence_day'?: number; + 'loan_reference_number'?: any; /** * - * @type {string} - * @memberof ScheduledPaymentResponse + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'recurrence_type'?: string; + 'passed_validation'?: any; /** * - * @type {string} - * @memberof ScheduledPaymentResponse + * @type {number} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'transaction_type'?: string; + 'routing_number'?: number; /** * - * @type {string} - * @memberof ScheduledPaymentResponse + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'updated_at'?: string; + 'sequence_number'?: any; /** * - * @type {string} - * @memberof ScheduledPaymentResponse + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner */ - 'user_guid'?: string; + 'transit_number'?: any; } /** * * @export - * @interface ScheduledPaymentsResponseBody + * @interface ProcessorOwner */ -export interface ScheduledPaymentsResponseBody { +export interface ProcessorOwner { /** * - * @type {PaginationResponse} - * @memberof ScheduledPaymentsResponseBody + * @type {any} + * @memberof ProcessorOwner */ - 'pagination'?: PaginationResponse; + 'guid'?: any; /** * - * @type {Array} - * @memberof ScheduledPaymentsResponseBody + * @type {any} + * @memberof ProcessorOwner */ - 'scheduled_payments'?: Array; -} -/** - * - * @export - * @interface SpendingPlanAccountResponse - */ -export interface SpendingPlanAccountResponse { + 'owner_name'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'account_guid'?: string; + 'address'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'client_guid'?: string; + 'city'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'created_at'?: string; + 'state'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'guid'?: string; + 'postal_code'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'spending_plan_guid'?: string; + 'country'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'updated_at'?: string; + 'email'?: any; /** * - * @type {string} - * @memberof SpendingPlanAccountResponse + * @type {any} + * @memberof ProcessorOwner */ - 'user_guid'?: string; + 'phone'?: any; } /** * * @export - * @interface SpendingPlanAccountsResponse + * @interface ProcessorOwnerBody */ -export interface SpendingPlanAccountsResponse { +export interface ProcessorOwnerBody { /** * - * @type {Array} - * @memberof SpendingPlanAccountsResponse + * @type {Array} + * @memberof ProcessorOwnerBody */ - 'spending_plan_accounts'?: Array; + 'account_owners'?: Array; /** * * @type {PaginationResponse} - * @memberof SpendingPlanAccountsResponse + * @memberof ProcessorOwnerBody */ 'pagination'?: PaginationResponse; } /** * * @export - * @interface SpendingPlanIterationItemCreateRequestBody + * @interface ProcessorOwnerBodyAccountOwnersInner */ -export interface SpendingPlanIterationItemCreateRequestBody { +export interface ProcessorOwnerBodyAccountOwnersInner { /** * * @type {string} - * @memberof SpendingPlanIterationItemCreateRequestBody + * @memberof ProcessorOwnerBodyAccountOwnersInner */ - 'category_guid'?: string; + 'account_guid'?: string; /** * - * @type {number} - * @memberof SpendingPlanIterationItemCreateRequestBody + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner */ - 'item_type'?: number; + 'member_guid'?: string; /** * - * @type {number} - * @memberof SpendingPlanIterationItemCreateRequestBody + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner */ - 'planned_amount': number; + 'user_guid'?: string; /** * - * @type {string} - * @memberof SpendingPlanIterationItemCreateRequestBody + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner */ - 'scheduled_payment_guid'?: string; + 'guid'?: any; /** * - * @type {string} - * @memberof SpendingPlanIterationItemCreateRequestBody + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner */ - 'top_level_category_guid'?: string; + 'owner_name'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'address'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'city'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'state'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'postal_code'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'country'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'email'?: any; + /** + * + * @type {any} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'phone'?: any; } /** * * @export - * @interface SpendingPlanIterationItemResponse + * @interface RepeatingTransactionResponse */ -export interface SpendingPlanIterationItemResponse { +export interface RepeatingTransactionResponse { + /** + * + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'account_guid'?: string | null; /** * * @type {number} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'actual_amount'?: number | null; + 'amount'?: number; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'category_guid'?: string | null; + 'description'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'created_at'?: string | null; + 'guid'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'guid'?: string | null; + 'member_guid'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'item_type'?: string | null; + 'merchant_guid'?: string; /** * - * @type {number} - * @memberof SpendingPlanIterationItemResponse + * @type {string} + * @memberof RepeatingTransactionResponse */ - 'planned_amount'?: number | null; + 'last_posted_date'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'scheduled_payment_guid'?: string | null; + 'predicted_occurs_on'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'spending_plan_iteration_guid'?: string | null; + 'recurrence_type'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'top_level_category_guid'?: string | null; + 'user_guid'?: string; /** * - * @type {Array} - * @memberof SpendingPlanIterationItemResponse + * @type {string} + * @memberof RepeatingTransactionResponse */ - 'transaction_guids'?: Array; + 'repeating_transaction_type'?: RepeatingTransactionResponseRepeatingTransactionTypeEnum; /** * * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepeatingTransactionResponse */ - 'updated_at'?: string | null; + 'transaction_type'?: RepeatingTransactionResponseTransactionTypeEnum; +} + +export const RepeatingTransactionResponseRepeatingTransactionTypeEnum = { + Bill: 'BILL', + Subscription: 'SUBSCRIPTION', + Income: 'INCOME', + Unknown: 'UNKNOWN' +} as const; + +export type RepeatingTransactionResponseRepeatingTransactionTypeEnum = typeof RepeatingTransactionResponseRepeatingTransactionTypeEnum[keyof typeof RepeatingTransactionResponseRepeatingTransactionTypeEnum]; +export const RepeatingTransactionResponseTransactionTypeEnum = { + Debit: 'DEBIT', + Credit: 'CREDIT' +} as const; + +export type RepeatingTransactionResponseTransactionTypeEnum = typeof RepeatingTransactionResponseTransactionTypeEnum[keyof typeof RepeatingTransactionResponseTransactionTypeEnum]; + +/** + * + * @export + * @interface RepeatingTransactionsResponseBody + */ +export interface RepeatingTransactionsResponseBody { /** * + * @type {Array} + * @memberof RepeatingTransactionsResponseBody + */ + 'repeating_transactions'?: Array; +} +/** + * + * @export + * @interface RepositionRequest + */ +export interface RepositionRequest { + /** + * The unique identifier for the goal. Defined by MX. * @type {string} - * @memberof SpendingPlanIterationItemResponse + * @memberof RepositionRequest */ - 'user_guid'?: string | null; + 'guid': string; + /** + * The priority of the goal in relation to multiple goals. + * @type {number} + * @memberof RepositionRequest + */ + 'position': number; } /** * * @export - * @interface SpendingPlanIterationItemsResponseBody + * @interface RepositionRequestBody */ -export interface SpendingPlanIterationItemsResponseBody { +export interface RepositionRequestBody { /** * - * @type {Array} - * @memberof SpendingPlanIterationItemsResponseBody + * @type {Array} + * @memberof RepositionRequestBody */ - 'iteration_items'?: Array; + 'goals'?: Array; +} +/** + * + * @export + * @interface RepositionResponseBody + */ +export interface RepositionResponseBody { /** * - * @type {PaginationResponse} - * @memberof SpendingPlanIterationItemsResponseBody + * @type {Array} + * @memberof RepositionResponseBody */ - 'pagination'?: PaginationResponse; + 'goals'?: Array; } /** * * @export - * @interface SpendingPlanIterationResponse + * @interface RewardElements */ -export interface SpendingPlanIterationResponse { +export interface RewardElements { /** * * @type {string} - * @memberof SpendingPlanIterationResponse + * @memberof RewardElements */ - 'created_at'?: string | null; + 'balance_type'?: string; /** * - * @type {string} - * @memberof SpendingPlanIterationResponse + * @type {number} + * @memberof RewardElements */ - 'end_on'?: string | null; + 'balance'?: number; /** * * @type {string} - * @memberof SpendingPlanIterationResponse + * @memberof RewardElements */ - 'guid'?: string | null; + 'created_at'?: string; /** * - * @type {number} - * @memberof SpendingPlanIterationResponse + * @type {string} + * @memberof RewardElements */ - 'iteration_number'?: number | null; + 'description'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationResponse + * @memberof RewardElements */ - 'spending_plan_guid'?: string | null; + 'expires_on'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationResponse + * @memberof RewardElements */ - 'start_on'?: string | null; + 'guid'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationResponse + * @memberof RewardElements */ - 'updated_at'?: string | null; + 'unit_type'?: string; /** * * @type {string} - * @memberof SpendingPlanIterationResponse + * @memberof RewardElements */ - 'user_guid'?: string | null; + 'updated_at'?: string; } /** * * @export - * @interface SpendingPlanIterationsResponse + * @interface RewardResponseBody */ -export interface SpendingPlanIterationsResponse { +export interface RewardResponseBody { /** * - * @type {Array} - * @memberof SpendingPlanIterationsResponse + * @type {RewardsResponseBodyRewardsInner} + * @memberof RewardResponseBody */ - 'iterations'?: Array; + 'reward'?: RewardsResponseBodyRewardsInner; +} +/** + * + * @export + * @interface RewardsResponseBody + */ +export interface RewardsResponseBody { + /** + * + * @type {Array} + * @memberof RewardsResponseBody + */ + 'rewards'?: Array; /** * * @type {PaginationResponse} - * @memberof SpendingPlanIterationsResponse + * @memberof RewardsResponseBody */ 'pagination'?: PaginationResponse; } /** * * @export - * @interface SpendingPlanResponse + * @interface RewardsResponseBodyRewardsInner */ -export interface SpendingPlanResponse { +export interface RewardsResponseBodyRewardsInner { /** * * @type {string} - * @memberof SpendingPlanResponse + * @memberof RewardsResponseBodyRewardsInner */ - 'created_at'?: string | null; + 'account_guid'?: string; /** * - * @type {number} - * @memberof SpendingPlanResponse + * @type {string} + * @memberof RewardsResponseBodyRewardsInner */ - 'current_iteration_number'?: number | null; + 'member_guid'?: string; /** * * @type {string} - * @memberof SpendingPlanResponse + * @memberof RewardsResponseBodyRewardsInner */ - 'guid'?: string | null; + 'user_guid'?: string; /** * * @type {string} - * @memberof SpendingPlanResponse + * @memberof RewardsResponseBodyRewardsInner */ - 'updated_at'?: string | null; + 'balance_type'?: string; /** * - * @type {string} - * @memberof SpendingPlanResponse + * @type {number} + * @memberof RewardsResponseBodyRewardsInner */ - 'user_guid'?: string | null; -} -/** - * - * @export - * @interface SpendingPlansResponseBody - */ -export interface SpendingPlansResponseBody { + 'balance'?: number; /** * - * @type {Array} - * @memberof SpendingPlansResponseBody + * @type {string} + * @memberof RewardsResponseBodyRewardsInner */ - 'spending_plans'?: Array; + 'created_at'?: string; /** * - * @type {PaginationResponse} - * @memberof SpendingPlansResponseBody + * @type {string} + * @memberof RewardsResponseBodyRewardsInner */ - 'pagination'?: PaginationResponse; -} -/** - * - * @export - * @interface SplitTransactionRequest - */ -export interface SplitTransactionRequest { + 'description'?: string; /** - * Amount of money you want to re-categorize. - * @type {number} - * @memberof SplitTransactionRequest + * + * @type {string} + * @memberof RewardsResponseBodyRewardsInner */ - 'amount': number; + 'expires_on'?: string; /** - * Description for the split transaction. + * * @type {string} - * @memberof SplitTransactionRequest + * @memberof RewardsResponseBodyRewardsInner */ - 'description'?: string; + 'guid'?: string; /** - * Unique identifier of the category. + * * @type {string} - * @memberof SplitTransactionRequest + * @memberof RewardsResponseBodyRewardsInner */ - 'category_guid'?: string; + 'unit_type'?: string; /** - * Memo for the split transaction + * * @type {string} - * @memberof SplitTransactionRequest + * @memberof RewardsResponseBodyRewardsInner */ - 'memo'?: string; + 'updated_at'?: string; } /** * * @export - * @interface SplitTransactionRequestBody + * @interface ScheduledPaymentResponse */ -export interface SplitTransactionRequestBody { +export interface ScheduledPaymentResponse { /** * - * @type {SplitTransactionRequest} - * @memberof SplitTransactionRequestBody + * @type {number} + * @memberof ScheduledPaymentResponse */ - 'transactions': SplitTransactionRequest; -} -/** - * - * @export - * @interface SplitTransactionsResponseBody - */ -export interface SplitTransactionsResponseBody { + 'amount'?: number; /** * - * @type {Array} - * @memberof SplitTransactionsResponseBody + * @type {string} + * @memberof ScheduledPaymentResponse */ - 'transactions'?: Array; -} -/** - * - * @export - * @interface StatementResponse - */ -export interface StatementResponse { + 'created_at'?: string; /** * * @type {string} - * @memberof StatementResponse + * @memberof ScheduledPaymentResponse */ - 'account_guid'?: string | null; + 'description'?: string; /** * * @type {string} - * @memberof StatementResponse + * @memberof ScheduledPaymentResponse */ - 'content_hash'?: string | null; + 'guid'?: string; /** * - * @type {string} - * @memberof StatementResponse + * @type {boolean} + * @memberof ScheduledPaymentResponse */ - 'created_at'?: string | null; + 'is_completed'?: boolean; /** * - * @type {string} - * @memberof StatementResponse + * @type {boolean} + * @memberof ScheduledPaymentResponse */ - 'guid'?: string | null; + 'is_recurring'?: boolean; /** * * @type {string} - * @memberof StatementResponse + * @memberof ScheduledPaymentResponse */ - 'member_guid'?: string | null; + 'merchant_guid'?: string; /** * * @type {string} - * @memberof StatementResponse + * @memberof ScheduledPaymentResponse */ - 'updated_at'?: string | null; + 'occurs_on'?: string; /** * - * @type {string} - * @memberof StatementResponse + * @type {number} + * @memberof ScheduledPaymentResponse */ - 'uri'?: string | null; + 'recurrence_day'?: number; /** * * @type {string} - * @memberof StatementResponse + * @memberof ScheduledPaymentResponse */ - 'user_guid'?: string | null; -} -/** - * - * @export - * @interface StatementResponseBody - */ -export interface StatementResponseBody { + 'recurrence_type'?: string; /** * - * @type {StatementResponse} - * @memberof StatementResponseBody + * @type {string} + * @memberof ScheduledPaymentResponse */ - 'statement'?: StatementResponse; -} -/** - * - * @export - * @interface StatementsResponseBody - */ -export interface StatementsResponseBody { + 'transaction_type'?: string; /** * - * @type {PaginationResponse} - * @memberof StatementsResponseBody + * @type {string} + * @memberof ScheduledPaymentResponse */ - 'pagination'?: PaginationResponse; + 'updated_at'?: string; /** * - * @type {Array} - * @memberof StatementsResponseBody + * @type {string} + * @memberof ScheduledPaymentResponse */ - 'statements'?: Array; + 'user_guid'?: string; } /** * * @export - * @interface TagCreateRequest + * @interface ScheduledPaymentsResponseBody */ -export interface TagCreateRequest { +export interface ScheduledPaymentsResponseBody { /** * - * @type {string} - * @memberof TagCreateRequest + * @type {Array} + * @memberof ScheduledPaymentsResponseBody */ - 'name': string; -} -/** - * - * @export - * @interface TagCreateRequestBody - */ -export interface TagCreateRequestBody { + 'scheduled_payments'?: Array; /** * - * @type {TagCreateRequest} - * @memberof TagCreateRequestBody + * @type {PaginationResponse} + * @memberof ScheduledPaymentsResponseBody */ - 'tag'?: TagCreateRequest; + 'pagination'?: PaginationResponse; } /** * * @export - * @interface TagResponse + * @interface SpendingPlanAccountResponse */ -export interface TagResponse { +export interface SpendingPlanAccountResponse { /** * * @type {string} - * @memberof TagResponse + * @memberof SpendingPlanAccountResponse */ - 'guid'?: string | null; + 'account_guid'?: string; /** * * @type {string} - * @memberof TagResponse + * @memberof SpendingPlanAccountResponse */ - 'name'?: string | null; + 'client_guid'?: string; /** * * @type {string} - * @memberof TagResponse - */ - 'user_guid'?: string | null; -} -/** - * - * @export - * @interface TagResponseBody - */ -export interface TagResponseBody { - /** - * - * @type {TagResponse} - * @memberof TagResponseBody + * @memberof SpendingPlanAccountResponse */ - 'tag'?: TagResponse; -} -/** - * - * @export - * @interface TagUpdateRequest - */ -export interface TagUpdateRequest { + 'created_at'?: string; /** * * @type {string} - * @memberof TagUpdateRequest + * @memberof SpendingPlanAccountResponse */ - 'name': string; -} -/** - * - * @export - * @interface TagUpdateRequestBody - */ -export interface TagUpdateRequestBody { + 'guid'?: string; /** * - * @type {TagUpdateRequest} - * @memberof TagUpdateRequestBody + * @type {string} + * @memberof SpendingPlanAccountResponse */ - 'tag'?: TagUpdateRequest; -} -/** - * - * @export - * @interface TaggingCreateRequest - */ -export interface TaggingCreateRequest { + 'spending_plan_guid'?: string; /** * * @type {string} - * @memberof TaggingCreateRequest + * @memberof SpendingPlanAccountResponse */ - 'tag_guid': string; + 'updated_at'?: string; /** * * @type {string} - * @memberof TaggingCreateRequest + * @memberof SpendingPlanAccountResponse */ - 'transaction_guid': string; + 'user_guid'?: string; } /** * * @export - * @interface TaggingCreateRequestBody + * @interface SpendingPlanAccountsResponse */ -export interface TaggingCreateRequestBody { +export interface SpendingPlanAccountsResponse { /** * - * @type {TaggingCreateRequest} - * @memberof TaggingCreateRequestBody + * @type {Array} + * @memberof SpendingPlanAccountsResponse */ - 'tagging'?: TaggingCreateRequest; + 'spending_plan_accounts'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof SpendingPlanAccountsResponse + */ + 'pagination'?: PaginationResponse; } /** * * @export - * @interface TaggingResponse + * @interface SpendingPlanIterationItemCreateRequestBody */ -export interface TaggingResponse { +export interface SpendingPlanIterationItemCreateRequestBody { /** * * @type {string} - * @memberof TaggingResponse + * @memberof SpendingPlanIterationItemCreateRequestBody */ - 'guid'?: string | null; + 'category_guid'?: string; /** * - * @type {boolean} - * @memberof TaggingResponse + * @type {number} + * @memberof SpendingPlanIterationItemCreateRequestBody */ - 'member_is_managed_by_user'?: boolean | null; + 'item_type'?: number; /** * - * @type {string} - * @memberof TaggingResponse + * @type {number} + * @memberof SpendingPlanIterationItemCreateRequestBody */ - 'tag_guid'?: string | null; + 'planned_amount': number; /** * * @type {string} - * @memberof TaggingResponse + * @memberof SpendingPlanIterationItemCreateRequestBody */ - 'transaction_guid'?: string | null; + 'scheduled_payment_guid'?: string; /** * * @type {string} - * @memberof TaggingResponse + * @memberof SpendingPlanIterationItemCreateRequestBody */ - 'user_guid'?: string | null; + 'top_level_category_guid'?: string; } /** * * @export - * @interface TaggingResponseBody + * @interface SpendingPlanIterationItemResponse */ -export interface TaggingResponseBody { +export interface SpendingPlanIterationItemResponse { /** * - * @type {TaggingResponse} - * @memberof TaggingResponseBody + * @type {number} + * @memberof SpendingPlanIterationItemResponse */ - 'tagging'?: TaggingResponse; -} -/** - * - * @export - * @interface TaggingUpdateRequest - */ -export interface TaggingUpdateRequest { + 'actual_amount'?: number | null; /** * * @type {string} - * @memberof TaggingUpdateRequest - */ - 'tag_guid': string; -} -/** - * - * @export - * @interface TaggingUpdateRequestBody - */ -export interface TaggingUpdateRequestBody { - /** - * - * @type {TaggingUpdateRequest} - * @memberof TaggingUpdateRequestBody - */ - 'tagging'?: TaggingUpdateRequest; -} -/** - * - * @export - * @interface TaggingsResponseBody - */ -export interface TaggingsResponseBody { - /** - * - * @type {PaginationResponse} - * @memberof TaggingsResponseBody - */ - 'pagination'?: PaginationResponse; - /** - * - * @type {Array} - * @memberof TaggingsResponseBody - */ - 'taggings'?: Array; -} -/** - * - * @export - * @interface TagsResponseBody - */ -export interface TagsResponseBody { - /** - * - * @type {PaginationResponse} - * @memberof TagsResponseBody - */ - 'pagination'?: PaginationResponse; - /** - * - * @type {Array} - * @memberof TagsResponseBody + * @memberof SpendingPlanIterationItemResponse */ - 'tags'?: Array; -} -/** - * - * @export - * @interface TaxDocumentResponse - */ -export interface TaxDocumentResponse { + 'category_guid'?: string | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'content_hash'?: string | null; + 'created_at'?: string | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'created_at'?: string | null; + 'guid'?: string | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'document_type'?: string | null; + 'item_type'?: string | null; /** * - * @type {string} - * @memberof TaxDocumentResponse + * @type {number} + * @memberof SpendingPlanIterationItemResponse */ - 'guid'?: string | null; + 'planned_amount'?: number | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'issued_on'?: string | null; + 'scheduled_payment_guid'?: string | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'member_guid'?: string | null; + 'spending_plan_iteration_guid'?: string | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'tax_year'?: string | null; + 'top_level_category_guid'?: string | null; /** * - * @type {string} - * @memberof TaxDocumentResponse + * @type {Array} + * @memberof SpendingPlanIterationItemResponse */ - 'updated_at'?: string | null; + 'transaction_guids'?: Array; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ - 'uri'?: string | null; + 'updated_at'?: string | null; /** * * @type {string} - * @memberof TaxDocumentResponse + * @memberof SpendingPlanIterationItemResponse */ 'user_guid'?: string | null; } /** * * @export - * @interface TaxDocumentResponseBody + * @interface SpendingPlanIterationItemsResponseBody */ -export interface TaxDocumentResponseBody { +export interface SpendingPlanIterationItemsResponseBody { /** * - * @type {TaxDocumentResponse} - * @memberof TaxDocumentResponseBody + * @type {Array} + * @memberof SpendingPlanIterationItemsResponseBody */ - 'tax_document'?: TaxDocumentResponse; -} -/** - * - * @export - * @interface TaxDocumentsResponseBody - */ -export interface TaxDocumentsResponseBody { + 'iteration_items'?: Array; /** * * @type {PaginationResponse} - * @memberof TaxDocumentsResponseBody + * @memberof SpendingPlanIterationItemsResponseBody */ 'pagination'?: PaginationResponse; - /** - * - * @type {Array} - * @memberof TaxDocumentsResponseBody - */ - 'tax_documents'?: Array; } /** * * @export - * @interface TransactionCreateRequest + * @interface SpendingPlanIterationResponse */ -export interface TransactionCreateRequest { - /** - * - * @type {number} - * @memberof TransactionCreateRequest - */ - 'amount': number; +export interface SpendingPlanIterationResponse { /** * * @type {string} - * @memberof TransactionCreateRequest + * @memberof SpendingPlanIterationResponse */ - 'date': string; + 'created_at'?: string | null; /** * * @type {string} - * @memberof TransactionCreateRequest - */ - 'description': string; - /** - * The type of transaction, which must be CREDIT or DEBIT. See Transaction Fields for more information. - * @type {string} - * @memberof TransactionCreateRequest - */ - 'type': string; - /** - * Unique identifier of the category. - * @type {string} - * @memberof TransactionCreateRequest + * @memberof SpendingPlanIterationResponse */ - 'category_guid'?: string; + 'end_on'?: string | null; /** * * @type {string} - * @memberof TransactionCreateRequest + * @memberof SpendingPlanIterationResponse */ - 'currency_code'?: string; + 'guid'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateRequest + * @type {number} + * @memberof SpendingPlanIterationResponse */ - 'has_been_viewed'?: boolean; + 'iteration_number'?: number | null; /** * - * @type {boolean} - * @memberof TransactionCreateRequest + * @type {string} + * @memberof SpendingPlanIterationResponse */ - 'is_hidden'?: boolean; + 'spending_plan_guid'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateRequest + * @type {string} + * @memberof SpendingPlanIterationResponse */ - 'is_international'?: boolean; + 'start_on'?: string | null; /** * * @type {string} - * @memberof TransactionCreateRequest + * @memberof SpendingPlanIterationResponse */ - 'memo'?: string; + 'updated_at'?: string | null; /** * * @type {string} - * @memberof TransactionCreateRequest - */ - 'metadata'?: string; - /** - * When set to true, this parameter will prevent a webhook from being triggered by the request. - * @type {boolean} - * @memberof TransactionCreateRequest + * @memberof SpendingPlanIterationResponse */ - 'skip_webhook'?: boolean; + 'user_guid'?: string | null; } /** * * @export - * @interface TransactionCreateRequestBody + * @interface SpendingPlanIterationsResponse */ -export interface TransactionCreateRequestBody { +export interface SpendingPlanIterationsResponse { /** * - * @type {TransactionCreateRequest} - * @memberof TransactionCreateRequestBody + * @type {Array} + * @memberof SpendingPlanIterationsResponse */ - 'transaction'?: TransactionCreateRequest; + 'iterations'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof SpendingPlanIterationsResponse + */ + 'pagination'?: PaginationResponse; } /** * * @export - * @interface TransactionCreateResponseBody + * @interface SpendingPlanResponse */ -export interface TransactionCreateResponseBody { - /** - * - * @type {string} - * @memberof TransactionCreateResponseBody - */ - 'account_guid'?: string | null; +export interface SpendingPlanResponse { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SpendingPlanResponse */ - 'account_id'?: string | null; + 'created_at'?: string | null; /** * * @type {number} - * @memberof TransactionCreateResponseBody - */ - 'amount'?: number; - /** - * - * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SpendingPlanResponse */ - 'category'?: string | null; + 'current_iteration_number'?: number | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SpendingPlanResponse */ - 'category_guid'?: string | null; + 'guid'?: string | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SpendingPlanResponse */ - 'check_number_string'?: string | null; + 'updated_at'?: string | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SpendingPlanResponse */ - 'created_at'?: string | null; + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface SpendingPlansResponseBody + */ +export interface SpendingPlansResponseBody { /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {Array} + * @memberof SpendingPlansResponseBody */ - 'currency_code'?: string | null; + 'spending_plans'?: Array; /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {PaginationResponse} + * @memberof SpendingPlansResponseBody */ - 'date'?: string | null; + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface SplitTransactionRequest + */ +export interface SplitTransactionRequest { /** - * - * @type {string} - * @memberof TransactionCreateResponseBody + * Amount of money you want to re-categorize. + * @type {number} + * @memberof SplitTransactionRequest */ - 'description'?: string | null; + 'amount': number; /** - * + * Description for the split transaction. * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SplitTransactionRequest */ - 'extended_transaction_type'?: string | null; + 'description'?: string; /** - * + * Unique identifier of the category. * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SplitTransactionRequest */ - 'guid'?: string | null; + 'category_guid'?: string; /** - * + * Memo for the split transaction * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof SplitTransactionRequest */ - 'id'?: string | null; + 'memo'?: string; +} +/** + * + * @export + * @interface SplitTransactionRequestBody + */ +export interface SplitTransactionRequestBody { /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {SplitTransactionRequest} + * @memberof SplitTransactionRequestBody */ - 'is_bill_pay'?: boolean | null; + 'transactions': SplitTransactionRequest; +} +/** + * + * @export + * @interface SplitTransactionsResponseBody + */ +export interface SplitTransactionsResponseBody { /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {Array} + * @memberof SplitTransactionsResponseBody */ - 'is_direct_deposit'?: boolean | null; + 'transactions'?: Array; +} +/** + * + * @export + * @interface StatementResponse + */ +export interface StatementResponse { /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_expense'?: boolean | null; + 'account_guid'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_fee'?: boolean | null; + 'content_hash'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_income'?: boolean | null; + 'created_at'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_international'?: boolean | null; + 'guid'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_manual'?: boolean | null; + 'member_guid'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_overdraft_fee'?: boolean | null; + 'updated_at'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_payroll_advance'?: boolean | null; + 'uri'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof StatementResponse */ - 'is_recurring'?: boolean | null; + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface StatementResponseBody + */ +export interface StatementResponseBody { /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {StatementResponse} + * @memberof StatementResponseBody */ - 'is_subscription'?: boolean | null; + 'statement'?: StatementResponse; +} +/** + * + * @export + * @interface StatementsResponseBody + */ +export interface StatementsResponseBody { /** * - * @type {number} - * @memberof TransactionCreateResponseBody + * @type {Array} + * @memberof StatementsResponseBody */ - 'latitude'?: number | null; + 'statements'?: Array; /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {PaginationResponse} + * @memberof StatementsResponseBody */ - 'localized_description'?: string | null; + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TagCreateRequest + */ +export interface TagCreateRequest { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TagCreateRequest */ - 'localized_memo'?: string | null; + 'name': string; +} +/** + * + * @export + * @interface TagCreateRequestBody + */ +export interface TagCreateRequestBody { /** * - * @type {number} - * @memberof TransactionCreateResponseBody + * @type {TagCreateRequest} + * @memberof TagCreateRequestBody */ - 'longitude'?: number | null; + 'tag'?: TagCreateRequest; +} +/** + * + * @export + * @interface TagResponse + */ +export interface TagResponse { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TagResponse */ - 'member_guid'?: string | null; + 'guid'?: string | null; /** * - * @type {boolean} - * @memberof TransactionCreateResponseBody + * @type {string} + * @memberof TagResponse */ - 'member_is_managed_by_user'?: boolean | null; + 'name'?: string | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TagResponse */ - 'memo'?: string | null; + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface TagResponseBody + */ +export interface TagResponseBody { /** * - * @type {number} - * @memberof TransactionCreateResponseBody + * @type {TagResponse} + * @memberof TagResponseBody */ - 'merchant_category_code'?: number | null; + 'tag'?: TagResponse; +} +/** + * + * @export + * @interface TagUpdateRequest + */ +export interface TagUpdateRequest { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TagUpdateRequest */ - 'merchant_guid'?: string | null; + 'name': string; +} +/** + * + * @export + * @interface TagUpdateRequestBody + */ +export interface TagUpdateRequestBody { /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {TagUpdateRequest} + * @memberof TagUpdateRequestBody */ - 'merchant_location_guid'?: string | null; + 'tag'?: TagUpdateRequest; +} +/** + * + * @export + * @interface TaggingCreateRequest + */ +export interface TaggingCreateRequest { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingCreateRequest */ - 'metadata'?: string | null; + 'tag_guid': string; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingCreateRequest */ - 'original_description'?: string | null; + 'transaction_guid': string; +} +/** + * + * @export + * @interface TaggingCreateRequestBody + */ +export interface TaggingCreateRequestBody { /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {TaggingCreateRequest} + * @memberof TaggingCreateRequestBody */ - 'posted_at'?: string | null; + 'tagging'?: TaggingCreateRequest; +} +/** + * + * @export + * @interface TaggingResponse + */ +export interface TaggingResponse { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingResponse */ - 'status'?: string | null; + 'guid'?: string | null; /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {boolean} + * @memberof TaggingResponse */ - 'top_level_category'?: string | null; + 'member_is_managed_by_user'?: boolean | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingResponse */ - 'transacted_at'?: string | null; + 'tag_guid'?: string | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingResponse */ - 'type'?: string; + 'transaction_guid'?: string | null; /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingResponse */ - 'updated_at'?: string; + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface TaggingResponseBody + */ +export interface TaggingResponseBody { /** * - * @type {string} - * @memberof TransactionCreateResponseBody + * @type {TaggingResponse} + * @memberof TaggingResponseBody */ - 'user_guid'?: string | null; + 'tagging'?: TaggingResponse; +} +/** + * + * @export + * @interface TaggingUpdateRequest + */ +export interface TaggingUpdateRequest { /** * * @type {string} - * @memberof TransactionCreateResponseBody + * @memberof TaggingUpdateRequest */ - 'user_id'?: string | null; + 'tag_guid': string; } /** * * @export - * @interface TransactionResponse + * @interface TaggingUpdateRequestBody */ -export interface TransactionResponse { +export interface TaggingUpdateRequestBody { /** * - * @type {string} - * @memberof TransactionResponse + * @type {TaggingUpdateRequest} + * @memberof TaggingUpdateRequestBody */ - 'account_guid'?: string | null; + 'tagging'?: TaggingUpdateRequest; +} +/** + * + * @export + * @interface TaggingsResponseBody + */ +export interface TaggingsResponseBody { /** * - * @type {string} - * @memberof TransactionResponse + * @type {Array} + * @memberof TaggingsResponseBody */ - 'account_id'?: string | null; + 'taggings'?: Array; /** * - * @type {number} - * @memberof TransactionResponse + * @type {PaginationResponse} + * @memberof TaggingsResponseBody */ - 'amount'?: number | null; + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TagsResponseBody + */ +export interface TagsResponseBody { /** * - * @type {string} - * @memberof TransactionResponse + * @type {Array} + * @memberof TagsResponseBody */ - 'category'?: string | null; + 'tags'?: Array; /** * - * @type {string} - * @memberof TransactionResponse + * @type {PaginationResponse} + * @memberof TagsResponseBody */ - 'category_guid'?: string | null; + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TokenRequestBody + */ +export interface TokenRequestBody { /** * - * @type {string} - * @memberof TransactionResponse + * @type {MemberElements} + * @memberof TokenRequestBody */ - 'check_number_string'?: string | null; + 'scope'?: MemberElements; +} +/** + * + * @export + * @interface TokenResponse + */ +export interface TokenResponse { /** * * @type {string} - * @memberof TransactionResponse + * @memberof TokenResponse */ - 'created_at'?: string | null; + 'payment_processor_guid'?: string; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TokenResponse */ - 'currency_code'?: string | null; + 'expires_at'?: string; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TokenResponse */ - 'date'?: string | null; + 'access_token'?: string; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TokenResponse */ - 'description'?: string | null; + 'active'?: boolean; +} +/** + * + * @export + * @interface TokenResponseBody + */ +export interface TokenResponseBody { /** * - * @type {string} - * @memberof TransactionResponse + * @type {Array} + * @memberof TokenResponseBody */ - 'extended_transaction_type'?: string | null; + 'tokens'?: Array; +} +/** + * + * @export + * @interface TransactionCreateRequest + */ +export interface TransactionCreateRequest { /** * - * @type {string} - * @memberof TransactionResponse + * @type {number} + * @memberof TransactionCreateRequest */ - 'guid'?: string | null; + 'amount': number; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateRequest */ - 'id'?: string | null; + 'date': string; /** * - * @type {boolean} - * @memberof TransactionResponse + * @type {string} + * @memberof TransactionCreateRequest */ - 'is_bill_pay'?: boolean | null; + 'description': string; /** - * - * @type {boolean} - * @memberof TransactionResponse + * The type of transaction, which must be CREDIT or DEBIT. See Transaction Fields for more information. + * @type {string} + * @memberof TransactionCreateRequest */ - 'is_direct_deposit'?: boolean | null; + 'type': string; /** - * - * @type {boolean} - * @memberof TransactionResponse + * Unique identifier of the category. + * @type {string} + * @memberof TransactionCreateRequest */ - 'is_expense'?: boolean | null; + 'category_guid'?: string; /** * - * @type {boolean} - * @memberof TransactionResponse + * @type {string} + * @memberof TransactionCreateRequest */ - 'is_fee'?: boolean | null; + 'currency_code'?: string; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateRequest */ - 'is_income'?: boolean | null; + 'has_been_viewed'?: boolean; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateRequest */ - 'is_international'?: boolean | null; + 'is_hidden'?: boolean; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateRequest */ - 'is_overdraft_fee'?: boolean | null; + 'is_international'?: boolean; /** * - * @type {boolean} - * @memberof TransactionResponse + * @type {string} + * @memberof TransactionCreateRequest */ - 'is_payroll_advance'?: boolean | null; + 'memo'?: string; /** * - * @type {boolean} - * @memberof TransactionResponse + * @type {string} + * @memberof TransactionCreateRequest */ - 'is_recurring'?: boolean | null; + 'metadata'?: string; /** - * + * When set to true, this parameter will prevent a webhook from being triggered by the request. * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateRequest */ - 'is_subscription'?: boolean | null; + 'skip_webhook'?: boolean; +} +/** + * + * @export + * @interface TransactionCreateRequestBody + */ +export interface TransactionCreateRequestBody { /** * - * @type {number} - * @memberof TransactionResponse + * @type {TransactionCreateRequest} + * @memberof TransactionCreateRequestBody */ - 'latitude'?: number | null; + 'transaction'?: TransactionCreateRequest; +} +/** + * + * @export + * @interface TransactionCreateResponseBody + */ +export interface TransactionCreateResponseBody { /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'localized_description'?: string | null; + 'account_guid'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'localized_memo'?: string | null; + 'account_id'?: string | null; /** * * @type {number} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'longitude'?: number | null; + 'amount'?: number; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'member_guid'?: string | null; + 'category'?: string | null; /** * - * @type {boolean} - * @memberof TransactionResponse + * @type {string} + * @memberof TransactionCreateResponseBody */ - 'member_is_managed_by_user'?: boolean | null; + 'category_guid'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'memo'?: string | null; + 'check_number_string'?: string | null; /** * - * @type {number} - * @memberof TransactionResponse + * @type {string} + * @memberof TransactionCreateResponseBody */ - 'merchant_category_code'?: number | null; + 'created_at'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'merchant_guid'?: string | null; + 'currency_code'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'merchant_location_guid'?: string | null; + 'date'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'metadata'?: string | null; + 'description'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'original_description'?: string | null; + 'extended_transaction_type'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'posted_at'?: string | null; + 'guid'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'status'?: string | null; + 'id'?: string | null; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'top_level_category'?: string | null; + 'is_bill_pay'?: boolean | null; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'transacted_at'?: string | null; + 'is_direct_deposit'?: boolean | null; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'type'?: string | null; + 'is_expense'?: boolean | null; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'updated_at'?: string | null; + 'is_fee'?: boolean | null; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'user_guid'?: string | null; + 'is_income'?: boolean | null; /** * - * @type {string} - * @memberof TransactionResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'user_id'?: string | null; -} -/** - * - * @export - * @interface TransactionResponseBody - */ -export interface TransactionResponseBody { + 'is_international'?: boolean | null; /** * - * @type {TransactionResponse} - * @memberof TransactionResponseBody + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'transaction'?: TransactionResponse; -} -/** - * - * @export - * @interface TransactionRuleCreateRequest - */ -export interface TransactionRuleCreateRequest { + 'is_manual'?: boolean | null; /** * - * @type {string} - * @memberof TransactionRuleCreateRequest + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'category_guid': string; + 'is_overdraft_fee'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_payroll_advance'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_recurring'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_subscription'?: boolean | null; + /** + * + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'latitude'?: number | null; /** * * @type {string} - * @memberof TransactionRuleCreateRequest + * @memberof TransactionCreateResponseBody */ - 'description'?: string; + 'localized_description'?: string | null; /** * * @type {string} - * @memberof TransactionRuleCreateRequest + * @memberof TransactionCreateResponseBody */ - 'match_description': string; -} -/** - * - * @export - * @interface TransactionRuleCreateRequestBody - */ -export interface TransactionRuleCreateRequestBody { + 'localized_memo'?: string | null; /** * - * @type {TransactionRuleCreateRequest} - * @memberof TransactionRuleCreateRequestBody + * @type {number} + * @memberof TransactionCreateResponseBody */ - 'transaction_rule'?: TransactionRuleCreateRequest; -} -/** - * - * @export - * @interface TransactionRuleResponse - */ -export interface TransactionRuleResponse { + 'longitude'?: number | null; /** * * @type {string} - * @memberof TransactionRuleResponse + * @memberof TransactionCreateResponseBody */ - 'category_guid'?: string | null; + 'member_guid'?: string | null; /** * - * @type {string} - * @memberof TransactionRuleResponse + * @type {boolean} + * @memberof TransactionCreateResponseBody */ - 'created_at'?: string | null; + 'member_is_managed_by_user'?: boolean | null; /** * * @type {string} - * @memberof TransactionRuleResponse + * @memberof TransactionCreateResponseBody */ - 'description'?: string | null; + 'memo'?: string | null; + /** + * + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'merchant_category_code'?: number | null; /** * * @type {string} - * @memberof TransactionRuleResponse + * @memberof TransactionCreateResponseBody */ - 'guid'?: string | null; + 'merchant_guid'?: string | null; /** * * @type {string} - * @memberof TransactionRuleResponse + * @memberof TransactionCreateResponseBody */ - 'match_description'?: string | null; + 'merchant_location_guid'?: string | null; /** * * @type {string} - * @memberof TransactionRuleResponse + * @memberof TransactionCreateResponseBody */ - 'updated_at'?: string | null; + 'metadata'?: string | null; /** * * @type {string} - * @memberof TransactionRuleResponse + * @memberof TransactionCreateResponseBody */ - 'user_guid'?: string | null; -} -/** - * - * @export - * @interface TransactionRuleResponseBody - */ -export interface TransactionRuleResponseBody { + 'original_description'?: string | null; /** * - * @type {TransactionRuleResponse} - * @memberof TransactionRuleResponseBody + * @type {string} + * @memberof TransactionCreateResponseBody */ - 'transaction_rule'?: TransactionRuleResponse; -} -/** - * - * @export - * @interface TransactionRuleUpdateRequest - */ -export interface TransactionRuleUpdateRequest { + 'posted_at'?: string | null; /** * * @type {string} - * @memberof TransactionRuleUpdateRequest + * @memberof TransactionCreateResponseBody */ - 'category_guid'?: string; + 'status'?: string | null; /** * * @type {string} - * @memberof TransactionRuleUpdateRequest + * @memberof TransactionCreateResponseBody */ - 'description'?: string; + 'top_level_category'?: string | null; /** * * @type {string} - * @memberof TransactionRuleUpdateRequest + * @memberof TransactionCreateResponseBody */ - 'match_description'?: string; -} -/** - * - * @export - * @interface TransactionRuleUpdateRequestBody - */ -export interface TransactionRuleUpdateRequestBody { + 'transacted_at'?: string | null; /** * - * @type {TransactionRuleUpdateRequest} - * @memberof TransactionRuleUpdateRequestBody + * @type {string} + * @memberof TransactionCreateResponseBody */ - 'transaction_rule'?: TransactionRuleUpdateRequest; -} -/** - * - * @export - * @interface TransactionRulesResponseBody - */ -export interface TransactionRulesResponseBody { + 'type'?: string; /** * - * @type {PaginationResponse} - * @memberof TransactionRulesResponseBody + * @type {string} + * @memberof TransactionCreateResponseBody */ - 'pagination'?: PaginationResponse; + 'updated_at'?: string; /** * - * @type {Array} - * @memberof TransactionRulesResponseBody + * @type {string} + * @memberof TransactionCreateResponseBody */ - 'transaction_rules'?: Array; -} -/** - * - * @export - * @interface TransactionUpdateRequest - */ -export interface TransactionUpdateRequest { + 'user_guid'?: string | null; /** * * @type {string} - * @memberof TransactionUpdateRequest + * @memberof TransactionCreateResponseBody */ - 'description': string; + 'user_id'?: string | null; } /** * * @export - * @interface TransactionUpdateRequestBody + * @interface TransactionIncludesResponse */ -export interface TransactionUpdateRequestBody { +export interface TransactionIncludesResponse { /** * - * @type {TransactionUpdateRequest} - * @memberof TransactionUpdateRequestBody + * @type {string} + * @memberof TransactionIncludesResponse */ - 'transaction'?: TransactionUpdateRequest; -} -/** - * - * @export - * @interface TransactionsResponseBody - */ -export interface TransactionsResponseBody { + 'account_guid'?: string | null; /** * - * @type {PaginationResponse} - * @memberof TransactionsResponseBody + * @type {string} + * @memberof TransactionIncludesResponse */ - 'pagination'?: PaginationResponse; + 'account_id'?: string | null; /** * - * @type {Array} - * @memberof TransactionsResponseBody + * @type {number} + * @memberof TransactionIncludesResponse */ - 'transactions'?: Array; -} -/** - * - * @export - * @interface UpdateGoalRequest - */ -export interface UpdateGoalRequest { + 'amount'?: number | null; /** - * Unique identifier of the account for the goal. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'account_guid'?: string; - /** - * Amount of the goal. - * @type {number} - * @memberof UpdateGoalRequest - */ - 'amount'?: number; + 'category'?: string | null; /** - * The goal type. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'goal_type_name'?: string; + 'category_guid'?: string | null; /** - * The category of the goal. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'meta_type_name'?: string; + 'check_number_string'?: string | null; /** - * The name of the goal. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'name'?: string; + 'created_at'?: string | null; /** - * Date and time the goal was completed. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'completed_at'?: string; + 'currency_code'?: string | null; /** - * Determines if the goal has been spent. - * @type {boolean} - * @memberof UpdateGoalRequest + * + * @type {string} + * @memberof TransactionIncludesResponse */ - 'has_been_spent'?: boolean; + 'date'?: string | null; /** - * Determines if the goal is complete. - * @type {boolean} - * @memberof UpdateGoalRequest + * + * @type {string} + * @memberof TransactionIncludesResponse */ - 'is_complete'?: boolean; + 'description'?: string | null; /** - * Additional information a partner can store on the goal. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'metadata'?: string; + 'extended_transaction_type'?: string | null; /** - * The priority of the goal in relation to multiple goals. - * @type {number} - * @memberof UpdateGoalRequest + * + * @type {string} + * @memberof TransactionIncludesResponse */ - 'position'?: number; + 'guid'?: string | null; /** - * Date and time the goal is to complete. Intended for users to set their own goal completion dates. + * * @type {string} - * @memberof UpdateGoalRequest + * @memberof TransactionIncludesResponse */ - 'targeted_to_complete_at'?: string; -} -/** - * - * @export - * @interface UpdateGoalRequestBody - */ -export interface UpdateGoalRequestBody { + 'id'?: string | null; /** * - * @type {UpdateGoalRequest} - * @memberof UpdateGoalRequestBody + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'goal'?: UpdateGoalRequest; -} -/** - * - * @export - * @interface UserCreateRequest - */ -export interface UserCreateRequest { + 'is_bill_pay'?: boolean | null; /** * - * @type {string} - * @memberof UserCreateRequest + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'email'?: string; + 'is_direct_deposit'?: boolean | null; /** * - * @type {string} - * @memberof UserCreateRequest + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'id'?: string; + 'is_expense'?: boolean | null; /** * * @type {boolean} - * @memberof UserCreateRequest + * @memberof TransactionIncludesResponse */ - 'is_disabled'?: boolean; + 'is_fee'?: boolean | null; /** * - * @type {string} - * @memberof UserCreateRequest + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'metadata'?: string; -} -/** - * - * @export - * @interface UserCreateRequestBody - */ -export interface UserCreateRequestBody { + 'is_income'?: boolean | null; /** * - * @type {UserCreateRequest} - * @memberof UserCreateRequestBody + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'user'?: UserCreateRequest; -} -/** - * - * @export - * @interface UserResponse - */ -export interface UserResponse { + 'is_international'?: boolean | null; /** * - * @type {string} - * @memberof UserResponse + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'email'?: string | null; + 'is_manual'?: boolean | null; /** * - * @type {string} - * @memberof UserResponse + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'guid'?: string | null; + 'is_overdraft_fee'?: boolean | null; /** * - * @type {string} - * @memberof UserResponse + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'id'?: string | null; + 'is_payroll_advance'?: boolean | null; /** * * @type {boolean} - * @memberof UserResponse + * @memberof TransactionIncludesResponse */ - 'is_disabled'?: boolean | null; + 'is_recurring'?: boolean | null; /** * - * @type {string} - * @memberof UserResponse + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'metadata'?: string | null; -} -/** - * - * @export - * @interface UserResponseBody - */ -export interface UserResponseBody { + 'is_subscription'?: boolean | null; /** * - * @type {UserResponse} - * @memberof UserResponseBody + * @type {number} + * @memberof TransactionIncludesResponse */ - 'user'?: UserResponse; -} -/** - * - * @export - * @interface UserUpdateRequest - */ -export interface UserUpdateRequest { + 'latitude'?: number | null; /** * * @type {string} - * @memberof UserUpdateRequest + * @memberof TransactionIncludesResponse */ - 'email'?: string; + 'localized_description'?: string | null; /** * * @type {string} - * @memberof UserUpdateRequest + * @memberof TransactionIncludesResponse */ - 'id'?: string; + 'localized_memo'?: string | null; /** * - * @type {boolean} - * @memberof UserUpdateRequest + * @type {number} + * @memberof TransactionIncludesResponse */ - 'is_disabled'?: boolean; + 'longitude'?: number | null; /** * * @type {string} - * @memberof UserUpdateRequest + * @memberof TransactionIncludesResponse */ - 'metadata'?: string; -} -/** - * - * @export - * @interface UserUpdateRequestBody - */ -export interface UserUpdateRequestBody { + 'member_guid'?: string | null; /** * - * @type {UserUpdateRequest} - * @memberof UserUpdateRequestBody + * @type {boolean} + * @memberof TransactionIncludesResponse */ - 'user'?: UserUpdateRequest; -} -/** - * - * @export - * @interface UsersResponseBody - */ -export interface UsersResponseBody { + 'member_is_managed_by_user'?: boolean | null; /** * - * @type {PaginationResponse} - * @memberof UsersResponseBody + * @type {string} + * @memberof TransactionIncludesResponse */ - 'pagination'?: PaginationResponse; + 'memo'?: string | null; /** * - * @type {Array} - * @memberof UsersResponseBody + * @type {number} + * @memberof TransactionIncludesResponse */ - 'users'?: Array; -} -/** - * - * @export - * @interface WidgetRequest - */ -export interface WidgetRequest { + 'merchant_category_code'?: number | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'client_redirect_url'?: string; + 'merchant_guid'?: string | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'color_scheme'?: string; + 'merchant_location_guid'?: string | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'current_institution_code'?: string; + 'metadata'?: string | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'current_institution_guid'?: string; + 'original_description'?: string | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'current_member_guid'?: string; + 'posted_at'?: string | null; /** * - * @type {boolean} - * @memberof WidgetRequest + * @type {string} + * @memberof TransactionIncludesResponse */ - 'disable_background_agg'?: boolean; + 'status'?: string | null; /** * - * @type {boolean} - * @memberof WidgetRequest + * @type {string} + * @memberof TransactionIncludesResponse */ - 'disable_institution_search'?: boolean; + 'top_level_category'?: string | null; /** * - * @type {boolean} - * @memberof WidgetRequest + * @type {string} + * @memberof TransactionIncludesResponse */ - 'include_identity'?: boolean; + 'transacted_at'?: string | null; /** * - * @type {boolean} - * @memberof WidgetRequest + * @type {string} + * @memberof TransactionIncludesResponse */ - 'include_transactions'?: boolean; + 'type'?: string | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'insight_guid'?: string; + 'updated_at'?: string | null; /** * - * @type {boolean} - * @memberof WidgetRequest + * @type {string} + * @memberof TransactionIncludesResponse */ - 'is_mobile_webview'?: boolean; + 'user_guid'?: string | null; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponse */ - 'microwidget_instance_id'?: string; + 'user_id'?: string | null; /** * - * @type {string} - * @memberof WidgetRequest + * @type {TransactionIncludesResponseAllOfClassification} + * @memberof TransactionIncludesResponse */ - 'mode'?: string; + 'classification'?: TransactionIncludesResponseAllOfClassification | null; /** * - * @type {string} - * @memberof WidgetRequest + * @type {TransactionIncludesResponseAllOfGeolocation} + * @memberof TransactionIncludesResponse */ - 'oauth_referral_source'?: string; + 'geolocation'?: TransactionIncludesResponseAllOfGeolocation | null; /** * - * @type {number} - * @memberof WidgetRequest + * @type {TransactionIncludesResponseAllOfMerchant} + * @memberof TransactionIncludesResponse */ - 'ui_message_version'?: number; + 'merchant'?: TransactionIncludesResponseAllOfMerchant | null; /** * - * @type {string} - * @memberof WidgetRequest + * @type {TransactionIncludesResponseAllOfRepeatingTransaction} + * @memberof TransactionIncludesResponse */ - 'ui_message_webview_url_scheme'?: string; + 'repeating_transaction'?: TransactionIncludesResponseAllOfRepeatingTransaction | null; +} +/** + * + * @export + * @interface TransactionIncludesResponseAllOfClassification + */ +export interface TransactionIncludesResponseAllOfClassification { /** * - * @type {boolean} - * @memberof WidgetRequest + * @type {string} + * @memberof TransactionIncludesResponseAllOfClassification */ - 'update_credentials'?: boolean; + 'parent_class'?: TransactionIncludesResponseAllOfClassificationParentClassEnum; /** * * @type {string} - * @memberof WidgetRequest + * @memberof TransactionIncludesResponseAllOfClassification */ - 'widget_type': string; + 'guid'?: string; } + +export const TransactionIncludesResponseAllOfClassificationParentClassEnum = { + Payroll: 'Payroll', + Deposit: 'Deposit', + Savings: 'Savings', + Transfer: 'Transfer', + Refunds: 'Refunds', + Spend: 'Spend', + Investment: 'Investment', + Buy: 'Buy', + Sell: 'Sell', + Income: 'Income', + Fees: 'Fees', + Expenses: 'Expenses', + CorporateActions: 'Corporate Actions', + Other: 'Other' +} as const; + +export type TransactionIncludesResponseAllOfClassificationParentClassEnum = typeof TransactionIncludesResponseAllOfClassificationParentClassEnum[keyof typeof TransactionIncludesResponseAllOfClassificationParentClassEnum]; + /** * * @export - * @interface WidgetRequestBody + * @interface TransactionIncludesResponseAllOfGeolocation */ -export interface WidgetRequestBody { +export interface TransactionIncludesResponseAllOfGeolocation { /** * - * @type {WidgetRequest} - * @memberof WidgetRequestBody + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation */ - 'widget_url'?: WidgetRequest; + 'country'?: string; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'state'?: string; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'city'?: string; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'postal code'?: string; } /** * * @export - * @interface WidgetResponse + * @interface TransactionIncludesResponseAllOfMerchant */ -export interface WidgetResponse { +export interface TransactionIncludesResponseAllOfMerchant { /** * * @type {string} - * @memberof WidgetResponse + * @memberof TransactionIncludesResponseAllOfMerchant */ - 'type'?: string | null; + 'name'?: string; /** * * @type {string} - * @memberof WidgetResponse + * @memberof TransactionIncludesResponseAllOfMerchant */ - 'url'?: string | null; + 'guid'?: string; /** * * @type {string} - * @memberof WidgetResponse + * @memberof TransactionIncludesResponseAllOfMerchant */ - 'user_id'?: string | null; + 'logo_url'?: string; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfMerchant + */ + 'website_url'?: string; } /** * * @export - * @interface WidgetResponseBody + * @interface TransactionIncludesResponseAllOfRepeatingTransaction */ -export interface WidgetResponseBody { +export interface TransactionIncludesResponseAllOfRepeatingTransaction { /** * - * @type {WidgetResponse} - * @memberof WidgetResponseBody + * @type {string} + * @memberof TransactionIncludesResponseAllOfRepeatingTransaction */ - 'widget_url'?: WidgetResponse; + 'repeating_transaction_type'?: TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfRepeatingTransaction + */ + 'recurrence_type'?: TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfRepeatingTransaction + */ + 'guid'?: string; } -/** - * BudgetsApi - axios parameter creator - * @export - */ -export const BudgetsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Delete a budget. - * @summary Delete a budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsBudgetGuidDelete: async (userGuid: string, budgetGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsBudgetGuidDelete', 'userGuid', userGuid) - // verify required parameter 'budgetGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsBudgetGuidDelete', 'budgetGuid', budgetGuid) - const localVarPath = `/users/{user_guid}/budgets/{budget_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"budget_guid"}}`, encodeURIComponent(String(budgetGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Read a specific budget. - * @summary Read a specific budget - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsBudgetGuidGet: async (budgetGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'budgetGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsBudgetGuidGet', 'budgetGuid', budgetGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsBudgetGuidGet', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/budgets/{budget_guid}` - .replace(`{${"budget_guid"}}`, encodeURIComponent(String(budgetGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update a specific budget. - * @summary Update a specific budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsBudgetGuidPut: async (userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsBudgetGuidPut', 'userGuid', userGuid) - // verify required parameter 'budgetGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsBudgetGuidPut', 'budgetGuid', budgetGuid) - const localVarPath = `/users/{user_guid}/budgets/{budget_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"budget_guid"}}`, encodeURIComponent(String(budgetGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(budgetUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. - * @summary Auto-generate budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsGeneratePost: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsGeneratePost', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/budgets/generate` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) +export const TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum = { + Bill: 'BILL', + Subscription: 'SUBSCRIPTION', + Income: 'INCOME', + Unknown: 'UNKNOWN' +} as const; +export type TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum = typeof TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum[keyof typeof TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum]; +export const TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum = { + EveryOtherWeek: 'EVERY_OTHER_WEEK' +} as const; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; +export type TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum = typeof TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum[keyof typeof TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum]; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * + * @export + * @interface TransactionResponse + */ +export interface TransactionResponse { + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'account_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'account_id'?: string | null; + /** + * + * @type {number} + * @memberof TransactionResponse + */ + 'amount'?: number | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'category'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'category_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'check_number_string'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'created_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'currency_code'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'date'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'extended_transaction_type'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'id'?: string | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_bill_pay'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_direct_deposit'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_expense'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_fee'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_income'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_international'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_manual'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_overdraft_fee'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_payroll_advance'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_recurring'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_subscription'?: boolean | null; + /** + * + * @type {number} + * @memberof TransactionResponse + */ + 'latitude'?: number | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'localized_description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'localized_memo'?: string | null; + /** + * + * @type {number} + * @memberof TransactionResponse + */ + 'longitude'?: number | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'member_guid'?: string | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'memo'?: string | null; + /** + * + * @type {number} + * @memberof TransactionResponse + */ + 'merchant_category_code'?: number | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'merchant_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'merchant_location_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'metadata'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'original_description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'posted_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'status'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'top_level_category'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'transacted_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'type'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'updated_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'user_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'user_id'?: string | null; +} +/** + * + * @export + * @interface TransactionResponseBody + */ +export interface TransactionResponseBody { + /** + * + * @type {TransactionResponse} + * @memberof TransactionResponseBody + */ + 'transaction'?: TransactionResponse; +} +/** + * + * @export + * @interface TransactionRuleCreateRequest + */ +export interface TransactionRuleCreateRequest { + /** + * + * @type {string} + * @memberof TransactionRuleCreateRequest + */ + 'category_guid': string; + /** + * + * @type {string} + * @memberof TransactionRuleCreateRequest + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof TransactionRuleCreateRequest + */ + 'match_description': string; +} +/** + * + * @export + * @interface TransactionRuleCreateRequestBody + */ +export interface TransactionRuleCreateRequestBody { + /** + * + * @type {TransactionRuleCreateRequest} + * @memberof TransactionRuleCreateRequestBody + */ + 'transaction_rule'?: TransactionRuleCreateRequest; +} +/** + * + * @export + * @interface TransactionRuleResponse + */ +export interface TransactionRuleResponse { + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'category_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'created_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'match_description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'updated_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionRuleResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface TransactionRuleResponseBody + */ +export interface TransactionRuleResponseBody { + /** + * + * @type {TransactionRuleResponse} + * @memberof TransactionRuleResponseBody + */ + 'transaction_rule'?: TransactionRuleResponse; +} +/** + * + * @export + * @interface TransactionRuleUpdateRequest + */ +export interface TransactionRuleUpdateRequest { + /** + * + * @type {string} + * @memberof TransactionRuleUpdateRequest + */ + 'category_guid'?: string; + /** + * + * @type {string} + * @memberof TransactionRuleUpdateRequest + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof TransactionRuleUpdateRequest + */ + 'match_description'?: string; +} +/** + * + * @export + * @interface TransactionRuleUpdateRequestBody + */ +export interface TransactionRuleUpdateRequestBody { + /** + * + * @type {TransactionRuleUpdateRequest} + * @memberof TransactionRuleUpdateRequestBody + */ + 'transaction_rule'?: TransactionRuleUpdateRequest; +} +/** + * + * @export + * @interface TransactionRulesResponseBody + */ +export interface TransactionRulesResponseBody { + /** + * + * @type {Array} + * @memberof TransactionRulesResponseBody + */ + 'transaction_rules'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof TransactionRulesResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TransactionUpdateRequest + */ +export interface TransactionUpdateRequest { + /** + * + * @type {string} + * @memberof TransactionUpdateRequest + */ + 'date'?: string; + /** + * + * @type {string} + * @memberof TransactionUpdateRequest + */ + 'memo'?: string; + /** + * + * @type {string} + * @memberof TransactionUpdateRequest + */ + 'category_guid'?: string; + /** + * + * @type {string} + * @memberof TransactionUpdateRequest + */ + 'description'?: string; +} +/** + * + * @export + * @interface TransactionUpdateRequestBody + */ +export interface TransactionUpdateRequestBody { + /** + * + * @type {TransactionUpdateRequest} + * @memberof TransactionUpdateRequestBody + */ + 'transaction'?: TransactionUpdateRequest; +} +/** + * + * @export + * @interface TransactionsResponseBody + */ +export interface TransactionsResponseBody { + /** + * + * @type {Array} + * @memberof TransactionsResponseBody + */ + 'transactions'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof TransactionsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TransactionsResponseBodyIncludes + */ +export interface TransactionsResponseBodyIncludes { + /** + * + * @type {Array} + * @memberof TransactionsResponseBodyIncludes + */ + 'transactions'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof TransactionsResponseBodyIncludes + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface UpdateGoalRequest + */ +export interface UpdateGoalRequest { + /** + * Unique identifier of the account for the goal. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'account_guid'?: string; + /** + * Amount of the goal. + * @type {number} + * @memberof UpdateGoalRequest + */ + 'amount'?: number; + /** + * The goal type. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'goal_type_name'?: string; + /** + * The category of the goal. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'meta_type_name'?: string; + /** + * The name of the goal. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'name'?: string; + /** + * Date and time the goal was completed. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'completed_at'?: string; + /** + * Determines if the goal has been spent. + * @type {boolean} + * @memberof UpdateGoalRequest + */ + 'has_been_spent'?: boolean; + /** + * Determines if the goal is complete. + * @type {boolean} + * @memberof UpdateGoalRequest + */ + 'is_complete'?: boolean; + /** + * Additional information a partner can store on the goal. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'metadata'?: string; + /** + * The priority of the goal in relation to multiple goals. + * @type {number} + * @memberof UpdateGoalRequest + */ + 'position'?: number; + /** + * Date and time the goal is to complete. Intended for users to set their own goal completion dates. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'targeted_to_complete_at'?: string; +} +/** + * + * @export + * @interface UpdateGoalRequestBody + */ +export interface UpdateGoalRequestBody { + /** + * + * @type {UpdateGoalRequest} + * @memberof UpdateGoalRequestBody + */ + 'goal'?: UpdateGoalRequest; +} +/** + * + * @export + * @interface UserCreateRequest + */ +export interface UserCreateRequest { + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + 'id'?: string; + /** + * + * @type {boolean} + * @memberof UserCreateRequest + */ + 'is_disabled'?: boolean; + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + 'metadata'?: string; +} +/** + * + * @export + * @interface UserCreateRequestBody + */ +export interface UserCreateRequestBody { + /** + * + * @type {UserCreateRequest} + * @memberof UserCreateRequestBody + */ + 'user'?: UserCreateRequest; +} +/** + * + * @export + * @interface UserResponse + */ +export interface UserResponse { + /** + * + * @type {string} + * @memberof UserResponse + */ + 'email'?: string | null; + /** + * + * @type {string} + * @memberof UserResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof UserResponse + */ + 'id'?: string | null; + /** + * + * @type {boolean} + * @memberof UserResponse + */ + 'is_disabled'?: boolean | null; + /** + * + * @type {string} + * @memberof UserResponse + */ + 'metadata'?: string | null; +} +/** + * + * @export + * @interface UserResponseBody + */ +export interface UserResponseBody { + /** + * + * @type {UserResponse} + * @memberof UserResponseBody + */ + 'user'?: UserResponse; +} +/** + * + * @export + * @interface UserUpdateRequest + */ +export interface UserUpdateRequest { + /** + * + * @type {string} + * @memberof UserUpdateRequest + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof UserUpdateRequest + */ + 'id'?: string; + /** + * + * @type {boolean} + * @memberof UserUpdateRequest + */ + 'is_disabled'?: boolean; + /** + * + * @type {string} + * @memberof UserUpdateRequest + */ + 'metadata'?: string; +} +/** + * + * @export + * @interface UserUpdateRequestBody + */ +export interface UserUpdateRequestBody { + /** + * + * @type {UserUpdateRequest} + * @memberof UserUpdateRequestBody + */ + 'user'?: UserUpdateRequest; +} +/** + * + * @export + * @interface UsersResponseBody + */ +export interface UsersResponseBody { + /** + * + * @type {Array} + * @memberof UsersResponseBody + */ + 'users'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof UsersResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface VCResponse + */ +export interface VCResponse { + /** + * + * @type {string} + * @memberof VCResponse + */ + 'verifiableCredential'?: string; +} +/** + * + * @export + * @interface WidgetRequest + */ +export interface WidgetRequest { + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This determines the redirect destination at the end of OAuth when used with `is_mobile_webview: true` or `oauth_referral_source: \'APP\'`. + * @type {string} + * @memberof WidgetRequest + */ + 'client_redirect_url'?: string; + /** + * This option can be passed to any `widget_type` but will not affect [legacy PFM widgets](products/experience/pfm/legacy-widget-overviews/). Load the widget with the specified `color_scheme`; options are `light`, `browser` (respects user\'s browser setting), and `dark`. Defaults to `light`. + * @type {string} + * @memberof WidgetRequest + */ + 'color_scheme'?: string; + /** + * To use this parameter, you must also set `use_cases` in the same request. If `connections_use_case_filter` is set to `true`, the Connections Widget will only show connections (members) with the `use_cases` you set in the same request. For some examples, see [Filter Connections](/products/experience/pfm/widget-overviews/connections-widget#example-1). + * @type {boolean} + * @memberof WidgetRequest + */ + 'connections_use_case_filter'?: boolean; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. Load the widget into the credential view for the specified institution. + * @type {string} + * @memberof WidgetRequest + */ + 'current_institution_code'?: string; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. Load the widget into the credential view for the specified institution. + * @type {string} + * @memberof WidgetRequest + */ + 'current_institution_guid'?: string; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. Load the widget into a specific member that contains an error or requires multifactor authentication. The widget will determine the best view to load based on the member\'s current state. `current_member_guid` takes precedence over `current_institution_code` and `current_institution_guid`. + * @type {string} + * @memberof WidgetRequest + */ + 'current_member_guid'?: string; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This determines whether background aggregation is enabled or disabled for the member created by the Connect Widget. Defaults to `false` in `aggregation` mode and `true` in `verification` mode. A global default for all members can be set by reaching out to MX. + * @type {boolean} + * @memberof WidgetRequest + */ + 'disable_background_agg'?: boolean; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This determines whether the institution search is displayed within the Connect Widget. This option must be used with `current_institution_code`, `current_instituion_guid`, or `current_member_guid`. When set to `true`, the institution search feature will be disabled and end users will not be able to navigate to it. Defaults to `false`. + * @type {boolean} + * @memberof WidgetRequest + */ + 'disable_institution_search'?: boolean; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, the widget will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. + * @type {boolean} + * @memberof WidgetRequest + */ + 'enable_app2app'?: boolean; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This determines whether an account owner identification (AOI, previously called identity verification) is run in addition to the process specified by the `mode`. Defaults to `false`. This can be set in either `aggregation` or `verification` mode. The AOI runs after the primary process is complete. + * @type {boolean} + * @memberof WidgetRequest + */ + 'include_identity'?: boolean; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This determines whether transaction data are retrieved. Defaults to `true` in aggregation mode and `false` in verification mode. This can be set in either `aggregation` or `verification` mode. This option does not affect future foreground or background aggregations. + * @type {boolean} + * @memberof WidgetRequest + */ + 'include_transactions'?: boolean; + /** + * Only use this option if the `widget_type` is set to `pulse_widget`. Set this to the insight guid you want to appear at the top of the insights feed. + * @type {string} + * @memberof WidgetRequest + */ + 'insight_guid'?: string | null; + /** + * An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @type {Array} + * @memberof WidgetRequest + */ + 'iso_country_code'?: Array; + /** + * This option is for all `widget_type`s. This configures the widget to render in a mobile WebView. JavaScript event postMessages are replaced with URL updates. + * @type {boolean} + * @memberof WidgetRequest + */ + 'is_mobile_webview'?: boolean; + /** + * Only use this option if the `widget_type` is set to `micro_pulse_carousel_widget`. Set this to a unique value for each instance of the Micro Widget. This lets us collect unique data for each instance of the widget. + * @type {string} + * @memberof WidgetRequest + */ + 'microwidget_instance_id'?: string | null; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. `mode` is the most important option for the Connect Widget. This determines what kind of process Connect will run, which affects how you should set many other options. Defaults to `aggregation`. `aggregation` mode retrieves account and transaction data; in other words, this runs a standard aggregation. `verification` mode retrieves account numbers and routing/transit numbers; in other words, it runs an Instant Account Verification (IAV). By default, verification mode does not retrieve transaction data; this default can be modified with secondary options. By default, background aggregation is disabled for all members created in verification mode; this default can be modified with secondary options. + * @type {string} + * @memberof WidgetRequest + */ + 'mode'?: string; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This determines how MX will respond to the result of an OAuth flow. When set to `APP`, MX will redirect to the URI specified in the `ui_message_webview_url_scheme`. When set to `BROWSER`, MX will send a postMessage but not redirect. If `is_mobile_webview` is `true`, this defaults to `APP`. If false, it defaults to `BROWSER`. + * @type {string} + * @memberof WidgetRequest + */ + 'oauth_referral_source'?: string; + /** + * This option is for all `widget_type`s. This determines which version of postMessage events are triggered. Defaults to 4. All new implementations must use version 4. Prior versions are deprecated. + * @type {number} + * @memberof WidgetRequest + */ + 'ui_message_version'?: number; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This is a client-defined scheme used in OAuth redirects in WebViews; also used in URL updates when these replace postMessages in WebViews. Defaults to `mx`. + * @type {string} + * @memberof WidgetRequest + */ + 'ui_message_webview_url_scheme'?: string; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. Load the widget into a view that allows them to update the current member. Optionally used with `current_member_guid`. This option should be used sparingly. The best practice is to use `current_member_guid` and let the widget resolve the issue. + * @type {boolean} + * @memberof WidgetRequest + */ + 'update_credentials'?: boolean; + /** + * The use case that will be associated with any members created through the widget. Valid values are `PFM` and/or `MONEY_MOVEMENT`. This is **required** if you\'ve met with MX, opted in to using this field, and are requesting a widget with a `widget_type` of `connect_widget` or `connections_widget`. + * @type {Array} + * @memberof WidgetRequest + */ + 'use_cases'?: Array; + /** + * This determines which widget URL you\'ll receive. See [Widget Types](/api-reference/platform-api/reference/widget-types) for a list of potential values. Additional request parameters may only apply to some widget types. + * @type {string} + * @memberof WidgetRequest + */ + 'widget_type': string; +} + +export const WidgetRequestUseCasesEnum = { + MoneyMovement: 'MONEY_MOVEMENT', + Pfm: 'PFM' +} as const; + +export type WidgetRequestUseCasesEnum = typeof WidgetRequestUseCasesEnum[keyof typeof WidgetRequestUseCasesEnum]; + +/** + * + * @export + * @interface WidgetRequestBody + */ +export interface WidgetRequestBody { + /** + * + * @type {WidgetRequest} + * @memberof WidgetRequestBody + */ + 'widget_url'?: WidgetRequest; +} +/** + * + * @export + * @interface WidgetResponse + */ +export interface WidgetResponse { + /** + * + * @type {string} + * @memberof WidgetResponse + */ + 'type'?: string | null; + /** + * + * @type {string} + * @memberof WidgetResponse + */ + 'url'?: string | null; + /** + * + * @type {string} + * @memberof WidgetResponse + */ + 'user_id'?: string | null; +} +/** + * + * @export + * @interface WidgetResponseBody + */ +export interface WidgetResponseBody { + /** + * + * @type {WidgetResponse} + * @memberof WidgetResponseBody + */ + 'widget_url'?: WidgetResponse; +} + +/** + * AccountsApi - axios parameter creator + * @export + */ +export const AccountsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * List all budgets - * @summary List all budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. + * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed.. + * @summary Create manual account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidBudgetsGet: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + createManualAccount: async (userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsGet', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/budgets` + assertParamExists('createManualAccount', 'userGuid', userGuid) + // verify required parameter 'accountCreateRequestBody' is not null or undefined + assertParamExists('createManualAccount', 'accountCreateRequestBody', accountCreateRequestBody) + const localVarPath = `/users/{user_guid}/accounts` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -7559,7 +9107,7 @@ export const BudgetsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -7569,9 +9117,12 @@ export const BudgetsApiAxiosParamCreator = function (configuration?: Configurati + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(accountCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -7579,19 +9130,23 @@ export const BudgetsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. - * @summary Create a budget - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {BudgetCreateRequestBody} budgetCreateRequestBody + * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete manual account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidBudgetsPost: async (userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + deleteManualAccount: async (accountGuid: string, accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('deleteManualAccount', 'accountGuid', accountGuid) + // verify required parameter 'accept' is not null or undefined + assertParamExists('deleteManualAccount', 'accept', accept) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidBudgetsPost', 'userGuid', userGuid) - // verify required parameter 'budgetCreateRequestBody' is not null or undefined - assertParamExists('usersUserGuidBudgetsPost', 'budgetCreateRequestBody', budgetCreateRequestBody) - const localVarPath = `/users/{user_guid}/budgets` + assertParamExists('deleteManualAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -7600,7 +9155,7 @@ export const BudgetsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -7608,285 +9163,142 @@ export const BudgetsApiAxiosParamCreator = function (configuration?: Configurati // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (accept != null) { + localVarHeaderParameter['Accept'] = String(accept); + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(budgetCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, - } -}; - -/** - * BudgetsApi - functional programming interface - * @export - */ -export const BudgetsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = BudgetsApiAxiosParamCreator(configuration) - return { - /** - * Delete a budget. - * @summary Delete a budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUserGuidBudgetsBudgetGuidDelete(userGuid: string, budgetGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidBudgetsBudgetGuidDelete(userGuid, budgetGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Read a specific budget. - * @summary Read a specific budget - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUserGuidBudgetsBudgetGuidGet(budgetGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidBudgetsBudgetGuidGet(budgetGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Update a specific budget. - * @summary Update a specific budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUserGuidBudgetsBudgetGuidPut(userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidBudgetsBudgetGuidPut(userGuid, budgetGuid, budgetUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. - * @summary Auto-generate budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUserGuidBudgetsGeneratePost(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidBudgetsGeneratePost(userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * List all budgets - * @summary List all budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUserGuidBudgetsGet(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidBudgetsGet(userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. - * @summary Create a budget - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {BudgetCreateRequestBody} budgetCreateRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUserGuidBudgetsPost(userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidBudgetsPost(userGuid, budgetCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * BudgetsApi - factory interface - * @export - */ -export const BudgetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = BudgetsApiFp(configuration) - return { - /** - * Delete a budget. - * @summary Delete a budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsBudgetGuidDelete(userGuid: string, budgetGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidBudgetsBudgetGuidDelete(userGuid, budgetGuid, options).then((request) => request(axios, basePath)); - }, - /** - * Read a specific budget. - * @summary Read a specific budget - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsBudgetGuidGet(budgetGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidBudgetsBudgetGuidGet(budgetGuid, userGuid, options).then((request) => request(axios, basePath)); - }, - /** - * Update a specific budget. - * @summary Update a specific budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsBudgetGuidPut(userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidBudgetsBudgetGuidPut(userGuid, budgetGuid, budgetUpdateRequestBody, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. - * @summary Auto-generate budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidBudgetsGeneratePost(userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidBudgetsGeneratePost(userGuid, options).then((request) => request(axios, basePath)); - }, /** - * List all budgets - * @summary List all budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. + * This endpoint returns a list of account numbers associated with the specified `account`. + * @summary List account numbers by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidBudgetsGet(userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidBudgetsGet(userGuid, options).then((request) => request(axios, basePath)); + listAccountNumbersByAccount: async (accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('listAccountNumbersByAccount', 'accountGuid', accountGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listAccountNumbersByAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}/account_numbers` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. - * @summary Create a budget - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {BudgetCreateRequestBody} budgetCreateRequestBody + * This endpoint returns a list of account numbers associated with the specified `member`. + * @summary List account numbers by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidBudgetsPost(userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidBudgetsPost(userGuid, budgetCreateRequestBody, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * BudgetsApi - object-oriented interface - * @export - * @class BudgetsApi - * @extends {BaseAPI} - */ -export class BudgetsApi extends BaseAPI { - /** - * Delete a budget. - * @summary Delete a budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BudgetsApi - */ - public usersUserGuidBudgetsBudgetGuidDelete(userGuid: string, budgetGuid: string, options?: AxiosRequestConfig) { - return BudgetsApiFp(this.configuration).usersUserGuidBudgetsBudgetGuidDelete(userGuid, budgetGuid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Read a specific budget. - * @summary Read a specific budget - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BudgetsApi - */ - public usersUserGuidBudgetsBudgetGuidGet(budgetGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return BudgetsApiFp(this.configuration).usersUserGuidBudgetsBudgetGuidGet(budgetGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + listAccountNumbersByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listAccountNumbersByMember', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listAccountNumbersByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/account_numbers` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Update a specific budget. - * @summary Update a specific budget - * @param {string} userGuid The unique identifier for the budget. Defined by MX. - * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. - * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BudgetsApi - */ - public usersUserGuidBudgetsBudgetGuidPut(userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: AxiosRequestConfig) { - return BudgetsApiFp(this.configuration).usersUserGuidBudgetsBudgetGuidPut(userGuid, budgetGuid, budgetUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. - * @summary Auto-generate budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BudgetsApi - */ - public usersUserGuidBudgetsGeneratePost(userGuid: string, options?: AxiosRequestConfig) { - return BudgetsApiFp(this.configuration).usersUserGuidBudgetsGeneratePost(userGuid, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * List all budgets - * @summary List all budgets - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BudgetsApi - */ - public usersUserGuidBudgetsGet(userGuid: string, options?: AxiosRequestConfig) { - return BudgetsApiFp(this.configuration).usersUserGuidBudgetsGet(userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - /** - * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. - * @summary Create a budget - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {BudgetCreateRequestBody} budgetCreateRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BudgetsApi - */ - public usersUserGuidBudgetsPost(userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: AxiosRequestConfig) { - return BudgetsApiFp(this.configuration).usersUserGuidBudgetsPost(userGuid, budgetCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } -} + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; -/** - * GoalsApi - axios parameter creator - * @export - */ -export const GoalsApiAxiosParamCreator = function (configuration?: Configuration) { - return { + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** - * List all goals a user can set. - * @summary List goals - * @param {string} userGuid The unique identifier for the user. - * @param {string} [page] Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. - * @param {string} [recordsPerAge] The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + * This endpoint returns an array with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGet: async (userGuid: string, page?: string, recordsPerAge?: string, options: AxiosRequestConfig = {}): Promise => { + listAccountOwnersByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listAccountOwnersByMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGet', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/goals` + assertParamExists('listAccountOwnersByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/account_owners` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -7907,8 +9319,8 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['page'] = page; } - if (recordsPerAge !== undefined) { - localVarQueryParameter['records_per_age'] = recordsPerAge; + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; } @@ -7923,21 +9335,24 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Delete a goal. - * @summary Delete a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List accounts by member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGoalGuidDelete: async (goalGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'goalGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidDelete', 'goalGuid', goalGuid) + listMemberAccounts: async (userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidDelete', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/goals/{goal_guid}` - .replace(`{${"goal_guid"}}`, encodeURIComponent(String(goalGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('listMemberAccounts', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listMemberAccounts', 'memberGuid', memberGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -7945,7 +9360,7 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -7953,6 +9368,18 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (memberIsManagedByUser !== undefined) { + localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7965,20 +9392,21 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Read a specific goal. - * @summary Read a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint returns a list of all the accounts associated with the specified `user`. :::warning This request will not return the full account number. It may return the last four digits of the account number if that information has been provided during aggregation. If you need the full account number, please refer to [List account numbers by member](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-member/), [List account numbers by account](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-account/), or the [Fetch Account and Routing Numbers](https://docs.mx.com/products/connectivity/instant-account-verification/fetch-account-routing-number-api/#4-read-the-account-numbers) guide. ::: + * @summary List accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {boolean} [isManual] List only accounts that were manually created. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGoalGuidGet: async (goalGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'goalGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidGet', 'goalGuid', goalGuid) + listUserAccounts: async (userGuid: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidGet', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/goals/{goal_guid}` - .replace(`{${"goal_guid"}}`, encodeURIComponent(String(goalGuid))) + assertParamExists('listUserAccounts', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -7995,6 +9423,26 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (memberIsManagedByUser !== undefined) { + localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser; + } + + if (isManual !== undefined) { + localVarQueryParameter['is_manual'] = isManual; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (useCase !== undefined) { + localVarQueryParameter['use_case'] = useCase; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -8007,23 +9455,20 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint updates a specific goal. - * @summary Update a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. - * @param {UpdateGoalRequestBody} updateGoalRequestBody + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGoalGuidPut: async (goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'goalGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidPut', 'goalGuid', goalGuid) + readAccount: async (accountGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('readAccount', 'accountGuid', accountGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidPut', 'userGuid', userGuid) - // verify required parameter 'updateGoalRequestBody' is not null or undefined - assertParamExists('usersUserGuidGoalsGoalGuidPut', 'updateGoalRequestBody', updateGoalRequestBody) - const localVarPath = `/users/{user_guid}/goals/{goal_guid}` - .replace(`{${"goal_guid"}}`, encodeURIComponent(String(goalGuid))) + assertParamExists('readAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -8032,7 +9477,7 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -8042,12 +9487,9 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateGoalRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -8055,19 +9497,24 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. - * @summary Create a goal - * @param {string} userGuid The unique identifier for the user. - * @param {GoalRequestBody} goalRequestBody + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsPost: async (userGuid: string, goalRequestBody: GoalRequestBody, options: AxiosRequestConfig = {}): Promise => { + readAccountByMember: async (accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('readAccountByMember', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('readAccountByMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsPost', 'userGuid', userGuid) - // verify required parameter 'goalRequestBody' is not null or undefined - assertParamExists('usersUserGuidGoalsPost', 'goalRequestBody', goalRequestBody) - const localVarPath = `/users/{user_guid}/goals` + assertParamExists('readAccountByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -8076,7 +9523,7 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -8086,12 +9533,9 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(goalRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -8099,19 +9543,27 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. - * @summary Reposition goals - * @param {string} userGuid The unique identifier for the user. - * @param {RepositionRequestBody} repositionRequestBody + * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. + * @summary Update account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountUpdateRequestBody} accountUpdateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsRepositionPut: async (userGuid: string, repositionRequestBody: RepositionRequestBody, options: AxiosRequestConfig = {}): Promise => { + updateAccountByMember: async (accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('updateAccountByMember', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('updateAccountByMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidGoalsRepositionPut', 'userGuid', userGuid) - // verify required parameter 'repositionRequestBody' is not null or undefined - assertParamExists('usersUserGuidGoalsRepositionPut', 'repositionRequestBody', repositionRequestBody) - const localVarPath = `/users/{user_guid}/goals/reposition` + assertParamExists('updateAccountByMember', 'userGuid', userGuid) + // verify required parameter 'accountUpdateRequestBody' is not null or undefined + assertParamExists('updateAccountByMember', 'accountUpdateRequestBody', accountUpdateRequestBody) + const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -8135,7 +9587,7 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(repositionRequestBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(accountUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -8146,485 +9598,463 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration }; /** - * GoalsApi - functional programming interface + * AccountsApi - functional programming interface * @export */ -export const GoalsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = GoalsApiAxiosParamCreator(configuration) +export const AccountsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AccountsApiAxiosParamCreator(configuration) return { /** - * List all goals a user can set. - * @summary List goals - * @param {string} userGuid The unique identifier for the user. - * @param {string} [page] Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. - * @param {string} [recordsPerAge] The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed.. + * @summary Create manual account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidGoalsGet(userGuid: string, page?: string, recordsPerAge?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidGoalsGet(userGuid, page, recordsPerAge, options); + async createManualAccount(userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManualAccount(userGuid, accountCreateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Delete a goal. - * @summary Delete a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete manual account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidGoalsGoalGuidDelete(goalGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidGoalsGoalGuidDelete(goalGuid, userGuid, options); + async deleteManualAccount(accountGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManualAccount(accountGuid, accept, userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Read a specific goal. - * @summary Read a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint returns a list of account numbers associated with the specified `account`. + * @summary List account numbers by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidGoalsGoalGuidGet(goalGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidGoalsGoalGuidGet(goalGuid, userGuid, options); + async listAccountNumbersByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint updates a specific goal. - * @summary Update a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. - * @param {UpdateGoalRequestBody} updateGoalRequestBody + * This endpoint returns a list of account numbers associated with the specified `member`. + * @summary List account numbers by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidGoalsGoalGuidPut(goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidGoalsGoalGuidPut(goalGuid, userGuid, updateGoalRequestBody, options); + async listAccountNumbersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. - * @summary Create a goal - * @param {string} userGuid The unique identifier for the user. - * @param {GoalRequestBody} goalRequestBody + * This endpoint returns an array with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidGoalsPost(userGuid: string, goalRequestBody: GoalRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidGoalsPost(userGuid, goalRequestBody, options); + async listAccountOwnersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. - * @summary Reposition goals - * @param {string} userGuid The unique identifier for the user. - * @param {RepositionRequestBody} repositionRequestBody + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List accounts by member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listMemberAccounts(userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of all the accounts associated with the specified `user`. :::warning This request will not return the full account number. It may return the last four digits of the account number if that information has been provided during aggregation. If you need the full account number, please refer to [List account numbers by member](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-member/), [List account numbers by account](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-account/), or the [Fetch Account and Routing Numbers](https://docs.mx.com/products/connectivity/instant-account-verification/fetch-account-routing-number-api/#4-read-the-account-numbers) guide. ::: + * @summary List accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {boolean} [isManual] List only accounts that were manually created. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listUserAccounts(userGuid: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserAccounts(userGuid, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readAccount(accountGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readAccount(accountGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readAccountByMember(accountGuid, memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. + * @summary Update account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountUpdateRequestBody} accountUpdateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidGoalsRepositionPut(userGuid: string, repositionRequestBody: RepositionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidGoalsRepositionPut(userGuid, repositionRequestBody, options); + async updateAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccountByMember(accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** - * GoalsApi - factory interface + * AccountsApi - factory interface * @export */ -export const GoalsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = GoalsApiFp(configuration) +export const AccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AccountsApiFp(configuration) return { /** - * List all goals a user can set. - * @summary List goals - * @param {string} userGuid The unique identifier for the user. - * @param {string} [page] Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. - * @param {string} [recordsPerAge] The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed.. + * @summary Create manual account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGet(userGuid: string, page?: string, recordsPerAge?: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidGoalsGet(userGuid, page, recordsPerAge, options).then((request) => request(axios, basePath)); + createManualAccount(userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManualAccount(userGuid, accountCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Delete a goal. - * @summary Delete a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete manual account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGoalGuidDelete(goalGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidGoalsGoalGuidDelete(goalGuid, userGuid, options).then((request) => request(axios, basePath)); + deleteManualAccount(accountGuid: string, accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManualAccount(accountGuid, accept, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Read a specific goal. - * @summary Read a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint returns a list of account numbers associated with the specified `account`. + * @summary List account numbers by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGoalGuidGet(goalGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidGoalsGoalGuidGet(goalGuid, userGuid, options).then((request) => request(axios, basePath)); + listAccountNumbersByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint updates a specific goal. - * @summary Update a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. - * @param {UpdateGoalRequestBody} updateGoalRequestBody + * This endpoint returns a list of account numbers associated with the specified `member`. + * @summary List account numbers by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAccountNumbersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns an array with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsGoalGuidPut(goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidGoalsGoalGuidPut(goalGuid, userGuid, updateGoalRequestBody, options).then((request) => request(axios, basePath)); + listAccountOwnersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. - * @summary Create a goal - * @param {string} userGuid The unique identifier for the user. - * @param {GoalRequestBody} goalRequestBody + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List accounts by member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsPost(userGuid: string, goalRequestBody: GoalRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidGoalsPost(userGuid, goalRequestBody, options).then((request) => request(axios, basePath)); + listMemberAccounts(userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. - * @summary Reposition goals - * @param {string} userGuid The unique identifier for the user. - * @param {RepositionRequestBody} repositionRequestBody + * This endpoint returns a list of all the accounts associated with the specified `user`. :::warning This request will not return the full account number. It may return the last four digits of the account number if that information has been provided during aggregation. If you need the full account number, please refer to [List account numbers by member](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-member/), [List account numbers by account](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-account/), or the [Fetch Account and Routing Numbers](https://docs.mx.com/products/connectivity/instant-account-verification/fetch-account-routing-number-api/#4-read-the-account-numbers) guide. ::: + * @summary List accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {boolean} [isManual] List only accounts that were manually created. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserAccounts(userGuid: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options?: any): AxiosPromise { + return localVarFp.listUserAccounts(userGuid, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readAccount(accountGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readAccount(accountGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readAccountByMember(accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. + * @summary Update account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountUpdateRequestBody} accountUpdateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidGoalsRepositionPut(userGuid: string, repositionRequestBody: RepositionRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidGoalsRepositionPut(userGuid, repositionRequestBody, options).then((request) => request(axios, basePath)); + updateAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateAccountByMember(accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options).then((request) => request(axios, basePath)); }, }; }; -/** - * GoalsApi - object-oriented interface - * @export - * @class GoalsApi - * @extends {BaseAPI} - */ -export class GoalsApi extends BaseAPI { +/** + * AccountsApi - object-oriented interface + * @export + * @class AccountsApi + * @extends {BaseAPI} + */ +export class AccountsApi extends BaseAPI { + /** + * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed.. + * @summary Create manual account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public createManualAccount(userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).createManualAccount(userGuid, accountCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete manual account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public deleteManualAccount(accountGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).deleteManualAccount(accountGuid, accept, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of account numbers associated with the specified `account`. + * @summary List account numbers by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public listAccountNumbersByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of account numbers associated with the specified `member`. + * @summary List account numbers by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public listAccountNumbersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + /** - * List all goals a user can set. - * @summary List goals - * @param {string} userGuid The unique identifier for the user. - * @param {string} [page] Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. - * @param {string} [recordsPerAge] The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + * This endpoint returns an array with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof GoalsApi + * @memberof AccountsApi */ - public usersUserGuidGoalsGet(userGuid: string, page?: string, recordsPerAge?: string, options?: AxiosRequestConfig) { - return GoalsApiFp(this.configuration).usersUserGuidGoalsGet(userGuid, page, recordsPerAge, options).then((request) => request(this.axios, this.basePath)); + public listAccountOwnersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); } /** - * Delete a goal. - * @summary Delete a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List accounts by member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof GoalsApi + * @memberof AccountsApi */ - public usersUserGuidGoalsGoalGuidDelete(goalGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return GoalsApiFp(this.configuration).usersUserGuidGoalsGoalGuidDelete(goalGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + public listMemberAccounts(userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); } /** - * Read a specific goal. - * @summary Read a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. + * This endpoint returns a list of all the accounts associated with the specified `user`. :::warning This request will not return the full account number. It may return the last four digits of the account number if that information has been provided during aggregation. If you need the full account number, please refer to [List account numbers by member](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-member/), [List account numbers by account](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-account/), or the [Fetch Account and Routing Numbers](https://docs.mx.com/products/connectivity/instant-account-verification/fetch-account-routing-number-api/#4-read-the-account-numbers) guide. ::: + * @summary List accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. + * @param {boolean} [isManual] List only accounts that were manually created. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof GoalsApi + * @memberof AccountsApi */ - public usersUserGuidGoalsGoalGuidGet(goalGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return GoalsApiFp(this.configuration).usersUserGuidGoalsGoalGuidGet(goalGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + public listUserAccounts(userGuid: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listUserAccounts(userGuid, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint updates a specific goal. - * @summary Update a goal - * @param {string} goalGuid The unique identifier for a goal. Defined by MX. - * @param {string} userGuid The unique identifier for a user. - * @param {UpdateGoalRequestBody} updateGoalRequestBody + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof GoalsApi + * @memberof AccountsApi */ - public usersUserGuidGoalsGoalGuidPut(goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: AxiosRequestConfig) { - return GoalsApiFp(this.configuration).usersUserGuidGoalsGoalGuidPut(goalGuid, userGuid, updateGoalRequestBody, options).then((request) => request(this.axios, this.basePath)); + public readAccount(accountGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).readAccount(accountGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. - * @summary Create a goal - * @param {string} userGuid The unique identifier for the user. - * @param {GoalRequestBody} goalRequestBody + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof GoalsApi + * @memberof AccountsApi */ - public usersUserGuidGoalsPost(userGuid: string, goalRequestBody: GoalRequestBody, options?: AxiosRequestConfig) { - return GoalsApiFp(this.configuration).usersUserGuidGoalsPost(userGuid, goalRequestBody, options).then((request) => request(this.axios, this.basePath)); + public readAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).readAccountByMember(accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. - * @summary Reposition goals - * @param {string} userGuid The unique identifier for the user. - * @param {RepositionRequestBody} repositionRequestBody + * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. + * @summary Update account by member + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountUpdateRequestBody} accountUpdateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof GoalsApi + * @memberof AccountsApi */ - public usersUserGuidGoalsRepositionPut(userGuid: string, repositionRequestBody: RepositionRequestBody, options?: AxiosRequestConfig) { - return GoalsApiFp(this.configuration).usersUserGuidGoalsRepositionPut(userGuid, repositionRequestBody, options).then((request) => request(this.axios, this.basePath)); + public updateAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateAccountByMember(accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); } } - -/** - * InsightsApi - axios parameter creator - * @export - */ -export const InsightsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Use this endpoint to list all the accounts associated with the insight. - * @summary List all accounts associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAccountsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listAccountsInsight', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('listAccountsInsight', 'insightGuid', insightGuid) - const localVarPath = `/users/{user_guid}/insights/{insight_guid}/accounts` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to list all the categories associated with the insight. - * @summary List all categories associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCategoriesInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listCategoriesInsight', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('listCategoriesInsight', 'insightGuid', insightGuid) - const localVarPath = `/users/{user_guid}/insights/{insight_guid}/categories` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to list all insights associated with a specified account GUID. - * @summary List insights by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInsightsByAccount: async (accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('listInsightsByAccount', 'accountGuid', accountGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listInsightsByAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}/insights` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to list all the insights associated with the user. - * @summary List all insights for a user. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInsightsUser: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listInsightsUser', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/insights` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, + +/** + * AchReturnApi - axios parameter creator + * @export + */ +export const AchReturnApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to list all the merchants associated with the insight. - * @summary List all merchants associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to create an ACH return in our system. + * @summary Create ACH Return + * @param {ACHReturnCreateRequestBody} aCHReturnCreateRequestBody ACH return object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMerchantsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listMerchantsInsight', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('listMerchantsInsight', 'insightGuid', insightGuid) - const localVarPath = `/users/{user_guid}/insights/{insight_guid}/merchants` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); + createACHReturn: async (aCHReturnCreateRequestBody: ACHReturnCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'aCHReturnCreateRequestBody' is not null or undefined + assertParamExists('createACHReturn', 'aCHReturnCreateRequestBody', aCHReturnCreateRequestBody) + const localVarPath = `/ach_returns`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8632,7 +10062,7 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -8640,19 +10070,14 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(aCHReturnCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -8660,23 +10085,20 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Use this endpoint to list all the scheduled payments associated with the insight. - * @summary List all scheduled payments associated with an insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get all ACH returns. + * @summary List ACH Returns + * @param {string} [institutionGuid] The identifier for the institution associated with the ACH return. Defined by MX. + * @param {string} [returnedAt] The date and time when the return was reported by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp. + * @param {string} [resolvedStatusAt] The date and time when the return was resolved by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp + * @param {string} [returnCode] The associated ACH return code and notice of change code. See [Return Codes](/api-reference/platform-api/reference/ach-return-fields#return-codes) for a complete list. + * @param {string} [returnStatus] The status of the return. See [Return Statuses](/api-reference/platform-api/reference/ach-return-fields#return-status) for a complete list. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listScheduledPaymentsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listScheduledPaymentsInsight', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('listScheduledPaymentsInsight', 'insightGuid', insightGuid) - const localVarPath = `/users/{user_guid}/insights/{insight_guid}/scheduled_payments` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); + listACHRetruns: async (institutionGuid?: string, returnedAt?: string, resolvedStatusAt?: string, returnCode?: string, returnStatus?: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/ach_returns`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8692,57 +10114,25 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; + if (institutionGuid !== undefined) { + localVarQueryParameter['institution_guid'] = institutionGuid; } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; + if (returnedAt !== undefined) { + localVarQueryParameter['returned_at'] = returnedAt; } - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to list all the transactions associated with the insight. - * @summary List all transactions associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listTransactionsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTransactionsInsight', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('listTransactionsInsight', 'insightGuid', insightGuid) - const localVarPath = `/users/{user_guid}/insights/{insight_guid}/transactions` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (resolvedStatusAt !== undefined) { + localVarQueryParameter['resolved_status_at'] = resolvedStatusAt; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + if (returnCode !== undefined) { + localVarQueryParameter['return_code'] = returnCode; + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + if (returnStatus !== undefined) { + localVarQueryParameter['return_status'] = returnStatus; + } if (page !== undefined) { localVarQueryParameter['page'] = page; @@ -8764,21 +10154,17 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Use this endpoint to read the attributes of a specific insight according to its unique GUID. - * @summary Read a specific insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get an ACH return by its `guid` or `id`. + * @summary Read ACH Return + * @param {string} achReturnGuid The unique identifier (`guid`) for the ACH return. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readInsightsUser: async (userGuid: string, insightGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readInsightsUser', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('readInsightsUser', 'insightGuid', insightGuid) - const localVarPath = `/users/{user_guid}/insights{insight_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); + readACHRetrun: async (achReturnGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'achReturnGuid' is not null or undefined + assertParamExists('readACHRetrun', 'achReturnGuid', achReturnGuid) + const localVarPath = `/ach_returns/{ach_return_guid}` + .replace(`{${"ach_return_guid"}}`, encodeURIComponent(String(achReturnGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8800,54 +10186,6 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to update the attributes of a particular insight according to its unique GUID. - * @summary Update insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateInsight: async (userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateInsight', 'userGuid', userGuid) - // verify required parameter 'insightGuid' is not null or undefined - assertParamExists('updateInsight', 'insightGuid', insightGuid) - // verify required parameter 'insightUpdateRequest' is not null or undefined - assertParamExists('updateInsight', 'insightUpdateRequest', insightUpdateRequest) - const localVarPath = `/users/{user_guid}/insights{insight_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(insightUpdateRequest, localVarRequestOptions, configuration) - return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -8857,420 +10195,170 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }; /** - * InsightsApi - functional programming interface + * AchReturnApi - functional programming interface * @export */ -export const InsightsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = InsightsApiAxiosParamCreator(configuration) +export const AchReturnApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AchReturnApiAxiosParamCreator(configuration) return { /** - * Use this endpoint to list all the accounts associated with the insight. - * @summary List all accounts associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the categories associated with the insight. - * @summary List all categories associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all insights associated with a specified account GUID. - * @summary List insights by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the insights associated with the user. - * @summary List all insights for a user. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsUser(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the merchants associated with the insight. - * @summary List all merchants associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the scheduled payments associated with the insight. - * @summary List all scheduled payments associated with an insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the transactions associated with the insight. - * @summary List all transactions associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to create an ACH return in our system. + * @summary Create ACH Return + * @param {ACHReturnCreateRequestBody} aCHReturnCreateRequestBody ACH return object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options); + async createACHReturn(aCHReturnCreateRequestBody: ACHReturnCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createACHReturn(aCHReturnCreateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific insight according to its unique GUID. - * @summary Read a specific insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get all ACH returns. + * @summary List ACH Returns + * @param {string} [institutionGuid] The identifier for the institution associated with the ACH return. Defined by MX. + * @param {string} [returnedAt] The date and time when the return was reported by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp. + * @param {string} [resolvedStatusAt] The date and time when the return was resolved by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp + * @param {string} [returnCode] The associated ACH return code and notice of change code. See [Return Codes](/api-reference/platform-api/reference/ach-return-fields#return-codes) for a complete list. + * @param {string} [returnStatus] The status of the return. See [Return Statuses](/api-reference/platform-api/reference/ach-return-fields#return-status) for a complete list. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readInsightsUser(userGuid: string, insightGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readInsightsUser(userGuid, insightGuid, options); + async listACHRetruns(institutionGuid?: string, returnedAt?: string, resolvedStatusAt?: string, returnCode?: string, returnStatus?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listACHRetruns(institutionGuid, returnedAt, resolvedStatusAt, returnCode, returnStatus, page, recordsPerPage, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to update the attributes of a particular insight according to its unique GUID. - * @summary Update insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get an ACH return by its `guid` or `id`. + * @summary Read ACH Return + * @param {string} achReturnGuid The unique identifier (`guid`) for the ACH return. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateInsight(userGuid, insightGuid, insightUpdateRequest, options); + async readACHRetrun(achReturnGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readACHRetrun(achReturnGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } -}; - -/** - * InsightsApi - factory interface - * @export - */ -export const InsightsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = InsightsApiFp(configuration) - return { - /** - * Use this endpoint to list all the accounts associated with the insight. - * @summary List all accounts associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all the categories associated with the insight. - * @summary List all categories associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all insights associated with a specified account GUID. - * @summary List insights by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all the insights associated with the user. - * @summary List all insights for a user. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all the merchants associated with the insight. - * @summary List all merchants associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all the scheduled payments associated with the insight. - * @summary List all scheduled payments associated with an insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, +}; + +/** + * AchReturnApi - factory interface + * @export + */ +export const AchReturnApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AchReturnApiFp(configuration) + return { /** - * Use this endpoint to list all the transactions associated with the insight. - * @summary List all transactions associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to create an ACH return in our system. + * @summary Create ACH Return + * @param {ACHReturnCreateRequestBody} aCHReturnCreateRequestBody ACH return object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + createACHReturn(aCHReturnCreateRequestBody: ACHReturnCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createACHReturn(aCHReturnCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific insight according to its unique GUID. - * @summary Read a specific insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get all ACH returns. + * @summary List ACH Returns + * @param {string} [institutionGuid] The identifier for the institution associated with the ACH return. Defined by MX. + * @param {string} [returnedAt] The date and time when the return was reported by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp. + * @param {string} [resolvedStatusAt] The date and time when the return was resolved by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp + * @param {string} [returnCode] The associated ACH return code and notice of change code. See [Return Codes](/api-reference/platform-api/reference/ach-return-fields#return-codes) for a complete list. + * @param {string} [returnStatus] The status of the return. See [Return Statuses](/api-reference/platform-api/reference/ach-return-fields#return-status) for a complete list. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readInsightsUser(userGuid: string, insightGuid: string, options?: any): AxiosPromise { - return localVarFp.readInsightsUser(userGuid, insightGuid, options).then((request) => request(axios, basePath)); + listACHRetruns(institutionGuid?: string, returnedAt?: string, resolvedStatusAt?: string, returnCode?: string, returnStatus?: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listACHRetruns(institutionGuid, returnedAt, resolvedStatusAt, returnCode, returnStatus, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the attributes of a particular insight according to its unique GUID. - * @summary Update insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get an ACH return by its `guid` or `id`. + * @summary Read ACH Return + * @param {string} achReturnGuid The unique identifier (`guid`) for the ACH return. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: any): AxiosPromise { - return localVarFp.updateInsight(userGuid, insightGuid, insightUpdateRequest, options).then((request) => request(axios, basePath)); + readACHRetrun(achReturnGuid: string, options?: any): AxiosPromise { + return localVarFp.readACHRetrun(achReturnGuid, options).then((request) => request(axios, basePath)); }, }; }; /** - * InsightsApi - object-oriented interface + * AchReturnApi - object-oriented interface * @export - * @class InsightsApi + * @class AchReturnApi * @extends {BaseAPI} */ -export class InsightsApi extends BaseAPI { - /** - * Use this endpoint to list all the accounts associated with the insight. - * @summary List all accounts associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the categories associated with the insight. - * @summary List all categories associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all insights associated with a specified account GUID. - * @summary List insights by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the insights associated with the user. - * @summary List all insights for a user. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the merchants associated with the insight. - * @summary List all merchants associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the scheduled payments associated with the insight. - * @summary List all scheduled payments associated with an insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - +export class AchReturnApi extends BaseAPI { /** - * Use this endpoint to list all the transactions associated with the insight. - * @summary List all transactions associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to create an ACH return in our system. + * @summary Create ACH Return + * @param {ACHReturnCreateRequestBody} aCHReturnCreateRequestBody ACH return object to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof AchReturnApi */ - public listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + public createACHReturn(aCHReturnCreateRequestBody: ACHReturnCreateRequestBody, options?: AxiosRequestConfig) { + return AchReturnApiFp(this.configuration).createACHReturn(aCHReturnCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to read the attributes of a specific insight according to its unique GUID. - * @summary Read a specific insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get all ACH returns. + * @summary List ACH Returns + * @param {string} [institutionGuid] The identifier for the institution associated with the ACH return. Defined by MX. + * @param {string} [returnedAt] The date and time when the return was reported by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp. + * @param {string} [resolvedStatusAt] The date and time when the return was resolved by the Receiving Financial Depository Institution (RDFI) in ISO 8601 format without timestamp + * @param {string} [returnCode] The associated ACH return code and notice of change code. See [Return Codes](/api-reference/platform-api/reference/ach-return-fields#return-codes) for a complete list. + * @param {string} [returnStatus] The status of the return. See [Return Statuses](/api-reference/platform-api/reference/ach-return-fields#return-status) for a complete list. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof AchReturnApi */ - public readInsightsUser(userGuid: string, insightGuid: string, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).readInsightsUser(userGuid, insightGuid, options).then((request) => request(this.axios, this.basePath)); + public listACHRetruns(institutionGuid?: string, returnedAt?: string, resolvedStatusAt?: string, returnCode?: string, returnStatus?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AchReturnApiFp(this.configuration).listACHRetruns(institutionGuid, returnedAt, resolvedStatusAt, returnCode, returnStatus, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to update the attributes of a particular insight according to its unique GUID. - * @summary Update insight - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * :::warning The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change. ::: Use this endpoint to get an ACH return by its `guid` or `id`. + * @summary Read ACH Return + * @param {string} achReturnGuid The unique identifier (`guid`) for the ACH return. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof AchReturnApi */ - public updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).updateInsight(userGuid, insightGuid, insightUpdateRequest, options).then((request) => request(this.axios, this.basePath)); + public readACHRetrun(achReturnGuid: string, options?: AxiosRequestConfig) { + return AchReturnApiFp(this.configuration).readACHRetrun(achReturnGuid, options).then((request) => request(this.axios, this.basePath)); } } /** - * MicrodepositsApi - axios parameter creator + * BudgetsApi - axios parameter creator * @export */ -export const MicrodepositsApiAxiosParamCreator = function (configuration?: Configuration) { +export const BudgetsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. - * @summary Verify a Microdeposit - * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. + * @summary Auto-generate budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - microDepositsMicrodepositGuidVerifyPut: async (microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'microdepositGuid' is not null or undefined - assertParamExists('microDepositsMicrodepositGuidVerifyPut', 'microdepositGuid', microdepositGuid) - const localVarPath = `/micro_deposits/{microdeposit_guid}/verify` - .replace(`{${"microdeposit_guid"}}`, encodeURIComponent(String(microdepositGuid))); + autoGenerateBudgets: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('autoGenerateBudgets', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/budgets/generate` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -9278,7 +10366,7 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -9288,12 +10376,9 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(microdepositVerifyRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -9301,16 +10386,19 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. - * @summary List all microdeposits for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. + * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. + * @summary Create a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {BudgetCreateRequestBody} budgetCreateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsGet: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + createBudget: async (userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsGet', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/micro_deposits` + assertParamExists('createBudget', 'userGuid', userGuid) + // verify required parameter 'budgetCreateRequestBody' is not null or undefined + assertParamExists('createBudget', 'budgetCreateRequestBody', budgetCreateRequestBody) + const localVarPath = `/users/{user_guid}/budgets` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -9319,7 +10407,7 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -9329,9 +10417,12 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi + localVarHeaderParameter['Content-Type'] = 'application/vnd.mx.api.v1+json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(budgetCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -9339,21 +10430,21 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Use this endpoint to delete the specified microdeposit. - * @summary Delete a microdeposit - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {string} userGuid The unique id for a `user`. + * Delete a budget. + * @summary Delete a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsMicroDepositGuidDelete: async (microDepositGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'microDepositGuid' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidDelete', 'microDepositGuid', microDepositGuid) + deleteBudget: async (userGuid: string, budgetGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidDelete', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` - .replace(`{${"micro_deposit_guid"}}`, encodeURIComponent(String(microDepositGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('deleteBudget', 'userGuid', userGuid) + // verify required parameter 'budgetGuid' is not null or undefined + assertParamExists('deleteBudget', 'budgetGuid', budgetGuid) + const localVarPath = `/users/{user_guid}/budgets/{budget_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"budget_guid"}}`, encodeURIComponent(String(budgetGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -9381,21 +10472,59 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. - * @summary Read a microdeposit for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * List all budgets + * @summary List all budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsMicroDepositGuidGet: async (userGuid: string, microDepositGuid: string, options: AxiosRequestConfig = {}): Promise => { + listAllBudgets: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidGet', 'userGuid', userGuid) - // verify required parameter 'microDepositGuid' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidGet', 'microDepositGuid', microDepositGuid) - const localVarPath = `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` + assertParamExists('listAllBudgets', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/budgets` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Read a specific budget. + * @summary Read a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readSpecificBudget: async (userGuid: string, budgetGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readSpecificBudget', 'userGuid', userGuid) + // verify required parameter 'budgetGuid' is not null or undefined + assertParamExists('readSpecificBudget', 'budgetGuid', budgetGuid) + const localVarPath = `/users/{user_guid}/budgets/{budget_guid}` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"micro_deposit_guid"}}`, encodeURIComponent(String(microDepositGuid))); + .replace(`{${"budget_guid"}}`, encodeURIComponent(String(budgetGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -9423,20 +10552,22 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. - * @summary Create a microdeposit - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {MicrodepositRequestBody} microdepositRequestBody + * Update a specific budget. + * @summary Update a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. + * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsPost: async (userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options: AxiosRequestConfig = {}): Promise => { + updateSpecificBudget: async (userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsPost', 'userGuid', userGuid) - // verify required parameter 'microdepositRequestBody' is not null or undefined - assertParamExists('usersUserGuidMicroDepositsPost', 'microdepositRequestBody', microdepositRequestBody) - const localVarPath = `/users/{user_guid}/micro_deposits` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('updateSpecificBudget', 'userGuid', userGuid) + // verify required parameter 'budgetGuid' is not null or undefined + assertParamExists('updateSpecificBudget', 'budgetGuid', budgetGuid) + const localVarPath = `/users/{user_guid}/budgets/{budget_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"budget_guid"}}`, encodeURIComponent(String(budgetGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -9444,7 +10575,7 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -9454,12 +10585,12 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi - localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Content-Type'] = 'application/vnd.mx.api.v1+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(microdepositRequestBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(budgetUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -9470,316 +10601,258 @@ export const MicrodepositsApiAxiosParamCreator = function (configuration?: Confi }; /** - * MicrodepositsApi - functional programming interface + * BudgetsApi - functional programming interface * @export */ -export const MicrodepositsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = MicrodepositsApiAxiosParamCreator(configuration) +export const BudgetsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BudgetsApiAxiosParamCreator(configuration) return { /** - * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. - * @summary Verify a Microdeposit - * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. + * @summary Auto-generate budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async microDepositsMicrodepositGuidVerifyPut(microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.microDepositsMicrodepositGuidVerifyPut(microdepositGuid, microdepositVerifyRequestBody, options); + async autoGenerateBudgets(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.autoGenerateBudgets(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. - * @summary List all microdeposits for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. + * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. + * @summary Create a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {BudgetCreateRequestBody} budgetCreateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidMicroDepositsGet(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsGet(userGuid, options); + async createBudget(userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBudget(userGuid, budgetCreateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to delete the specified microdeposit. - * @summary Delete a microdeposit - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {string} userGuid The unique id for a `user`. + * Delete a budget. + * @summary Delete a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid, userGuid, options); + async deleteBudget(userGuid: string, budgetGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBudget(userGuid, budgetGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. - * @summary Read a microdeposit for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * List all budgets + * @summary List all budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid: string, microDepositGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid, microDepositGuid, options); + async listAllBudgets(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllBudgets(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. - * @summary Create a microdeposit - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {MicrodepositRequestBody} microdepositRequestBody + * Read a specific budget. + * @summary Read a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readSpecificBudget(userGuid: string, budgetGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpecificBudget(userGuid, budgetGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Update a specific budget. + * @summary Update a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. + * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidMicroDepositsPost(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsPost(userGuid, microdepositRequestBody, options); + async updateSpecificBudget(userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSpecificBudget(userGuid, budgetGuid, budgetUpdateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** - * MicrodepositsApi - factory interface + * BudgetsApi - factory interface * @export */ -export const MicrodepositsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = MicrodepositsApiFp(configuration) +export const BudgetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BudgetsApiFp(configuration) return { /** - * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. - * @summary Verify a Microdeposit - * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. + * @summary Auto-generate budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + autoGenerateBudgets(userGuid: string, options?: any): AxiosPromise { + return localVarFp.autoGenerateBudgets(userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. + * @summary Create a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {BudgetCreateRequestBody} budgetCreateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - microDepositsMicrodepositGuidVerifyPut(microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: any): AxiosPromise { - return localVarFp.microDepositsMicrodepositGuidVerifyPut(microdepositGuid, microdepositVerifyRequestBody, options).then((request) => request(axios, basePath)); + createBudget(userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createBudget(userGuid, budgetCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. - * @summary List all microdeposits for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. + * Delete a budget. + * @summary Delete a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsGet(userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidMicroDepositsGet(userGuid, options).then((request) => request(axios, basePath)); + deleteBudget(userGuid: string, budgetGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteBudget(userGuid, budgetGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete the specified microdeposit. - * @summary Delete a microdeposit - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {string} userGuid The unique id for a `user`. + * List all budgets + * @summary List all budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid, userGuid, options).then((request) => request(axios, basePath)); + listAllBudgets(userGuid: string, options?: any): AxiosPromise { + return localVarFp.listAllBudgets(userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. - * @summary Read a microdeposit for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * Read a specific budget. + * @summary Read a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid: string, microDepositGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid, microDepositGuid, options).then((request) => request(axios, basePath)); + readSpecificBudget(userGuid: string, budgetGuid: string, options?: any): AxiosPromise { + return localVarFp.readSpecificBudget(userGuid, budgetGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. - * @summary Create a microdeposit - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {MicrodepositRequestBody} microdepositRequestBody + * Update a specific budget. + * @summary Update a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. + * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMicroDepositsPost(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidMicroDepositsPost(userGuid, microdepositRequestBody, options).then((request) => request(axios, basePath)); + updateSpecificBudget(userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateSpecificBudget(userGuid, budgetGuid, budgetUpdateRequestBody, options).then((request) => request(axios, basePath)); }, }; }; /** - * MicrodepositsApi - object-oriented interface + * BudgetsApi - object-oriented interface * @export - * @class MicrodepositsApi + * @class BudgetsApi * @extends {BaseAPI} */ -export class MicrodepositsApi extends BaseAPI { +export class BudgetsApi extends BaseAPI { /** - * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. - * @summary Verify a Microdeposit - * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren\'t enough transactions to automatically create any budgets`. + * @summary Auto-generate budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MicrodepositsApi + * @memberof BudgetsApi */ - public microDepositsMicrodepositGuidVerifyPut(microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig) { - return MicrodepositsApiFp(this.configuration).microDepositsMicrodepositGuidVerifyPut(microdepositGuid, microdepositVerifyRequestBody, options).then((request) => request(this.axios, this.basePath)); + public autoGenerateBudgets(userGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).autoGenerateBudgets(userGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. - * @summary List all microdeposits for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. + * Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint. + * @summary Create a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {BudgetCreateRequestBody} budgetCreateRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MicrodepositsApi + * @memberof BudgetsApi */ - public usersUserGuidMicroDepositsGet(userGuid: string, options?: AxiosRequestConfig) { - return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsGet(userGuid, options).then((request) => request(this.axios, this.basePath)); + public createBudget(userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).createBudget(userGuid, budgetCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to delete the specified microdeposit. - * @summary Delete a microdeposit - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. - * @param {string} userGuid The unique id for a `user`. + * Delete a budget. + * @summary Delete a budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MicrodepositsApi + * @memberof BudgetsApi */ - public usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + public deleteBudget(userGuid: string, budgetGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).deleteBudget(userGuid, budgetGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. - * @summary Read a microdeposit for a user - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * List all budgets + * @summary List all budgets + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MicrodepositsApi + * @memberof BudgetsApi */ - public usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid: string, microDepositGuid: string, options?: AxiosRequestConfig) { - return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid, microDepositGuid, options).then((request) => request(this.axios, this.basePath)); + public listAllBudgets(userGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).listAllBudgets(userGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. - * @summary Create a microdeposit - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {MicrodepositRequestBody} microdepositRequestBody + * Read a specific budget. + * @summary Read a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MicrodepositsApi + * @memberof BudgetsApi + */ + public readSpecificBudget(userGuid: string, budgetGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).readSpecificBudget(userGuid, budgetGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update a specific budget. + * @summary Update a specific budget + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} budgetGuid The unique identifier for the budget. Defined by MX. + * @param {BudgetUpdateRequestBody} [budgetUpdateRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BudgetsApi */ - public usersUserGuidMicroDepositsPost(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig) { - return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsPost(userGuid, microdepositRequestBody, options).then((request) => request(this.axios, this.basePath)); + public updateSpecificBudget(userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).updateSpecificBudget(userGuid, budgetGuid, budgetUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); } } /** - * MxPlatformApi - axios parameter creator + * CategoriesApi - axios parameter creator * @export */ -export const MxPlatformApiAxiosParamCreator = function (configuration?: Configuration) { +export const CategoriesApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. - * @summary Aggregate member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. - * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - aggregateMember: async (memberGuid: string, userGuid: string, includeHoldings?: boolean, includeTransactions?: boolean, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('aggregateMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('aggregateMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/aggregate` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (includeHoldings !== undefined) { - localVarQueryParameter['include_holdings'] = includeHoldings; - } - - if (includeTransactions !== undefined) { - localVarQueryParameter['include_transactions'] = includeTransactions; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. - * @summary Check balances - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - checkBalances: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('checkBalances', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('checkBalances', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/check_balance` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Use this endpoint to create a new custom category for a specific `user`. * @summary Create category - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -9821,23 +10894,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to create a partner-managed account. - * @summary Create managed account - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. + * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManagedAccount: async (memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('createManagedAccount', 'memberGuid', memberGuid) + deleteCategory: async (categoryGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'categoryGuid' is not null or undefined + assertParamExists('deleteCategory', 'categoryGuid', categoryGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createManagedAccount', 'userGuid', userGuid) - // verify required parameter 'managedAccountCreateRequestBody' is not null or undefined - assertParamExists('createManagedAccount', 'managedAccountCreateRequestBody', managedAccountCreateRequestBody) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('deleteCategory', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/categories/{category_guid}` + .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -9846,7 +10916,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -9856,12 +10926,9 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(managedAccountCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -9869,19 +10936,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to create a new partner-managed `member`. - * @summary Create managed member - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. + * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. + * @summary List categories + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManagedMember: async (userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + listCategories: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createManagedMember', 'userGuid', userGuid) - // verify required parameter 'managedMemberCreateRequestBody' is not null or undefined - assertParamExists('createManagedMember', 'managedMemberCreateRequestBody', managedMemberCreateRequestBody) - const localVarPath = `/users/{user_guid}/managed_members` + assertParamExists('listCategories', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/categories` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -9890,7 +10956,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -9898,66 +10964,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(managedMemberCreateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to create a new partner-managed `transaction`. - * @summary Create managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createManagedTransaction: async (accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('createManagedTransaction', 'accountGuid', accountGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('createManagedTransaction', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createManagedTransaction', 'userGuid', userGuid) - // verify required parameter 'managedTransactionCreateRequestBody' is not null or undefined - assertParamExists('createManagedTransaction', 'managedTransactionCreateRequestBody', managedTransactionCreateRequestBody) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (page !== undefined) { + localVarQueryParameter['page'] = page; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(managedTransactionCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -9965,20 +10984,15 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed. - * @summary Create manual account - * @param {string} userGuid The unique id for a `user`. - * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManualAccount: async (userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createManualAccount', 'userGuid', userGuid) - // verify required parameter 'accountCreateRequestBody' is not null or undefined - assertParamExists('createManualAccount', 'accountCreateRequestBody', accountCreateRequestBody) - const localVarPath = `/users/{user_guid}/accounts` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + listDefaultCategories: async (page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/categories/default`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -9986,7 +11000,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -9994,14 +11008,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(accountCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10009,19 +11028,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. - * @summary Create member - * @param {string} userGuid The unique id for a `user`. - * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) + * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createMember: async (userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + listDefaultCategoriesByUser: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createMember', 'userGuid', userGuid) - // verify required parameter 'memberCreateRequestBody' is not null or undefined - assertParamExists('createMember', 'memberCreateRequestBody', memberCreateRequestBody) - const localVarPath = `/users/{user_guid}/members` + assertParamExists('listDefaultCategoriesByUser', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/categories/default` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10030,7 +11048,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10038,14 +11056,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(memberCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10053,19 +11076,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to create a new custom tag. - * @summary Create tag - * @param {string} userGuid The unique id for a `user`. - * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) + * Use this endpoint to read the attributes of either a default category or a custom category. + * @summary Read a custom category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTag: async (userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + readCategory: async (categoryGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'categoryGuid' is not null or undefined + assertParamExists('readCategory', 'categoryGuid', categoryGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createTag', 'userGuid', userGuid) - // verify required parameter 'tagCreateRequestBody' is not null or undefined - assertParamExists('createTag', 'tagCreateRequestBody', tagCreateRequestBody) - const localVarPath = `/users/{user_guid}/tags` + assertParamExists('readCategory', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/categories/{category_guid}` + .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10074,7 +11098,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10084,12 +11108,9 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(tagCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10097,20 +11118,17 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. - * @summary Create tagging - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) + * Use this endpoint to read the attributes of a default category. + * @summary Read a default category + * @param {string} categoryGuid The unique id for a `category`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTagging: async (userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createTagging', 'userGuid', userGuid) - // verify required parameter 'taggingCreateRequestBody' is not null or undefined - assertParamExists('createTagging', 'taggingCreateRequestBody', taggingCreateRequestBody) - const localVarPath = `/users/{user_guid}/taggings` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + readDefaultCategory: async (categoryGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'categoryGuid' is not null or undefined + assertParamExists('readDefaultCategory', 'categoryGuid', categoryGuid) + const localVarPath = `/categories/{category_guid}` + .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -10118,7 +11136,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10128,12 +11146,9 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(taggingCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10141,19 +11156,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. - * @summary Create transaction rule - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) + * Use this endpoint to update the attributes of a custom category according to its unique GUID. + * @summary Update category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransactionRule: async (userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + updateCategory: async (categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'categoryGuid' is not null or undefined + assertParamExists('updateCategory', 'categoryGuid', categoryGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createTransactionRule', 'userGuid', userGuid) - // verify required parameter 'transactionRuleCreateRequestBody' is not null or undefined - assertParamExists('createTransactionRule', 'transactionRuleCreateRequestBody', transactionRuleCreateRequestBody) - const localVarPath = `/users/{user_guid}/transaction_rules` + assertParamExists('updateCategory', 'userGuid', userGuid) + // verify required parameter 'categoryUpdateRequestBody' is not null or undefined + assertParamExists('updateCategory', 'categoryUpdateRequestBody', categoryUpdateRequestBody) + const localVarPath = `/users/{user_guid}/categories/{category_guid}` + .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10162,7 +11181,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10177,106 +11196,360 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionRuleCreateRequestBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(categoryUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * CategoriesApi - functional programming interface + * @export + */ +export const CategoriesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CategoriesApiAxiosParamCreator(configuration) + return { + /** + * Use this endpoint to create a new custom category for a specific `user`. + * @summary Create category + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createCategory(userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createCategory(userGuid, categoryCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCategory(categoryGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. + * @summary List categories + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCategories(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCategories(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listDefaultCategories(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listDefaultCategories(page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listDefaultCategoriesByUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listDefaultCategoriesByUser(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of either a default category or a custom category. + * @summary Read a custom category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readCategory(categoryGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a default category. + * @summary Read a default category + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readDefaultCategory(categoryGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readDefaultCategory(categoryGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of a custom category according to its unique GUID. + * @summary Update category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateCategory(categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateCategory(categoryGuid, userGuid, categoryUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * CategoriesApi - factory interface + * @export + */ +export const CategoriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CategoriesApiFp(configuration) + return { + /** + * Use this endpoint to create a new custom category for a specific `user`. + * @summary Create category + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCategory(userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createCategory(userGuid, categoryCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteCategory(categoryGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteCategory(categoryGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. + * @summary List categories + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCategories(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listCategories(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listDefaultCategories(page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listDefaultCategories(page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, /** - * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. - * @summary Create user - * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) + * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (userCreateRequestBody: UserCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userCreateRequestBody' is not null or undefined - assertParamExists('createUser', 'userCreateRequestBody', userCreateRequestBody) - const localVarPath = `/users`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + listDefaultCategoriesByUser(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listDefaultCategoriesByUser(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of either a default category or a custom category. + * @summary Read a custom category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readCategory(categoryGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readCategory(categoryGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a default category. + * @summary Read a default category + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readDefaultCategory(categoryGuid: string, options?: any): AxiosPromise { + return localVarFp.readDefaultCategory(categoryGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of a custom category according to its unique GUID. + * @summary Update category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateCategory(categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateCategory(categoryGuid, userGuid, categoryUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; +/** + * CategoriesApi - object-oriented interface + * @export + * @class CategoriesApi + * @extends {BaseAPI} + */ +export class CategoriesApi extends BaseAPI { + /** + * Use this endpoint to create a new custom category for a specific `user`. + * @summary Create category + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public createCategory(userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).createCategory(userGuid, categoryCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. + * @summary Delete category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public deleteCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).deleteCategory(categoryGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. + * @summary List categories + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public listCategories(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).listCategories(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + /** + * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public listDefaultCategories(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).listDefaultCategories(page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(userCreateRequestBody, localVarRequestOptions, configuration) + /** + * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. + * @summary List default categories by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public listDefaultCategoriesByUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).listDefaultCategoriesByUser(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint returns the specified `credit_card_product` according to the unique GUID. - * @summary Read a Credit Card Product - * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - creditCard: async (creditCardProductGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'creditCardProductGuid' is not null or undefined - assertParamExists('creditCard', 'creditCardProductGuid', creditCardProductGuid) - const localVarPath = `/credit_card_products/{credit_card_product_guid}` - .replace(`{${"credit_card_product_guid"}}`, encodeURIComponent(String(creditCardProductGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + /** + * Use this endpoint to read the attributes of either a default category or a custom category. + * @summary Read a custom category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public readCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).readCategory(categoryGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Use this endpoint to read the attributes of a default category. + * @summary Read a default category + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public readDefaultCategory(categoryGuid: string, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).readDefaultCategory(categoryGuid, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to update the attributes of a custom category according to its unique GUID. + * @summary Update category + * @param {string} categoryGuid The unique id for a `category`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public updateCategory(categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).updateCategory(categoryGuid, userGuid, categoryUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * GoalsApi - axios parameter creator + * @export + */ +export const GoalsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. + * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + * @summary Create a goal + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {GoalRequestBody} goalRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteCategory: async (categoryGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'categoryGuid' is not null or undefined - assertParamExists('deleteCategory', 'categoryGuid', categoryGuid) + createGoal: async (userGuid: string, goalRequestBody: GoalRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteCategory', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/categories/{category_guid}` - .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))) + assertParamExists('createGoal', 'userGuid', userGuid) + // verify required parameter 'goalRequestBody' is not null or undefined + assertParamExists('createGoal', 'goalRequestBody', goalRequestBody) + const localVarPath = `/users/{user_guid}/goals` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10285,7 +11558,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10295,9 +11568,12 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/vnd.mx.api.v1+json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(goalRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10305,24 +11581,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. - * @summary Delete managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Delete a goal. + * @summary Delete a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accept Specifies the media type expected in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManagedAccount: async (accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('deleteManagedAccount', 'accountGuid', accountGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('deleteManagedAccount', 'memberGuid', memberGuid) + deleteGoal: async (goalGuid: string, userGuid: string, accept: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'goalGuid' is not null or undefined + assertParamExists('deleteGoal', 'goalGuid', goalGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteManagedAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('deleteGoal', 'userGuid', userGuid) + // verify required parameter 'accept' is not null or undefined + assertParamExists('deleteGoal', 'accept', accept) + const localVarPath = `/users/{user_guid}/goals/{goal_guid}` + .replace(`{${"goal_guid"}}`, encodeURIComponent(String(goalGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10339,6 +11614,10 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (accept != null) { + localVarHeaderParameter['Accept'] = String(accept); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -10351,20 +11630,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * List all goals a user can set. + * @summary List goals + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManagedMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('deleteManagedMember', 'memberGuid', memberGuid) + listGoals: async (accept: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accept' is not null or undefined + assertParamExists('listGoals', 'accept', accept) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteManagedMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('listGoals', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/goals` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10373,7 +11653,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10381,6 +11661,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (accept != null) { + localVarHeaderParameter['Accept'] = String(accept); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -10390,31 +11682,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + }; + }, + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManagedTransaction: async (accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('deleteManagedTransaction', 'accountGuid', accountGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('deleteManagedTransaction', 'memberGuid', memberGuid) - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('deleteManagedTransaction', 'transactionGuid', transactionGuid) + readGoal: async (goalGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'goalGuid' is not null or undefined + assertParamExists('readGoal', 'goalGuid', goalGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteManagedTransaction', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) + assertParamExists('readGoal', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/goals/{goal_guid}` + .replace(`{${"goal_guid"}}`, encodeURIComponent(String(goalGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10423,7 +11707,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10443,20 +11727,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete manual account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + * @summary Reposition goals + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RepositionRequestBody} repositionRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManualAccount: async (accountGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('deleteManualAccount', 'accountGuid', accountGuid) + repositionGoals: async (userGuid: string, repositionRequestBody: RepositionRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteManualAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + assertParamExists('repositionGoals', 'userGuid', userGuid) + // verify required parameter 'repositionRequestBody' is not null or undefined + assertParamExists('repositionGoals', 'repositionRequestBody', repositionRequestBody) + const localVarPath = `/users/{user_guid}/goals/reposition` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10465,7 +11748,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10475,9 +11758,12 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/vnd.mx.api.v1+json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(repositionRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10485,20 +11771,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Accessing this endpoint will permanently delete a member. - * @summary Delete member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UpdateGoalRequestBody} updateGoalRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('deleteMember', 'memberGuid', memberGuid) + updateGoal: async (goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'goalGuid' is not null or undefined + assertParamExists('updateGoal', 'goalGuid', goalGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('updateGoal', 'userGuid', userGuid) + // verify required parameter 'updateGoalRequestBody' is not null or undefined + assertParamExists('updateGoal', 'updateGoalRequestBody', updateGoalRequestBody) + const localVarPath = `/users/{user_guid}/goals/{goal_guid}` + .replace(`{${"goal_guid"}}`, encodeURIComponent(String(goalGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10507,7 +11796,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10517,73 +11806,303 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateGoalRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * GoalsApi - functional programming interface + * @export + */ +export const GoalsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GoalsApiAxiosParamCreator(configuration) + return { + /** + * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + * @summary Create a goal + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {GoalRequestBody} goalRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createGoal(userGuid: string, goalRequestBody: GoalRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGoal(userGuid, goalRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** - * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. - * @summary Delete tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. + * Delete a goal. + * @summary Delete a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accept Specifies the media type expected in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTag: async (tagGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'tagGuid' is not null or undefined - assertParamExists('deleteTag', 'tagGuid', tagGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteTag', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/tags/{tag_guid}` - .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + async deleteGoal(goalGuid: string, userGuid: string, accept: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGoal(goalGuid, userGuid, accept, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * List all goals a user can set. + * @summary List goals + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listGoals(accept: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGoals(accept, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readGoal(goalGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readGoal(goalGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + * @summary Reposition goals + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RepositionRequestBody} repositionRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async repositionGoals(userGuid: string, repositionRequestBody: RepositionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.repositionGoals(userGuid, repositionRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UpdateGoalRequestBody} updateGoalRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateGoal(goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGoal(goalGuid, userGuid, updateGoalRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; +/** + * GoalsApi - factory interface + * @export + */ +export const GoalsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GoalsApiFp(configuration) + return { + /** + * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + * @summary Create a goal + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {GoalRequestBody} goalRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createGoal(userGuid: string, goalRequestBody: GoalRequestBody, options?: any): AxiosPromise { + return localVarFp.createGoal(userGuid, goalRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a goal. + * @summary Delete a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accept Specifies the media type expected in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGoal(goalGuid: string, userGuid: string, accept: string, options?: any): AxiosPromise { + return localVarFp.deleteGoal(goalGuid, userGuid, accept, options).then((request) => request(axios, basePath)); + }, + /** + * List all goals a user can set. + * @summary List goals + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGoals(accept: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listGoals(accept, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readGoal(goalGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readGoal(goalGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + * @summary Reposition goals + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RepositionRequestBody} repositionRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + repositionGoals(userGuid: string, repositionRequestBody: RepositionRequestBody, options?: any): AxiosPromise { + return localVarFp.repositionGoals(userGuid, repositionRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UpdateGoalRequestBody} updateGoalRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGoal(goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: any): AxiosPromise { + return localVarFp.updateGoal(goalGuid, userGuid, updateGoalRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * GoalsApi - object-oriented interface + * @export + * @class GoalsApi + * @extends {BaseAPI} + */ +export class GoalsApi extends BaseAPI { + /** + * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + * @summary Create a goal + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {GoalRequestBody} goalRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GoalsApi + */ + public createGoal(userGuid: string, goalRequestBody: GoalRequestBody, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).createGoal(userGuid, goalRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a goal. + * @summary Delete a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accept Specifies the media type expected in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GoalsApi + */ + public deleteGoal(goalGuid: string, userGuid: string, accept: string, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).deleteGoal(goalGuid, userGuid, accept, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all goals a user can set. + * @summary List goals + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GoalsApi + */ + public listGoals(accept: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).listGoals(accept, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GoalsApi + */ + public readGoal(goalGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).readGoal(goalGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + * @summary Reposition goals + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RepositionRequestBody} repositionRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GoalsApi + */ + public repositionGoals(userGuid: string, repositionRequestBody: RepositionRequestBody, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).repositionGoals(userGuid, repositionRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} goalGuid The unique identifier for a goal. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UpdateGoalRequestBody} updateGoalRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GoalsApi + */ + public updateGoal(goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).updateGoal(goalGuid, userGuid, updateGoalRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * InsightsApi - axios parameter creator + * @export + */ +export const InsightsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. - * @summary Delete tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the accounts associated with the insight. + * @summary List all accounts associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTagging: async (taggingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'taggingGuid' is not null or undefined - assertParamExists('deleteTagging', 'taggingGuid', taggingGuid) + listAccountsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteTagging', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/taggings/{tagging_guid}` - .replace(`{${"tagging_guid"}}`, encodeURIComponent(String(taggingGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('listAccountsInsight', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('listAccountsInsight', 'insightGuid', insightGuid) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}/accounts` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -10591,7 +12110,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10599,47 +12118,13 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to permanently delete a transaction rule based on its unique GUID. - * @summary Delete transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteTransactionRule: async (transactionRuleGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionRuleGuid' is not null or undefined - assertParamExists('deleteTransactionRule', 'transactionRuleGuid', transactionRuleGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteTransactionRule', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/transaction_rules/{transaction_rule_guid}` - .replace(`{${"transaction_rule_guid"}}`, encodeURIComponent(String(transactionRuleGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (page !== undefined) { + localVarQueryParameter['page'] = page; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } @@ -10653,17 +12138,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. - * @summary Delete user - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the categories associated with the insight. + * @summary List all categories associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + listCategoriesInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteUser', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('listCategoriesInsight', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('listCategoriesInsight', 'insightGuid', insightGuid) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}/categories` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -10671,7 +12162,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10679,51 +12170,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. - * @summary (Deprecated) Request an authorization code. - * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deprecatedRequestPaymentProcessorAuthorizationCode: async (paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'paymentProcessorAuthorizationCodeRequestBody' is not null or undefined - assertParamExists('deprecatedRequestPaymentProcessorAuthorizationCode', 'paymentProcessorAuthorizationCodeRequestBody', paymentProcessorAuthorizationCodeRequestBody) - const localVarPath = `/payment_processor_authorization_code`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (page !== undefined) { + localVarQueryParameter['page'] = page; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(paymentProcessorAuthorizationCodeRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10731,24 +12190,22 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to download a specified statement PDF. - * @summary Download statement pdf - * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all insights associated with an account GUID. + * @summary List insights by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadStatementPDF: async (memberGuid: string, statementGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('downloadStatementPDF', 'memberGuid', memberGuid) - // verify required parameter 'statementGuid' is not null or undefined - assertParamExists('downloadStatementPDF', 'statementGuid', statementGuid) + listInsightsByAccount: async (accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('listInsightsByAccount', 'accountGuid', accountGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('downloadStatementPDF', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/statements/{statement_guid}.pdf` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"statement_guid"}}`, encodeURIComponent(String(statementGuid))) + assertParamExists('listInsightsByAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}/insights` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10765,6 +12222,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -10777,24 +12242,22 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to download a PDF version of the specified tax document. The endpoint URL is the base URL appended with the uri of the tax_document. - * @summary Download a Tax Document PDF - * @param {string} taxDocumentGuid The unique id for a `tax_document`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all insights associated with a transaction GUID. + * @summary List insights by transaction + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadTaxDocument: async (taxDocumentGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'taxDocumentGuid' is not null or undefined - assertParamExists('downloadTaxDocument', 'taxDocumentGuid', taxDocumentGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('downloadTaxDocument', 'memberGuid', memberGuid) + listInsightsByTransaction: async (transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('listInsightsByTransaction', 'transactionGuid', transactionGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('downloadTaxDocument', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/tax_documents/{tax_document_guid}.pdf` - .replace(`{${"tax_document_guid"}}`, encodeURIComponent(String(taxDocumentGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('listInsightsByTransaction', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}/insights` + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10811,51 +12274,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform. - * @summary Enhance transactions - * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - enhanceTransactions: async (enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'enhanceTransactionsRequestBody' is not null or undefined - assertParamExists('enhanceTransactions', 'enhanceTransactionsRequestBody', enhanceTransactionsRequestBody) - const localVarPath = `/transactions/enhance`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (page !== undefined) { + localVarQueryParameter['page'] = page; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(enhanceTransactionsRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -10863,20 +12294,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. - * @summary Extend history - * @param {string} memberGuid The unique identifier for a `member`. - * @param {string} userGuid The unique identifier for a `user`. + * Use this endpoint to list all the insights associated with the user. + * @summary List all insights for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - extendHistory: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('extendHistory', 'memberGuid', memberGuid) + listInsightsUser: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('extendHistory', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/extend_history` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('listInsightsUser', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/insights` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -10885,7 +12314,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10893,6 +12322,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -10905,21 +12342,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. - * @summary Fetch Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. + * Use this endpoint to list all the merchants associated with the insight. + * @summary List all merchants associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchRewards: async (userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + listMerchantsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('fetchRewards', 'userGuid', userGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('fetchRewards', 'memberGuid', memberGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/fetch_rewards` + assertParamExists('listMerchantsInsight', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('listMerchantsInsight', 'insightGuid', insightGuid) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}/merchants` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -10927,7 +12366,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10935,6 +12374,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -10947,21 +12394,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to fetch the statements associated with a particular member. - * @summary Fetch statements - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchStatements: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('fetchStatements', 'memberGuid', memberGuid) + listScheduledPaymentsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('fetchStatements', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/fetch_statements` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('listScheduledPaymentsInsight', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('listScheduledPaymentsInsight', 'insightGuid', insightGuid) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}/scheduled_payments` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -10969,7 +12418,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -10977,6 +12426,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -10989,21 +12446,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to fetch (aggregate) the tax documents associated with the specified member. This request **does not** return the latest tax documents. It just starts the document aggregation process and returns the initial state of the process. You must interact with the newly aggregated data using the other document endpoints in this reference. This request may also trigger multi-factor authentication which requires end-user input and a specific process for answering authentication challenges. - * @summary Fetch Tax Documents - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchTaxDocuments: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('fetchTaxDocuments', 'memberGuid', memberGuid) + listTransactionsInsight: async (userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('fetchTaxDocuments', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/fetch_tax_documents` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('listTransactionsInsight', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('listTransactionsInsight', 'insightGuid', insightGuid) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11011,7 +12470,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -11019,6 +12478,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -11031,21 +12498,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * The identify endpoint begins an identification process for an already-existing member. - * @summary Identify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of an insight according to its unique GUID. + * @summary Read insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - identifyMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('identifyMember', 'memberGuid', memberGuid) + readInsightUser: async (userGuid: string, insightGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('identifyMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/identify` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('readInsightUser', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('readInsightUser', 'insightGuid', insightGuid) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11053,7 +12520,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -11073,23 +12540,24 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of account numbers associated with the specified `account`. - * @summary List account numbers by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to update the attributes of an insight according to its unique GUID. + * @summary Update insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {InsightUpdateRequestBody} insightUpdateRequestBody The insight to be updated (None of these parameters are required, but the user object cannot be empty.) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAccountNumbersByAccount: async (accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('listAccountNumbersByAccount', 'accountGuid', accountGuid) + updateInsight: async (userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listAccountNumbersByAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}/account_numbers` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('updateInsight', 'userGuid', userGuid) + // verify required parameter 'insightGuid' is not null or undefined + assertParamExists('updateInsight', 'insightGuid', insightGuid) + // verify required parameter 'insightUpdateRequestBody' is not null or undefined + assertParamExists('updateInsight', 'insightUpdateRequestBody', insightUpdateRequestBody) + const localVarPath = `/users/{user_guid}/insights/{insight_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"insight_guid"}}`, encodeURIComponent(String(insightGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11097,7 +12565,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -11105,278 +12573,477 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(insightUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * InsightsApi - functional programming interface + * @export + */ +export const InsightsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = InsightsApiAxiosParamCreator(configuration) + return { + /** + * Use this endpoint to list all the accounts associated with the insight. + * @summary List all accounts associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all the categories associated with the insight. + * @summary List all categories associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all insights associated with an account GUID. + * @summary List insights by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all insights associated with a transaction GUID. + * @summary List insights by transaction + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInsightsByTransaction(transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsByTransaction(transactionGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all the insights associated with the user. + * @summary List all insights for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsUser(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all the merchants associated with the insight. + * @summary List all merchants associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all the scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of an insight according to its unique GUID. + * @summary Read insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readInsightUser(userGuid: string, insightGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readInsightUser(userGuid, insightGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of an insight according to its unique GUID. + * @summary Update insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {InsightUpdateRequestBody} insightUpdateRequestBody The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateInsight(userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateInsight(userGuid, insightGuid, insightUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * InsightsApi - factory interface + * @export + */ +export const InsightsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = InsightsApiFp(configuration) + return { + /** + * Use this endpoint to list all the accounts associated with the insight. + * @summary List all accounts associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the categories associated with the insight. + * @summary List all categories associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all insights associated with an account GUID. + * @summary List insights by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all insights associated with a transaction GUID. + * @summary List insights by transaction + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInsightsByTransaction(transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsByTransaction(transactionGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, /** - * This endpoint returns a list of account numbers associated with the specified `member`. - * @summary List account numbers by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list all the insights associated with the user. + * @summary List all insights for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAccountNumbersByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listAccountNumbersByMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listAccountNumbersByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/account_numbers` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns an array with information about every account associated with a particular member. - * @summary List account owners by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list all the merchants associated with the insight. + * @summary List all merchants associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAccountOwnersByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listAccountOwnersByMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listAccountOwnersByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/account_owners` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. - * @summary List categories - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list all the scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listCategories: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listCategories', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/categories` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listDefaultCategories: async (page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/categories/default`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories by user - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to read the attributes of an insight according to its unique GUID. + * @summary Read insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listDefaultCategoriesByUser: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listDefaultCategoriesByUser', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/categories/default` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + readInsightUser(userGuid: string, insightGuid: string, options?: any): AxiosPromise { + return localVarFp.readInsightUser(userGuid, insightGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of an insight according to its unique GUID. + * @summary Update insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {InsightUpdateRequestBody} insightUpdateRequestBody The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateInsight(userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateInsight(userGuid, insightGuid, insightUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * InsightsApi - object-oriented interface + * @export + * @class InsightsApi + * @extends {BaseAPI} + */ +export class InsightsApi extends BaseAPI { + /** + * Use this endpoint to list all the accounts associated with the insight. + * @summary List all accounts associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the categories associated with the insight. + * @summary List all categories associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all insights associated with an account GUID. + * @summary List insights by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all insights associated with a transaction GUID. + * @summary List insights by transaction + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listInsightsByTransaction(transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsByTransaction(transactionGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Use this endpoint to list all the insights associated with the user. + * @summary List all insights for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to list all the merchants associated with the insight. + * @summary List all merchants associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + /** + * Use this endpoint to list all the scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } + /** + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Use this endpoint to read the attributes of an insight according to its unique GUID. + * @summary Read insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public readInsightUser(userGuid: string, insightGuid: string, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).readInsightUser(userGuid, insightGuid, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Use this endpoint to update the attributes of an insight according to its unique GUID. + * @summary Update insight + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {InsightUpdateRequestBody} insightUpdateRequestBody The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public updateInsight(userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).updateInsight(userGuid, insightGuid, insightUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, + + +/** + * InstitutionsApi - axios parameter creator + * @export + */ +export const InstitutionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. * @summary List favorite institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listFavoriteInstitutions: async (page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + listFavoriteInstitutions: async (isoCountryCode?: Array, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/institutions/favorites`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -11393,6 +13060,10 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (isoCountryCode) { + localVarQueryParameter['iso_country_code'] = isoCountryCode; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -11413,21 +13084,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns all holdings associated with the specified `user` across all accounts and members. - * @summary List holdings - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. + * Use this endpoint to see which credentials will be needed to create a member for a specific institution. Passing an invalid `institution_code` returns a `404`. + * @summary List institution credentials + * @param {string} institutionCode The institution_code of the institution. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listHoldings: async (userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listHoldings', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/holdings` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + listInstitutionCredentials: async (institutionCode: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'institutionCode' is not null or undefined + assertParamExists('listInstitutionCredentials', 'institutionCode', institutionCode) + const localVarPath = `/institutions/{institution_code}/credentials` + .replace(`{${"institution_code"}}`, encodeURIComponent(String(institutionCode))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11443,10 +13112,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; - } - if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -11455,10 +13120,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['records_per_page'] = recordsPerPage; } - if (toDate !== undefined) { - localVarQueryParameter['to_date'] = toDate; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -11471,25 +13132,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns all holdings associated with the specified `account`. - * @summary List holdings by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. + * This endpoint returns a list of institutions based on the specified search term or parameter. + * @summary List institutions + * @param {string} [name] This will list only institutions in which the appended string appears. + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. + * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. + * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. + * @param {boolean} [supportsTransactionHistory] Filter only institutions which support extended transaction history. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listHoldingsByAccount: async (accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('listHoldingsByAccount', 'accountGuid', accountGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listHoldingsByAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}/holdings` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + listInstitutions: async (name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/institutions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11505,8 +13162,12 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; + if (name !== undefined) { + localVarQueryParameter['name'] = name; + } + + if (isoCountryCode) { + localVarQueryParameter['iso_country_code'] = isoCountryCode; } if (page !== undefined) { @@ -11517,70 +13178,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['records_per_page'] = recordsPerPage; } - if (toDate !== undefined) { - localVarQueryParameter['to_date'] = toDate; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint returns all holdings associated with the specified `member` across all accounts. - * @summary List holdings by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listHoldingsByMember: async (memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listHoldingsByMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listHoldingsByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/holdings` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; + if (supportsAccountIdentification !== undefined) { + localVarQueryParameter['supports_account_identification'] = supportsAccountIdentification; } - if (page !== undefined) { - localVarQueryParameter['page'] = page; + if (supportsAccountStatement !== undefined) { + localVarQueryParameter['supports_account_statement'] = supportsAccountStatement; } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; + if (supportsAccountVerification !== undefined) { + localVarQueryParameter['supports_account_verification'] = supportsAccountVerification; } - if (toDate !== undefined) { - localVarQueryParameter['to_date'] = toDate; + if (supportsTransactionHistory !== undefined) { + localVarQueryParameter['supports_transaction_history'] = supportsTransactionHistory; } @@ -11595,18 +13206,16 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to see which credentials will be needed to create a member for a specific institution. - * @summary List institution credentials + * This endpoint returns information about the institution specified by `institution_code`. + * @summary Read institution * @param {string} institutionCode The institution_code of the institution. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listInstitutionCredentials: async (institutionCode: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + readInstitution: async (institutionCode: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'institutionCode' is not null or undefined - assertParamExists('listInstitutionCredentials', 'institutionCode', institutionCode) - const localVarPath = `/institutions/{institution_code}/credentials` + assertParamExists('readInstitution', 'institutionCode', institutionCode) + const localVarPath = `/institutions/{institution_code}` .replace(`{${"institution_code"}}`, encodeURIComponent(String(institutionCode))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -11623,14 +13232,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -11642,12 +13243,112 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur options: localVarRequestOptions, }; }, + } +}; + +/** + * InstitutionsApi - functional programming interface + * @export + */ +export const InstitutionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = InstitutionsApiAxiosParamCreator(configuration) + return { + /** + * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. + * @summary List favorite institutions + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFavoriteInstitutions(isoCountryCode?: Array, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFavoriteInstitutions(isoCountryCode, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to see which credentials will be needed to create a member for a specific institution. Passing an invalid `institution_code` returns a `404`. + * @summary List institution credentials + * @param {string} institutionCode The institution_code of the institution. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInstitutionCredentials(institutionCode: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInstitutionCredentials(institutionCode, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of institutions based on the specified search term or parameter. + * @summary List institutions + * @param {string} [name] This will list only institutions in which the appended string appears. + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. + * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. + * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. + * @param {boolean} [supportsTransactionHistory] Filter only institutions which support extended transaction history. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInstitutions(name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInstitutions(name, isoCountryCode, page, recordsPerPage, supportsAccountIdentification, supportsAccountStatement, supportsAccountVerification, supportsTransactionHistory, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns information about the institution specified by `institution_code`. + * @summary Read institution + * @param {string} institutionCode The institution_code of the institution. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readInstitution(institutionCode: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readInstitution(institutionCode, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * InstitutionsApi - factory interface + * @export + */ +export const InstitutionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = InstitutionsApiFp(configuration) + return { + /** + * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. + * @summary List favorite institutions + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFavoriteInstitutions(isoCountryCode?: Array, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listFavoriteInstitutions(isoCountryCode, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to see which credentials will be needed to create a member for a specific institution. Passing an invalid `institution_code` returns a `404`. + * @summary List institution credentials + * @param {string} institutionCode The institution_code of the institution. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInstitutionCredentials(institutionCode: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInstitutionCredentials(institutionCode, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, /** * This endpoint returns a list of institutions based on the specified search term or parameter. * @summary List institutions * @param {string} [name] This will list only institutions in which the appended string appears. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. @@ -11655,79 +13356,108 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listInstitutions: async (name?: string, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/institutions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (name !== undefined) { - localVarQueryParameter['name'] = name; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } + listInstitutions(name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options?: any): AxiosPromise { + return localVarFp.listInstitutions(name, isoCountryCode, page, recordsPerPage, supportsAccountIdentification, supportsAccountStatement, supportsAccountVerification, supportsTransactionHistory, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns information about the institution specified by `institution_code`. + * @summary Read institution + * @param {string} institutionCode The institution_code of the institution. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readInstitution(institutionCode: string, options?: any): AxiosPromise { + return localVarFp.readInstitution(institutionCode, options).then((request) => request(axios, basePath)); + }, + }; +}; - if (supportsAccountIdentification !== undefined) { - localVarQueryParameter['supports_account_identification'] = supportsAccountIdentification; - } +/** + * InstitutionsApi - object-oriented interface + * @export + * @class InstitutionsApi + * @extends {BaseAPI} + */ +export class InstitutionsApi extends BaseAPI { + /** + * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. + * @summary List favorite institutions + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstitutionsApi + */ + public listFavoriteInstitutions(isoCountryCode?: Array, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).listFavoriteInstitutions(isoCountryCode, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - if (supportsAccountStatement !== undefined) { - localVarQueryParameter['supports_account_statement'] = supportsAccountStatement; - } + /** + * Use this endpoint to see which credentials will be needed to create a member for a specific institution. Passing an invalid `institution_code` returns a `404`. + * @summary List institution credentials + * @param {string} institutionCode The institution_code of the institution. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstitutionsApi + */ + public listInstitutionCredentials(institutionCode: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).listInstitutionCredentials(institutionCode, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - if (supportsAccountVerification !== undefined) { - localVarQueryParameter['supports_account_verification'] = supportsAccountVerification; - } + /** + * This endpoint returns a list of institutions based on the specified search term or parameter. + * @summary List institutions + * @param {string} [name] This will list only institutions in which the appended string appears. + * @param {Array} [isoCountryCode] An array of strings that filters institutions in the widget by the specified country code. Acceptable codes include `US`, `CA`, and `MX` (Mexico). + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `100`. If the value exceeds `100`, the default value of `25` will be used instead. + * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. + * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. + * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. + * @param {boolean} [supportsTransactionHistory] Filter only institutions which support extended transaction history. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstitutionsApi + */ + public listInstitutions(name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).listInstitutions(name, isoCountryCode, page, recordsPerPage, supportsAccountIdentification, supportsAccountStatement, supportsAccountVerification, supportsTransactionHistory, options).then((request) => request(this.axios, this.basePath)); + } - if (supportsTransactionHistory !== undefined) { - localVarQueryParameter['supports_transaction_history'] = supportsTransactionHistory; - } + /** + * This endpoint returns information about the institution specified by `institution_code`. + * @summary Read institution + * @param {string} institutionCode The institution_code of the institution. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstitutionsApi + */ + public readInstitution(institutionCode: string, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).readInstitution(institutionCode, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * InvestmentHoldingsApi - axios parameter creator + * @export + */ +export const InvestmentHoldingsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-manage member. - * @summary List managed accounts - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * This endpoint deactivates the specific user from the `/investment_holdings` product. To reactivate a user, use any of the current `/investment_holding` endpoints. + * @summary Deactivate user from Investment Holdings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listManagedAccounts: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listManagedAccounts', 'memberGuid', memberGuid) + deactivateUser: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listManagedAccounts', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + assertParamExists('deactivateUser', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/investment_holdings_deactivate` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -11744,14 +13474,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -11764,15 +13486,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of institutions which can be used to create partner-managed members. - * @summary List managed institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listManagedInstitutions: async (page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/managed_institutions`; + listHoldings: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listHoldings', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/investment_holdings` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11808,18 +13534,22 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of all the partner-managed members associated with the specified `user`. - * @summary List managed members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * This endpoint lists all holdings associated with the particular account defined. + * @summary List holdings by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listManagedMembers: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + listHoldingsByAccount: async (accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('listHoldingsByAccount', 'accountGuid', accountGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listManagedMembers', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members` + assertParamExists('listHoldingsByAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}/investment_holdings` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -11856,25 +13586,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. - * @summary List managed transactions - * @param {string} accountGuid The unique id for an `account`. + * This endpoint lists all holdings associated with the specified member. + * @summary List holdings by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listManagedTransactions: async (accountGuid: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('listManagedTransactions', 'accountGuid', accountGuid) + listHoldingsByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listManagedTransactions', 'memberGuid', memberGuid) + assertParamExists('listHoldingsByMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listManagedTransactions', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + assertParamExists('listHoldingsByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/investment_holdings` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -11912,24 +13638,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of all the accounts associated with the specified `member`. - * @summary List accounts by member - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique id for a `member`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to read the attributes of a specific `holding`. + * @summary Read holding + * @param {string} holdingGuid The unique id for a `holding`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMemberAccounts: async (userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + readHolding: async (holdingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'holdingGuid' is not null or undefined + assertParamExists('readHolding', 'holdingGuid', holdingGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listMemberAccounts', 'userGuid', userGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listMemberAccounts', 'memberGuid', memberGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + assertParamExists('readHolding', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/investment_holdings/{holding_guid}` + .replace(`{${"holding_guid"}}`, encodeURIComponent(String(holdingGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11945,18 +13668,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (memberIsManagedByUser !== undefined) { - localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -11968,74 +13679,254 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur options: localVarRequestOptions, }; }, + } +}; + +/** + * InvestmentHoldingsApi - functional programming interface + * @export + */ +export const InvestmentHoldingsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = InvestmentHoldingsApiAxiosParamCreator(configuration) + return { + /** + * This endpoint deactivates the specific user from the `/investment_holdings` product. To reactivate a user, use any of the current `/investment_holding` endpoints. + * @summary Deactivate user from Investment Holdings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deactivateUser(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deactivateUser(userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listHoldings(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldings(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint lists all holdings associated with the particular account defined. + * @summary List holdings by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listHoldingsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldingsByAccount(accountGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint lists all holdings associated with the specified member. + * @summary List holdings by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listHoldingsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldingsByMember(memberGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a specific `holding`. + * @summary Read holding + * @param {string} holdingGuid The unique id for a `holding`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readHolding(holdingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readHolding(holdingGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * InvestmentHoldingsApi - factory interface + * @export + */ +export const InvestmentHoldingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = InvestmentHoldingsApiFp(configuration) + return { + /** + * This endpoint deactivates the specific user from the `/investment_holdings` product. To reactivate a user, use any of the current `/investment_holding` endpoints. + * @summary Deactivate user from Investment Holdings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deactivateUser(userGuid: string, options?: any): AxiosPromise { + return localVarFp.deactivateUser(userGuid, options).then((request) => request(axios, basePath)); + }, /** - * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. - * @summary List member challenges + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listHoldings(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listHoldings(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint lists all holdings associated with the particular account defined. + * @summary List holdings by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listHoldingsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listHoldingsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint lists all holdings associated with the specified member. + * @summary List holdings by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMemberChallenges: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listMemberChallenges', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listMemberChallenges', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/challenges` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + listHoldingsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listHoldingsByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a specific `holding`. + * @summary Read holding + * @param {string} holdingGuid The unique id for a `holding`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readHolding(holdingGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readHolding(holdingGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + }; +}; - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; +/** + * InvestmentHoldingsApi - object-oriented interface + * @export + * @class InvestmentHoldingsApi + * @extends {BaseAPI} + */ +export class InvestmentHoldingsApi extends BaseAPI { + /** + * This endpoint deactivates the specific user from the `/investment_holdings` product. To reactivate a user, use any of the current `/investment_holding` endpoints. + * @summary Deactivate user from Investment Holdings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InvestmentHoldingsApi + */ + public deactivateUser(userGuid: string, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).deactivateUser(userGuid, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InvestmentHoldingsApi + */ + public listHoldings(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).listHoldings(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + /** + * This endpoint lists all holdings associated with the particular account defined. + * @summary List holdings by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InvestmentHoldingsApi + */ + public listHoldingsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).listHoldingsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } + /** + * This endpoint lists all holdings associated with the specified member. + * @summary List holdings by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InvestmentHoldingsApi + */ + public listHoldingsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).listHoldingsByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Use this endpoint to read the attributes of a specific `holding`. + * @summary Read holding + * @param {string} holdingGuid The unique id for a `holding`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InvestmentHoldingsApi + */ + public readHolding(holdingGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).readHolding(holdingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, + +/** + * ManagedDataApi - axios parameter creator + * @export + */ +export const ManagedDataApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. - * @summary List member credentials + * Use this endpoint to create a partner-managed account. + * @summary Create managed account * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMemberCredentials: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + createManagedAccount: async (memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listMemberCredentials', 'memberGuid', memberGuid) + assertParamExists('createManagedAccount', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listMemberCredentials', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/credentials` + assertParamExists('createManagedAccount', 'userGuid', userGuid) + // verify required parameter 'managedAccountCreateRequestBody' is not null or undefined + assertParamExists('createManagedAccount', 'managedAccountCreateRequestBody', managedAccountCreateRequestBody) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -12045,7 +13936,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12053,19 +13944,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(managedAccountCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -12073,18 +13959,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns an array which contains information on every member associated with a specific user. - * @summary List members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to create a new partner-managed `member`. + * @summary Create managed member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMembers: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + createManagedMember: async (userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listMembers', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members` + assertParamExists('createManagedMember', 'userGuid', userGuid) + // verify required parameter 'managedMemberCreateRequestBody' is not null or undefined + assertParamExists('createManagedMember', 'managedMemberCreateRequestBody', managedMemberCreateRequestBody) + const localVarPath = `/users/{user_guid}/managed_members` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12093,7 +13980,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12101,63 +13988,14 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint returns a paginated list of all the merchants in the MX system. - * @summary List merchants - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMerchants: async (page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/merchants`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(managedMemberCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -12165,21 +14003,28 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to list all the `rewards` associated with a specified `member`. - * @summary List Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. + * Use this endpoint to create a new partner-managed `transaction`. + * @summary Create managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRewards: async (userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listRewards', 'userGuid', userGuid) + createManagedTransaction: async (accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('createManagedTransaction', 'accountGuid', accountGuid) // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listRewards', 'memberGuid', memberGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/rewards` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + assertParamExists('createManagedTransaction', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createManagedTransaction', 'userGuid', userGuid) + // verify required parameter 'managedTransactionCreateRequestBody' is not null or undefined + assertParamExists('createManagedTransaction', 'managedTransactionCreateRequestBody', managedTransactionCreateRequestBody) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -12187,7 +14032,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12197,9 +14042,12 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(managedTransactionCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -12207,21 +14055,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to get an array of available statements. - * @summary List statements by member + * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. + * @summary Delete managed account + * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listStatementsByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + deleteManagedAccount: async (accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('deleteManagedAccount', 'accountGuid', accountGuid) // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listStatementsByMember', 'memberGuid', memberGuid) + assertParamExists('deleteManagedAccount', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listStatementsByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/statements` + assertParamExists('deleteManagedAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -12231,7 +14081,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12239,14 +14089,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12259,18 +14101,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to retrieve a list of all the taggings associated with a specific user. - * @summary List taggings - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTaggings: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + deleteManagedMember: async (memberGuid: string, accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('deleteManagedMember', 'memberGuid', memberGuid) + // verify required parameter 'accept' is not null or undefined + assertParamExists('deleteManagedMember', 'accept', accept) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTaggings', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/taggings` + assertParamExists('deleteManagedMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12279,7 +14126,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12287,12 +14134,8 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; + if (accept != null) { + localVarHeaderParameter['Accept'] = String(accept); } @@ -12307,18 +14150,28 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. - * @summary List tags - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTags: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + deleteManagedTransaction: async (accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('deleteManagedTransaction', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('deleteManagedTransaction', 'memberGuid', memberGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('deleteManagedTransaction', 'transactionGuid', transactionGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTags', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/tags` + assertParamExists('deleteManagedTransaction', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12327,7 +14180,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12335,14 +14188,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12355,21 +14200,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to get a paginated list of tax documents. - * @summary List Tax Documents + * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-managed member. + * @summary List managed accounts * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTaxDocuments: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + listManagedAccounts: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listTaxDocuments', 'memberGuid', memberGuid) + assertParamExists('listManagedAccounts', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTaxDocuments', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/tax_documents` + assertParamExists('listManagedAccounts', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -12407,19 +14252,15 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. - * @summary List transaction rules - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * This endpoint returns a list of institutions which can be used to create partner-managed members. + * @summary List managed institutions + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionRules: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTransactionRules', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/transaction_rules` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + listManagedInstitutions: async (page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/managed_institutions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -12455,20 +14296,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Requests to this endpoint return a list of transactions associated with the specified `user`, accross all members and accounts associated with that `user`. - * @summary List transactions - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * This endpoint returns a list of all the partner-managed members associated with the specified `user`. + * @summary List managed members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactions: async (userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { + listManagedMembers: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTransactions', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/transactions` + assertParamExists('listManagedMembers', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12485,10 +14324,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; - } - if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -12497,10 +14332,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['records_per_page'] = recordsPerPage; } - if (toDate !== undefined) { - localVarQueryParameter['to_date'] = toDate; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12513,24 +14344,28 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of the last 90 days of transactions associated with the specified account. - * @summary List transactions by account + * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. + * @summary List managed transactions * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsByAccount: async (accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { + listManagedTransactions: async (accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('listTransactionsByAccount', 'accountGuid', accountGuid) + assertParamExists('listManagedTransactions', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listManagedTransactions', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTransactionsByAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}/transactions` + assertParamExists('listManagedTransactions', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions` .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12547,22 +14382,22 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; - } - if (page !== undefined) { localVarQueryParameter['page'] = page; } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; } if (toDate !== undefined) { localVarQueryParameter['to_date'] = toDate; } + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12575,23 +14410,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Requests to this endpoint return a list of transactions associated with the specified `member`, accross all accounts associated with that `member`. - * @summary List transactions by member + * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. + * @summary Read managed account + * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsByMember: async (memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { + readManagedAccount: async (accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('readManagedAccount', 'accountGuid', accountGuid) // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('listTransactionsByMember', 'memberGuid', memberGuid) + assertParamExists('readManagedAccount', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTransactionsByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/transactions` + assertParamExists('readManagedAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -12609,22 +14444,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - if (toDate !== undefined) { - localVarQueryParameter['to_date'] = toDate; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12637,24 +14456,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag’s unique GUID. In other words, a list of all transactions that have been assigned to a particular tag using the create a tagging endpoint. - * @summary List transactions by tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * This endpoint returns the attributes of the specified partner-managed`member`. + * @summary Read managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsByTag: async (tagGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'tagGuid' is not null or undefined - assertParamExists('listTransactionsByTag', 'tagGuid', tagGuid) + readManagedMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('readManagedMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listTransactionsByTag', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/tags/{tag_guid}/transactions` - .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) + assertParamExists('readManagedMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12671,22 +14486,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (fromDate !== undefined) { - localVarQueryParameter['from_date'] = fromDate; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - if (toDate !== undefined) { - localVarQueryParameter['to_date'] = toDate; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12699,20 +14498,28 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns a list of all the accounts associated with the specified `user`. - * @summary List accounts - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {boolean} [isManual] List only accounts that were manually created. - * @param {number} [recordsPerPage] Specify records per page. + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. + * @summary Read managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listUserAccounts: async (userGuid: string, memberIsManagedByUser?: boolean, page?: number, isManual?: boolean, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + readManagedTransaction: async (accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('readManagedTransaction', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('readManagedTransaction', 'memberGuid', memberGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('readManagedTransaction', 'transactionGuid', transactionGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listUserAccounts', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts` + assertParamExists('readManagedTransaction', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12729,22 +14536,6 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (memberIsManagedByUser !== undefined) { - localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (isManual !== undefined) { - localVarQueryParameter['is_manual'] = isManual; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12757,18 +14548,28 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to list every user you\'ve created in the MX Platform API. - * @summary List users - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [id] The user `id` to search for. - * @param {string} [email] The user `email` to search for. - * @param {boolean} [isDisabled] Search for users that are diabled. + * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. + * @summary Update managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listUsers: async (page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/users`; + updateManagedAccount: async (accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('updateManagedAccount', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('updateManagedAccount', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateManagedAccount', 'userGuid', userGuid) + // verify required parameter 'managedAccountUpdateRequestBody' is not null or undefined + assertParamExists('updateManagedAccount', 'managedAccountUpdateRequestBody', managedAccountUpdateRequestBody) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -12776,39 +14577,22 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (email !== undefined) { - localVarQueryParameter['email'] = email; - } - - if (isDisabled !== undefined) { - localVarQueryParameter['is_disabled'] = isDisabled; - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(managedAccountUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -12816,20 +14600,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint returns the specified `account` resource. - * @summary Read account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to update the attributes of the specified partner_managed `member`. + * @summary Update managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readAccount: async (accountGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('readAccount', 'accountGuid', accountGuid) + updateManagedMember: async (memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('updateManagedMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + assertParamExists('updateManagedMember', 'userGuid', userGuid) + // verify required parameter 'managedMemberUpdateRequestBody' is not null or undefined + assertParamExists('updateManagedMember', 'managedMemberUpdateRequestBody', managedMemberUpdateRequestBody) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12838,7 +14625,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12848,9 +14635,12 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(managedMemberUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -12858,24 +14648,31 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint allows you to read the attributes of an `account` resource. - * @summary Read account by member + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. + * @summary Update managed transaction * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readAccountByMember: async (accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + updateManagedTransaction: async (accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('readAccountByMember', 'accountGuid', accountGuid) + assertParamExists('updateManagedTransaction', 'accountGuid', accountGuid) // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readAccountByMember', 'memberGuid', memberGuid) + assertParamExists('updateManagedTransaction', 'memberGuid', memberGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('updateManagedTransaction', 'transactionGuid', transactionGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readAccountByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}` + assertParamExists('updateManagedTransaction', 'userGuid', userGuid) + // verify required parameter 'managedTransactionUpdateRequestBody' is not null or undefined + assertParamExists('updateManagedTransaction', 'managedTransactionUpdateRequestBody', managedTransactionUpdateRequestBody) + const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -12884,7 +14681,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -12894,667 +14691,722 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(managedTransactionUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * ManagedDataApi - functional programming interface + * @export + */ +export const ManagedDataApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ManagedDataApiAxiosParamCreator(configuration) + return { + /** + * Use this endpoint to create a partner-managed account. + * @summary Create managed account + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createManagedAccount(memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedAccount(memberGuid, userGuid, managedAccountCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to create a new partner-managed `member`. + * @summary Create managed member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createManagedMember(userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedMember(userGuid, managedMemberCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to create a new partner-managed `transaction`. + * @summary Create managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createManagedTransaction(accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedTransaction(accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. + * @summary Delete managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedAccount(accountGuid, memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteManagedMember(memberGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedMember(memberGuid, accept, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-managed member. + * @summary List managed accounts + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listManagedAccounts(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedAccounts(memberGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of institutions which can be used to create partner-managed members. + * @summary List managed institutions + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listManagedInstitutions(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedInstitutions(page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of all the partner-managed members associated with the specified `user`. + * @summary List managed members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listManagedMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedMembers(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. + * @summary List managed transactions + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listManagedTransactions(accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedTransactions(accountGuid, memberGuid, userGuid, page, fromDate, toDate, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. + * @summary Read managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedAccount(accountGuid, memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns the attributes of the specified partner-managed`member`. + * @summary Read managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readManagedMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedMember(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. + * @summary Read managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. + * @summary Update managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedAccount(accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `member`. + * @summary Update managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateManagedMember(memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedMember(memberGuid, userGuid, managedMemberUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. + * @summary Update managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ManagedDataApi - factory interface + * @export + */ +export const ManagedDataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ManagedDataApiFp(configuration) + return { + /** + * Use this endpoint to create a partner-managed account. + * @summary Create managed account + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createManagedAccount(memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManagedAccount(memberGuid, userGuid, managedAccountCreateRequestBody, options).then((request) => request(axios, basePath)); + }, /** - * Use this endpoint to read the attributes of either a default category or a custom category. - * @summary Read a custom category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to create a new partner-managed `member`. + * @summary Create managed member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readCategory: async (categoryGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'categoryGuid' is not null or undefined - assertParamExists('readCategory', 'categoryGuid', categoryGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readCategory', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/categories/{category_guid}` - .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + createManagedMember(userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManagedMember(userGuid, managedMemberCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a default category. - * @summary Read a default category - * @param {string} categoryGuid The unique id for a `category`. + * Use this endpoint to create a new partner-managed `transaction`. + * @summary Create managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readDefaultCategory: async (categoryGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'categoryGuid' is not null or undefined - assertParamExists('readDefaultCategory', 'categoryGuid', categoryGuid) - const localVarPath = `/categories/{category_guid}` - .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + createManagedTransaction(accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManagedTransaction(accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific `holding`. - * @summary Read holding - * @param {string} holdingGuid The unique id for a `holding`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. + * @summary Delete managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readHolding: async (holdingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'holdingGuid' is not null or undefined - assertParamExists('readHolding', 'holdingGuid', holdingGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readHolding', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/holdings/{holding_guid}` - .replace(`{${"holding_guid"}}`, encodeURIComponent(String(holdingGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns information about the institution specified by `institution_code`. - * @summary Read institution - * @param {string} institutionCode The institution_code of the institution. + * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readInstitution: async (institutionCode: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'institutionCode' is not null or undefined - assertParamExists('readInstitution', 'institutionCode', institutionCode) - const localVarPath = `/institutions/{institution_code}` - .replace(`{${"institution_code"}}`, encodeURIComponent(String(institutionCode))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteManagedMember(memberGuid: string, accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManagedMember(memberGuid, accept, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. - * @summary Read managed account + * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed transaction * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readManagedAccount: async (accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('readManagedAccount', 'accountGuid', accountGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readManagedAccount', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readManagedAccount', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns the attributes of the specified partner-managed `member`. - * @summary Read managed member + * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-managed member. + * @summary List managed accounts * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readManagedMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readManagedMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readManagedMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listManagedAccounts(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedAccounts(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns a list of institutions which can be used to create partner-managed members. + * @summary List managed institutions + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listManagedInstitutions(page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedInstitutions(page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. - * @summary Read managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns a list of all the partner-managed members associated with the specified `user`. + * @summary List managed members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readManagedTransaction: async (accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('readManagedTransaction', 'accountGuid', accountGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readManagedTransaction', 'memberGuid', memberGuid) - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('readManagedTransaction', 'transactionGuid', transactionGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readManagedTransaction', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listManagedMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedMembers(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific member. - * @summary Read member + * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. + * @summary List managed transactions + * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listManagedTransactions(accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedTransactions(accountGuid, memberGuid, userGuid, page, fromDate, toDate, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. - * @summary Read member status + * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. + * @summary Read managed account + * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMemberStatus: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readMemberStatus', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readMemberStatus', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/status` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + readManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Returns information about a particular merchant, such as a logo, name, and website. - * @summary Read merchant - * @param {string} merchantGuid The unique id for a `merchant`. + * This endpoint returns the attributes of the specified partner-managed`member`. + * @summary Read managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMerchant: async (merchantGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'merchantGuid' is not null or undefined - assertParamExists('readMerchant', 'merchantGuid', merchantGuid) - const localVarPath = `/merchants/{merchant_guid}` - .replace(`{${"merchant_guid"}}`, encodeURIComponent(String(merchantGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + readManagedMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readManagedMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns the specified merchant_location resource. - * @summary Read merchant location - * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. + * @summary Read managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMerchantLocation: async (merchantLocationGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'merchantLocationGuid' is not null or undefined - assertParamExists('readMerchantLocation', 'merchantLocationGuid', merchantLocationGuid) - const localVarPath = `/merchant_locations/{merchant_location_guid}` - .replace(`{${"merchant_location_guid"}}`, encodeURIComponent(String(merchantLocationGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + readManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read a specific `reward` based on its unique GUID.. - * @summary Read Reward - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. - * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. + * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. + * @summary Update managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readRewards: async (userGuid: string, memberGuid: string, rewardGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readRewards', 'userGuid', userGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readRewards', 'memberGuid', memberGuid) - // verify required parameter 'rewardGuid' is not null or undefined - assertParamExists('readRewards', 'rewardGuid', rewardGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/rewards/{reward_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"reward_guid"}}`, encodeURIComponent(String(rewardGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + updateManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateManagedAccount(accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `member`. + * @summary Update managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateManagedMember(memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateManagedMember(memberGuid, userGuid, managedMemberUpdateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read a JSON representation of the statement. - * @summary Read statement by member + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. + * @summary Update managed transaction + * @param {string} accountGuid The unique id for an `account`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readStatementByMember: async (memberGuid: string, statementGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readStatementByMember', 'memberGuid', memberGuid) - // verify required parameter 'statementGuid' is not null or undefined - assertParamExists('readStatementByMember', 'statementGuid', statementGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readStatementByMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/statements/{statement_guid}` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"statement_guid"}}`, encodeURIComponent(String(statementGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + updateManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; +/** + * ManagedDataApi - object-oriented interface + * @export + * @class ManagedDataApi + * @extends {BaseAPI} + */ +export class ManagedDataApi extends BaseAPI { + /** + * Use this endpoint to create a partner-managed account. + * @summary Create managed account + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public createManagedAccount(memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).createManagedAccount(memberGuid, userGuid, managedAccountCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to create a new partner-managed `member`. + * @summary Create managed member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public createManagedMember(userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).createManagedMember(userGuid, managedMemberCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Use this endpoint to create a new partner-managed `transaction`. + * @summary Create managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public createManagedTransaction(accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).createManagedTransaction(accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. + * @summary Delete managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public deleteManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).deleteManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to read the attributes of a particular tag according to its unique GUID. - * @summary Read tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - readTag: async (tagGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'tagGuid' is not null or undefined - assertParamExists('readTag', 'tagGuid', tagGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readTag', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/tags/{tag_guid}` - .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + /** + * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public deleteManagedMember(memberGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).deleteManagedMember(memberGuid, accept, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. + * @summary Delete managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public deleteManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).deleteManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-managed member. + * @summary List managed accounts + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public listManagedAccounts(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).listManagedAccounts(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + /** + * This endpoint returns a list of institutions which can be used to create partner-managed members. + * @summary List managed institutions + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public listManagedInstitutions(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).listManagedInstitutions(page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * This endpoint returns a list of all the partner-managed members associated with the specified `user`. + * @summary List managed members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public listManagedMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).listManagedMembers(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. - * @summary Read tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - readTagging: async (taggingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'taggingGuid' is not null or undefined - assertParamExists('readTagging', 'taggingGuid', taggingGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readTagging', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/taggings/{tagging_guid}` - .replace(`{${"tagging_guid"}}`, encodeURIComponent(String(taggingGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + /** + * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. + * @summary List managed transactions + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public listManagedTransactions(accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).listManagedTransactions(accountGuid, memberGuid, userGuid, page, fromDate, toDate, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. + * @summary Read managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public readManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).readManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns the attributes of the specified partner-managed`member`. + * @summary Read managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public readManagedMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).readManagedMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. + * @summary Read managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public readManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).readManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. + * @summary Update managed account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public updateManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).updateManagedAccount(accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of the specified partner_managed `member`. + * @summary Update managed member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public updateManagedMember(memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).updateManagedMember(memberGuid, userGuid, managedMemberUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. + * @summary Update managed transaction + * @param {string} accountGuid The unique id for an `account`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagedDataApi + */ + public updateManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataApiFp(this.configuration).updateManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * MembersApi - axios parameter creator + * @export + */ +export const MembersApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to read the attributes of the specified tax document. - * @summary Read a Tax Document - * @param {string} taxDocumentGuid The unique id for a `tax_document`. + * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. + * @summary Aggregate member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. + * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTaxDocument: async (taxDocumentGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'taxDocumentGuid' is not null or undefined - assertParamExists('readTaxDocument', 'taxDocumentGuid', taxDocumentGuid) + aggregateMember: async (memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, includeHoldings?: boolean, includeTransactions?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('readTaxDocument', 'memberGuid', memberGuid) + assertParamExists('aggregateMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readTaxDocument', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/tax_documents/{tax_document_guid}` - .replace(`{${"tax_document_guid"}}`, encodeURIComponent(String(taxDocumentGuid))) + assertParamExists('aggregateMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/aggregate` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -13564,7 +15416,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13572,6 +15424,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (includeHoldings !== undefined) { + localVarQueryParameter['include_holdings'] = includeHoldings; + } + + if (includeTransactions !== undefined) { + localVarQueryParameter['include_transactions'] = includeTransactions; + } + + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13584,20 +15448,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Requests to this endpoint will return the attributes of the specified `transaction`. - * @summary Read transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. + * @summary Check balances + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTransaction: async (transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('readTransaction', 'transactionGuid', transactionGuid) + checkBalances: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('checkBalances', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readTransaction', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}` - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) + assertParamExists('checkBalances', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/check_balance` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -13606,7 +15470,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13626,20 +15490,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. - * @summary Read transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. + * @summary Create member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTransactionRule: async (transactionRuleGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionRuleGuid' is not null or undefined - assertParamExists('readTransactionRule', 'transactionRuleGuid', transactionRuleGuid) + createMember: async (userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readTransactionRule', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/transaction_rules/{transaction_rule_guid}` - .replace(`{${"transaction_rule_guid"}}`, encodeURIComponent(String(transactionRuleGuid))) + assertParamExists('createMember', 'userGuid', userGuid) + // verify required parameter 'memberCreateRequestBody' is not null or undefined + assertParamExists('createMember', 'memberCreateRequestBody', memberCreateRequestBody) + const localVarPath = `/users/{user_guid}/members` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -13648,7 +15512,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13656,11 +15520,18 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(memberCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -13668,16 +15539,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to read the attributes of a specific user. - * @summary Read user - * @param {string} userGuid The unique id for a `user`. + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readUser: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + deleteMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('deleteMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readUser', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}` + assertParamExists('deleteMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -13686,7 +15561,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13706,16 +15581,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. - * @summary Request an authorization code. - * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestAuthorizationCode: async (authorizationCodeRequestBody: AuthorizationCodeRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'authorizationCodeRequestBody' is not null or undefined - assertParamExists('requestAuthorizationCode', 'authorizationCodeRequestBody', authorizationCodeRequestBody) - const localVarPath = `/authorization_code`; + identifyMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('identifyMember', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('identifyMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/identify` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -13733,12 +15613,9 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(authorizationCodeRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -13746,19 +15623,22 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint will return a URL for an embeddable version of MX Connect. - * @summary Request connect widget url - * @param {string} userGuid The unique id for a `user`. - * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) + * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. + * @summary List member challenges + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestConnectWidgetURL: async (userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options: AxiosRequestConfig = {}): Promise => { + listMemberChallenges: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listMemberChallenges', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('requestConnectWidgetURL', 'userGuid', userGuid) - // verify required parameter 'connectWidgetRequestBody' is not null or undefined - assertParamExists('requestConnectWidgetURL', 'connectWidgetRequestBody', connectWidgetRequestBody) - const localVarPath = `/users/{user_guid}/connect_widget_url` + assertParamExists('listMemberChallenges', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/challenges` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -13767,7 +15647,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13775,14 +15655,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(connectWidgetRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -13790,24 +15675,21 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint will generate an `oauth_window_uri` for the specified `member`. - * @summary Request oauth window uri + * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + * @summary List member credentials * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. - * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. This setting is not persistent. - * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. - * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. - * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestOAuthWindowURI: async (memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options: AxiosRequestConfig = {}): Promise => { + listMemberCredentials: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('requestOAuthWindowURI', 'memberGuid', memberGuid) + assertParamExists('listMemberCredentials', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('requestOAuthWindowURI', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/oauth_window_uri` + assertParamExists('listMemberCredentials', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/credentials` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -13825,24 +15707,12 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (clientRedirectUrl !== undefined) { - localVarQueryParameter['client_redirect_url'] = clientRedirectUrl; - } - - if (enableApp2app !== undefined) { - localVarQueryParameter['enable_app2app'] = enableApp2app; - } - - if (referralSource !== undefined) { - localVarQueryParameter['referral_source'] = referralSource; - } - - if (skipAggregation !== undefined) { - localVarQueryParameter['skip_aggregation'] = skipAggregation; + if (page !== undefined) { + localVarQueryParameter['page'] = page; } - if (uiMessageWebviewUrlScheme !== undefined) { - localVarQueryParameter['ui_message_webview_url_scheme'] = uiMessageWebviewUrlScheme; + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; } @@ -13857,20 +15727,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint allows partners to get a URL by passing the `widget_type` in the request body, as well as configuring it in several different ways. In the case of Connect, that means setting the `widget_type` to `connect_widget`. Partners may also pass an optional `Accept-Language` header as well as a number of configuration options. Note that this is a `POST` request. - * @summary Request widget url - * @param {string} userGuid The unique id for a `user`. - * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. - * @param {string} [acceptLanguage] The desired language of the widget. + * This endpoint returns an array which contains information on every member associated with a specific user. + * @summary List members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestWidgetURL: async (userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, options: AxiosRequestConfig = {}): Promise => { + listMembers: async (userGuid: string, page?: number, recordsPerPage?: number, useCase?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('requestWidgetURL', 'userGuid', userGuid) - // verify required parameter 'widgetRequestBody' is not null or undefined - assertParamExists('requestWidgetURL', 'widgetRequestBody', widgetRequestBody) - const localVarPath = `/users/{user_guid}/widget_urls` + assertParamExists('listMembers', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members` .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -13879,7 +15748,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13887,18 +15756,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (acceptLanguage != null) { - localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; } + if (useCase !== undefined) { + localVarQueryParameter['use_case'] = useCase; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(widgetRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -13906,22 +15780,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. - * @summary Resume aggregation + * Use this endpoint to read the attributes of a specific member. + * @summary Read member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - resumeAggregation: async (memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options: AxiosRequestConfig = {}): Promise => { + readMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('resumeAggregation', 'memberGuid', memberGuid) + assertParamExists('readMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('resumeAggregation', 'userGuid', userGuid) - // verify required parameter 'memberResumeRequestBody' is not null or undefined - assertParamExists('resumeAggregation', 'memberResumeRequestBody', memberResumeRequestBody) - const localVarPath = `/users/{user_guid}/members/{member_guid}/resume` + assertParamExists('readMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -13931,7 +15802,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13941,12 +15812,9 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(memberResumeRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -13954,26 +15822,19 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. - * @summary Update account by member - * @param {string} accountGuid The unique id for an `account`. + * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. + * @summary Read member status * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateAccountByMember: async (accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('updateAccountByMember', 'accountGuid', accountGuid) + readMemberStatus: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('updateAccountByMember', 'memberGuid', memberGuid) + assertParamExists('readMemberStatus', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateAccountByMember', 'userGuid', userGuid) - // verify required parameter 'accountUpdateRequestBody' is not null or undefined - assertParamExists('updateAccountByMember', 'accountUpdateRequestBody', accountUpdateRequestBody) - const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + assertParamExists('readMemberStatus', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/status` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -13983,7 +15844,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -13993,12 +15854,9 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(accountUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14006,23 +15864,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to update the attributes of a custom category according to its unique GUID. - * @summary Update category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) + * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. + * @summary Resume aggregation + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateCategory: async (categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'categoryGuid' is not null or undefined - assertParamExists('updateCategory', 'categoryGuid', categoryGuid) + resumeAggregation: async (memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('resumeAggregation', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateCategory', 'userGuid', userGuid) - // verify required parameter 'categoryUpdateRequestBody' is not null or undefined - assertParamExists('updateCategory', 'categoryUpdateRequestBody', categoryUpdateRequestBody) - const localVarPath = `/users/{user_guid}/categories/{category_guid}` - .replace(`{${"category_guid"}}`, encodeURIComponent(String(categoryGuid))) + assertParamExists('resumeAggregation', 'userGuid', userGuid) + // verify required parameter 'memberResumeRequestBody' is not null or undefined + assertParamExists('resumeAggregation', 'memberResumeRequestBody', memberResumeRequestBody) + const localVarPath = `/users/{user_guid}/members/{member_guid}/resume` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -14046,7 +15904,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(categoryUpdateRequestBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(memberResumeRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14054,26 +15912,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. - * @summary Update managed account - * @param {string} accountGuid The unique id for an `account`. + * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. + * @summary Update member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateManagedAccount: async (accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('updateManagedAccount', 'accountGuid', accountGuid) + updateMember: async (memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('updateManagedAccount', 'memberGuid', memberGuid) + assertParamExists('updateMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateManagedAccount', 'userGuid', userGuid) - // verify required parameter 'managedAccountUpdateRequestBody' is not null or undefined - assertParamExists('updateManagedAccount', 'managedAccountUpdateRequestBody', managedAccountUpdateRequestBody) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + assertParamExists('updateMember', 'userGuid', userGuid) + // verify required parameter 'memberUpdateRequestBody' is not null or undefined + assertParamExists('updateMember', 'memberUpdateRequestBody', memberUpdateRequestBody) + const localVarPath = `/users/{user_guid}/members/{member_guid}` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -14091,6 +15946,10 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -14098,7 +15957,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(managedAccountUpdateRequestBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(memberUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14106,22 +15965,20 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Use this endpoint to update the attributes of the specified partner_managed `member`. - * @summary Update managed member + * The verify endpoint begins a verification process for a member. + * @summary Verify member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateManagedMember: async (memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + verifyMember: async (memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('updateManagedMember', 'memberGuid', memberGuid) + assertParamExists('verifyMember', 'memberGuid', memberGuid) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateManagedMember', 'userGuid', userGuid) - // verify required parameter 'managedMemberUpdateRequestBody' is not null or undefined - assertParamExists('updateManagedMember', 'managedMemberUpdateRequestBody', managedMemberUpdateRequestBody) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}` + assertParamExists('verifyMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/verify` .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -14131,7 +15988,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -14139,458 +15996,581 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(managedMemberUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * MembersApi - functional programming interface + * @export + */ +export const MembersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MembersApiAxiosParamCreator(configuration) + return { + /** + * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. + * @summary Aggregate member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. + * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async aggregateMember(memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, includeHoldings?: boolean, includeTransactions?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.aggregateMember(memberGuid, userGuid, xCALLBACKPAYLOAD, includeHoldings, includeTransactions, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. + * @summary Check balances + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async checkBalances(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkBalances(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. + * @summary Create member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createMember(userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMember(userGuid, memberCreateRequestBody, xCALLBACKPAYLOAD, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMember(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async identifyMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.identifyMember(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. + * @summary List member challenges + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listMemberChallenges(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberChallenges(memberGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + * @summary List member credentials + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listMemberCredentials(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberCredentials(memberGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns an array which contains information on every member associated with a specific user. + * @summary List members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listMembers(userGuid: string, page?: number, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMembers(userGuid, page, recordsPerPage, useCase, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a specific member. + * @summary Read member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMember(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. + * @summary Read member status + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMemberStatus(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMemberStatus(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. + * @summary Resume aggregation + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resumeAggregation(memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resumeAggregation(memberGuid, userGuid, memberResumeRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. + * @summary Update member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateMember(memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateMember(memberGuid, userGuid, memberUpdateRequestBody, xCALLBACKPAYLOAD, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * The verify endpoint begins a verification process for a member. + * @summary Verify member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async verifyMember(memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.verifyMember(memberGuid, userGuid, xCALLBACKPAYLOAD, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MembersApi - factory interface + * @export + */ +export const MembersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MembersApiFp(configuration) + return { + /** + * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. + * @summary Aggregate member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. + * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + aggregateMember(memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, includeHoldings?: boolean, includeTransactions?: boolean, options?: any): AxiosPromise { + return localVarFp.aggregateMember(memberGuid, userGuid, xCALLBACKPAYLOAD, includeHoldings, includeTransactions, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. + * @summary Check balances + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkBalances(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.checkBalances(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. + * @summary Create member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createMember(userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.createMember(userGuid, memberCreateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); + }, /** - * Use this endpoint to update the attributes of the specified partner_managed `transaction`. - * @summary Update managed transaction - * @param {string} accountGuid The unique id for an `account`. + * Accessing this endpoint will permanently delete a member. + * @summary Delete member * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateManagedTransaction: async (accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('updateManagedTransaction', 'accountGuid', accountGuid) - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('updateManagedTransaction', 'memberGuid', memberGuid) - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('updateManagedTransaction', 'transactionGuid', transactionGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateManagedTransaction', 'userGuid', userGuid) - // verify required parameter 'managedTransactionUpdateRequestBody' is not null or undefined - assertParamExists('updateManagedTransaction', 'managedTransactionUpdateRequestBody', managedTransactionUpdateRequestBody) - const localVarPath = `/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(managedTransactionUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. - * @summary Update member + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateMember: async (memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('updateMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateMember', 'userGuid', userGuid) - // verify required parameter 'memberUpdateRequestBody' is not null or undefined - assertParamExists('updateMember', 'memberUpdateRequestBody', memberUpdateRequestBody) - const localVarPath = `/users/{user_guid}/members/{member_guid}` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(memberUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + identifyMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.identifyMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the name of a specific tag according to its unique GUID. - * @summary Update tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) + * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. + * @summary List member challenges + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTag: async (tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'tagGuid' is not null or undefined - assertParamExists('updateTag', 'tagGuid', tagGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateTag', 'userGuid', userGuid) - // verify required parameter 'tagUpdateRequestBody' is not null or undefined - assertParamExists('updateTag', 'tagUpdateRequestBody', tagUpdateRequestBody) - const localVarPath = `/users/{user_guid}/tags/{tag_guid}` - .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(tagUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listMemberChallenges(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMemberChallenges(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update a tagging. - * @summary Update tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) + * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + * @summary List member credentials + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTagging: async (taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'taggingGuid' is not null or undefined - assertParamExists('updateTagging', 'taggingGuid', taggingGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateTagging', 'userGuid', userGuid) - // verify required parameter 'taggingUpdateRequestBody' is not null or undefined - assertParamExists('updateTagging', 'taggingUpdateRequestBody', taggingUpdateRequestBody) - const localVarPath = `/users/{user_guid}/taggings/{tagging_guid}` - .replace(`{${"tagging_guid"}}`, encodeURIComponent(String(taggingGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(taggingUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listMemberCredentials(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMemberCredentials(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. - * @summary Update transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * This endpoint returns an array which contains information on every member associated with a specific user. + * @summary List members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTransaction: async (transactionGuid: string, userGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('updateTransaction', 'transactionGuid', transactionGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateTransaction', 'userGuid', userGuid) - // verify required parameter 'transactionUpdateRequestBody' is not null or undefined - assertParamExists('updateTransaction', 'transactionUpdateRequestBody', transactionUpdateRequestBody) - const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}` - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listMembers(userGuid: string, page?: number, recordsPerPage?: number, useCase?: string, options?: any): AxiosPromise { + return localVarFp.listMembers(userGuid, page, recordsPerPage, useCase, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a specific member. + * @summary Read member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. + * @summary Read member status + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMemberStatus(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readMemberStatus(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. + * @summary Resume aggregation + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resumeAggregation(memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options?: any): AxiosPromise { + return localVarFp.resumeAggregation(memberGuid, userGuid, memberResumeRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. - * @summary Update transaction_rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated + * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. + * @summary Update member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTransactionRule: async (transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionRuleGuid' is not null or undefined - assertParamExists('updateTransactionRule', 'transactionRuleGuid', transactionRuleGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateTransactionRule', 'userGuid', userGuid) - // verify required parameter 'transactionRuleUpdateRequestBody' is not null or undefined - assertParamExists('updateTransactionRule', 'transactionRuleUpdateRequestBody', transactionRuleUpdateRequestBody) - const localVarPath = `/users/{user_guid}/transaction_rules/{transaction_rule_guid}` - .replace(`{${"transaction_rule_guid"}}`, encodeURIComponent(String(transactionRuleGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionRuleUpdateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + updateMember(memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.updateMember(memberGuid, userGuid, memberUpdateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the attributes of the specified user. - * @summary Update user - * @param {string} userGuid The unique id for a `user`. - * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) + * The verify endpoint begins a verification process for a member. + * @summary Verify member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateUser', 'userGuid', userGuid) - // verify required parameter 'userUpdateRequestBody' is not null or undefined - assertParamExists('updateUser', 'userUpdateRequestBody', userUpdateRequestBody) - const localVarPath = `/users/{user_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + verifyMember(memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.verifyMember(memberGuid, userGuid, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); + }, + }; +}; - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) +/** + * MembersApi - object-oriented interface + * @export + * @class MembersApi + * @extends {BaseAPI} + */ +export class MembersApi extends BaseAPI { + /** + * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. + * @summary Aggregate member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. + * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public aggregateMember(memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, includeHoldings?: boolean, includeTransactions?: boolean, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).aggregateMember(memberGuid, userGuid, xCALLBACKPAYLOAD, includeHoldings, includeTransactions, options).then((request) => request(this.axios, this.basePath)); + } + /** + * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. + * @summary Check balances + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public checkBalances(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).checkBalances(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + /** + * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. + * @summary Create member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public createMember(userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).createMember(userGuid, memberCreateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(userUpdateRequestBody, localVarRequestOptions, configuration) + /** + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public deleteMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).deleteMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Read monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidMonthlyCashFlowProfileGet: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidMonthlyCashFlowProfileGet', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/monthly_cash_flow_profile` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + /** + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public identifyMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).identifyMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. + * @summary List member challenges + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public listMemberChallenges(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).listMemberChallenges(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + * @summary List member credentials + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public listMemberCredentials(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).listMemberCredentials(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + /** + * This endpoint returns an array which contains information on every member associated with a specific user. + * @summary List members + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public listMembers(userGuid: string, page?: number, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).listMembers(userGuid, page, recordsPerPage, useCase, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Use this endpoint to read the attributes of a specific member. + * @summary Read member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public readMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).readMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. - * @summary Update monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidMonthlyCashFlowProfilePut: async (userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidMonthlyCashFlowProfilePut', 'userGuid', userGuid) - // verify required parameter 'monthlyCashFlowProfileRequestBody' is not null or undefined - assertParamExists('usersUserGuidMonthlyCashFlowProfilePut', 'monthlyCashFlowProfileRequestBody', monthlyCashFlowProfileRequestBody) - const localVarPath = `/users/{user_guid}/monthly_cash_flow_profile` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + /** + * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. + * @summary Read member status + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public readMemberStatus(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).readMemberStatus(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. + * @summary Resume aggregation + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public resumeAggregation(memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).resumeAggregation(memberGuid, userGuid, memberResumeRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. + * @summary Update member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public updateMember(memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).updateMember(memberGuid, userGuid, memberUpdateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); + } + /** + * The verify endpoint begins a verification process for a member. + * @summary Verify member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public verifyMember(memberGuid: string, userGuid: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).verifyMember(memberGuid, userGuid, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); + } +} - - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(monthlyCashFlowProfileRequestBody, localVarRequestOptions, configuration) - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * MerchantsApi - axios parameter creator + * @export + */ +export const MerchantsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. - * @summary Delete split transactions - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} [name] This will list only merchants in which the appended string appears. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidTransactionsTransactionGuidSplitDelete: async (transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('usersUserGuidTransactionsTransactionGuidSplitDelete', 'transactionGuid', transactionGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidTransactionsTransactionGuidSplitDelete', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}/split` - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + listMerchants: async (name?: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/merchants`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14598,7 +16578,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -14606,57 +16586,23 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. - * @summary Create split transactions - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} transactionGuid The unique identifier for the transaction. Defined by MX. - * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidTransactionsTransactionGuidSplitPost: async (userGuid: string, transactionGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidTransactionsTransactionGuidSplitPost', 'userGuid', userGuid) - // verify required parameter 'transactionGuid' is not null or undefined - assertParamExists('usersUserGuidTransactionsTransactionGuidSplitPost', 'transactionGuid', transactionGuid) - const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}/split` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (name !== undefined) { + localVarQueryParameter['name'] = name; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(splitTransactionRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14664,21 +16610,17 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * The verify endpoint begins a verification process for a member. - * @summary Verify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Returns information about a particular merchant, such as a logo, name, and website. + * @summary Read merchant + * @param {string} merchantGuid The unique id for a `merchant`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - verifyMember: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'memberGuid' is not null or undefined - assertParamExists('verifyMember', 'memberGuid', memberGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('verifyMember', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/members/{member_guid}/verify` - .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + readMerchant: async (merchantGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'merchantGuid' is not null or undefined + assertParamExists('readMerchant', 'merchantGuid', merchantGuid) + const localVarPath = `/merchants/{merchant_guid}` + .replace(`{${"merchant_guid"}}`, encodeURIComponent(String(merchantGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14686,7 +16628,7 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -14697,4199 +16639,6056 @@ export const MxPlatformApiAxiosParamCreator = function (configuration?: Configur setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * MxPlatformApi - functional programming interface - * @export - */ -export const MxPlatformApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = MxPlatformApiAxiosParamCreator(configuration) - return { - /** - * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. - * @summary Aggregate member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. - * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async aggregateMember(memberGuid: string, userGuid: string, includeHoldings?: boolean, includeTransactions?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.aggregateMember(memberGuid, userGuid, includeHoldings, includeTransactions, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. - * @summary Check balances - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async checkBalances(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.checkBalances(memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new custom category for a specific `user`. - * @summary Create category - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createCategory(userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createCategory(userGuid, categoryCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a partner-managed account. - * @summary Create managed account - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createManagedAccount(memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedAccount(memberGuid, userGuid, managedAccountCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new partner-managed `member`. - * @summary Create managed member - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createManagedMember(userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedMember(userGuid, managedMemberCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new partner-managed `transaction`. - * @summary Create managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createManagedTransaction(accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedTransaction(accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed. - * @summary Create manual account - * @param {string} userGuid The unique id for a `user`. - * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createManualAccount(userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createManualAccount(userGuid, accountCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. - * @summary Create member - * @param {string} userGuid The unique id for a `user`. - * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createMember(userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createMember(userGuid, memberCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new custom tag. - * @summary Create tag - * @param {string} userGuid The unique id for a `user`. - * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createTag(userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTag(userGuid, tagCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. - * @summary Create tagging - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createTagging(userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTagging(userGuid, taggingCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. - * @summary Create transaction rule - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createTransactionRule(userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTransactionRule(userGuid, transactionRuleCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. - * @summary Create user - * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createUser(userCreateRequestBody: UserCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(userCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint returns the specified `credit_card_product` according to the unique GUID. - * @summary Read a Credit Card Product - * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async creditCard(creditCardProductGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.creditCard(creditCardProductGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns the specified `merchant_location` resource. The `merchant_location_guid` can be found on `transaction` objects. + * @summary Read merchant location + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCategory(categoryGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readMerchantLocation: async (merchantLocationGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'merchantLocationGuid' is not null or undefined + assertParamExists('readMerchantLocation', 'merchantLocationGuid', merchantLocationGuid) + const localVarPath = `/merchant_locations/{merchant_location_guid}` + .replace(`{${"merchant_location_guid"}}`, encodeURIComponent(String(merchantLocationGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * MerchantsApi - functional programming interface + * @export + */ +export const MerchantsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MerchantsApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. - * @summary Delete managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} [name] This will list only merchants in which the appended string appears. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedAccount(accountGuid, memberGuid, userGuid, options); + async listMerchants(name?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMerchants(name, page, recordsPerPage, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Returns information about a particular merchant, such as a logo, name, and website. + * @summary Read merchant + * @param {string} merchantGuid The unique id for a `merchant`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteManagedMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedMember(memberGuid, userGuid, options); + async readMerchant(merchantGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMerchant(merchantGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns the specified `merchant_location` resource. The `merchant_location_guid` can be found on `transaction` objects. + * @summary Read merchant location + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options); + async readMerchantLocation(merchantLocationGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMerchantLocation(merchantLocationGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * MerchantsApi - factory interface + * @export + */ +export const MerchantsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MerchantsApiFp(configuration) + return { /** - * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete manual account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} [name] This will list only merchants in which the appended string appears. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteManualAccount(accountGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManualAccount(accountGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listMerchants(name?: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMerchants(name, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Accessing this endpoint will permanently delete a member. - * @summary Delete member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Returns information about a particular merchant, such as a logo, name, and website. + * @summary Read merchant + * @param {string} merchantGuid The unique id for a `merchant`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMember(memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readMerchant(merchantGuid: string, options?: any): AxiosPromise { + return localVarFp.readMerchant(merchantGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. - * @summary Delete tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns the specified `merchant_location` resource. The `merchant_location_guid` can be found on `transaction` objects. + * @summary Read merchant location + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteTag(tagGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTag(tagGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readMerchantLocation(merchantLocationGuid: string, options?: any): AxiosPromise { + return localVarFp.readMerchantLocation(merchantLocationGuid, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * MerchantsApi - object-oriented interface + * @export + * @class MerchantsApi + * @extends {BaseAPI} + */ +export class MerchantsApi extends BaseAPI { + /** + * This endpoint returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} [name] This will list only merchants in which the appended string appears. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantsApi + */ + public listMerchants(name?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return MerchantsApiFp(this.configuration).listMerchants(name, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about a particular merchant, such as a logo, name, and website. + * @summary Read merchant + * @param {string} merchantGuid The unique id for a `merchant`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantsApi + */ + public readMerchant(merchantGuid: string, options?: AxiosRequestConfig) { + return MerchantsApiFp(this.configuration).readMerchant(merchantGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns the specified `merchant_location` resource. The `merchant_location_guid` can be found on `transaction` objects. + * @summary Read merchant location + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantsApi + */ + public readMerchantLocation(merchantLocationGuid: string, options?: AxiosRequestConfig) { + return MerchantsApiFp(this.configuration).readMerchantLocation(merchantLocationGuid, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MicrodepositsApi - axios parameter creator + * @export + */ +export const MicrodepositsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. - * @summary Delete tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to create or pre-initiate a microdeposit. The response will include the new microdeposit record with a status of `INITIATED` or `PREINITIATED` respectively. To pre-initiate a microdeposit, you only need to set `email` (string), `first_name` (string), and `last_name` (string) in the request body. Pre-initiating a microdeposit allows you to pass the end user\'s first name, last name, and email if this data has already been collected. If the end user selects an institution which requires the microdeposit flow, the pre-initiated `micro_deposit` will be used and the Connect Widget step that normally requests this info from the end user will be skipped. However, if the end user selects an institution which supports IAV, the pre-initiated `micro_deposit` will be deleted and IAV will be used instead. When requesting a Connect Widget URL after pre-initiating, make sure to set the `current_microdeposit_guid` to the resulting microdeposit\'s `guid` and set the `mode` to `verification`. If you use this enhanced flow, a `micro_deposit` should be pre-initiated for all connect sessions in verification mode. After pre-initiating a microdeposit, pass the GUID to the config as `current_microdeposit_guid` and set the `mode` to `verification` when requesting a Connect URL. Pre-initiating a microdeposit is optional. If you choose to implement this flow, it should be used for all Connect Widget sessions in verification mode. + * @summary Create or pre-initiate a microdeposit + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MicrodepositRequestBody} microdepositRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTagging(taggingGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + createMicrodeposit: async (userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createMicrodeposit', 'userGuid', userGuid) + // verify required parameter 'microdepositRequestBody' is not null or undefined + assertParamExists('createMicrodeposit', 'microdepositRequestBody', microdepositRequestBody) + const localVarPath = `/users/{user_guid}/micro_deposits` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(microdepositRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to permanently delete a transaction rule based on its unique GUID. - * @summary Delete transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTransactionRule(transactionRuleGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + deleteMicrodeposit: async (microDepositGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'microDepositGuid' is not null or undefined + assertParamExists('deleteMicrodeposit', 'microDepositGuid', microDepositGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteMicrodeposit', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` + .replace(`{${"micro_deposit_guid"}}`, encodeURIComponent(String(microDepositGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. - * @summary Delete user - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listUserMicrodeposits: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listUserMicrodeposits', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/micro_deposits` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. - * @summary (Deprecated) Request an authorization code. - * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. + * This endpoint returns a list of the account verifications associated with the user, as well as the status of those verifications. + * @summary List all verifications for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listUserVerifications: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listUserVerifications', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/account_verifications` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to download a specified statement PDF. - * @summary Download statement pdf - * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadStatementPDF(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadStatementPDF(memberGuid, statementGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readUserMicrodeposit: async (microDepositGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'microDepositGuid' is not null or undefined + assertParamExists('readUserMicrodeposit', 'microDepositGuid', microDepositGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readUserMicrodeposit', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` + .replace(`{${"micro_deposit_guid"}}`, encodeURIComponent(String(microDepositGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to download a PDF version of the specified tax document. The endpoint URL is the base URL appended with the uri of the tax_document. - * @summary Download a Tax Document PDF - * @param {string} taxDocumentGuid The unique id for a `tax_document`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadTaxDocument(taxDocumentGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadTaxDocument(taxDocumentGuid, memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + verifyMicrodeposit: async (microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'microDepositGuid' is not null or undefined + assertParamExists('verifyMicrodeposit', 'microDepositGuid', microDepositGuid) + const localVarPath = `/micro_deposits/{micro_deposit_guid}/verify` + .replace(`{${"micro_deposit_guid"}}`, encodeURIComponent(String(microDepositGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(microdepositVerifyRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * MicrodepositsApi - functional programming interface + * @export + */ +export const MicrodepositsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MicrodepositsApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform. - * @summary Enhance transactions - * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * Use this endpoint to create or pre-initiate a microdeposit. The response will include the new microdeposit record with a status of `INITIATED` or `PREINITIATED` respectively. To pre-initiate a microdeposit, you only need to set `email` (string), `first_name` (string), and `last_name` (string) in the request body. Pre-initiating a microdeposit allows you to pass the end user\'s first name, last name, and email if this data has already been collected. If the end user selects an institution which requires the microdeposit flow, the pre-initiated `micro_deposit` will be used and the Connect Widget step that normally requests this info from the end user will be skipped. However, if the end user selects an institution which supports IAV, the pre-initiated `micro_deposit` will be deleted and IAV will be used instead. When requesting a Connect Widget URL after pre-initiating, make sure to set the `current_microdeposit_guid` to the resulting microdeposit\'s `guid` and set the `mode` to `verification`. If you use this enhanced flow, a `micro_deposit` should be pre-initiated for all connect sessions in verification mode. After pre-initiating a microdeposit, pass the GUID to the config as `current_microdeposit_guid` and set the `mode` to `verification` when requesting a Connect URL. Pre-initiating a microdeposit is optional. If you choose to implement this flow, it should be used for all Connect Widget sessions in verification mode. + * @summary Create or pre-initiate a microdeposit + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MicrodepositRequestBody} microdepositRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async enhanceTransactions(enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.enhanceTransactions(enhanceTransactionsRequestBody, options); + async createMicrodeposit(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMicrodeposit(userGuid, microdepositRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. - * @summary Extend history - * @param {string} memberGuid The unique identifier for a `member`. - * @param {string} userGuid The unique identifier for a `user`. + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async extendHistory(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.extendHistory(memberGuid, userGuid, options); + async deleteMicrodeposit(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMicrodeposit(microDepositGuid, userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. - * @summary Fetch Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fetchRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRewards(userGuid, memberGuid, options); + async listUserMicrodeposits(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserMicrodeposits(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to fetch the statements associated with a particular member. - * @summary Fetch statements - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns a list of the account verifications associated with the user, as well as the status of those verifications. + * @summary List all verifications for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fetchStatements(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchStatements(memberGuid, userGuid, options); + async listUserVerifications(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserVerifications(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to fetch (aggregate) the tax documents associated with the specified member. This request **does not** return the latest tax documents. It just starts the document aggregation process and returns the initial state of the process. You must interact with the newly aggregated data using the other document endpoints in this reference. This request may also trigger multi-factor authentication which requires end-user input and a specific process for answering authentication challenges. - * @summary Fetch Tax Documents - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fetchTaxDocuments(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchTaxDocuments(memberGuid, userGuid, options); + async readUserMicrodeposit(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readUserMicrodeposit(microDepositGuid, userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * The identify endpoint begins an identification process for an already-existing member. - * @summary Identify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async identifyMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.identifyMember(memberGuid, userGuid, options); + async verifyMicrodeposit(microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.verifyMicrodeposit(microDepositGuid, microdepositVerifyRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * MicrodepositsApi - factory interface + * @export + */ +export const MicrodepositsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MicrodepositsApiFp(configuration) + return { /** - * This endpoint returns a list of account numbers associated with the specified `account`. - * @summary List account numbers by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to create or pre-initiate a microdeposit. The response will include the new microdeposit record with a status of `INITIATED` or `PREINITIATED` respectively. To pre-initiate a microdeposit, you only need to set `email` (string), `first_name` (string), and `last_name` (string) in the request body. Pre-initiating a microdeposit allows you to pass the end user\'s first name, last name, and email if this data has already been collected. If the end user selects an institution which requires the microdeposit flow, the pre-initiated `micro_deposit` will be used and the Connect Widget step that normally requests this info from the end user will be skipped. However, if the end user selects an institution which supports IAV, the pre-initiated `micro_deposit` will be deleted and IAV will be used instead. When requesting a Connect Widget URL after pre-initiating, make sure to set the `current_microdeposit_guid` to the resulting microdeposit\'s `guid` and set the `mode` to `verification`. If you use this enhanced flow, a `micro_deposit` should be pre-initiated for all connect sessions in verification mode. After pre-initiating a microdeposit, pass the GUID to the config as `current_microdeposit_guid` and set the `mode` to `verification` when requesting a Connect URL. Pre-initiating a microdeposit is optional. If you choose to implement this flow, it should be used for all Connect Widget sessions in verification mode. + * @summary Create or pre-initiate a microdeposit + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MicrodepositRequestBody} microdepositRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAccountNumbersByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + createMicrodeposit(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: any): AxiosPromise { + return localVarFp.createMicrodeposit(userGuid, microdepositRequestBody, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns a list of account numbers associated with the specified `member`. - * @summary List account numbers by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAccountNumbersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + deleteMicrodeposit(microDepositGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteMicrodeposit(microDepositGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns an array with information about every account associated with a particular member. - * @summary List account owners by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAccountOwnersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listUserMicrodeposits(userGuid: string, options?: any): AxiosPromise { + return localVarFp.listUserMicrodeposits(userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. - * @summary List categories - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * This endpoint returns a list of the account verifications associated with the user, as well as the status of those verifications. + * @summary List all verifications for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listCategories(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listCategories(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listUserVerifications(userGuid: string, options?: any): AxiosPromise { + return localVarFp.listUserVerifications(userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listDefaultCategories(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listDefaultCategories(page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readUserMicrodeposit(microDepositGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readUserMicrodeposit(microDepositGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories by user - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listDefaultCategoriesByUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listDefaultCategoriesByUser(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + verifyMicrodeposit(microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: any): AxiosPromise { + return localVarFp.verifyMicrodeposit(microDepositGuid, microdepositVerifyRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * MicrodepositsApi - object-oriented interface + * @export + * @class MicrodepositsApi + * @extends {BaseAPI} + */ +export class MicrodepositsApi extends BaseAPI { + /** + * Use this endpoint to create or pre-initiate a microdeposit. The response will include the new microdeposit record with a status of `INITIATED` or `PREINITIATED` respectively. To pre-initiate a microdeposit, you only need to set `email` (string), `first_name` (string), and `last_name` (string) in the request body. Pre-initiating a microdeposit allows you to pass the end user\'s first name, last name, and email if this data has already been collected. If the end user selects an institution which requires the microdeposit flow, the pre-initiated `micro_deposit` will be used and the Connect Widget step that normally requests this info from the end user will be skipped. However, if the end user selects an institution which supports IAV, the pre-initiated `micro_deposit` will be deleted and IAV will be used instead. When requesting a Connect Widget URL after pre-initiating, make sure to set the `current_microdeposit_guid` to the resulting microdeposit\'s `guid` and set the `mode` to `verification`. If you use this enhanced flow, a `micro_deposit` should be pre-initiated for all connect sessions in verification mode. After pre-initiating a microdeposit, pass the GUID to the config as `current_microdeposit_guid` and set the `mode` to `verification` when requesting a Connect URL. Pre-initiating a microdeposit is optional. If you choose to implement this flow, it should be used for all Connect Widget sessions in verification mode. + * @summary Create or pre-initiate a microdeposit + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MicrodepositRequestBody} microdepositRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MicrodepositsApi + */ + public createMicrodeposit(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).createMicrodeposit(userGuid, microdepositRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MicrodepositsApi + */ + public deleteMicrodeposit(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).deleteMicrodeposit(microDepositGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MicrodepositsApi + */ + public listUserMicrodeposits(userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).listUserMicrodeposits(userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of the account verifications associated with the user, as well as the status of those verifications. + * @summary List all verifications for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MicrodepositsApi + */ + public listUserVerifications(userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).listUserVerifications(userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MicrodepositsApi + */ + public readUserMicrodeposit(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).readUserMicrodeposit(microDepositGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MicrodepositsApi + */ + public verifyMicrodeposit(microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).verifyMicrodeposit(microDepositGuid, microdepositVerifyRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MonthlyCashFlowProfileApi - axios parameter creator + * @export + */ +export const MonthlyCashFlowProfileApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. - * @summary List favorite institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listFavoriteInstitutions(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listFavoriteInstitutions(page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readMonthlyCashFlowProfile: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readMonthlyCashFlowProfile', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/monthly_cash_flow_profile` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns all holdings associated with the specified `user` across all accounts and members. - * @summary List holdings - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. + * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listHoldings(userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldings(userGuid, fromDate, page, recordsPerPage, toDate, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + updateMonthlyCashFlowProfile: async (userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateMonthlyCashFlowProfile', 'userGuid', userGuid) + // verify required parameter 'monthlyCashFlowProfileRequestBody' is not null or undefined + assertParamExists('updateMonthlyCashFlowProfile', 'monthlyCashFlowProfileRequestBody', monthlyCashFlowProfileRequestBody) + const localVarPath = `/users/{user_guid}/monthly_cash_flow_profile` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(monthlyCashFlowProfileRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * MonthlyCashFlowProfileApi - functional programming interface + * @export + */ +export const MonthlyCashFlowProfileApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MonthlyCashFlowProfileApiAxiosParamCreator(configuration) + return { /** - * This endpoint returns all holdings associated with the specified `account`. - * @summary List holdings by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listHoldingsByAccount(accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldingsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, options); + async readMonthlyCashFlowProfile(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMonthlyCashFlowProfile(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns all holdings associated with the specified `member` across all accounts. - * @summary List holdings by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. + * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listHoldingsByMember(memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldingsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate, options); + async updateMonthlyCashFlowProfile(userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateMonthlyCashFlowProfile(userGuid, monthlyCashFlowProfileRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * MonthlyCashFlowProfileApi - factory interface + * @export + */ +export const MonthlyCashFlowProfileApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MonthlyCashFlowProfileApiFp(configuration) + return { /** - * Use this endpoint to see which credentials will be needed to create a member for a specific institution. - * @summary List institution credentials - * @param {string} institutionCode The institution_code of the institution. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listInstitutionCredentials(institutionCode: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listInstitutionCredentials(institutionCode, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readMonthlyCashFlowProfile(userGuid: string, options?: any): AxiosPromise { + return localVarFp.readMonthlyCashFlowProfile(userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns a list of institutions based on the specified search term or parameter. - * @summary List institutions - * @param {string} [name] This will list only institutions in which the appended string appears. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. - * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. - * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. - * @param {boolean} [supportsTransactionHistory] Filter only institutions which support extended transaction history. + * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listInstitutions(name?: string, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listInstitutions(name, page, recordsPerPage, supportsAccountIdentification, supportsAccountStatement, supportsAccountVerification, supportsTransactionHistory, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + updateMonthlyCashFlowProfile(userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: any): AxiosPromise { + return localVarFp.updateMonthlyCashFlowProfile(userGuid, monthlyCashFlowProfileRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * MonthlyCashFlowProfileApi - object-oriented interface + * @export + * @class MonthlyCashFlowProfileApi + * @extends {BaseAPI} + */ +export class MonthlyCashFlowProfileApi extends BaseAPI { + /** + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MonthlyCashFlowProfileApi + */ + public readMonthlyCashFlowProfile(userGuid: string, options?: AxiosRequestConfig) { + return MonthlyCashFlowProfileApiFp(this.configuration).readMonthlyCashFlowProfile(userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MonthlyCashFlowProfileApi + */ + public updateMonthlyCashFlowProfile(userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: AxiosRequestConfig) { + return MonthlyCashFlowProfileApiFp(this.configuration).updateMonthlyCashFlowProfile(userGuid, monthlyCashFlowProfileRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * NotificationsApi - axios parameter creator + * @export + */ +export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-manage member. - * @summary List managed accounts - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * All notifications created through the API will be of notification type `API_NOTIFICATION`, channel `PUSH`, and will not be associated to an entity. No other channels are supported. This will only have an effect for clients using an MX mobile application. + * @summary Create a notification + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} content The information related to the notification. + * @param {string} subject The subject related to the notification. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listManagedAccounts(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedAccounts(memberGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + createNotification: async (userGuid: string, content: string, subject: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createNotification', 'userGuid', userGuid) + // verify required parameter 'content' is not null or undefined + assertParamExists('createNotification', 'content', content) + // verify required parameter 'subject' is not null or undefined + assertParamExists('createNotification', 'subject', subject) + const localVarPath = `/users/{user_guid}/notifications` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (content !== undefined) { + localVarQueryParameter['content'] = content; + } + + if (subject !== undefined) { + localVarQueryParameter['subject'] = subject; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns a list of institutions which can be used to create partner-managed members. - * @summary List managed institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listManagedInstitutions(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedInstitutions(page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listNotifications: async (userGuid: string, fromDate?: string, toDate?: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listNotifications', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/notifications` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns a list of all the partner-managed members associated with the specified `user`. - * @summary List managed members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Can pull up any notification associated with the user, including notifications created by MX for other channels besides `PUSH`. + * @summary Read notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} notificationGuid The unique identifier for notifications. Defined by MX. * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listManagedMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedMembers(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + * @throws {RequiredError} + */ + readNotifications: async (userGuid: string, notificationGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readNotifications', 'userGuid', userGuid) + // verify required parameter 'notificationGuid' is not null or undefined + assertParamExists('readNotifications', 'notificationGuid', notificationGuid) + const localVarPath = `/users/{user_guid}/notifications/{notification_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"notification_guid"}}`, encodeURIComponent(String(notificationGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * NotificationsApi - functional programming interface + * @export + */ +export const NotificationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) + return { /** - * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. - * @summary List managed transactions - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * All notifications created through the API will be of notification type `API_NOTIFICATION`, channel `PUSH`, and will not be associated to an entity. No other channels are supported. This will only have an effect for clients using an MX mobile application. + * @summary Create a notification + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} content The information related to the notification. + * @param {string} subject The subject related to the notification. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listManagedTransactions(accountGuid: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedTransactions(accountGuid, memberGuid, userGuid, page, recordsPerPage, options); + async createNotification(userGuid: string, content: string, subject: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createNotification(userGuid, content, subject, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns a list of all the accounts associated with the specified `member`. - * @summary List accounts by member - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique id for a `member`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listMemberAccounts(userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options); + async listNotifications(userGuid: string, fromDate?: string, toDate?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listNotifications(userGuid, fromDate, toDate, page, recordsPerPage, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. - * @summary List member challenges - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Can pull up any notification associated with the user, including notifications created by MX for other channels besides `PUSH`. + * @summary Read notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} notificationGuid The unique identifier for notifications. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listMemberChallenges(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberChallenges(memberGuid, userGuid, page, recordsPerPage, options); + async readNotifications(userGuid: string, notificationGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readNotifications(userGuid, notificationGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * NotificationsApi - factory interface + * @export + */ +export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationsApiFp(configuration) + return { /** - * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. - * @summary List member credentials - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * All notifications created through the API will be of notification type `API_NOTIFICATION`, channel `PUSH`, and will not be associated to an entity. No other channels are supported. This will only have an effect for clients using an MX mobile application. + * @summary Create a notification + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} content The information related to the notification. + * @param {string} subject The subject related to the notification. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listMemberCredentials(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberCredentials(memberGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + createNotification(userGuid: string, content: string, subject: string, options?: any): AxiosPromise { + return localVarFp.createNotification(userGuid, content, subject, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns an array which contains information on every member associated with a specific user. - * @summary List members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listMembers(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listNotifications(userGuid: string, fromDate?: string, toDate?: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listNotifications(userGuid, fromDate, toDate, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns a paginated list of all the merchants in the MX system. - * @summary List merchants - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Can pull up any notification associated with the user, including notifications created by MX for other channels besides `PUSH`. + * @summary Read notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} notificationGuid The unique identifier for notifications. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listMerchants(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listMerchants(page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readNotifications(userGuid: string, notificationGuid: string, options?: any): AxiosPromise { + return localVarFp.readNotifications(userGuid, notificationGuid, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * NotificationsApi - object-oriented interface + * @export + * @class NotificationsApi + * @extends {BaseAPI} + */ +export class NotificationsApi extends BaseAPI { + /** + * All notifications created through the API will be of notification type `API_NOTIFICATION`, channel `PUSH`, and will not be associated to an entity. No other channels are supported. This will only have an effect for clients using an MX mobile application. + * @summary Create a notification + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} content The information related to the notification. + * @param {string} subject The subject related to the notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public createNotification(userGuid: string, content: string, subject: string, options?: AxiosRequestConfig) { + return NotificationsApiFp(this.configuration).createNotification(userGuid, content, subject, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public listNotifications(userGuid: string, fromDate?: string, toDate?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return NotificationsApiFp(this.configuration).listNotifications(userGuid, fromDate, toDate, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Can pull up any notification associated with the user, including notifications created by MX for other channels besides `PUSH`. + * @summary Read notifications + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} notificationGuid The unique identifier for notifications. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public readNotifications(userGuid: string, notificationGuid: string, options?: AxiosRequestConfig) { + return NotificationsApiFp(this.configuration).readNotifications(userGuid, notificationGuid, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ProcessorTokenApi - axios parameter creator + * @export + */ +export const ProcessorTokenApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to list all the `rewards` associated with a specified `member`. - * @summary List Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listRewards(userGuid, memberGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + checkRealTimeAccountBalance: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/account/check_balance`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to get an array of available statements. - * @summary List statements by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + * @summary (Deprecated) Request an authorization code + * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - async listStatementsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listStatementsByMember(memberGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + deprecatedRequestPaymentProcessorAuthorizationCode: async (paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'paymentProcessorAuthorizationCodeRequestBody' is not null or undefined + assertParamExists('deprecatedRequestPaymentProcessorAuthorizationCode', 'paymentProcessorAuthorizationCodeRequestBody', paymentProcessorAuthorizationCodeRequestBody) + const localVarPath = `/payment_processor_authorization_code`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(paymentProcessorAuthorizationCodeRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to retrieve a list of all the taggings associated with a specific user. - * @summary List taggings - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTaggings(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTaggings(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + getAccountOwnerInfo: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/account/transactions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. - * @summary List tags - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {TokenRequestBody} [tokenRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTags(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTags(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listTokens: async (tokenRequestBody?: TokenRequestBody, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/tokens`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(tokenRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to get a paginated list of tax documents. - * @summary List Tax Documents - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTaxDocuments(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTaxDocuments(memberGuid, userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readAccountBalance: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/payment_account`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. - * @summary List transaction rules - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransactionRules(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionRules(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + requestAccountNumber: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/account/account_numbers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Requests to this endpoint return a list of transactions associated with the specified `user`, accross all members and accounts associated with that `user`. - * @summary List transactions - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + * @summary Request an authorization code + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransactions(userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(userGuid, fromDate, page, recordsPerPage, toDate, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + requestAuthorizationCode: async (authorizationCodeRequestBody: AuthorizationCodeRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'authorizationCodeRequestBody' is not null or undefined + assertParamExists('requestAuthorizationCode', 'authorizationCodeRequestBody', authorizationCodeRequestBody) + const localVarPath = `/authorization_code`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(authorizationCodeRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * ProcessorTokenApi - functional programming interface + * @export + */ +export const ProcessorTokenApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ProcessorTokenApiAxiosParamCreator(configuration) + return { /** - * This endpoint returns a list of the last 90 days of transactions associated with the specified account. - * @summary List transactions by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransactionsByAccount(accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, options); + async checkRealTimeAccountBalance(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkRealTimeAccountBalance(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Requests to this endpoint return a list of transactions associated with the specified `member`, accross all accounts associated with that `member`. - * @summary List transactions by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + * @summary (Deprecated) Request an authorization code + * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - async listTransactionsByMember(memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate, options); + async deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag’s unique GUID. In other words, a list of all transactions that have been assigned to a particular tag using the create a tagging endpoint. - * @summary List transactions by tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransactionsByTag(tagGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByTag(tagGuid, userGuid, fromDate, page, recordsPerPage, toDate, options); + async getAccountOwnerInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountOwnerInfo(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns a list of all the accounts associated with the specified `user`. - * @summary List accounts - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {boolean} [isManual] List only accounts that were manually created. - * @param {number} [recordsPerPage] Specify records per page. + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {TokenRequestBody} [tokenRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listUserAccounts(userGuid: string, memberIsManagedByUser?: boolean, page?: number, isManual?: boolean, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listUserAccounts(userGuid, memberIsManagedByUser, page, isManual, recordsPerPage, options); + async listTokens(tokenRequestBody?: TokenRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTokens(tokenRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to list every user you\'ve created in the MX Platform API. - * @summary List users - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [id] The user `id` to search for. - * @param {string} [email] The user `email` to search for. - * @param {boolean} [isDisabled] Search for users that are diabled. + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listUsers(page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(page, recordsPerPage, id, email, isDisabled, options); + async readAccountBalance(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readAccountBalance(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns the specified `account` resource. - * @summary Read account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readAccount(accountGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readAccount(accountGuid, userGuid, options); + async requestAccountNumber(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestAccountNumber(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint allows you to read the attributes of an `account` resource. - * @summary Read account by member - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + * @summary Request an authorization code + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readAccountByMember(accountGuid, memberGuid, userGuid, options); + async requestAuthorizationCode(authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestAuthorizationCode(authorizationCodeRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * ProcessorTokenApi - factory interface + * @export + */ +export const ProcessorTokenApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProcessorTokenApiFp(configuration) + return { /** - * Use this endpoint to read the attributes of either a default category or a custom category. - * @summary Read a custom category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readCategory(categoryGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + checkRealTimeAccountBalance(options?: any): AxiosPromise { + return localVarFp.checkRealTimeAccountBalance(options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a default category. - * @summary Read a default category - * @param {string} categoryGuid The unique id for a `category`. + * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + * @summary (Deprecated) Request an authorization code + * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - async readDefaultCategory(categoryGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readDefaultCategory(categoryGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options?: any): AxiosPromise { + return localVarFp.deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific `holding`. - * @summary Read holding - * @param {string} holdingGuid The unique id for a `holding`. - * @param {string} userGuid The unique id for a `user`. + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readHolding(holdingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readHolding(holdingGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + getAccountOwnerInfo(options?: any): AxiosPromise { + return localVarFp.getAccountOwnerInfo(options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns information about the institution specified by `institution_code`. - * @summary Read institution - * @param {string} institutionCode The institution_code of the institution. + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {TokenRequestBody} [tokenRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readInstitution(institutionCode: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readInstitution(institutionCode, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listTokens(tokenRequestBody?: TokenRequestBody, options?: any): AxiosPromise { + return localVarFp.listTokens(tokenRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. - * @summary Read managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedAccount(accountGuid, memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readAccountBalance(options?: any): AxiosPromise { + return localVarFp.readAccountBalance(options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns the attributes of the specified partner-managed `member`. - * @summary Read managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readManagedMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedMember(memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + requestAccountNumber(options?: any): AxiosPromise { + return localVarFp.requestAccountNumber(options).then((request) => request(axios, basePath)); }, /** - * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. - * @summary Read managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + * @summary Request an authorization code + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + requestAuthorizationCode(authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: any): AxiosPromise { + return localVarFp.requestAuthorizationCode(authorizationCodeRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * ProcessorTokenApi - object-oriented interface + * @export + * @class ProcessorTokenApi + * @extends {BaseAPI} + */ +export class ProcessorTokenApi extends BaseAPI { + /** + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public checkRealTimeAccountBalance(options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).checkRealTimeAccountBalance(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + * @summary (Deprecated) Request an authorization code + * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public getAccountOwnerInfo(options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).getAccountOwnerInfo(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {TokenRequestBody} [tokenRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public listTokens(tokenRequestBody?: TokenRequestBody, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).listTokens(tokenRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public readAccountBalance(options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).readAccountBalance(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public requestAccountNumber(options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).requestAccountNumber(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + * @summary Request an authorization code + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public requestAuthorizationCode(authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).requestAuthorizationCode(authorizationCodeRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * RewardsApi - axios parameter creator + * @export + */ +export const RewardsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to read the attributes of a specific member. - * @summary Read member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readMember(memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + creditCard: async (creditCardProductGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'creditCardProductGuid' is not null or undefined + assertParamExists('creditCard', 'creditCardProductGuid', creditCardProductGuid) + const localVarPath = `/credit_card_products/{credit_card_product_guid}` + .replace(`{${"credit_card_product_guid"}}`, encodeURIComponent(String(creditCardProductGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. - * @summary Read member status + * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. Member and Rewards guids are defined by MX. + * @summary Fetch Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async readMemberStatus(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readMemberStatus(memberGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Returns information about a particular merchant, such as a logo, name, and website. - * @summary Read merchant - * @param {string} merchantGuid The unique id for a `merchant`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readMerchant(merchantGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readMerchant(merchantGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + fetchRewards: async (userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('fetchRewards', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('fetchRewards', 'memberGuid', memberGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/fetch_rewards` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns the specified merchant_location resource. - * @summary Read merchant location - * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * Use this endpoint to list all the `rewards` associated with a specified `member`. Member guids are defined by MX. + * @summary List Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readMerchantLocation(merchantLocationGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readMerchantLocation(merchantLocationGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listRewards: async (userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listRewards', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listRewards', 'memberGuid', memberGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/rewards` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to read a specific `reward` based on its unique GUID.. + * Use this endpoint to read a specific `reward` based on its unique GUID. Member and Rewards guids are defined by MX. * @summary Read Reward - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. - * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async readRewards(userGuid: string, memberGuid: string, rewardGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readRewards(userGuid, memberGuid, rewardGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to read a JSON representation of the statement. - * @summary Read statement by member + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readStatementByMember(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readStatementByMember(memberGuid, statementGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readRewards: async (userGuid: string, memberGuid: string, rewardGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readRewards', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('readRewards', 'memberGuid', memberGuid) + // verify required parameter 'rewardGuid' is not null or undefined + assertParamExists('readRewards', 'rewardGuid', rewardGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/rewards/{reward_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"reward_guid"}}`, encodeURIComponent(String(rewardGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * RewardsApi - functional programming interface + * @export + */ +export const RewardsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = RewardsApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to read the attributes of a particular tag according to its unique GUID. - * @summary Read tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readTag(tagGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readTag(tagGuid, userGuid, options); + async creditCard(creditCardProductGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.creditCard(creditCardProductGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. - * @summary Read tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. + * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. Member and Rewards guids are defined by MX. + * @summary Fetch Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readTagging(taggingGuid, userGuid, options); + async fetchRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRewards(userGuid, memberGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of the specified tax document. - * @summary Read a Tax Document - * @param {string} taxDocumentGuid The unique id for a `tax_document`. + * Use this endpoint to list all the `rewards` associated with a specified `member`. Member guids are defined by MX. + * @summary List Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readTaxDocument(taxDocumentGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readTaxDocument(taxDocumentGuid, memberGuid, userGuid, options); + async listRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRewards(userGuid, memberGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Requests to this endpoint will return the attributes of the specified `transaction`. - * @summary Read transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read a specific `reward` based on its unique GUID. Member and Rewards guids are defined by MX. + * @summary Read Reward + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readTransaction(transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readTransaction(transactionGuid, userGuid, options); + async readRewards(userGuid: string, memberGuid: string, rewardGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readRewards(userGuid, memberGuid, rewardGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * RewardsApi - factory interface + * @export + */ +export const RewardsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RewardsApiFp(configuration) + return { /** - * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. - * @summary Read transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readTransactionRule(transactionRuleGuid, userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + creditCard(creditCardProductGuid: string, options?: any): AxiosPromise { + return localVarFp.creditCard(creditCardProductGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific user. - * @summary Read user - * @param {string} userGuid The unique id for a `user`. + * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. Member and Rewards guids are defined by MX. + * @summary Fetch Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readUser(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readUser(userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + fetchRewards(userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.fetchRewards(userGuid, memberGuid, options).then((request) => request(axios, basePath)); }, /** - * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. - * @summary Request an authorization code. - * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * Use this endpoint to list all the `rewards` associated with a specified `member`. Member guids are defined by MX. + * @summary List Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async requestAuthorizationCode(authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestAuthorizationCode(authorizationCodeRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listRewards(userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.listRewards(userGuid, memberGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint will return a URL for an embeddable version of MX Connect. - * @summary Request connect widget url - * @param {string} userGuid The unique id for a `user`. - * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) + * Use this endpoint to read a specific `reward` based on its unique GUID. Member and Rewards guids are defined by MX. + * @summary Read Reward + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async requestConnectWidgetURL(userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestConnectWidgetURL(userGuid, connectWidgetRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readRewards(userGuid: string, memberGuid: string, rewardGuid: string, options?: any): AxiosPromise { + return localVarFp.readRewards(userGuid, memberGuid, rewardGuid, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * RewardsApi - object-oriented interface + * @export + * @class RewardsApi + * @extends {BaseAPI} + */ +export class RewardsApi extends BaseAPI { + /** + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RewardsApi + */ + public creditCard(creditCardProductGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).creditCard(creditCardProductGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. Member and Rewards guids are defined by MX. + * @summary Fetch Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RewardsApi + */ + public fetchRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).fetchRewards(userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the `rewards` associated with a specified `member`. Member guids are defined by MX. + * @summary List Rewards + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RewardsApi + */ + public listRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).listRewards(userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read a specific `reward` based on its unique GUID. Member and Rewards guids are defined by MX. + * @summary Read Reward + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RewardsApi + */ + public readRewards(userGuid: string, memberGuid: string, rewardGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).readRewards(userGuid, memberGuid, rewardGuid, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * SpendingPlanApi - axios parameter creator + * @export + */ +export const SpendingPlanApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * This endpoint will generate an `oauth_window_uri` for the specified `member`. - * @summary Request oauth window uri - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. - * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. This setting is not persistent. - * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. - * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. - * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * This endpoint creates a new `spending_plan` for the user. + * @summary Create spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async requestOAuthWindowURI(memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestOAuthWindowURI(memberGuid, userGuid, clientRedirectUrl, enableApp2app, referralSource, skipAggregation, uiMessageWebviewUrlScheme, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + createSpendingPlan: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createSpendingPlan', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/spending_plans` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint allows partners to get a URL by passing the `widget_type` in the request body, as well as configuring it in several different ways. In the case of Connect, that means setting the `widget_type` to `connect_widget`. Partners may also pass an optional `Accept-Language` header as well as a number of configuration options. Note that this is a `POST` request. - * @summary Request widget url - * @param {string} userGuid The unique id for a `user`. - * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. - * @param {string} [acceptLanguage] The desired language of the widget. + * This endpoint creates a new `spending_plan_iteration_item`. + * @summary Create spending plan iteration item + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async requestWidgetURL(userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestWidgetURL(userGuid, widgetRequestBody, acceptLanguage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + createSpendingPlanIterationItem: async (spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('createSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createSpendingPlanIterationItem', 'userGuid', userGuid) + // verify required parameter 'spendingPlanIterationItemCreateRequestBody' is not null or undefined + assertParamExists('createSpendingPlanIterationItem', 'spendingPlanIterationItemCreateRequestBody', spendingPlanIterationItemCreateRequestBody) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items` + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(spendingPlanIterationItemCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. - * @summary Resume aggregation - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * Use this endpoint to delete a user\'s `spending_plan`. + * @summary Delete spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async resumeAggregation(memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.resumeAggregation(memberGuid, userGuid, memberResumeRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + deleteSpendingPlan: async (userGuid: string, spendingPlanGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteSpendingPlan', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('deleteSpendingPlan', 'spendingPlanGuid', spendingPlanGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. - * @summary Update account by member - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * Use this endpoint to delete a `spending_plan_account`. + * @summary Delete spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccountByMember(accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + deleteSpendingPlanAccount: async (userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteSpendingPlanAccount', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('deleteSpendingPlanAccount', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'spendingPlanAccountGuid' is not null or undefined + assertParamExists('deleteSpendingPlanAccount', 'spendingPlanAccountGuid', spendingPlanAccountGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"spending_plan_account_guid"}}`, encodeURIComponent(String(spendingPlanAccountGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of a custom category according to its unique GUID. - * @summary Update category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) + * Use this endpoint to delete a spending plan `iteration_item`. + * @summary Delete spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateCategory(categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateCategory(categoryGuid, userGuid, categoryUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. - * @summary Update managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) + deleteSpendingPlanIterationItem: async (userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteSpendingPlanIterationItem', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('deleteSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'iterationItemGuid' is not null or undefined + assertParamExists('deleteSpendingPlanIterationItem', 'iterationItemGuid', iterationItemGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"iteration_item_guid"}}`, encodeURIComponent(String(iterationItemGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to list all the spending plan accounts associated with the spending plan. + * @summary List spending plan accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedAccount(accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listSpendingPlanAccounts: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listSpendingPlanAccounts', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('listSpendingPlanAccounts', 'spendingPlanGuid', spendingPlanGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of the specified partner_managed `member`. - * @summary Update managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. + * @summary List spending plan iteration items + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateManagedMember(memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedMember(memberGuid, userGuid, managedMemberUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listSpendingPlanIterationItems: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listSpendingPlanIterationItems', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('listSpendingPlanIterationItems', 'spendingPlanGuid', spendingPlanGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of the specified partner_managed `transaction`. - * @summary Update managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. + * @summary List spending plan iterations + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listSpendingPlanIterations: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listSpendingPlanIterations', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('listSpendingPlanIterations', 'spendingPlanGuid', spendingPlanGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. - * @summary Update member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to list all the spending plans associated with the user. + * @summary List spending plans + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateMember(memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateMember(memberGuid, userGuid, memberUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + listSpendingPlans: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listSpendingPlans', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/spending_plans` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the name of a specific tag according to its unique GUID. - * @summary Update tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) + * Use this endpoint to read the attributes of the current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateTag(tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateTag(tagGuid, userGuid, tagUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readCurrentSpendingPlanIteration: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readCurrentSpendingPlanIteration', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('readCurrentSpendingPlanIteration', 'spendingPlanGuid', spendingPlanGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update a tagging. - * @summary Update tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) + * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. + * @summary Read spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} - */ - async updateTagging(taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateTagging(taggingGuid, userGuid, taggingUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + */ + readSpendingPlanAccount: async (userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readSpendingPlanAccount', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('readSpendingPlanAccount', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'spendingPlanAccountGuid' is not null or undefined + assertParamExists('readSpendingPlanAccount', 'spendingPlanAccountGuid', spendingPlanAccountGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"spending_plan_account_guid"}}`, encodeURIComponent(String(spendingPlanAccountGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. - * @summary Update transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. + * @summary Read a spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} iterationNumber The current iteration number for the spending plan `iteration`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateTransaction(transactionGuid: string, userGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransaction(transactionGuid, userGuid, transactionUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readSpendingPlanIteration: async (userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readSpendingPlanIteration', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('readSpendingPlanIteration', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'iterationNumber' is not null or undefined + assertParamExists('readSpendingPlanIteration', 'iterationNumber', iterationNumber) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/{iteration_number}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"iteration_number"}}`, encodeURIComponent(String(iterationNumber))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. - * @summary Update transaction_rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated + * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. + * @summary Read a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateTransactionRule(transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransactionRule(transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readSpendingPlanIterationItem: async (userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readSpendingPlanIterationItem', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('readSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'iterationItemGuid' is not null or undefined + assertParamExists('readSpendingPlanIterationItem', 'iterationItemGuid', iterationItemGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"iteration_item_guid"}}`, encodeURIComponent(String(iterationItemGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of the specified user. - * @summary Update user - * @param {string} userGuid The unique id for a `user`. - * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) + * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. + * @summary Read a spending plan for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(userGuid, userUpdateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + readSpendingPlanUser: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readSpendingPlanUser', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('readSpendingPlanUser', 'spendingPlanGuid', spendingPlanGuid) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * - * @summary Read monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. + * Use this endpoint to update an existing `spending_plan_iteration_item`. + * @summary Update a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidMonthlyCashFlowProfileGet(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMonthlyCashFlowProfileGet(userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + updateSpendingPlanIterationItem: async (userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateSpendingPlanIterationItem', 'userGuid', userGuid) + // verify required parameter 'spendingPlanGuid' is not null or undefined + assertParamExists('updateSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) + // verify required parameter 'iterationItemGuid' is not null or undefined + assertParamExists('updateSpendingPlanIterationItem', 'iterationItemGuid', iterationItemGuid) + // verify required parameter 'spendingPlanIterationItemCreateRequestBody' is not null or undefined + assertParamExists('updateSpendingPlanIterationItem', 'spendingPlanIterationItemCreateRequestBody', spendingPlanIterationItemCreateRequestBody) + const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) + .replace(`{${"iteration_item_guid"}}`, encodeURIComponent(String(iterationItemGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(spendingPlanIterationItemCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * SpendingPlanApi - functional programming interface + * @export + */ +export const SpendingPlanApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SpendingPlanApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. - * @summary Update monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * This endpoint creates a new `spending_plan` for the user. + * @summary Create spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidMonthlyCashFlowProfilePut(userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMonthlyCashFlowProfilePut(userGuid, monthlyCashFlowProfileRequestBody, options); + async createSpendingPlan(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSpendingPlan(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. - * @summary Delete split transactions - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint creates a new `spending_plan_iteration_item`. + * @summary Create spending plan iteration item + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidTransactionsTransactionGuidSplitDelete(transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidTransactionsTransactionGuidSplitDelete(transactionGuid, userGuid, options); + async createSpendingPlanIterationItem(spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSpendingPlanIterationItem(spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. - * @summary Create split transactions - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} transactionGuid The unique identifier for the transaction. Defined by MX. - * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * Use this endpoint to delete a user\'s `spending_plan`. + * @summary Delete spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidTransactionsTransactionGuidSplitPost(userGuid: string, transactionGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidTransactionsTransactionGuidSplitPost(userGuid, transactionGuid, splitTransactionRequestBody, options); + async deleteSpendingPlan(userGuid: string, spendingPlanGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlan(userGuid, spendingPlanGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * The verify endpoint begins a verification process for a member. - * @summary Verify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete a `spending_plan_account`. + * @summary Delete spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async verifyMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.verifyMember(memberGuid, userGuid, options); + async deleteSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - } -}; - -/** - * MxPlatformApi - factory interface - * @export - */ -export const MxPlatformApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = MxPlatformApiFp(configuration) - return { - /** - * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. - * @summary Aggregate member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. - * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - aggregateMember(memberGuid: string, userGuid: string, includeHoldings?: boolean, includeTransactions?: boolean, options?: any): AxiosPromise { - return localVarFp.aggregateMember(memberGuid, userGuid, includeHoldings, includeTransactions, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. - * @summary Check balances - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - checkBalances(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.checkBalances(memberGuid, userGuid, options).then((request) => request(axios, basePath)); - }, /** - * Use this endpoint to create a new custom category for a specific `user`. - * @summary Create category - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created + * Use this endpoint to delete a spending plan `iteration_item`. + * @summary Delete spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createCategory(userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createCategory(userGuid, categoryCreateRequestBody, options).then((request) => request(axios, basePath)); + async deleteSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a partner-managed account. - * @summary Create managed account - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. + * Use this endpoint to list all the spending plan accounts associated with the spending plan. + * @summary List spending plan accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManagedAccount(memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createManagedAccount(memberGuid, userGuid, managedAccountCreateRequestBody, options).then((request) => request(axios, basePath)); + async listSpendingPlanAccounts(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanAccounts(userGuid, spendingPlanGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a new partner-managed `member`. - * @summary Create managed member - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. + * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. + * @summary List spending plan iteration items + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManagedMember(userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createManagedMember(userGuid, managedMemberCreateRequestBody, options).then((request) => request(axios, basePath)); + async listSpendingPlanIterationItems(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanIterationItems(userGuid, spendingPlanGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a new partner-managed `transaction`. - * @summary Create managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. + * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. + * @summary List spending plan iterations + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManagedTransaction(accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createManagedTransaction(accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, options).then((request) => request(axios, basePath)); + async listSpendingPlanIterations(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanIterations(userGuid, spendingPlanGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed. - * @summary Create manual account - * @param {string} userGuid The unique id for a `user`. - * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * Use this endpoint to list all the spending plans associated with the user. + * @summary List spending plans + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createManualAccount(userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createManualAccount(userGuid, accountCreateRequestBody, options).then((request) => request(axios, basePath)); + async listSpendingPlans(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlans(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. - * @summary Create member - * @param {string} userGuid The unique id for a `user`. - * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) + * Use this endpoint to read the attributes of the current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createMember(userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createMember(userGuid, memberCreateRequestBody, options).then((request) => request(axios, basePath)); + async readCurrentSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readCurrentSpendingPlanIteration(userGuid, spendingPlanGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a new custom tag. - * @summary Create tag - * @param {string} userGuid The unique id for a `user`. - * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) + * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. + * @summary Read spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTag(userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createTag(userGuid, tagCreateRequestBody, options).then((request) => request(axios, basePath)); + async readSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. - * @summary Create tagging - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) + * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. + * @summary Read a spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} iterationNumber The current iteration number for the spending plan `iteration`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTagging(userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createTagging(userGuid, taggingCreateRequestBody, options).then((request) => request(axios, basePath)); + async readSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanIteration(userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. - * @summary Create transaction rule - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) + * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. + * @summary Read a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransactionRule(userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createTransactionRule(userGuid, transactionRuleCreateRequestBody, options).then((request) => request(axios, basePath)); + async readSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. - * @summary Create user - * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) + * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. + * @summary Read a spending plan for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser(userCreateRequestBody: UserCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createUser(userCreateRequestBody, options).then((request) => request(axios, basePath)); + async readSpendingPlanUser(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanUser(userGuid, spendingPlanGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns the specified `credit_card_product` according to the unique GUID. - * @summary Read a Credit Card Product - * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. + * Use this endpoint to update an existing `spending_plan_iteration_item`. + * @summary Update a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - creditCard(creditCardProductGuid: string, options?: any): AxiosPromise { - return localVarFp.creditCard(creditCardProductGuid, options).then((request) => request(axios, basePath)); + async updateSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * SpendingPlanApi - factory interface + * @export + */ +export const SpendingPlanApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SpendingPlanApiFp(configuration) + return { /** - * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint creates a new `spending_plan` for the user. + * @summary Create spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteCategory(categoryGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteCategory(categoryGuid, userGuid, options).then((request) => request(axios, basePath)); + createSpendingPlan(userGuid: string, options?: any): AxiosPromise { + return localVarFp.createSpendingPlan(userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. - * @summary Delete managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * This endpoint creates a new `spending_plan_iteration_item`. + * @summary Create spending plan iteration item + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + createSpendingPlanIterationItem(spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createSpendingPlanIterationItem(spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete a user\'s `spending_plan`. + * @summary Delete spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManagedMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteManagedMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + deleteSpendingPlan(userGuid: string, spendingPlanGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSpendingPlan(userGuid, spendingPlanGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete a `spending_plan_account`. + * @summary Delete spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + deleteSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete manual account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete a spending plan `iteration_item`. + * @summary Delete spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteManualAccount(accountGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteManualAccount(accountGuid, userGuid, options).then((request) => request(axios, basePath)); + deleteSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, options).then((request) => request(axios, basePath)); }, /** - * Accessing this endpoint will permanently delete a member. - * @summary Delete member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the spending plan accounts associated with the spending plan. + * @summary List spending plan accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. - * @summary Delete tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. + listSpendingPlanAccounts(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlanAccounts(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. + * @summary List spending plan iteration items + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTag(tagGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteTag(tagGuid, userGuid, options).then((request) => request(axios, basePath)); + listSpendingPlanIterationItems(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlanIterationItems(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. - * @summary Delete tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. + * @summary List spending plan iterations + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTagging(taggingGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteTagging(taggingGuid, userGuid, options).then((request) => request(axios, basePath)); + listSpendingPlanIterations(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlanIterations(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to permanently delete a transaction rule based on its unique GUID. - * @summary Delete transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all the spending plans associated with the user. + * @summary List spending plans + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTransactionRule(transactionRuleGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(axios, basePath)); + listSpendingPlans(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlans(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. - * @summary Delete user - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of the current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser(userGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteUser(userGuid, options).then((request) => request(axios, basePath)); + readCurrentSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readCurrentSpendingPlanIteration(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. - * @summary (Deprecated) Request an authorization code. - * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. + * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. + * @summary Read spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options?: any): AxiosPromise { - return localVarFp.deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody, options).then((request) => request(axios, basePath)); + readSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to download a specified statement PDF. - * @summary Download statement pdf - * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. + * @summary Read a spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} iterationNumber The current iteration number for the spending plan `iteration`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadStatementPDF(memberGuid: string, statementGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.downloadStatementPDF(memberGuid, statementGuid, userGuid, options).then((request) => request(axios, basePath)); + readSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanIteration(userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to download a PDF version of the specified tax document. The endpoint URL is the base URL appended with the uri of the tax_document. - * @summary Download a Tax Document PDF - * @param {string} taxDocumentGuid The unique id for a `tax_document`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. + * @summary Read a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadTaxDocument(taxDocumentGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.downloadTaxDocument(taxDocumentGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + readSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform. - * @summary Enhance transactions - * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. + * @summary Read a spending plan for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - enhanceTransactions(enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: any): AxiosPromise { - return localVarFp.enhanceTransactions(enhanceTransactionsRequestBody, options).then((request) => request(axios, basePath)); + readSpendingPlanUser(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanUser(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. - * @summary Extend history - * @param {string} memberGuid The unique identifier for a `member`. - * @param {string} userGuid The unique identifier for a `user`. + * Use this endpoint to update an existing `spending_plan_iteration_item`. + * @summary Update a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - extendHistory(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.extendHistory(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + updateSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * SpendingPlanApi - object-oriented interface + * @export + * @class SpendingPlanApi + * @extends {BaseAPI} + */ +export class SpendingPlanApi extends BaseAPI { + /** + * This endpoint creates a new `spending_plan` for the user. + * @summary Create spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public createSpendingPlan(userGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).createSpendingPlan(userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint creates a new `spending_plan_iteration_item`. + * @summary Create spending plan iteration item + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public createSpendingPlanIterationItem(spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).createSpendingPlanIterationItem(spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete a user\'s `spending_plan`. + * @summary Delete spending plan + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public deleteSpendingPlan(userGuid: string, spendingPlanGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).deleteSpendingPlan(userGuid, spendingPlanGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete a `spending_plan_account`. + * @summary Delete spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public deleteSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).deleteSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete a spending plan `iteration_item`. + * @summary Delete spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public deleteSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).deleteSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the spending plan accounts associated with the spending plan. + * @summary List spending plan accounts + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public listSpendingPlanAccounts(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlanAccounts(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. + * @summary List spending plan iteration items + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public listSpendingPlanIterationItems(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlanIterationItems(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. + * @summary List spending plan iterations + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public listSpendingPlanIterations(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlanIterations(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the spending plans associated with the user. + * @summary List spending plans + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public listSpendingPlans(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlans(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of the current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public readCurrentSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readCurrentSpendingPlanIteration(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. + * @summary Read spending plan account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public readSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. + * @summary Read a spending plan iteration + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} iterationNumber The current iteration number for the spending plan `iteration`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public readSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanIteration(userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. + * @summary Read a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public readSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. + * @summary Read a spending plan for a user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public readSpendingPlanUser(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanUser(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update an existing `spending_plan_iteration_item`. + * @summary Update a spending plan iteration item + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SpendingPlanApi + */ + public updateSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).updateSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * StatementsApi - axios parameter creator + * @export + */ +export const StatementsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. - * @summary Fetch Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. + * Use this endpoint to download a specified statement PDF. + * @summary Download statement pdf + * @param {string} memberGuid The unique id for a `member`. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchRewards(userGuid: string, memberGuid: string, options?: any): AxiosPromise { - return localVarFp.fetchRewards(userGuid, memberGuid, options).then((request) => request(axios, basePath)); + downloadStatementPDF: async (memberGuid: string, statementGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('downloadStatementPDF', 'memberGuid', memberGuid) + // verify required parameter 'statementGuid' is not null or undefined + assertParamExists('downloadStatementPDF', 'statementGuid', statementGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('downloadStatementPDF', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/statements/{statement_guid}.pdf` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"statement_guid"}}`, encodeURIComponent(String(statementGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** * Use this endpoint to fetch the statements associated with a particular member. * @summary Fetch statements * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchStatements(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.fetchStatements(memberGuid, userGuid, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to fetch (aggregate) the tax documents associated with the specified member. This request **does not** return the latest tax documents. It just starts the document aggregation process and returns the initial state of the process. You must interact with the newly aggregated data using the other document endpoints in this reference. This request may also trigger multi-factor authentication which requires end-user input and a specific process for answering authentication challenges. - * @summary Fetch Tax Documents - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchTaxDocuments(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.fetchTaxDocuments(memberGuid, userGuid, options).then((request) => request(axios, basePath)); - }, - /** - * The identify endpoint begins an identification process for an already-existing member. - * @summary Identify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - identifyMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.identifyMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of account numbers associated with the specified `account`. - * @summary List account numbers by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAccountNumbersByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of account numbers associated with the specified `member`. - * @summary List account numbers by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAccountNumbersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns an array with information about every account associated with a particular member. - * @summary List account owners by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAccountOwnersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. - * @summary List categories - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCategories(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listCategories(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listDefaultCategories(page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listDefaultCategories(page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories by user - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listDefaultCategoriesByUser(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listDefaultCategoriesByUser(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. - * @summary List favorite institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFavoriteInstitutions(page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listFavoriteInstitutions(page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns all holdings associated with the specified `user` across all accounts and members. - * @summary List holdings - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listHoldings(userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listHoldings(userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns all holdings associated with the specified `account`. - * @summary List holdings by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listHoldingsByAccount(accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listHoldingsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns all holdings associated with the specified `member` across all accounts. - * @summary List holdings by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listHoldingsByMember(memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listHoldingsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to see which credentials will be needed to create a member for a specific institution. - * @summary List institution credentials - * @param {string} institutionCode The institution_code of the institution. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInstitutionCredentials(institutionCode: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listInstitutionCredentials(institutionCode, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of institutions based on the specified search term or parameter. - * @summary List institutions - * @param {string} [name] This will list only institutions in which the appended string appears. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. - * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. - * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. - * @param {boolean} [supportsTransactionHistory] Filter only institutions which support extended transaction history. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInstitutions(name?: string, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options?: any): AxiosPromise { - return localVarFp.listInstitutions(name, page, recordsPerPage, supportsAccountIdentification, supportsAccountStatement, supportsAccountVerification, supportsTransactionHistory, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-manage member. - * @summary List managed accounts - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listManagedAccounts(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listManagedAccounts(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of institutions which can be used to create partner-managed members. - * @summary List managed institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listManagedInstitutions(page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listManagedInstitutions(page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of all the partner-managed members associated with the specified `user`. - * @summary List managed members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listManagedMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listManagedMembers(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. - * @summary List managed transactions - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listManagedTransactions(accountGuid: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listManagedTransactions(accountGuid, memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a list of all the accounts associated with the specified `member`. - * @summary List accounts by member - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique id for a `member`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMemberAccounts(userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options).then((request) => request(axios, basePath)); + fetchStatements: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('fetchStatements', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('fetchStatements', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/fetch_statements` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. - * @summary List member challenges + * Use this endpoint to get an array of available statements. + * @summary List statements by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMemberChallenges(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMemberChallenges(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + listStatementsByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listStatementsByMember', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listStatementsByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/statements` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. - * @summary List member credentials + * Use this endpoint to read a JSON representation of the statement. + * @summary Read statement by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMemberCredentials(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMemberCredentials(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns an array which contains information on every member associated with a specific user. - * @summary List members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMembers(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + readStatementByMember: async (memberGuid: string, statementGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('readStatementByMember', 'memberGuid', memberGuid) + // verify required parameter 'statementGuid' is not null or undefined + assertParamExists('readStatementByMember', 'statementGuid', statementGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readStatementByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/statements/{statement_guid}` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"statement_guid"}}`, encodeURIComponent(String(statementGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * StatementsApi - functional programming interface + * @export + */ +export const StatementsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StatementsApiAxiosParamCreator(configuration) + return { /** - * This endpoint returns a paginated list of all the merchants in the MX system. - * @summary List merchants - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to download a specified statement PDF. + * @summary Download statement pdf + * @param {string} memberGuid The unique id for a `member`. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMerchants(page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMerchants(page, recordsPerPage, options).then((request) => request(axios, basePath)); + async downloadStatementPDF(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadStatementPDF(memberGuid, statementGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to list all the `rewards` associated with a specified `member`. - * @summary List Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. + * Use this endpoint to fetch the statements associated with a particular member. + * @summary Fetch statements + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRewards(userGuid: string, memberGuid: string, options?: any): AxiosPromise { - return localVarFp.listRewards(userGuid, memberGuid, options).then((request) => request(axios, basePath)); + async fetchStatements(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchStatements(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to get an array of available statements. * @summary List statements by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listStatementsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listStatementsByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to retrieve a list of all the taggings associated with a specific user. - * @summary List taggings - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listTaggings(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listTaggings(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. - * @summary List tags - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listTags(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listTags(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async listStatementsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listStatementsByMember(memberGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to get a paginated list of tax documents. - * @summary List Tax Documents + * Use this endpoint to read a JSON representation of the statement. + * @summary Read statement by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTaxDocuments(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listTaxDocuments(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async readStatementByMember(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readStatementByMember(memberGuid, statementGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * StatementsApi - factory interface + * @export + */ +export const StatementsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StatementsApiFp(configuration) + return { /** - * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. - * @summary List transaction rules - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to download a specified statement PDF. + * @summary Download statement pdf + * @param {string} memberGuid The unique id for a `member`. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionRules(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listTransactionRules(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + downloadStatementPDF(memberGuid: string, statementGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.downloadStatementPDF(memberGuid, statementGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Requests to this endpoint return a list of transactions associated with the specified `user`, accross all members and accounts associated with that `user`. - * @summary List transactions - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * Use this endpoint to fetch the statements associated with a particular member. + * @summary Fetch statements + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactions(userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listTransactions(userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); + fetchStatements(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.fetchStatements(memberGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns a list of the last 90 days of transactions associated with the specified account. - * @summary List transactions by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * Use this endpoint to get an array of available statements. + * @summary List statements by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsByAccount(accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listTransactionsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); + listStatementsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listStatementsByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Requests to this endpoint return a list of transactions associated with the specified `member`, accross all accounts associated with that `member`. - * @summary List transactions by member + * Use this endpoint to read a JSON representation of the statement. + * @summary Read statement by member * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsByMember(memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listTransactionsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); + readStatementByMember(memberGuid: string, statementGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readStatementByMember(memberGuid, statementGuid, userGuid, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * StatementsApi - object-oriented interface + * @export + * @class StatementsApi + * @extends {BaseAPI} + */ +export class StatementsApi extends BaseAPI { + /** + * Use this endpoint to download a specified statement PDF. + * @summary Download statement pdf + * @param {string} memberGuid The unique id for a `member`. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatementsApi + */ + public downloadStatementPDF(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).downloadStatementPDF(memberGuid, statementGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to fetch the statements associated with a particular member. + * @summary Fetch statements + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatementsApi + */ + public fetchStatements(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).fetchStatements(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to get an array of available statements. + * @summary List statements by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatementsApi + */ + public listStatementsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).listStatementsByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read a JSON representation of the statement. + * @summary Read statement by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} statementGuid The unique id for a `statement`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatementsApi + */ + public readStatementByMember(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).readStatementByMember(memberGuid, statementGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TaggingsApi - axios parameter creator + * @export + */ +export const TaggingsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag’s unique GUID. In other words, a list of all transactions that have been assigned to a particular tag using the create a tagging endpoint. - * @summary List transactions by tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. + * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. + * @summary Create tagging + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsByTag(tagGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: any): AxiosPromise { - return localVarFp.listTransactionsByTag(tagGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(axios, basePath)); + createTagging: async (userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createTagging', 'userGuid', userGuid) + // verify required parameter 'taggingCreateRequestBody' is not null or undefined + assertParamExists('createTagging', 'taggingCreateRequestBody', taggingCreateRequestBody) + const localVarPath = `/users/{user_guid}/taggings` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(taggingCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns a list of all the accounts associated with the specified `user`. - * @summary List accounts - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {boolean} [isManual] List only accounts that were manually created. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. + * @summary Delete tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listUserAccounts(userGuid: string, memberIsManagedByUser?: boolean, page?: number, isManual?: boolean, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listUserAccounts(userGuid, memberIsManagedByUser, page, isManual, recordsPerPage, options).then((request) => request(axios, basePath)); + deleteTagging: async (taggingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'taggingGuid' is not null or undefined + assertParamExists('deleteTagging', 'taggingGuid', taggingGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteTagging', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/taggings/{tagging_guid}` + .replace(`{${"tagging_guid"}}`, encodeURIComponent(String(taggingGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to list every user you\'ve created in the MX Platform API. - * @summary List users - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [id] The user `id` to search for. - * @param {string} [email] The user `email` to search for. - * @param {boolean} [isDisabled] Search for users that are diabled. + * Use this endpoint to retrieve a list of all the taggings associated with a specific user. + * @summary List taggings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listUsers(page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: any): AxiosPromise { - return localVarFp.listUsers(page, recordsPerPage, id, email, isDisabled, options).then((request) => request(axios, basePath)); + listTaggings: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTaggings', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/taggings` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint returns the specified `account` resource. - * @summary Read account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. + * @summary Read tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readAccount(accountGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readAccount(accountGuid, userGuid, options).then((request) => request(axios, basePath)); + readTagging: async (taggingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'taggingGuid' is not null or undefined + assertParamExists('readTagging', 'taggingGuid', taggingGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readTagging', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/taggings/{tagging_guid}` + .replace(`{${"tagging_guid"}}`, encodeURIComponent(String(taggingGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This endpoint allows you to read the attributes of an `account` resource. - * @summary Read account by member - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readAccountByMember(accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + updateTagging: async (taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'taggingGuid' is not null or undefined + assertParamExists('updateTagging', 'taggingGuid', taggingGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateTagging', 'userGuid', userGuid) + // verify required parameter 'taggingUpdateRequestBody' is not null or undefined + assertParamExists('updateTagging', 'taggingUpdateRequestBody', taggingUpdateRequestBody) + const localVarPath = `/users/{user_guid}/taggings/{tagging_guid}` + .replace(`{${"tagging_guid"}}`, encodeURIComponent(String(taggingGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(taggingUpdateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * TaggingsApi - functional programming interface + * @export + */ +export const TaggingsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TaggingsApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to read the attributes of either a default category or a custom category. - * @summary Read a custom category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. + * @summary Create tagging + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readCategory(categoryGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readCategory(categoryGuid, userGuid, options).then((request) => request(axios, basePath)); + async createTagging(userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTagging(userGuid, taggingCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a default category. - * @summary Read a default category - * @param {string} categoryGuid The unique id for a `category`. + * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. + * @summary Delete tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readDefaultCategory(categoryGuid: string, options?: any): AxiosPromise { - return localVarFp.readDefaultCategory(categoryGuid, options).then((request) => request(axios, basePath)); + async deleteTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTagging(taggingGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific `holding`. - * @summary Read holding - * @param {string} holdingGuid The unique id for a `holding`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to retrieve a list of all the taggings associated with a specific user. + * @summary List taggings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readHolding(holdingGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readHolding(holdingGuid, userGuid, options).then((request) => request(axios, basePath)); + async listTaggings(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTaggings(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns information about the institution specified by `institution_code`. - * @summary Read institution - * @param {string} institutionCode The institution_code of the institution. + * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. + * @summary Read tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readInstitution(institutionCode: string, options?: any): AxiosPromise { - return localVarFp.readInstitution(institutionCode, options).then((request) => request(axios, basePath)); + async readTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTagging(taggingGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. - * @summary Read managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + async updateTagging(taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTagging(taggingGuid, userGuid, taggingUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * TaggingsApi - factory interface + * @export + */ +export const TaggingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TaggingsApiFp(configuration) + return { /** - * This endpoint returns the attributes of the specified partner-managed `member`. - * @summary Read managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. + * @summary Create tagging + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readManagedMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readManagedMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + createTagging(userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createTagging(userGuid, taggingCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. - * @summary Read managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. + * @summary Delete tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + deleteTagging(taggingGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteTagging(taggingGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific member. - * @summary Read member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to retrieve a list of all the taggings associated with a specific user. + * @summary List taggings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + listTaggings(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTaggings(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. - * @summary Read member status - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. + * @summary Read tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMemberStatus(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readMemberStatus(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + readTagging(taggingGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readTagging(taggingGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Returns information about a particular merchant, such as a logo, name, and website. - * @summary Read merchant - * @param {string} merchantGuid The unique id for a `merchant`. + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMerchant(merchantGuid: string, options?: any): AxiosPromise { - return localVarFp.readMerchant(merchantGuid, options).then((request) => request(axios, basePath)); + updateTagging(taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTagging(taggingGuid, userGuid, taggingUpdateRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * TaggingsApi - object-oriented interface + * @export + * @class TaggingsApi + * @extends {BaseAPI} + */ +export class TaggingsApi extends BaseAPI { + /** + * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. + * @summary Create tagging + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaggingsApi + */ + public createTagging(userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).createTagging(userGuid, taggingCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. + * @summary Delete tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaggingsApi + */ + public deleteTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).deleteTagging(taggingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to retrieve a list of all the taggings associated with a specific user. + * @summary List taggings + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaggingsApi + */ + public listTaggings(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).listTaggings(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. + * @summary Read tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaggingsApi + */ + public readTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).readTagging(taggingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} taggingGuid The unique id for a `tagging`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaggingsApi + */ + public updateTagging(taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).updateTagging(taggingGuid, userGuid, taggingUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TagsApi - axios parameter creator + * @export + */ +export const TagsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * This endpoint returns the specified merchant_location resource. - * @summary Read merchant location - * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readMerchantLocation(merchantLocationGuid: string, options?: any): AxiosPromise { - return localVarFp.readMerchantLocation(merchantLocationGuid, options).then((request) => request(axios, basePath)); + createTag: async (userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createTag', 'userGuid', userGuid) + // verify required parameter 'tagCreateRequestBody' is not null or undefined + assertParamExists('createTag', 'tagCreateRequestBody', tagCreateRequestBody) + const localVarPath = `/users/{user_guid}/tags` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(tagCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to read a specific `reward` based on its unique GUID.. - * @summary Read Reward - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. - * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. + * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. + * @summary Delete tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readRewards(userGuid: string, memberGuid: string, rewardGuid: string, options?: any): AxiosPromise { - return localVarFp.readRewards(userGuid, memberGuid, rewardGuid, options).then((request) => request(axios, basePath)); + deleteTag: async (tagGuid: string, accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'tagGuid' is not null or undefined + assertParamExists('deleteTag', 'tagGuid', tagGuid) + // verify required parameter 'accept' is not null or undefined + assertParamExists('deleteTag', 'accept', accept) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteTag', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/tags/{tag_guid}` + .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (accept != null) { + localVarHeaderParameter['Accept'] = String(accept); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to read a JSON representation of the statement. - * @summary Read statement by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. + * @summary List tags + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readStatementByMember(memberGuid: string, statementGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readStatementByMember(memberGuid, statementGuid, userGuid, options).then((request) => request(axios, basePath)); + listTags: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTags', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/tags` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** * Use this endpoint to read the attributes of a particular tag according to its unique GUID. * @summary Read tag * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - readTag(tagGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readTag(tagGuid, userGuid, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. - * @summary Read tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTagging(taggingGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readTagging(taggingGuid, userGuid, options).then((request) => request(axios, basePath)); + readTag: async (tagGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'tagGuid' is not null or undefined + assertParamExists('readTag', 'tagGuid', tagGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readTag', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/tags/{tag_guid}` + .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to read the attributes of the specified tax document. - * @summary Read a Tax Document - * @param {string} taxDocumentGuid The unique id for a `tax_document`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to update the name of a specific tag according to its unique GUID. + * @summary Update tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTaxDocument(taxDocumentGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readTaxDocument(taxDocumentGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + updateTag: async (tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'tagGuid' is not null or undefined + assertParamExists('updateTag', 'tagGuid', tagGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateTag', 'userGuid', userGuid) + // verify required parameter 'tagUpdateRequestBody' is not null or undefined + assertParamExists('updateTag', 'tagUpdateRequestBody', tagUpdateRequestBody) + const localVarPath = `/users/{user_guid}/tags/{tag_guid}` + .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(tagUpdateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * TagsApi - functional programming interface + * @export + */ +export const TagsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TagsApiAxiosParamCreator(configuration) + return { /** - * Requests to this endpoint will return the attributes of the specified `transaction`. - * @summary Read transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTransaction(transactionGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readTransaction(transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + async createTag(userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTag(userGuid, tagCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. - * @summary Read transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. + * @summary Delete tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readTransactionRule(transactionRuleGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.readTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(axios, basePath)); + async deleteTag(tagGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTag(tagGuid, accept, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific user. - * @summary Read user - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. + * @summary List tags + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readUser(userGuid: string, options?: any): AxiosPromise { - return localVarFp.readUser(userGuid, options).then((request) => request(axios, basePath)); + async listTags(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTags(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. - * @summary Request an authorization code. - * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * Use this endpoint to read the attributes of a particular tag according to its unique GUID. + * @summary Read tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestAuthorizationCode(authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: any): AxiosPromise { - return localVarFp.requestAuthorizationCode(authorizationCodeRequestBody, options).then((request) => request(axios, basePath)); + async readTag(tagGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTag(tagGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint will return a URL for an embeddable version of MX Connect. - * @summary Request connect widget url - * @param {string} userGuid The unique id for a `user`. - * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) + * Use this endpoint to update the name of a specific tag according to its unique GUID. + * @summary Update tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestConnectWidgetURL(userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options?: any): AxiosPromise { - return localVarFp.requestConnectWidgetURL(userGuid, connectWidgetRequestBody, options).then((request) => request(axios, basePath)); + async updateTag(tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTag(tagGuid, userGuid, tagUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * TagsApi - factory interface + * @export + */ +export const TagsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TagsApiFp(configuration) + return { /** - * This endpoint will generate an `oauth_window_uri` for the specified `member`. - * @summary Request oauth window uri - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. - * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. This setting is not persistent. - * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. - * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. - * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestOAuthWindowURI(memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: any): AxiosPromise { - return localVarFp.requestOAuthWindowURI(memberGuid, userGuid, clientRedirectUrl, enableApp2app, referralSource, skipAggregation, uiMessageWebviewUrlScheme, options).then((request) => request(axios, basePath)); + createTag(userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createTag(userGuid, tagCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * This endpoint allows partners to get a URL by passing the `widget_type` in the request body, as well as configuring it in several different ways. In the case of Connect, that means setting the `widget_type` to `connect_widget`. Partners may also pass an optional `Accept-Language` header as well as a number of configuration options. Note that this is a `POST` request. - * @summary Request widget url - * @param {string} userGuid The unique id for a `user`. - * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. - * @param {string} [acceptLanguage] The desired language of the widget. + * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. + * @summary Delete tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestWidgetURL(userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, options?: any): AxiosPromise { - return localVarFp.requestWidgetURL(userGuid, widgetRequestBody, acceptLanguage, options).then((request) => request(axios, basePath)); + deleteTag(tagGuid: string, accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteTag(tagGuid, accept, userGuid, options).then((request) => request(axios, basePath)); }, /** - * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. - * @summary Resume aggregation - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. + * @summary List tags + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - resumeAggregation(memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options?: any): AxiosPromise { - return localVarFp.resumeAggregation(memberGuid, userGuid, memberResumeRequestBody, options).then((request) => request(axios, basePath)); + listTags(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTags(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. - * @summary Update account by member - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * Use this endpoint to read the attributes of a particular tag according to its unique GUID. + * @summary Read tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateAccountByMember(accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options).then((request) => request(axios, basePath)); + readTag(tagGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readTag(tagGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the attributes of a custom category according to its unique GUID. - * @summary Update category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) + * Use this endpoint to update the name of a specific tag according to its unique GUID. + * @summary Update tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateCategory(categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateCategory(categoryGuid, userGuid, categoryUpdateRequestBody, options).then((request) => request(axios, basePath)); + updateTag(tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTag(tagGuid, userGuid, tagUpdateRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * TagsApi - object-oriented interface + * @export + * @class TagsApi + * @extends {BaseAPI} + */ +export class TagsApi extends BaseAPI { + /** + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TagsApi + */ + public createTag(userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).createTag(userGuid, tagCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. + * @summary Delete tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TagsApi + */ + public deleteTag(tagGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).deleteTag(tagGuid, accept, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. + * @summary List tags + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TagsApi + */ + public listTags(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).listTags(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a particular tag according to its unique GUID. + * @summary Read tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TagsApi + */ + public readTag(tagGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).readTag(tagGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the name of a specific tag according to its unique GUID. + * @summary Update tag + * @param {string} tagGuid The unique id for a `tag`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TagsApi + */ + public updateTag(tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).updateTag(tagGuid, userGuid, tagUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TransactionRulesApi - axios parameter creator + * @export + */ +export const TransactionRulesApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. - * @summary Update managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. + * @summary Create transaction rule + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateManagedAccount(accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options).then((request) => request(axios, basePath)); + createTransactionRule: async (userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createTransactionRule', 'userGuid', userGuid) + // verify required parameter 'transactionRuleCreateRequestBody' is not null or undefined + assertParamExists('createTransactionRule', 'transactionRuleCreateRequestBody', transactionRuleCreateRequestBody) + const localVarPath = `/users/{user_guid}/transaction_rules` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionRuleCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of the specified partner_managed `member`. - * @summary Update managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateManagedMember(memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateManagedMember(memberGuid, userGuid, managedMemberUpdateRequestBody, options).then((request) => request(axios, basePath)); + listTransactionRules: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactionRules', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transaction_rules` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update the attributes of the specified partner_managed `transaction`. - * @summary Update managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. + * @summary Read transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options).then((request) => request(axios, basePath)); + readTransactionRule: async (transactionRuleGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionRuleGuid' is not null or undefined + assertParamExists('readTransactionRule', 'transactionRuleGuid', transactionRuleGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readTransactionRule', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transaction_rules/{transaction_rule_guid}` + .replace(`{${"transaction_rule_guid"}}`, encodeURIComponent(String(transactionRuleGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. - * @summary Update member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) + * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. + * @summary Update transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateMember(memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateMember(memberGuid, userGuid, memberUpdateRequestBody, options).then((request) => request(axios, basePath)); + updateTransactionRule: async (transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionRuleGuid' is not null or undefined + assertParamExists('updateTransactionRule', 'transactionRuleGuid', transactionRuleGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateTransactionRule', 'userGuid', userGuid) + // verify required parameter 'transactionRuleUpdateRequestBody' is not null or undefined + assertParamExists('updateTransactionRule', 'transactionRuleUpdateRequestBody', transactionRuleUpdateRequestBody) + const localVarPath = `/users/{user_guid}/transaction_rules/{transaction_rule_guid}` + .replace(`{${"transaction_rule_guid"}}`, encodeURIComponent(String(transactionRuleGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionRuleUpdateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * TransactionRulesApi - functional programming interface + * @export + */ +export const TransactionRulesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionRulesApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to update the name of a specific tag according to its unique GUID. - * @summary Update tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) + * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. + * @summary Create transaction rule + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTag(tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateTag(tagGuid, userGuid, tagUpdateRequestBody, options).then((request) => request(axios, basePath)); + async createTransactionRule(userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTransactionRule(userGuid, transactionRuleCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to update a tagging. - * @summary Update tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTagging(taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateTagging(taggingGuid, userGuid, taggingUpdateRequestBody, options).then((request) => request(axios, basePath)); + async listTransactionRules(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionRules(userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. - * @summary Update transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. + * @summary Read transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTransaction(transactionGuid: string, userGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateTransaction(transactionGuid, userGuid, transactionUpdateRequestBody, options).then((request) => request(axios, basePath)); + async readTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTransactionRule(transactionRuleGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. - * @summary Update transaction_rule + * @summary Update transaction rule * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTransactionRule(transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateTransactionRule(transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to update the attributes of the specified user. - * @summary Update user - * @param {string} userGuid The unique id for a `user`. - * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUser(userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateUser(userGuid, userUpdateRequestBody, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Read monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUserGuidMonthlyCashFlowProfileGet(userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidMonthlyCashFlowProfileGet(userGuid, options).then((request) => request(axios, basePath)); + async updateTransactionRule(transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransactionRule(transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * TransactionRulesApi - factory interface + * @export + */ +export const TransactionRulesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionRulesApiFp(configuration) + return { /** - * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. - * @summary Update monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. + * @summary Create transaction rule + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidMonthlyCashFlowProfilePut(userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidMonthlyCashFlowProfilePut(userGuid, monthlyCashFlowProfileRequestBody, options).then((request) => request(axios, basePath)); + createTransactionRule(userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createTransactionRule(userGuid, transactionRuleCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. - * @summary Delete split transactions - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidTransactionsTransactionGuidSplitDelete(transactionGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.usersUserGuidTransactionsTransactionGuidSplitDelete(transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + listTransactionRules(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTransactionRules(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. - * @summary Create split transactions - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} transactionGuid The unique identifier for the transaction. Defined by MX. - * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. + * @summary Read transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidTransactionsTransactionGuidSplitPost(userGuid: string, transactionGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidTransactionsTransactionGuidSplitPost(userGuid, transactionGuid, splitTransactionRequestBody, options).then((request) => request(axios, basePath)); + readTransactionRule(transactionRuleGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * The verify endpoint begins a verification process for a member. - * @summary Verify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. + * @summary Update transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated * @param {*} [options] Override http request option. * @throws {RequiredError} */ - verifyMember(memberGuid: string, userGuid: string, options?: any): AxiosPromise { - return localVarFp.verifyMember(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + updateTransactionRule(transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTransactionRule(transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options).then((request) => request(axios, basePath)); }, }; }; /** - * MxPlatformApi - object-oriented interface + * TransactionRulesApi - object-oriented interface * @export - * @class MxPlatformApi + * @class TransactionRulesApi * @extends {BaseAPI} */ -export class MxPlatformApi extends BaseAPI { +export class TransactionRulesApi extends BaseAPI { /** - * Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. - * @summary Aggregate member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [includeHoldings] When set to `false`, the aggregation will not gather holdings data. Defaults to `true`. - * @param {boolean} [includeTransactions] When set to `false`, the aggregation will not gather transactions data. Defaults to `true`. + * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. + * @summary Create transaction rule + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MxPlatformApi + * @memberof TransactionRulesApi */ - public aggregateMember(memberGuid: string, userGuid: string, includeHoldings?: boolean, includeTransactions?: boolean, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).aggregateMember(memberGuid, userGuid, includeHoldings, includeTransactions, options).then((request) => request(this.axios, this.basePath)); + public createTransactionRule(userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).createTransactionRule(userGuid, transactionRuleCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint operates much like the aggregate member endpoint except that it gathers only account balance information; it does not gather any transaction data. - * @summary Check balances - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MxPlatformApi + * @memberof TransactionRulesApi */ - public checkBalances(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).checkBalances(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + public listTransactionRules(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).listTransactionRules(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to create a new custom category for a specific `user`. - * @summary Create category - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryCreateRequestBody} categoryCreateRequestBody Custom category object to be created + * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. + * @summary Read transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MxPlatformApi + * @memberof TransactionRulesApi */ - public createCategory(userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createCategory(userGuid, categoryCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + public readTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).readTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to create a partner-managed account. - * @summary Create managed account - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountCreateRequestBody} managedAccountCreateRequestBody Managed account to be created. + * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. + * @summary Update transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MxPlatformApi + * @memberof TransactionRulesApi */ - public createManagedAccount(memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createManagedAccount(memberGuid, userGuid, managedAccountCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + public updateTransactionRule(transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).updateTransactionRule(transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); } +} - /** - * Use this endpoint to create a new partner-managed `member`. - * @summary Create managed member - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberCreateRequestBody} managedMemberCreateRequestBody Managed member to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createManagedMember(userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createManagedMember(userGuid, managedMemberCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to create a new partner-managed `transaction`. - * @summary Create managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionCreateRequestBody} managedTransactionCreateRequestBody Managed transaction to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createManagedTransaction(accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createManagedTransaction(accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } - /** - * This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed. - * @summary Create manual account - * @param {string} userGuid The unique id for a `user`. - * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createManualAccount(userGuid: string, accountCreateRequestBody: AccountCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createManualAccount(userGuid, accountCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } +/** + * TransactionsApi - axios parameter creator + * @export + */ +export const TransactionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createManualTransaction: async (userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createManualTransaction', 'userGuid', userGuid) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('createManualTransaction', 'accountGuid', accountGuid) + // verify required parameter 'transactionCreateRequestBody' is not null or undefined + assertParamExists('createManualTransaction', 'transactionCreateRequestBody', transactionCreateRequestBody) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. + * @summary Create split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSplitTransactions: async (transactionGuid: string, userGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('createSplitTransactions', 'transactionGuid', transactionGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createSplitTransactions', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}/split` + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(splitTransactionRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a manual transaction. In the path, use the manual transaction guid as the `transaction_guid`, such as `MAN-810828b0-5210-4878-9bd3-f4ce514f90c4`. + * @summary Delete manual transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteManualTransactions: async (userGuid: string, transactionGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteManualTransactions', 'userGuid', userGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('deleteManualTransactions', 'transactionGuid', transactionGuid) + const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. + * @summary Delete split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSplitTransactions: async (transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('deleteSplitTransactions', 'transactionGuid', transactionGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteSplitTransactions', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}/split` + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to permanently delete a transaction rule based on its unique GUID. + * @summary Delete transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTransactionRule: async (transactionRuleGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionRuleGuid' is not null or undefined + assertParamExists('deleteTransactionRule', 'transactionRuleGuid', transactionRuleGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('deleteTransactionRule', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transaction_rules/{transaction_rule_guid}` + .replace(`{${"transaction_rule_guid"}}`, encodeURIComponent(String(transactionRuleGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters id and metadata. When creating a member, youll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the `/institutions/{institution_code}/credentials` endpoint. If successful, the MX Platform API will respond with the newly-created member object. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions. - * @summary Create member - * @param {string} userGuid The unique id for a `user`. - * @param {MemberCreateRequestBody} memberCreateRequestBody Member object to be created with optional parameters (id and metadata) and required parameters (credentials and institution_code) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createMember(userGuid: string, memberCreateRequestBody: MemberCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createMember(userGuid, memberCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Use this endpoint to create a new custom tag. - * @summary Create tag - * @param {string} userGuid The unique id for a `user`. - * @param {TagCreateRequestBody} tagCreateRequestBody Tag object to be created with required parameters (tag_guid) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createTag(userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createTag(userGuid, tagCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to create a new association between a tag and a particular transaction, according to their unique GUIDs. - * @summary Create tagging - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingCreateRequestBody} taggingCreateRequestBody Tagging object to be created with required parameters (tag_guid and transaction_guid) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createTagging(userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createTagging(userGuid, taggingCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. - * @summary Create transaction rule - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleCreateRequestBody} transactionRuleCreateRequestBody TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createTransactionRule(userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createTransactionRule(userGuid, transactionRuleCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.

For more information on returned data, please see the [Enhanced Transactions fields guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + enhanceTransactions: async (enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'enhanceTransactionsRequestBody' is not null or undefined + assertParamExists('enhanceTransactions', 'enhanceTransactionsRequestBody', enhanceTransactionsRequestBody) + const localVarPath = `/transactions/enhance`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. - * @summary Create user - * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public createUser(userCreateRequestBody: UserCreateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).createUser(userCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * This endpoint returns the specified `credit_card_product` according to the unique GUID. - * @summary Read a Credit Card Product - * @param {string} creditCardProductGuid The required `credit_card_product_guid` can be found on the `account` object. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public creditCard(creditCardProductGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).creditCard(creditCardProductGuid, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteCategory(categoryGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`. - * @summary Delete managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + + localVarHeaderParameter['Content-Type'] = 'application/json'; - /** - * Use this endpoint to delete the specified partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteManagedMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteManagedMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(enhanceTransactionsRequestBody, localVarRequestOptions, configuration) - /** - * Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. - * @summary Delete managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. + * @summary Extend history + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + extendHistory: async (memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('extendHistory', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('extendHistory', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/extend_history` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`. - * @summary Delete manual account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteManualAccount(accountGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteManualAccount(accountGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Accessing this endpoint will permanently delete a member. - * @summary Delete member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Use this endpoint to permanently delete a specific tag based on its unique GUID. If successful, the API will respond with status of `204 No Content`. - * @summary Delete tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteTag(tagGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteTag(tagGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to delete a tagging according to its unique GUID. If successful, the API will respond with an empty body and a status of 204 NO Content. - * @summary Delete tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteTagging(taggingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Use this endpoint to permanently delete a transaction rule based on its unique GUID. - * @summary Delete transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Requests to this endpoint return a list of transactions associated with the specified `user`, across all members and accounts associated with that `user`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTransactions: async (userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactions', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. - * @summary Delete user - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deleteUser(userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deleteUser(userGuid, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. - * @summary (Deprecated) Request an authorization code. - * @param {PaymentProcessorAuthorizationCodeRequestBody} paymentProcessorAuthorizationCodeRequestBody The scope for the authorization code. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody: PaymentProcessorAuthorizationCodeRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).deprecatedRequestPaymentProcessorAuthorizationCode(paymentProcessorAuthorizationCodeRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Use this endpoint to download a specified statement PDF. - * @summary Download statement pdf - * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public downloadStatementPDF(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).downloadStatementPDF(memberGuid, statementGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - /** - * Use this endpoint to download a PDF version of the specified tax document. The endpoint URL is the base URL appended with the uri of the tax_document. - * @summary Download a Tax Document PDF - * @param {string} taxDocumentGuid The unique id for a `tax_document`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public downloadTaxDocument(taxDocumentGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).downloadTaxDocument(taxDocumentGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - /** - * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform. - * @summary Enhance transactions - * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public enhanceTransactions(enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).enhanceTransactions(enhanceTransactionsRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } - /** - * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. - * @summary Extend history - * @param {string} memberGuid The unique identifier for a `member`. - * @param {string} userGuid The unique identifier for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public extendHistory(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).extendHistory(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } - /** - * Calling this endpoint initiates an aggregation-type event which will gather the member\'s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. - * @summary Fetch Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public fetchRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).fetchRewards(userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } - /** - * Use this endpoint to fetch the statements associated with a particular member. - * @summary Fetch statements - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public fetchStatements(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).fetchStatements(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } - /** - * Use this endpoint to fetch (aggregate) the tax documents associated with the specified member. This request **does not** return the latest tax documents. It just starts the document aggregation process and returns the initial state of the process. You must interact with the newly aggregated data using the other document endpoints in this reference. This request may also trigger multi-factor authentication which requires end-user input and a specific process for answering authentication challenges. - * @summary Fetch Tax Documents - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public fetchTaxDocuments(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).fetchTaxDocuments(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } - /** - * The identify endpoint begins an identification process for an already-existing member. - * @summary Identify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public identifyMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).identifyMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } - /** - * This endpoint returns a list of account numbers associated with the specified `account`. - * @summary List account numbers by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listAccountNumbersByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid !== undefined) { + localVarQueryParameter['category_guid'] = categoryGuid; + } - /** - * This endpoint returns a list of account numbers associated with the specified `member`. - * @summary List account numbers by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listAccountNumbersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid2) { + localVarQueryParameter['category_guid[]'] = categoryGuid2; + } - /** - * This endpoint returns an array with information about every account associated with a particular member. - * @summary List account owners by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listAccountOwnersByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid !== undefined) { + localVarQueryParameter['top_level_category_guid'] = topLevelCategoryGuid; + } - /** - * Use this endpoint to list all categories associated with a `user`, including both default and custom categories. - * @summary List categories - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listCategories(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listCategories(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid2) { + localVarQueryParameter['top_level_category_guid[]'] = topLevelCategoryGuid2; + } - /** - * Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listDefaultCategories(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listDefaultCategories(page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (useCase !== undefined) { + localVarQueryParameter['use_case'] = useCase; + } - /** - * Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience. - * @summary List default categories by user - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listDefaultCategoriesByUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listDefaultCategoriesByUser(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } - /** - * This endpoint returns a paginated list containing institutions that have been set as the partner’s favorites, sorted by popularity. Please contact MX to set a list of favorites. - * @summary List favorite institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listFavoriteInstitutions(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listFavoriteInstitutions(page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - /** - * This endpoint returns all holdings associated with the specified `user` across all accounts and members. - * @summary List holdings - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listHoldings(userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listHoldings(userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * This endpoint returns all holdings associated with the specified `account`. - * @summary List holdings by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listHoldingsByAccount(accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listHoldingsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Requests to this endpoint return a list of transactions associated with the specified account.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTransactionsByAccount: async (accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('listTransactionsByAccount', 'accountGuid', accountGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactionsByAccount', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}/transactions` + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * This endpoint returns all holdings associated with the specified `member` across all accounts. - * @summary List holdings by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter holdings from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter holdings to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listHoldingsByMember(memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listHoldingsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Use this endpoint to see which credentials will be needed to create a member for a specific institution. - * @summary List institution credentials - * @param {string} institutionCode The institution_code of the institution. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listInstitutionCredentials(institutionCode: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listInstitutionCredentials(institutionCode, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * This endpoint returns a list of institutions based on the specified search term or parameter. - * @summary List institutions - * @param {string} [name] This will list only institutions in which the appended string appears. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {boolean} [supportsAccountIdentification] Filter only institutions which support account identification. - * @param {boolean} [supportsAccountStatement] Filter only institutions which support account statements. - * @param {boolean} [supportsAccountVerification] Filter only institutions which support account verification. - * @param {boolean} [supportsTransactionHistory] Filter only institutions which support extended transaction history. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listInstitutions(name?: string, page?: number, recordsPerPage?: number, supportsAccountIdentification?: boolean, supportsAccountStatement?: boolean, supportsAccountVerification?: boolean, supportsTransactionHistory?: boolean, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listInstitutions(name, page, recordsPerPage, supportsAccountIdentification, supportsAccountStatement, supportsAccountVerification, supportsTransactionHistory, options).then((request) => request(this.axios, this.basePath)); - } + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - /** - * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-manage member. - * @summary List managed accounts - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listManagedAccounts(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listManagedAccounts(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } - /** - * This endpoint returns a list of institutions which can be used to create partner-managed members. - * @summary List managed institutions - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listManagedInstitutions(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listManagedInstitutions(page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } - /** - * This endpoint returns a list of all the partner-managed members associated with the specified `user`. - * @summary List managed members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listManagedMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listManagedMembers(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } - /** - * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. - * @summary List managed transactions - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listManagedTransactions(accountGuid: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listManagedTransactions(accountGuid, memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } - /** - * This endpoint returns a list of all the accounts associated with the specified `member`. - * @summary List accounts by member - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique id for a `member`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listMemberAccounts(userGuid: string, memberGuid: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } - /** - * Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member. If the aggregation is not challenged, i.e., the member does not have a connection status of `CHALLENGED`, then code `204 No Content` will be returned. If the aggregation has been challenged, i.e., the member does have a connection status of `CHALLENGED`, then code `200 OK` will be returned - along with the corresponding credentials. - * @summary List member challenges - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listMemberChallenges(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listMemberChallenges(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid !== undefined) { + localVarQueryParameter['category_guid'] = categoryGuid; + } - /** - * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. - * @summary List member credentials - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listMemberCredentials(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listMemberCredentials(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid2) { + localVarQueryParameter['category_guid[]'] = categoryGuid2; + } - /** - * This endpoint returns an array which contains information on every member associated with a specific user. - * @summary List members - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listMembers(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listMembers(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid !== undefined) { + localVarQueryParameter['top_level_category_guid'] = topLevelCategoryGuid; + } - /** - * This endpoint returns a paginated list of all the merchants in the MX system. - * @summary List merchants - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listMerchants(page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listMerchants(page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid2) { + localVarQueryParameter['top_level_category_guid[]'] = topLevelCategoryGuid2; + } - /** - * Use this endpoint to list all the `rewards` associated with a specified `member`. - * @summary List Rewards - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listRewards(userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listRewards(userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } - /** - * Use this endpoint to get an array of available statements. - * @summary List statements by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listStatementsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listStatementsByMember(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to retrieve a list of all the taggings associated with a specific user. - * @summary List taggings - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTaggings(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTaggings(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Use this endpoint to list all tags associated with the specified `user`. Each user includes the `Business` tag by default. - * @summary List tags - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTags(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTags(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Requests to this endpoint return a list of transactions associated with the specified `member`, across all accounts associated with that `member`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTransactionsByMember: async (memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listTransactionsByMember', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactionsByMember', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/transactions` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Use this endpoint to get a paginated list of tax documents. - * @summary List Tax Documents - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTaxDocuments(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTaxDocuments(memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. - * @summary List transaction rules - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTransactionRules(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTransactionRules(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Requests to this endpoint return a list of transactions associated with the specified `user`, accross all members and accounts associated with that `user`. - * @summary List transactions - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTransactions(userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTransactions(userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - /** - * This endpoint returns a list of the last 90 days of transactions associated with the specified account. - * @summary List transactions by account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTransactionsByAccount(accountGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTransactionsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - /** - * Requests to this endpoint return a list of transactions associated with the specified `member`, accross all accounts associated with that `member`. - * @summary List transactions by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTransactionsByMember(memberGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTransactionsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } - /** - * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag’s unique GUID. In other words, a list of all transactions that have been assigned to a particular tag using the create a tagging endpoint. - * @summary List transactions by tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [fromDate] Filter transactions from this date. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [toDate] Filter transactions to this date. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listTransactionsByTag(tagGuid: string, userGuid: string, fromDate?: string, page?: number, recordsPerPage?: number, toDate?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listTransactionsByTag(tagGuid, userGuid, fromDate, page, recordsPerPage, toDate, options).then((request) => request(this.axios, this.basePath)); - } + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } - /** - * This endpoint returns a list of all the accounts associated with the specified `user`. - * @summary List accounts - * @param {string} userGuid The unique id for a `user`. - * @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user. - * @param {number} [page] Specify current page. - * @param {boolean} [isManual] List only accounts that were manually created. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listUserAccounts(userGuid: string, memberIsManagedByUser?: boolean, page?: number, isManual?: boolean, recordsPerPage?: number, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listUserAccounts(userGuid, memberIsManagedByUser, page, isManual, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } - /** - * Use this endpoint to list every user you\'ve created in the MX Platform API. - * @summary List users - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {string} [id] The user `id` to search for. - * @param {string} [email] The user `email` to search for. - * @param {boolean} [isDisabled] Search for users that are diabled. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public listUsers(page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).listUsers(page, recordsPerPage, id, email, isDisabled, options).then((request) => request(this.axios, this.basePath)); - } + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } - /** - * This endpoint returns the specified `account` resource. - * @summary Read account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readAccount(accountGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readAccount(accountGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } - /** - * This endpoint allows you to read the attributes of an `account` resource. - * @summary Read account by member - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readAccountByMember(accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } - /** - * Use this endpoint to read the attributes of either a default category or a custom category. - * @summary Read a custom category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readCategory(categoryGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readCategory(categoryGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid !== undefined) { + localVarQueryParameter['category_guid'] = categoryGuid; + } - /** - * Use this endpoint to read the attributes of a default category. - * @summary Read a default category - * @param {string} categoryGuid The unique id for a `category`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readDefaultCategory(categoryGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readDefaultCategory(categoryGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid2) { + localVarQueryParameter['category_guid[]'] = categoryGuid2; + } + + if (topLevelCategoryGuid !== undefined) { + localVarQueryParameter['top_level_category_guid'] = topLevelCategoryGuid; + } - /** - * Use this endpoint to read the attributes of a specific `holding`. - * @summary Read holding - * @param {string} holdingGuid The unique id for a `holding`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readHolding(holdingGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readHolding(holdingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid2) { + localVarQueryParameter['top_level_category_guid[]'] = topLevelCategoryGuid2; + } - /** - * This endpoint returns information about the institution specified by `institution_code`. - * @summary Read institution - * @param {string} institutionCode The institution_code of the institution. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readInstitution(institutionCode: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readInstitution(institutionCode, options).then((request) => request(this.axios, this.basePath)); - } + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } - /** - * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. - * @summary Read managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readManagedAccount(accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } - /** - * This endpoint returns the attributes of the specified partner-managed `member`. - * @summary Read managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readManagedMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readManagedMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. - * @summary Read managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag\'s unique GUID. This lists all transactions that have been assigned to a particular tag using the create tagging endpoint.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} tagGuid The unique id for a `tag`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTransactionsByTag: async (userGuid: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactionsByTag', 'userGuid', userGuid) + // verify required parameter 'tagGuid' is not null or undefined + assertParamExists('listTransactionsByTag', 'tagGuid', tagGuid) + const localVarPath = `/users/{user_guid}/tags/{tag_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"tag_guid"}}`, encodeURIComponent(String(tagGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Use this endpoint to read the attributes of a specific member. - * @summary Read member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * This endpoint provides the status of the members most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member. MX has introduced new, more detailed information on the current status of a members connection to a financial institution and the state of its aggregation - the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being. - * @summary Read member status - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readMemberStatus(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readMemberStatus(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Returns information about a particular merchant, such as a logo, name, and website. - * @summary Read merchant - * @param {string} merchantGuid The unique id for a `merchant`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readMerchant(merchantGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readMerchant(merchantGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - /** - * This endpoint returns the specified merchant_location resource. - * @summary Read merchant location - * @param {string} merchantLocationGuid The unique id for a `merchant_location`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readMerchantLocation(merchantLocationGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readMerchantLocation(merchantLocationGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } - /** - * Use this endpoint to read a specific `reward` based on its unique GUID.. - * @summary Read Reward - * @param {string} userGuid The unique id for a `user`. - * @param {string} memberGuid The unique identifier for the member. Defined by MX. - * @param {string} rewardGuid The unique identifier for the rewards. Defined by MX. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readRewards(userGuid: string, memberGuid: string, rewardGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readRewards(userGuid, memberGuid, rewardGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } - /** - * Use this endpoint to read a JSON representation of the statement. - * @summary Read statement by member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} statementGuid The unique id for a `statement`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readStatementByMember(memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readStatementByMember(memberGuid, statementGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } - /** - * Use this endpoint to read the attributes of a particular tag according to its unique GUID. - * @summary Read tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readTag(tagGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readTag(tagGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } - /** - * Use this endpoint to read the attributes of a `tagging` according to its unique GUID. - * @summary Read tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readTagging(taggingGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readTagging(taggingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } - /** - * Use this endpoint to read the attributes of the specified tax document. - * @summary Read a Tax Document - * @param {string} taxDocumentGuid The unique id for a `tax_document`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readTaxDocument(taxDocumentGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readTaxDocument(taxDocumentGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } - /** - * Requests to this endpoint will return the attributes of the specified `transaction`. - * @summary Read transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readTransaction(transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readTransaction(transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } - /** - * Use this endpoint to read the attributes of an existing transaction rule based on the rule’s unique GUID. - * @summary Read transaction rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid !== undefined) { + localVarQueryParameter['category_guid'] = categoryGuid; + } - /** - * Use this endpoint to read the attributes of a specific user. - * @summary Read user - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public readUser(userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).readUser(userGuid, options).then((request) => request(this.axios, this.basePath)); - } + if (categoryGuid2) { + localVarQueryParameter['category_guid[]'] = categoryGuid2; + } - /** - * Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. - * @summary Request an authorization code. - * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public requestAuthorizationCode(authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).requestAuthorizationCode(authorizationCodeRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid !== undefined) { + localVarQueryParameter['top_level_category_guid'] = topLevelCategoryGuid; + } - /** - * This endpoint will return a URL for an embeddable version of MX Connect. - * @summary Request connect widget url - * @param {string} userGuid The unique id for a `user`. - * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public requestConnectWidgetURL(userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).requestConnectWidgetURL(userGuid, connectWidgetRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + if (topLevelCategoryGuid2) { + localVarQueryParameter['top_level_category_guid[]'] = topLevelCategoryGuid2; + } - /** - * This endpoint will generate an `oauth_window_uri` for the specified `member`. - * @summary Request oauth window uri - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. - * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. This setting is not persistent. - * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. - * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. - * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public requestOAuthWindowURI(memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).requestOAuthWindowURI(memberGuid, userGuid, clientRedirectUrl, enableApp2app, referralSource, skipAggregation, uiMessageWebviewUrlScheme, options).then((request) => request(this.axios, this.basePath)); - } + if (useCase !== undefined) { + localVarQueryParameter['use_case'] = useCase; + } + + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Requests to this endpoint will return the attributes of the specified `transaction`. To read a manual transaction, use the manual transaction guid in the path as the `transactionGuid`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary Read transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readTransaction: async (userGuid: string, transactionGuid: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('readTransaction', 'userGuid', userGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('readTransaction', 'transactionGuid', transactionGuid) + const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * This endpoint allows partners to get a URL by passing the `widget_type` in the request body, as well as configuring it in several different ways. In the case of Connect, that means setting the `widget_type` to `connect_widget`. Partners may also pass an optional `Accept-Language` header as well as a number of configuration options. Note that this is a `POST` request. - * @summary Request widget url - * @param {string} userGuid The unique id for a `user`. - * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. - * @param {string} [acceptLanguage] The desired language of the widget. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public requestWidgetURL(userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).requestWidgetURL(userGuid, widgetRequestBody, acceptLanguage, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. - * @summary Resume aggregation - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public resumeAggregation(memberGuid: string, userGuid: string, memberResumeRequestBody: MemberResumeRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).resumeAggregation(memberGuid, userGuid, memberResumeRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`. - * @summary Update account by member - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {AccountUpdateRequestBody} accountUpdateRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateAccountByMember(accountGuid: string, memberGuid: string, userGuid: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateAccountByMember(accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } - /** - * Use this endpoint to update the attributes of a custom category according to its unique GUID. - * @summary Update category - * @param {string} categoryGuid The unique id for a `category`. - * @param {string} userGuid The unique id for a `user`. - * @param {CategoryUpdateRequestBody} categoryUpdateRequestBody Category object to be updated (While no single parameter is required, the `category` object cannot be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateCategory(categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateCategory(categoryGuid, userGuid, categoryUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. - * @summary Update managed account - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedAccountUpdateRequestBody} managedAccountUpdateRequestBody Managed account object to be updated (While no single parameter is required, the request body can\'t be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateManagedAccount(accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateManagedAccount(accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Use this endpoint to update the attributes of the specified partner_managed `member`. - * @summary Update managed member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedMemberUpdateRequestBody} managedMemberUpdateRequestBody Managed member object to be updated (While no single parameter is required, the request body can\'t be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateManagedMember(memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateManagedMember(memberGuid, userGuid, managedMemberUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve a list of all recurring transactions for a user.

For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx). + * @summary List Repeating Transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + repeatingTransactions: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('repeatingTransactions', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/repeating_transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Use this endpoint to update the attributes of the specified partner_managed `transaction`. - * @summary Update managed transaction - * @param {string} accountGuid The unique id for an `account`. - * @param {string} memberGuid The unique id for a `member`. - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {ManagedTransactionUpdateRequestBody} managedTransactionUpdateRequestBody Managed transaction object to be updated (While no single parameter is required, the request body can\'t be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateManagedTransaction(accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateManagedTransaction(accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Use this endpoint to update a members attributes. Only the credentials, id, and metadata parameters can be updated. To get a list of the required credentials for the member, use the list member credentials endpoint. - * @summary Update member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {MemberUpdateRequestBody} memberUpdateRequestBody Member object to be updated (While no single parameter is required, the request body can\'t be empty) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateMember(memberGuid: string, userGuid: string, memberUpdateRequestBody: MemberUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateMember(memberGuid, userGuid, memberUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * Use this endpoint to update the name of a specific tag according to its unique GUID. - * @summary Update tag - * @param {string} tagGuid The unique id for a `tag`. - * @param {string} userGuid The unique id for a `user`. - * @param {TagUpdateRequestBody} tagUpdateRequestBody Tag object to be updated with required parameter (tag_guid) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateTag(tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateTag(tagGuid, userGuid, tagUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to update a tagging. - * @summary Update tagging - * @param {string} taggingGuid The unique id for a `tagging`. - * @param {string} userGuid The unique id for a `user`. - * @param {TaggingUpdateRequestBody} taggingUpdateRequestBody Tagging object to be updated with required parameter (tag_guid) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateTagging(taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateTagging(taggingGuid, userGuid, taggingUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. - * @summary Update transaction - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateTransaction(transactionGuid: string, userGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateTransaction(transactionGuid, userGuid, transactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx) + * @summary Get a Repeating Transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} repeatingTransactionGuid The unique id for a recurring transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + specificRepeatingTransaction: async (userGuid: string, repeatingTransactionGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('specificRepeatingTransaction', 'userGuid', userGuid) + // verify required parameter 'repeatingTransactionGuid' is not null or undefined + assertParamExists('specificRepeatingTransaction', 'repeatingTransactionGuid', repeatingTransactionGuid) + const localVarPath = `/users/{user_guid}/repeating_transactions/{repeating_transaction_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"repeating_transaction_guid"}}`, encodeURIComponent(String(repeatingTransactionGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged. - * @summary Update transaction_rule - * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. - * @param {string} userGuid The unique id for a `user`. - * @param {TransactionRuleUpdateRequestBody} transactionRuleUpdateRequestBody TransactionRule object to be updated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateTransactionRule(transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateTransactionRule(transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Use this endpoint to update the attributes of the specified user. - * @summary Update user - * @param {string} userGuid The unique id for a `user`. - * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public updateUser(userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).updateUser(userGuid, userUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - /** - * - * @summary Read monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public usersUserGuidMonthlyCashFlowProfileGet(userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).usersUserGuidMonthlyCashFlowProfileGet(userGuid, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. - * @summary Update monthly cash flow profile - * @param {string} userGuid The unique identifier for the user. - * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public usersUserGuidMonthlyCashFlowProfilePut(userGuid: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).usersUserGuidMonthlyCashFlowProfilePut(userGuid, monthlyCashFlowProfileRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. - * @summary Delete split transactions - * @param {string} transactionGuid The unique id for a `transaction`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public usersUserGuidTransactionsTransactionGuidSplitDelete(transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).usersUserGuidTransactionsTransactionGuidSplitDelete(transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object with the fields to be updated. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTransaction: async (userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateTransaction', 'userGuid', userGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('updateTransaction', 'transactionGuid', transactionGuid) + // verify required parameter 'transactionUpdateRequestBody' is not null or undefined + assertParamExists('updateTransaction', 'transactionUpdateRequestBody', transactionUpdateRequestBody) + const localVarPath = `/users/{user_guid}/transactions/{transaction_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } - /** - * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. - * @summary Create split transactions - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} transactionGuid The unique identifier for the transaction. Defined by MX. - * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public usersUserGuidTransactionsTransactionGuidSplitPost(userGuid: string, transactionGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).usersUserGuidTransactionsTransactionGuidSplitPost(userGuid, transactionGuid, splitTransactionRequestBody, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * The verify endpoint begins a verification process for a member. - * @summary Verify member - * @param {string} memberGuid The unique id for a `member`. - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MxPlatformApi - */ - public verifyMember(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { - return MxPlatformApiFp(this.configuration).verifyMember(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); - } -} + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; -/** - * SpendingPlanApi - axios parameter creator - * @export - */ -export const SpendingPlanApiAxiosParamCreator = function (configuration?: Configuration) { - return { + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionUpdateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** - * This endpoint creates a new `spending_plan` for the user. - * @summary Create spending plan - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update Transaction by Account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createSpendingPlan: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + updateTransactionByAccount: async (userGuid: string, memberGuid: string, accountGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createSpendingPlan', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/spending_plans` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + assertParamExists('updateTransactionByAccount', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('updateTransactionByAccount', 'memberGuid', memberGuid) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('updateTransactionByAccount', 'accountGuid', accountGuid) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('updateTransactionByAccount', 'transactionGuid', transactionGuid) + // verify required parameter 'transactionUpdateRequestBody' is not null or undefined + assertParamExists('updateTransactionByAccount', 'transactionUpdateRequestBody', transactionUpdateRequestBody) + const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .replace(`{${"transaction_guid"}}`, encodeURIComponent(String(transactionGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -18897,7 +22696,7 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -18907,479 +22706,818 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionUpdateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * TransactionsApi - functional programming interface + * @export + */ +export const TransactionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration) + return { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createManualTransaction(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManualTransaction(userGuid, accountGuid, transactionCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. + * @summary Create split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSplitTransactions(transactionGuid: string, userGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSplitTransactions(transactionGuid, userGuid, splitTransactionRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Delete a manual transaction. In the path, use the manual transaction guid as the `transaction_guid`, such as `MAN-810828b0-5210-4878-9bd3-f4ce514f90c4`. + * @summary Delete manual transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteManualTransactions(userGuid: string, transactionGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManualTransactions(userGuid, transactionGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. + * @summary Delete split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSplitTransactions(transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSplitTransactions(transactionGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to permanently delete a transaction rule based on its unique GUID. + * @summary Delete transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTransactionRule(transactionRuleGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.

For more information on returned data, please see the [Enhanced Transactions fields guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async enhanceTransactions(enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.enhanceTransactions(enhanceTransactionsRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. + * @summary Extend history + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async extendHistory(memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.extendHistory(memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests to this endpoint return a list of transactions associated with the specified `user`, across all members and accounts associated with that `user`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTransactions(userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, useCase, includes, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests to this endpoint return a list of transactions associated with the specified account.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTransactionsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByAccount(accountGuid, userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, includes, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests to this endpoint return a list of transactions associated with the specified `member`, across all accounts associated with that `member`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTransactionsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByMember(memberGuid, userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, includes, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag\'s unique GUID. This lists all transactions that have been assigned to a particular tag using the create tagging endpoint.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} tagGuid The unique id for a `tag`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTransactionsByTag(userGuid: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByTag(userGuid, tagGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, useCase, includes, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests to this endpoint will return the attributes of the specified `transaction`. To read a manual transaction, use the manual transaction guid in the path as the `transactionGuid`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary Read transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readTransaction(userGuid: string, transactionGuid: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTransaction(userGuid, transactionGuid, includes, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieve a list of all recurring transactions for a user.

For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx). + * @summary List Repeating Transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async repeatingTransactions(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.repeatingTransactions(userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx) + * @summary Get a Repeating Transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} repeatingTransactionGuid The unique id for a recurring transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async specificRepeatingTransaction(userGuid: string, repeatingTransactionGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.specificRepeatingTransaction(userGuid, repeatingTransactionGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object with the fields to be updated. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateTransaction(userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransaction(userGuid, transactionGuid, transactionUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update Transaction by Account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateTransactionByAccount(userGuid: string, memberGuid: string, accountGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransactionByAccount(userGuid, memberGuid, accountGuid, transactionGuid, transactionUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TransactionsApi - factory interface + * @export + */ +export const TransactionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionsApiFp(configuration) + return { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createManualTransaction(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManualTransaction(userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. + * @summary Create split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSplitTransactions(transactionGuid: string, userGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: any): AxiosPromise { + return localVarFp.createSplitTransactions(transactionGuid, userGuid, splitTransactionRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a manual transaction. In the path, use the manual transaction guid as the `transaction_guid`, such as `MAN-810828b0-5210-4878-9bd3-f4ce514f90c4`. + * @summary Delete manual transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteManualTransactions(userGuid: string, transactionGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManualTransactions(userGuid, transactionGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. + * @summary Delete split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSplitTransactions(transactionGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSplitTransactions(transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to permanently delete a transaction rule based on its unique GUID. + * @summary Delete transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTransactionRule(transactionRuleGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.

For more information on returned data, please see the [Enhanced Transactions fields guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + enhanceTransactions(enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: any): AxiosPromise { + return localVarFp.enhanceTransactions(enhanceTransactionsRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. + * @summary Extend history + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + extendHistory(memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.extendHistory(memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, /** - * This endpoint creates a new `spending_plan_iteration_item`. - * @summary Create spending plan iteration item - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} userGuid The unique id for a `user`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) + * Requests to this endpoint return a list of transactions associated with the specified `user`, across all members and accounts associated with that `user`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createSpendingPlanIterationItem: async (spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('createSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('createSpendingPlanIterationItem', 'userGuid', userGuid) - // verify required parameter 'spendingPlanIterationItemCreateRequestBody' is not null or undefined - assertParamExists('createSpendingPlanIterationItem', 'spendingPlanIterationItemCreateRequestBody', spendingPlanIterationItemCreateRequestBody) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items` - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(spendingPlanIterationItemCreateRequestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listTransactions(userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactions(userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, useCase, includes, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a user\'s `spending_plan`. - * @summary Delete spending plan - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * Requests to this endpoint return a list of transactions associated with the specified account.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSpendingPlan: async (userGuid: string, spendingPlanGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteSpendingPlan', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('deleteSpendingPlan', 'spendingPlanGuid', spendingPlanGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listTransactionsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByAccount(accountGuid, userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, includes, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a `spending_plan_account`. - * @summary Delete spending plan account - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * Requests to this endpoint return a list of transactions associated with the specified `member`, across all accounts associated with that `member`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSpendingPlanAccount: async (userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteSpendingPlanAccount', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('deleteSpendingPlanAccount', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'spendingPlanAccountGuid' is not null or undefined - assertParamExists('deleteSpendingPlanAccount', 'spendingPlanAccountGuid', spendingPlanAccountGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"spending_plan_account_guid"}}`, encodeURIComponent(String(spendingPlanAccountGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listTransactionsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByMember(memberGuid, userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, includes, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a spending plan `iteration_item`. - * @summary Delete spending plan iteration item - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag\'s unique GUID. This lists all transactions that have been assigned to a particular tag using the create tagging endpoint.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} tagGuid The unique id for a `tag`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSpendingPlanIterationItem: async (userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('deleteSpendingPlanIterationItem', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('deleteSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'iterationItemGuid' is not null or undefined - assertParamExists('deleteSpendingPlanIterationItem', 'iterationItemGuid', iterationItemGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"iteration_item_guid"}}`, encodeURIComponent(String(iterationItemGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listTransactionsByTag(userGuid: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByTag(userGuid, tagGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, useCase, includes, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all the spending plan accounts associated with the spending plan. - * @summary List spending plan accounts - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Requests to this endpoint will return the attributes of the specified `transaction`. To read a manual transaction, use the manual transaction guid in the path as the `transactionGuid`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary Read transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlanAccounts: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listSpendingPlanAccounts', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('listSpendingPlanAccounts', 'spendingPlanGuid', spendingPlanGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + readTransaction(userGuid: string, transactionGuid: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.readTransaction(userGuid, transactionGuid, includes, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. - * @summary List spending plan iteration items - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Retrieve a list of all recurring transactions for a user.

For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx). + * @summary List Repeating Transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlanIterationItems: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listSpendingPlanIterationItems', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('listSpendingPlanIterationItems', 'spendingPlanGuid', spendingPlanGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + repeatingTransactions(userGuid: string, options?: any): AxiosPromise { + return localVarFp.repeatingTransactions(userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx) + * @summary Get a Repeating Transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} repeatingTransactionGuid The unique id for a recurring transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + specificRepeatingTransaction(userGuid: string, repeatingTransactionGuid: string, options?: any): AxiosPromise { + return localVarFp.specificRepeatingTransaction(userGuid, repeatingTransactionGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. - * @summary List spending plan iterations - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object with the fields to be updated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlanIterations: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listSpendingPlanIterations', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('listSpendingPlanIterations', 'spendingPlanGuid', spendingPlanGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + updateTransaction(userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTransaction(userGuid, transactionGuid, transactionUpdateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all the spending plans associated with the user. - * @summary List spending plans - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update Transaction by Account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlans: async (userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('listSpendingPlans', 'userGuid', userGuid) - const localVarPath = `/users/{user_guid}/spending_plans` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + updateTransactionByAccount(userGuid: string, memberGuid: string, accountGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTransactionByAccount(userGuid, memberGuid, accountGuid, transactionGuid, transactionUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; +/** + * TransactionsApi - object-oriented interface + * @export + * @class TransactionsApi + * @extends {BaseAPI} + */ +export class TransactionsApi extends BaseAPI { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public createManualTransaction(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).createManualTransaction(userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction\'s `has_been_split` field will automatically be updated to true and the child transactions\' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can\'t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction\'s `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again. + * @summary Create split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public createSplitTransactions(transactionGuid: string, userGuid: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).createSplitTransactions(transactionGuid, userGuid, splitTransactionRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + /** + * Delete a manual transaction. In the path, use the manual transaction guid as the `transaction_guid`, such as `MAN-810828b0-5210-4878-9bd3-f4ce514f90c4`. + * @summary Delete manual transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public deleteManualTransactions(userGuid: string, transactionGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteManualTransactions(userGuid, transactionGuid, options).then((request) => request(this.axios, this.basePath)); + } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } + /** + * This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction\'s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header. + * @summary Delete split transactions + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public deleteSplitTransactions(transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteSplitTransactions(transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to permanently delete a transaction rule based on its unique GUID. + * @summary Delete transaction rule + * @param {string} transactionRuleGuid The unique id for a `transaction_rule`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public deleteTransactionRule(transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteTransactionRule(transactionRuleGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.

For more information on returned data, please see the [Enhanced Transactions fields guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public enhanceTransactions(enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).enhanceTransactions(enhanceTransactionsRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Some institutions allow developers to access an extended transaction history with up to 24 months of data associated with a particular member. The process for fetching and then reading this extended transaction history is much like standard aggregation, and it may trigger multi-factor authentication. + * @summary Extend history + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public extendHistory(memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).extendHistory(memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. - * @summary Read spending plan account - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - readSpendingPlanAccount: async (userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readSpendingPlanAccount', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('readSpendingPlanAccount', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'spendingPlanAccountGuid' is not null or undefined - assertParamExists('readSpendingPlanAccount', 'spendingPlanAccountGuid', spendingPlanAccountGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"spending_plan_account_guid"}}`, encodeURIComponent(String(spendingPlanAccountGuid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + /** + * Requests to this endpoint return a list of transactions associated with the specified `user`, across all members and accounts associated with that `user`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public listTransactions(userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactions(userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, useCase, includes, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Requests to this endpoint return a list of transactions associated with the specified account.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by account + * @param {string} accountGuid The unique id for an `account`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public listTransactionsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByAccount(accountGuid, userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, includes, options).then((request) => request(this.axios, this.basePath)); + } - // authentication basicAuth required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) + /** + * Requests to this endpoint return a list of transactions associated with the specified `member`, across all accounts associated with that `member`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by member + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public listTransactionsByMember(memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByMember(memberGuid, userGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, includes, options).then((request) => request(this.axios, this.basePath)); + } - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + /** + * Use this endpoint to get a list of all transactions associated with a particular tag according to the tag\'s unique GUID. This lists all transactions that have been assigned to a particular tag using the create tagging endpoint.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary List transactions by tag + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} tagGuid The unique id for a `tag`. + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [fromDate] Filter transactions from this date. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made to capture pending transactions. + * @param {string} [fromCreatedAt] Filter transactions from the date the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports ISO 8601 format without timestamp (YYYY-MM-DD). Maximum date range limit is 6 months. + * @param {string} [categoryGuid] Filter transactions belonging to specified `category_guid`. For example, `?category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [categoryGuid2] Filter transactions belonging to any specified `category_guid[]` in url. For example, `?category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [topLevelCategoryGuid] Filter transactions belonging to specified `top_level_category_guid`. This must be top level category guid, use `category_guid` for subcategory guid. For example, `?top_level_category_guid=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {Array} [topLevelCategoryGuid2] Filter transactions belonging to any specified `top_level_category_guid[]` in url. This must be top level category guid(s), use `category_guid` for subcategory guid(s). For example, `?top_level_category_guid[]=CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874`. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public listTransactionsByTag(userGuid: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, categoryGuid?: string, categoryGuid2?: Array, topLevelCategoryGuid?: string, topLevelCategoryGuid2?: Array, useCase?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByTag(userGuid, tagGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, categoryGuid, categoryGuid2, topLevelCategoryGuid, topLevelCategoryGuid2, useCase, includes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Requests to this endpoint will return the attributes of the specified `transaction`. To read a manual transaction, use the manual transaction guid in the path as the `transactionGuid`.

Enhanced transaction data may be requested using the `includes` parameter. To use this optional parameter, the value should include the optional metadata requested such as `repeating_transactions`, `merchants`, `classifications`, `geolocations`. For more information, see the [Optional Enhancement Query Parameter guide](/api-reference/platform-api/reference/transactions-overview#enhanced-transactions#optional-enhancement-query-parameter). + * @summary Read transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {string} [includes] Options for enhanced transactions. This query parameter is optional. Possible additional metadata: `repeating_transactions`, `merchants`, `classifications`, `geolocations`. The query value is format sensitive. To retrieve all available enhancements, append: `?includes=repeating_transactions,merchants,classifications,geolocations`. The query options may be combined to specific enhancements. For example, to request Repeating Transactions and Geolocation data, use: `?includes=repeating_transactions,geolocations`. - Repeating Transactions: Identifies transactions with predictable recurrence patterns (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions with merchant name. - Classifications: Provides more insight into the type of money movement that is occurring on the transaction, whether it be retail or investments. - Geolocation: Provides geographic metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public readTransaction(userGuid: string, transactionGuid: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).readTransaction(userGuid, transactionGuid, includes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve a list of all recurring transactions for a user.

For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx). + * @summary List Repeating Transactions + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public repeatingTransactions(userGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).repeatingTransactions(userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](repeating-transactions-overview.mdx) + * @summary Get a Repeating Transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} repeatingTransactionGuid The unique id for a recurring transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public specificRepeatingTransaction(userGuid: string, repeatingTransactionGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).specificRepeatingTransaction(userGuid, repeatingTransactionGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object with the fields to be updated. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public updateTransaction(userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).updateTransaction(userGuid, transactionGuid, transactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } + /** + * Use this endpoint to update a specific transaction according to its unique GUID. + * @summary Update Transaction by Account + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} transactionGuid The unique id for a `transaction`. + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public updateTransactionByAccount(userGuid: string, memberGuid: string, accountGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).updateTransactionByAccount(userGuid, memberGuid, accountGuid, transactionGuid, transactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * UsersApi - axios parameter creator + * @export + */ +export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. - * @summary Read a spending plan iteration - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} iterationNumber The current iteration number for the spending plan `iteration``. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful, containing a `guid` that you\'ll set as the `user_guid` in other requests when required. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. + * @summary Create user + * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanIteration: async (userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readSpendingPlanIteration', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('readSpendingPlanIteration', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'iterationNumber' is not null or undefined - assertParamExists('readSpendingPlanIteration', 'iterationNumber', iterationNumber) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/{iteration_number}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"iteration_number"}}`, encodeURIComponent(String(iterationNumber))); + createUser: async (userCreateRequestBody: UserCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userCreateRequestBody' is not null or undefined + assertParamExists('createUser', 'userCreateRequestBody', userCreateRequestBody) + const localVarPath = `/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -19387,7 +23525,7 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -19395,19 +23533,14 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(userCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -19415,27 +23548,20 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. - * @summary Read a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. :::warning Deleting a user is permanent. Deleted users can never be restored. For more info, see [Deleting Objects](https://docs.mx.com/api-reference/platform-api/overview/deleting-objects). ::: + * @summary Delete user + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanIterationItem: async (userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'accept' is not null or undefined + assertParamExists('deleteUser', 'accept', accept) // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readSpendingPlanIterationItem', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('readSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'iterationItemGuid' is not null or undefined - assertParamExists('readSpendingPlanIterationItem', 'iterationItemGuid', iterationItemGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"iteration_item_guid"}}`, encodeURIComponent(String(iterationItemGuid))); + assertParamExists('deleteUser', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -19443,7 +23569,7 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -19451,12 +23577,8 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (recordsPerPage !== undefined) { - localVarQueryParameter['records_per_page'] = recordsPerPage; + if (accept != null) { + localVarHeaderParameter['Accept'] = String(accept); } @@ -19471,23 +23593,18 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. - * @summary Read a spending plan for a user - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list every user you\'ve created in the MX Platform API. + * @summary List users + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [id] The user `id` to search for. + * @param {string} [email] The user `email` to search for. + * @param {boolean} [isDisabled] Search for users that are diabled. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanUser: async (userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'userGuid' is not null or undefined - assertParamExists('readSpendingPlanUser', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('readSpendingPlanUser', 'spendingPlanGuid', spendingPlanGuid) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))); + listUsers: async (page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -19511,6 +23628,18 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config localVarQueryParameter['records_per_page'] = recordsPerPage; } + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (email !== undefined) { + localVarQueryParameter['email'] = email; + } + + if (isDisabled !== undefined) { + localVarQueryParameter['is_disabled'] = isDisabled; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19523,28 +23652,17 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Use this endpoint to update an existing `spending_plan_iteration_item`. - * @summary Update a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) + * Use this endpoint to read the attributes of a specific user. + * @summary Read user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateSpendingPlanIterationItem: async (userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + readUser: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('updateSpendingPlanIterationItem', 'userGuid', userGuid) - // verify required parameter 'spendingPlanGuid' is not null or undefined - assertParamExists('updateSpendingPlanIterationItem', 'spendingPlanGuid', spendingPlanGuid) - // verify required parameter 'iterationItemGuid' is not null or undefined - assertParamExists('updateSpendingPlanIterationItem', 'iterationItemGuid', iterationItemGuid) - // verify required parameter 'spendingPlanIterationItemCreateRequestBody' is not null or undefined - assertParamExists('updateSpendingPlanIterationItem', 'spendingPlanIterationItemCreateRequestBody', spendingPlanIterationItemCreateRequestBody) - const localVarPath = `/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"spending_plan_guid"}}`, encodeURIComponent(String(spendingPlanGuid))) - .replace(`{${"iteration_item_guid"}}`, encodeURIComponent(String(iterationItemGuid))); + assertParamExists('readUser', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -19552,7 +23670,7 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -19562,646 +23680,586 @@ export const SpendingPlanApiAxiosParamCreator = function (configuration?: Config - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(spendingPlanIterationItemCreateRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, - } -}; - -/** - * SpendingPlanApi - functional programming interface - * @export - */ -export const SpendingPlanApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = SpendingPlanApiAxiosParamCreator(configuration) - return { - /** - * This endpoint creates a new `spending_plan` for the user. - * @summary Create spending plan - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createSpendingPlan(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createSpendingPlan(userGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint creates a new `spending_plan_iteration_item`. - * @summary Create spending plan iteration item - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} userGuid The unique id for a `user`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createSpendingPlanIterationItem(spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createSpendingPlanIterationItem(spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to delete a user\'s `spending_plan`. - * @summary Delete spending plan - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteSpendingPlan(userGuid: string, spendingPlanGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlan(userGuid, spendingPlanGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to delete a `spending_plan_account`. - * @summary Delete spending plan account - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to delete a spending plan `iteration_item`. - * @summary Delete spending plan iteration item - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the spending plan accounts associated with the spending plan. - * @summary List spending plan accounts - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listSpendingPlanAccounts(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanAccounts(userGuid, spendingPlanGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** - * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. - * @summary List spending plan iteration items - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listSpendingPlanIterationItems(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanIterationItems(userGuid, spendingPlanGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. - * @summary List spending plan iterations - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listSpendingPlanIterations(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanIterations(userGuid, spendingPlanGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Use this endpoint to list all the spending plans associated with the user. - * @summary List spending plans - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listSpendingPlans(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlans(userGuid, page, recordsPerPage, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + * @throws {RequiredError} + */ + updateUser: async (userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('updateUser', 'userGuid', userGuid) + // verify required parameter 'userUpdateRequestBody' is not null or undefined + assertParamExists('updateUser', 'userUpdateRequestBody', userUpdateRequestBody) + const localVarPath = `/users/{user_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(userUpdateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * UsersApi - functional programming interface + * @export + */ +export const UsersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. - * @summary Read spending plan account - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful, containing a `guid` that you\'ll set as the `user_guid` in other requests when required. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. + * @summary Create user + * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options); + async createUser(userCreateRequestBody: UserCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(userCreateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. - * @summary Read a spending plan iteration - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} iterationNumber The current iteration number for the spending plan `iteration``. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. :::warning Deleting a user is permanent. Deleted users can never be restored. For more info, see [Deleting Objects](https://docs.mx.com/api-reference/platform-api/overview/deleting-objects). ::: + * @summary Delete user + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanIteration(userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options); + async deleteUser(accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(accept, userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. - * @summary Read a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list every user you\'ve created in the MX Platform API. + * @summary List users + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [id] The user `id` to search for. + * @param {string} [email] The user `email` to search for. + * @param {boolean} [isDisabled] Search for users that are diabled. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, options); + async listUsers(page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(page, recordsPerPage, id, email, isDisabled, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. - * @summary Read a spending plan for a user - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to read the attributes of a specific user. + * @summary Read user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async readSpendingPlanUser(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanUser(userGuid, spendingPlanGuid, page, recordsPerPage, options); + async readUser(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readUser(userGuid, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to update an existing `spending_plan_iteration_item`. - * @summary Update a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options); + async updateUser(userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(userGuid, userUpdateRequestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** - * SpendingPlanApi - factory interface + * UsersApi - factory interface * @export */ -export const SpendingPlanApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = SpendingPlanApiFp(configuration) +export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UsersApiFp(configuration) return { /** - * This endpoint creates a new `spending_plan` for the user. - * @summary Create spending plan - * @param {string} userGuid The unique id for a `user`. + * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful, containing a `guid` that you\'ll set as the `user_guid` in other requests when required. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. + * @summary Create user + * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createSpendingPlan(userGuid: string, options?: any): AxiosPromise { - return localVarFp.createSpendingPlan(userGuid, options).then((request) => request(axios, basePath)); + createUser(userCreateRequestBody: UserCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createUser(userCreateRequestBody, options).then((request) => request(axios, basePath)); }, /** - * This endpoint creates a new `spending_plan_iteration_item`. - * @summary Create spending plan iteration item - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} userGuid The unique id for a `user`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) + * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. :::warning Deleting a user is permanent. Deleted users can never be restored. For more info, see [Deleting Objects](https://docs.mx.com/api-reference/platform-api/overview/deleting-objects). ::: + * @summary Delete user + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createSpendingPlanIterationItem(spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.createSpendingPlanIterationItem(spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(axios, basePath)); + deleteUser(accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteUser(accept, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a user\'s `spending_plan`. - * @summary Delete spending plan - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. + * Use this endpoint to list every user you\'ve created in the MX Platform API. + * @summary List users + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [id] The user `id` to search for. + * @param {string} [email] The user `email` to search for. + * @param {boolean} [isDisabled] Search for users that are diabled. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSpendingPlan(userGuid: string, spendingPlanGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteSpendingPlan(userGuid, spendingPlanGuid, options).then((request) => request(axios, basePath)); + listUsers(page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: any): AxiosPromise { + return localVarFp.listUsers(page, recordsPerPage, id, email, isDisabled, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a `spending_plan_account`. - * @summary Delete spending plan account - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. + * Use this endpoint to read the attributes of a specific user. + * @summary Read user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, options).then((request) => request(axios, basePath)); + readUser(userGuid: string, options?: any): AxiosPromise { + return localVarFp.readUser(userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to delete a spending plan `iteration_item`. - * @summary Delete spending plan iteration item - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: any): AxiosPromise { - return localVarFp.deleteSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, options).then((request) => request(axios, basePath)); + updateUser(userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateUser(userGuid, userUpdateRequestBody, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * UsersApi - object-oriented interface + * @export + * @class UsersApi + * @extends {BaseAPI} + */ +export class UsersApi extends BaseAPI { + /** + * Use this endpoint to create a new user. The API will respond with the newly-created user object if successful, containing a `guid` that you\'ll set as the `user_guid` in other requests when required. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. + * @summary Create user + * @param {UserCreateRequestBody} userCreateRequestBody User object to be created. (None of these parameters are required, but the user object cannot be empty) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public createUser(userCreateRequestBody: UserCreateRequestBody, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).createUser(userCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete the specified `user`. The response will have a status of `204 No Content` without an object. :::warning Deleting a user is permanent. Deleted users can never be restored. For more info, see [Deleting Objects](https://docs.mx.com/api-reference/platform-api/overview/deleting-objects). ::: + * @summary Delete user + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public deleteUser(accept: string, userGuid: string, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).deleteUser(accept, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list every user you\'ve created in the MX Platform API. + * @summary List users + * @param {number} [page] Results are paginated. Specify current page. + * @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead. + * @param {string} [id] The user `id` to search for. + * @param {string} [email] The user `email` to search for. + * @param {boolean} [isDisabled] Search for users that are diabled. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public listUsers(page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).listUsers(page, recordsPerPage, id, email, isDisabled, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific user. + * @summary Read user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public readUser(userGuid: string, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).readUser(userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {UserUpdateRequestBody} userUpdateRequestBody User object to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public updateUser(userGuid: string, userUpdateRequestBody: UserUpdateRequestBody, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).updateUser(userGuid, userUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * VerifiableCredentialsApi - axios parameter creator + * @export + */ +export const VerifiableCredentialsApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Use this endpoint to list all the spending plan accounts associated with the spending plan. - * @summary List spending plan accounts - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlanAccounts(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listSpendingPlanAccounts(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + getAccountsData: async (userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('getAccountsData', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('getAccountsData', 'memberGuid', memberGuid) + const localVarPath = `/vc/users/{user_guid}/members/{member_guid}/accounts` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. - * @summary List spending plan iteration items - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlanIterationItems(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listSpendingPlanIterationItems(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + getIdentityData: async (userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('getIdentityData', 'userGuid', userGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('getIdentityData', 'memberGuid', memberGuid) + const localVarPath = `/vc/users/{user_guid}/members/{member_guid}/customers` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. - * @summary List spending plan iterations - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} [startTime] Filter transactions from this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. + * @param {string} [endTime] Filter transactions to this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlanIterations(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listSpendingPlanIterations(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + getTransactionsData: async (userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('getTransactionsData', 'userGuid', userGuid) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('getTransactionsData', 'accountGuid', accountGuid) + const localVarPath = `/vc/users/{user_guid}/accounts/{account_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (startTime !== undefined) { + localVarQueryParameter['startTime'] = startTime; + } + + if (endTime !== undefined) { + localVarQueryParameter['endTime'] = endTime; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * VerifiableCredentialsApi - functional programming interface + * @export + */ +export const VerifiableCredentialsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = VerifiableCredentialsApiAxiosParamCreator(configuration) + return { /** - * Use this endpoint to list all the spending plans associated with the user. - * @summary List spending plans - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSpendingPlans(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listSpendingPlans(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async getAccountsData(userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountsData(userGuid, memberGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. - * @summary Read spending plan account - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.readSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async getIdentityData(userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentityData(userGuid, memberGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. - * @summary Read a spending plan iteration - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} iterationNumber The current iteration number for the spending plan `iteration``. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} [startTime] Filter transactions from this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. + * @param {string} [endTime] Filter transactions to this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.readSpendingPlanIteration(userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async getTransactionsData(userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionsData(userGuid, accountGuid, startTime, endTime, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + } +}; + +/** + * VerifiableCredentialsApi - factory interface + * @export + */ +export const VerifiableCredentialsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = VerifiableCredentialsApiFp(configuration) + return { /** - * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. - * @summary Read a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.readSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + getAccountsData(userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.getAccountsData(userGuid, memberGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. - * @summary Read a spending plan for a user - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readSpendingPlanUser(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.readSpendingPlanUser(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + getIdentityData(userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.getIdentityData(userGuid, memberGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update an existing `spending_plan_iteration_item`. - * @summary Update a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} [startTime] Filter transactions from this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. + * @param {string} [endTime] Filter transactions to this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.updateSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(axios, basePath)); + getTransactionsData(userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options?: any): AxiosPromise { + return localVarFp.getTransactionsData(userGuid, accountGuid, startTime, endTime, options).then((request) => request(axios, basePath)); }, }; }; -/** - * SpendingPlanApi - object-oriented interface - * @export - * @class SpendingPlanApi - * @extends {BaseAPI} - */ -export class SpendingPlanApi extends BaseAPI { - /** - * This endpoint creates a new `spending_plan` for the user. - * @summary Create spending plan - * @param {string} userGuid The unique id for a `user`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public createSpendingPlan(userGuid: string, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).createSpendingPlan(userGuid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * This endpoint creates a new `spending_plan_iteration_item`. - * @summary Create spending plan iteration item - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} userGuid The unique id for a `user`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be created with required parameter (planned_amount) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public createSpendingPlanIterationItem(spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).createSpendingPlanIterationItem(spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to delete a user\'s `spending_plan`. - * @summary Delete spending plan - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public deleteSpendingPlan(userGuid: string, spendingPlanGuid: string, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).deleteSpendingPlan(userGuid, spendingPlanGuid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to delete a `spending_plan_account`. - * @summary Delete spending plan account - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public deleteSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).deleteSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to delete a spending plan `iteration_item`. - * @summary Delete spending plan iteration item - * @param {string} userGuid The unique ID for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public deleteSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).deleteSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the spending plan accounts associated with the spending plan. - * @summary List spending plan accounts - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public listSpendingPlanAccounts(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).listSpendingPlanAccounts(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`. - * @summary List spending plan iteration items - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public listSpendingPlanIterationItems(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).listSpendingPlanIterationItems(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`. - * @summary List spending plan iterations - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public listSpendingPlanIterations(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).listSpendingPlanIterations(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the spending plans associated with the user. - * @summary List spending plans - * @param {string} userGuid The unique id for a `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public listSpendingPlans(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).listSpendingPlans(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID. - * @summary Read spending plan account - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} spendingPlanAccountGuid The unique ID for the specified account. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public readSpendingPlanAccount(userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).readSpendingPlanAccount(userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`. - * @summary Read a spending plan iteration - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} iterationNumber The current iteration number for the spending plan `iteration``. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SpendingPlanApi - */ - public readSpendingPlanIteration(userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).readSpendingPlanIteration(userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - +/** + * VerifiableCredentialsApi - object-oriented interface + * @export + * @class VerifiableCredentialsApi + * @extends {BaseAPI} + */ +export class VerifiableCredentialsApi extends BaseAPI { /** - * Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID. - * @summary Read a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof SpendingPlanApi + * @memberof VerifiableCredentialsApi */ - public readSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).readSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + public getAccountsData(userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return VerifiableCredentialsApiFp(this.configuration).getAccountsData(userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to read the attributes of a specific spending plan according to its unique GUID. - * @summary Read a spending plan for a user - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} memberGuid The unique id for a `member`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof SpendingPlanApi + * @memberof VerifiableCredentialsApi */ - public readSpendingPlanUser(userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).readSpendingPlanUser(userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + public getIdentityData(userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return VerifiableCredentialsApiFp(this.configuration).getIdentityData(userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to update an existing `spending_plan_iteration_item`. - * @summary Update a spending plan iteration item - * @param {string} userGuid The unique id for a `user`. - * @param {string} spendingPlanGuid The unique ID for the `spending_plan`. - * @param {string} iterationItemGuid The unique ID for the `iteration_item`. - * @param {SpendingPlanIterationItemCreateRequestBody} spendingPlanIterationItemCreateRequestBody Iteration item to be updated with required parameter (planned_amount) + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `account`. + * @param {string} [startTime] Filter transactions from this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. + * @param {string} [endTime] Filter transactions to this date. Must be in the format YYYY-MM-DD. The range is limited to 1 year. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof SpendingPlanApi + * @memberof VerifiableCredentialsApi */ - public updateSpendingPlanIterationItem(userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig) { - return SpendingPlanApiFp(this.configuration).updateSpendingPlanIterationItem(userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + public getTransactionsData(userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options?: AxiosRequestConfig) { + return VerifiableCredentialsApiFp(this.configuration).getTransactionsData(userGuid, accountGuid, startTime, endTime, options).then((request) => request(this.axios, this.basePath)); } } /** - * TransactionsApi - axios parameter creator + * WidgetsApi - axios parameter creator * @export */ -export const TransactionsApiAxiosParamCreator = function (configuration?: Configuration) { +export const WidgetsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. - * @summary Create manual transaction - * @param {string} userGuid The unique identifier for the user. - * @param {string} accountGuid The unique identifier for the account. - * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * This endpoint will return a URL for an embeddable version of MX Connect. + * @summary (Deprecated) Request connect widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - usersUserGuidAccountsAccountGuidTransactionsPost: async (userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + requestConnectWidgetURL: async (userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'userGuid' is not null or undefined - assertParamExists('usersUserGuidAccountsAccountGuidTransactionsPost', 'userGuid', userGuid) - // verify required parameter 'accountGuid' is not null or undefined - assertParamExists('usersUserGuidAccountsAccountGuidTransactionsPost', 'accountGuid', accountGuid) - // verify required parameter 'transactionCreateRequestBody' is not null or undefined - assertParamExists('usersUserGuidAccountsAccountGuidTransactionsPost', 'transactionCreateRequestBody', transactionCreateRequestBody) - const localVarPath = `/users/{user_guid}/accounts/{account_guid}/transactions` - .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) - .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))); + assertParamExists('requestConnectWidgetURL', 'userGuid', userGuid) + // verify required parameter 'connectWidgetRequestBody' is not null or undefined + assertParamExists('requestConnectWidgetURL', 'connectWidgetRequestBody', connectWidgetRequestBody) + const localVarPath = `/users/{user_guid}/connect_widget_url` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -20224,7 +24282,128 @@ export const TransactionsApiAxiosParamCreator = function (configuration?: Config setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionCreateRequestBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(connectWidgetRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. + * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, any `oauth_window_uri` generated will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. + * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. + * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. + * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestOAuthWindowURI: async (memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('requestOAuthWindowURI', 'memberGuid', memberGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('requestOAuthWindowURI', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/oauth_window_uri` + .replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (clientRedirectUrl !== undefined) { + localVarQueryParameter['client_redirect_url'] = clientRedirectUrl; + } + + if (enableApp2app !== undefined) { + localVarQueryParameter['enable_app2app'] = enableApp2app; + } + + if (referralSource !== undefined) { + localVarQueryParameter['referral_source'] = referralSource; + } + + if (skipAggregation !== undefined) { + localVarQueryParameter['skip_aggregation'] = skipAggregation; + } + + if (uiMessageWebviewUrlScheme !== undefined) { + localVarQueryParameter['ui_message_webview_url_scheme'] = uiMessageWebviewUrlScheme; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get an embeddable URL for integrating a widget into your website or app. The URL expires after ten minutes or upon first use, whichever occurs first. You\'ll need to obtain a new URL each time the page loads or reloads. Include the `widget_type` in the request body to specify which widget you want to embed—the Connect Widget, a Personal Financial Management widget, or an Insights widget. Some request parameters are specific to certain widget types. To embed the Connect Widget, set `widget_type` to `connect_widget`. For a full list of available widget types, see [Widget Types](/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. + * @param {string} [acceptLanguage] The desired language of the widget. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestWidgetURL: async (userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('requestWidgetURL', 'userGuid', userGuid) + // verify required parameter 'widgetRequestBody' is not null or undefined + assertParamExists('requestWidgetURL', 'widgetRequestBody', widgetRequestBody) + const localVarPath = `/users/{user_guid}/widget_urls` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (acceptLanguage != null) { + localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); + } + + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(widgetRequestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -20235,69 +24414,162 @@ export const TransactionsApiAxiosParamCreator = function (configuration?: Config }; /** - * TransactionsApi - functional programming interface + * WidgetsApi - functional programming interface * @export */ -export const TransactionsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration) +export const WidgetsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WidgetsApiAxiosParamCreator(configuration) return { /** - * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. - * @summary Create manual transaction - * @param {string} userGuid The unique identifier for the user. - * @param {string} accountGuid The unique identifier for the account. - * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * This endpoint will return a URL for an embeddable version of MX Connect. + * @summary (Deprecated) Request connect widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async requestConnectWidgetURL(userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestConnectWidgetURL(userGuid, connectWidgetRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. + * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, any `oauth_window_uri` generated will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. + * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. + * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. + * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestOAuthWindowURI(memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestOAuthWindowURI(memberGuid, userGuid, clientRedirectUrl, enableApp2app, referralSource, skipAggregation, uiMessageWebviewUrlScheme, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an embeddable URL for integrating a widget into your website or app. The URL expires after ten minutes or upon first use, whichever occurs first. You\'ll need to obtain a new URL each time the page loads or reloads. Include the `widget_type` in the request body to specify which widget you want to embed—the Connect Widget, a Personal Financial Management widget, or an Insights widget. Some request parameters are specific to certain widget types. To embed the Connect Widget, set `widget_type` to `connect_widget`. For a full list of available widget types, see [Widget Types](/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. + * @param {string} [acceptLanguage] The desired language of the widget. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersUserGuidAccountsAccountGuidTransactionsPost(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidAccountsAccountGuidTransactionsPost(userGuid, accountGuid, transactionCreateRequestBody, options); + async requestWidgetURL(userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestWidgetURL(userGuid, widgetRequestBody, acceptLanguage, xCALLBACKPAYLOAD, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** - * TransactionsApi - factory interface + * WidgetsApi - factory interface * @export */ -export const TransactionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TransactionsApiFp(configuration) +export const WidgetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WidgetsApiFp(configuration) return { /** - * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. - * @summary Create manual transaction - * @param {string} userGuid The unique identifier for the user. - * @param {string} accountGuid The unique identifier for the account. - * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * This endpoint will return a URL for an embeddable version of MX Connect. + * @summary (Deprecated) Request connect widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + requestConnectWidgetURL(userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options?: any): AxiosPromise { + return localVarFp.requestConnectWidgetURL(userGuid, connectWidgetRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. + * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, any `oauth_window_uri` generated will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. + * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. + * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. + * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestOAuthWindowURI(memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: any): AxiosPromise { + return localVarFp.requestOAuthWindowURI(memberGuid, userGuid, clientRedirectUrl, enableApp2app, referralSource, skipAggregation, uiMessageWebviewUrlScheme, options).then((request) => request(axios, basePath)); + }, + /** + * Get an embeddable URL for integrating a widget into your website or app. The URL expires after ten minutes or upon first use, whichever occurs first. You\'ll need to obtain a new URL each time the page loads or reloads. Include the `widget_type` in the request body to specify which widget you want to embed—the Connect Widget, a Personal Financial Management widget, or an Insights widget. Some request parameters are specific to certain widget types. To embed the Connect Widget, set `widget_type` to `connect_widget`. For a full list of available widget types, see [Widget Types](/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. + * @param {string} [acceptLanguage] The desired language of the widget. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersUserGuidAccountsAccountGuidTransactionsPost(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: any): AxiosPromise { - return localVarFp.usersUserGuidAccountsAccountGuidTransactionsPost(userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(axios, basePath)); + requestWidgetURL(userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.requestWidgetURL(userGuid, widgetRequestBody, acceptLanguage, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); }, }; }; /** - * TransactionsApi - object-oriented interface + * WidgetsApi - object-oriented interface * @export - * @class TransactionsApi + * @class WidgetsApi * @extends {BaseAPI} */ -export class TransactionsApi extends BaseAPI { +export class WidgetsApi extends BaseAPI { /** - * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. - * @summary Create manual transaction - * @param {string} userGuid The unique identifier for the user. - * @param {string} accountGuid The unique identifier for the account. - * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * This endpoint will return a URL for an embeddable version of MX Connect. + * @summary (Deprecated) Request connect widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {ConnectWidgetRequestBody} connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} - * @memberof TransactionsApi + * @memberof WidgetsApi + */ + public requestConnectWidgetURL(userGuid: string, connectWidgetRequestBody: ConnectWidgetRequestBody, options?: AxiosRequestConfig) { + return WidgetsApiFp(this.configuration).requestConnectWidgetURL(userGuid, connectWidgetRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} memberGuid The unique id for a `member`. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} [clientRedirectUrl] A URL that MX will redirect to at the end of OAuth with additional query parameters. Only available with `referral_source=APP`. + * @param {string} [enableApp2app] This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to `true`. When set to `false`, any `oauth_window_uri` generated will **not** direct the end user to the institution\'s mobile application. This setting is not persistent. This setting currently only affects Chase institutions. + * @param {string} [referralSource] Must be either `BROWSER` or `APP` depending on the implementation. Defaults to `BROWSER`. + * @param {boolean} [skipAggregation] Setting this parameter to `true` will prevent the member from automatically aggregating after being redirected from the authorization page. + * @param {string} [uiMessageWebviewUrlScheme] A scheme for routing the user back to the application state they were previously in. Only available with `referral_source=APP`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetsApi + */ + public requestOAuthWindowURI(memberGuid: string, userGuid: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: AxiosRequestConfig) { + return WidgetsApiFp(this.configuration).requestOAuthWindowURI(memberGuid, userGuid, clientRedirectUrl, enableApp2app, referralSource, skipAggregation, uiMessageWebviewUrlScheme, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an embeddable URL for integrating a widget into your website or app. The URL expires after ten minutes or upon first use, whichever occurs first. You\'ll need to obtain a new URL each time the page loads or reloads. Include the `widget_type` in the request body to specify which widget you want to embed—the Connect Widget, a Personal Financial Management widget, or an Insights widget. Some request parameters are specific to certain widget types. To embed the Connect Widget, set `widget_type` to `connect_widget`. For a full list of available widget types, see [Widget Types](/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {WidgetRequestBody} widgetRequestBody The widget url configuration options. + * @param {string} [acceptLanguage] The desired language of the widget. + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](/resources/webhooks/member/) and [Member Data Updated](/resources/webhooks/member#member-data-updated) webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetsApi */ - public usersUserGuidAccountsAccountGuidTransactionsPost(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig) { - return TransactionsApiFp(this.configuration).usersUserGuidAccountsAccountGuidTransactionsPost(userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + public requestWidgetURL(userGuid: string, widgetRequestBody: WidgetRequestBody, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return WidgetsApiFp(this.configuration).requestWidgetURL(userGuid, widgetRequestBody, acceptLanguage, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/base.ts b/base.ts index 2e84c6a..fc22b13 100644 --- a/base.ts +++ b/base.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * MX Platform API - * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/). * - * The version of the OpenAPI document: 0.1.0 + * The version of the OpenAPI document: 20111101 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,7 +19,7 @@ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; -export const BASE_PATH = "https://api.mx.com".replace(/\/+$/, ""); +export const BASE_PATH = "https://int-api.mx.com".replace(/\/+$/, ""); /** * diff --git a/common.ts b/common.ts index 3f67889..a701881 100644 --- a/common.ts +++ b/common.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * MX Platform API - * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/). * - * The version of the OpenAPI document: 0.1.0 + * The version of the OpenAPI document: 20111101 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/configuration.ts b/configuration.ts index 358a7c6..0f10a11 100644 --- a/configuration.ts +++ b/configuration.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * MX Platform API - * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/). * - * The version of the OpenAPI document: 0.1.0 + * The version of the OpenAPI document: 20111101 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/index.ts b/index.ts index 7bdddef..fab9087 100644 --- a/index.ts +++ b/index.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * MX Platform API - * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + * The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/). * - * The version of the OpenAPI document: 0.1.0 + * The version of the OpenAPI document: 20111101 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/openapi/config.yml b/openapi/config.yml index 2e1b4fb..4e172c3 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -1,4 +1,4 @@ --- npmName: mx-platform-node -npmVersion: 1.10.0 +npmVersion: 1.10.1 supportsES6: true diff --git a/package.json b/package.json index edf2450..ec1fd5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mx-platform-node", - "version": "1.10.0", + "version": "1.10.1", "description": "A Node library for the MX Platform API.", "author": "MX", "keywords": [