diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ac8e82..8755b4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.0] - 2026-01-29 + +### ⚠️ BREAKING CHANGES + +This is a major version bump because it targets a new API version. If you are currently using `mx-platform-node@^2`, this is a new API version (`v20250224`) with potentially significant changes. **See the [MX Platform API Migration Guide](https://docs.mx.com/api-reference/platform-api/overview/migration) for detailed API breaking changes and migration instructions.** + +### Added +- Initial support for MX Platform API `v20250224` +- Published as separate major version to support independent API versions + +### Changed +- This is a completely new API version (`v20250224`). Refer to the [MX Platform API changelog](https://docs.mx.com/resources/changelog/platform) for detailed API specification changes from `v20111101` + +### Migration +For upgrading from `mx-platform-node@^2` (v20111101 API) to v3.x (v20250224 API): +```bash +npm install mx-platform-node@^3 +``` +Consult the [MX Platform API Migration Guide](https://docs.mx.com/api-reference/platform-api/overview/migration) for API-level changes, deprecations and migration steps. + ## [2.0.0] - 2026-01-07 (v20111101 API) ### Changed @@ -50,4 +70,4 @@ These versions (v1.10.1 through v1.12.0) contain the breaking API restructure bu --- -**Note:** This CHANGELOG was created retroactively. For detailed version history prior to v2.0.0, please refer to the [commit history](https://github.com/mxenabled/mx-platform-node/commits/master). +**Note:** This CHANGELOG was created retroactively. For detailed version history prior to v2.0.0, please refer to the [commit history](https://github.com/mxenabled/mx-platform-node/commits/master). \ No newline at end of file diff --git a/v20250224/.npmignore b/v20250224/.npmignore new file mode 100644 index 0000000..999d88d --- /dev/null +++ b/v20250224/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/v20250224/.openapi-generator-ignore b/v20250224/.openapi-generator-ignore new file mode 100644 index 0000000..3530143 --- /dev/null +++ b/v20250224/.openapi-generator-ignore @@ -0,0 +1,2 @@ +git_push.sh +.gitignore \ No newline at end of file diff --git a/v20250224/.openapi-generator/FILES b/v20250224/.openapi-generator/FILES new file mode 100644 index 0000000..11eb2c8 --- /dev/null +++ b/v20250224/.openapi-generator/FILES @@ -0,0 +1,10 @@ +.npmignore +README.md +api.ts +base.ts +common.ts +configuration.ts +index.ts +package.json +tsconfig.esm.json +tsconfig.json diff --git a/v20250224/.openapi-generator/VERSION b/v20250224/.openapi-generator/VERSION new file mode 100644 index 0000000..73a86b1 --- /dev/null +++ b/v20250224/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.0.1 \ No newline at end of file diff --git a/v20250224/CHANGELOG.md b/v20250224/CHANGELOG.md new file mode 100644 index 0000000..8755b4a --- /dev/null +++ b/v20250224/CHANGELOG.md @@ -0,0 +1,73 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [3.0.0] - 2026-01-29 + +### ⚠️ BREAKING CHANGES + +This is a major version bump because it targets a new API version. If you are currently using `mx-platform-node@^2`, this is a new API version (`v20250224`) with potentially significant changes. **See the [MX Platform API Migration Guide](https://docs.mx.com/api-reference/platform-api/overview/migration) for detailed API breaking changes and migration instructions.** + +### Added +- Initial support for MX Platform API `v20250224` +- Published as separate major version to support independent API versions + +### Changed +- This is a completely new API version (`v20250224`). Refer to the [MX Platform API changelog](https://docs.mx.com/resources/changelog/platform) for detailed API specification changes from `v20111101` + +### Migration +For upgrading from `mx-platform-node@^2` (v20111101 API) to v3.x (v20250224 API): +```bash +npm install mx-platform-node@^3 +``` +Consult the [MX Platform API Migration Guide](https://docs.mx.com/api-reference/platform-api/overview/migration) for API-level changes, deprecations and migration steps. + +## [2.0.0] - 2026-01-07 (v20111101 API) + +### Changed +- **Versioning Correction:** Re-released as v2.0.0 to properly indicate breaking changes that were inadvertently introduced in v1.10.1 +- No code changes from v1.12.1 - this is a versioning correction to follow semantic versioning +- Versions v1.10.1 through v1.12.1 are now deprecated on npm in favor of this properly versioned v2.0.0 release + +### ⚠️ BREAKING CHANGES (from v1.10.0) + +**API Class Restructure:** The unified `MxPlatformApi` class has been replaced with granular, domain-specific API classes (e.g., `UsersApi`, `MembersApi`, `AccountsApi`) to better align with the OpenAPI specification structure. This change improves code organization and maintainability but requires migration of existing code. + +**Note:** This breaking change was originally introduced in v1.10.1 but should have been released as v2.0.0. If you are currently using v1.10.1 through v1.12.1, the code is functionally identical to v2.0.0. + +**See [MIGRATION.md](MIGRATION.md) for detailed upgrade instructions.** + +### Changed +- Restructured API classes from single `MxPlatformApi` to domain-specific classes + +## [1.12.1] - 2025-11-25 (v20111101 API) + +### Fixed +- Updated package template (`package.mustache`) to fix recurring dependency regression + - axios: ^0.21.4 → ^1.6.8 (fixes CVE GHSA-wf5p-g6vw-rhxx) + - typescript: ^3.6.4 → ^5.4.5 + - @types/node: ^12.11.5 → ^20.12.7 +- Added automated validation workflow to prevent template/package.json drift + +### ⚠️ DEPRECATED +This version contains breaking API changes that should have been released as v2.0.0. Please upgrade to v2.0.0 (code is functionally identical, just properly versioned). + +## [1.12.0] and earlier (1.10.1 - 1.12.0) - Various dates + +### ⚠️ DEPRECATED +These versions (v1.10.1 through v1.12.0) contain the breaking API restructure but were incorrectly published as minor/patch releases instead of a major version. They have been deprecated on npm in favor of v2.0.0. + +**If you are on any of these versions:** Please upgrade to v2.0.0. + +## [1.10.0] - 2025-11-05 (v20111101 API) + +### Note +- Last stable version with unified `MxPlatformApi` class +- Upgrade from this version to v2.0.0 requires code changes (see [MIGRATION.md](MIGRATION.md)) + +--- + +**Note:** This CHANGELOG was created retroactively. For detailed version history prior to v2.0.0, please refer to the [commit history](https://github.com/mxenabled/mx-platform-node/commits/master). \ No newline at end of file diff --git a/v20250224/LICENSE b/v20250224/LICENSE new file mode 100644 index 0000000..1f8e9a2 --- /dev/null +++ b/v20250224/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 MX Technologies Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/v20250224/MIGRATION.md b/v20250224/MIGRATION.md new file mode 100644 index 0000000..5ac2994 --- /dev/null +++ b/v20250224/MIGRATION.md @@ -0,0 +1,114 @@ +# Migration Guide + +## Upgrading from v20111101 (v2.x) to v20250224 (v3.x) + +The v20250224 API is now available, and v3.0.0 of this SDK provides support as an independent major version. + +### Installation + +The two API versions are published as separate major versions of the same npm package: + +**For v20111101 API:** +```bash +npm install mx-platform-node@^2 +``` + +**For v20250224 API:** +```bash +npm install mx-platform-node@^3 +``` + +### Migration Path + +1. **Review API Changes**: Consult the [MX Platform API Migration Guide](https://docs.mx.com/api-reference/platform-api/overview/migration) for breaking changes and new features +2. **Update Package**: Update your `package.json` to use `mx-platform-node@^3` +3. **Update Imports**: Both APIs have similar structure, but review type definitions for any breaking changes +4. **Run Tests**: Validate your code works with the new SDK version +5. **Deploy**: Update production once validated + +### Benefits of TypeScript + +Since this is a TypeScript SDK, the compiler will help catch most compatibility issues at compile time when you update to v3.x. + +--- + +## Upgrading to v2.0.0 from v1.10.0 or earlier + +### Breaking Change: API Class Restructure + +**Important:** Starting with version 2.0.0 (originally introduced in v1.10.1, now properly versioned), the unified `MxPlatformApi` class has been replaced with domain-specific API classes. If you're upgrading from v1.10.0 or earlier, you'll need to update your imports and API instantiation. + +**Note:** Versions v1.10.1 through v1.12.1 are deprecated. If you're on any of these versions, please upgrade to v2.0.0 (functionally identical to v1.12.1, just properly versioned). + +### What Changed + +The library now provides granular API classes organized by domain (Users, Members, Accounts, Transactions, etc.) instead of a single `MxPlatformApi` class. This aligns with the OpenAPI specification structure and provides better code organization. + +### How to Migrate + +**Before (v1.10.0 and earlier):** +```javascript +import { Configuration, MxPlatformApi } from 'mx-platform-node'; + +const client = new MxPlatformApi(configuration); +await client.createUser(requestBody); +await client.listMembers(userGuid); +await client.listAccounts(userGuid); +``` + +**After (v2.0.0+):** +```javascript +import { Configuration, UsersApi, MembersApi, AccountsApi } from 'mx-platform-node'; + +const usersApi = new UsersApi(configuration); +const membersApi = new MembersApi(configuration); +const accountsApi = new AccountsApi(configuration); + +await usersApi.createUser(requestBody); +await membersApi.listMembers(userGuid); +await accountsApi.listAccounts(userGuid); +``` + +### Available API Classes + +The new structure includes the following API classes: + +- `AccountsApi` - Account operations +- `AuthorizationApi` - Authorization operations +- `BudgetsApi` - Budget operations +- `CategoriesApi` - Category operations +- `GoalsApi` - Goal operations +- `InsightsApi` - Insight operations +- `InstitutionsApi` - Institution operations +- `InvestmentHoldingsApi` - Investment holding operations +- `ManagedDataApi` - Managed data operations +- `MembersApi` - Member operations +- `MerchantsApi` - Merchant operations +- `MicrodepositsApi` - Microdeposit operations +- `MonthlyCashFlowProfileApi` - Monthly cash flow profile operations +- `NotificationsApi` - Notification operations +- `ProcessorTokenApi` - Processor token operations +- `RewardsApi` - Rewards operations +- `SpendingPlanApi` - Spending plan operations +- `StatementsApi` - Statement operations +- `TaggingsApi` - Tagging operations +- `TagsApi` - Tag operations +- `TransactionRulesApi` - Transaction rule operations +- `TransactionsApi` - Transaction operations +- `UsersApi` - User operations +- `VerifiableCredentialsApi` - Verifiable credential operations +- `WidgetsApi` - Widget operations + +For the complete list of available methods, please refer to the [API documentation](https://docs.mx.com/api). + +### Migration Checklist + +1. **Update your imports**: Replace `MxPlatformApi` with the specific API classes you need +2. **Update instantiation**: Create separate instances for each API class instead of a single client +3. **Update method calls**: Call methods on the appropriate API class instance +4. **Test thoroughly**: Verify all API calls work as expected with the new structure +5. **Update documentation**: If you have internal docs referencing the old API, update them + +### Need Help? + +If you encounter any issues during migration, please [open an issue](https://github.com/mxenabled/mx-platform-node/issues) on GitHub. diff --git a/v20250224/README.md b/v20250224/README.md new file mode 100644 index 0000000..1b28da3 --- /dev/null +++ b/v20250224/README.md @@ -0,0 +1,115 @@ +# MX Platform Node.js (v20250224 API) + +**SDK version:** 3.0.0 +**API version:** v20250224 + +You are using the **v20250224** API version of `mx-platform-node`. For other API versions, see [Available API Versions](#available-api-versions) below. + +### Checking Your Installed Version + +To verify which API version you have installed: + +**In package.json:** +```json +{ + "dependencies": { + "mx-platform-node": "^3.0.0" + } +} +``` + +**Programmatically in your code:** +```javascript +const pkg = require('mx-platform-node/package.json'); +console.log(pkg.apiVersion); // v20250224 +``` + +**Via npm:** +```shell +npm view mx-platform-node@3.0.0 +``` + +## Available API Versions + +- **mx-platform-node@2.x.x** - [v20111101 API](https://docs.mx.com/api-reference/platform-api/v20111101/reference/mx-platform-api/) +- **mx-platform-node@3.x.x** - [v20250224 API](https://docs.mx.com/api-reference/platform-api/reference/mx-platform-api/) + +--- + +## Overview + +The [MX Platform API](https://www.mx.com/products/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. + +## Documentation + +Examples for the API endpoints can be found [here.](https://docs.mx.com/api) + +## Requirements + +The generated Node module can be used in the following environments: + +Environment +* Node.js +* Webpack +* Browserify + +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 + +Module system +* CommonJS +* ES6 module system + +## Installation + +To build and compile the TypeScript sources to JavaScript use: + +```shell +npm install mx-platform-node +``` + +## Getting Started + +In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`. + +Please follow the [installation](#installation) procedure and then run the following code to create your first User: + +```javascript +import { Configuration, UsersApi } from 'mx-platform-node'; + +const configuration = new Configuration({ + // Configure with your Client ID/API Key from https://dashboard.mx.com + username: 'Your Client ID', + password: 'Your API Key', + + // Configure environment. https://int-api.mx.com for development, https://api.mx.com for production + basePath: 'https://int-api.mx.com', + + baseOptions: { + headers: { + Accept: 'application/vnd.mx.api.v1+json' + } + } +}); + +const usersApi = new UsersApi(configuration); + +const requestBody = { + user: { + metadata: 'Creating a user!' + } +}; + +const response = await usersApi.createUser(requestBody); + +console.log(response.data); +``` + +## Upgrading from v1.x? + +> **⚠️ Breaking Changes in v2.0.0:** If you're upgrading from v1.10.0 or earlier, the API structure has changed significantly. See the [Migration Guide](MIGRATION.md) for detailed instructions on updating your code. + +## Contributing + +Please [open an issue](https://github.com/mxenabled/mx-platform-node/issues) or [submit a pull request.](https://github.com/mxenabled/mx-platform-node/pulls) diff --git a/v20250224/api.ts b/v20250224/api.ts new file mode 100644 index 0000000..fc8e2ea --- /dev/null +++ b/v20250224/api.ts @@ -0,0 +1,26523 @@ +/* tslint:disable */ +/* 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. ## What\'s Changed? Several endpoints, headers, and fields changed in `v20250224`. For more on breaking changes, refer to our [versioning](https://docs.mx.com/api-reference/platform-api/overview/versioning#v20250224) and [migration](https://docs.mx.com/api-reference/platform-api/overview/migration) guides. ## Version Header Versions are set in the `Accept-Version` header of API requests. Version numbers correspond with the date associated with that version. The example below uses the version `v20250224`. ``` -H \'Accept: application/json\' -H \'Accept-Version: v20250224\' ``` --- + * + * The version of the OpenAPI document: 20250224 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; + +/** + * + * @export + * @interface ACHResponse + */ +export interface ACHResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof ACHResponse + */ + '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 ACHResponse + */ + 'account_number_last_four'?: string | null; + /** + * The type of account. Some account types may include subtypes. + * @type {string} + * @memberof ACHResponse + */ + 'account_type'?: ACHResponseAccountTypeEnum; + /** + * 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 ACHResponse + */ + 'ach_initiated_at'?: string | null; + /** + * The unique identifier for the client associated with the insight. Defined by MX. + * @type {string} + * @memberof ACHResponse + */ + 'client_guid'?: string; + /** + * The account number correction reported by the RDFI. Populate only if the `resolution_code` is `NOTICE_OF_CHANGE`. + * @type {string} + * @memberof ACHResponse + */ + 'corrected_account_number'?: string | null; + /** + * The routing number correction reported by the RDFI. Populated only if the `resolution_code` is `NOTICE_OF_CHANGE`. Must be a valid 9-digit routing number format. + * @type {string} + * @memberof ACHResponse + */ + 'corrected_routing_number'?: string | null; + /** + * The date and time the ACH return was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof ACHResponse + */ + 'created_at'?: string; + /** + * The unique identifier for the ACH return record. Defined by MX. + * @type {string} + * @memberof ACHResponse + */ + 'guid'?: string; + /** + * Client-defined identifier for this specific return submission. Allows you to track and reference your requests. + * @type {string} + * @memberof ACHResponse + */ + 'id'?: string; + /** + * The unique identifier for an institution. Defined by MX. + * @type {string} + * @memberof ACHResponse + */ + 'institution_guid'?: string; + /** + * Notes added by Product Support during investigation of the ACH return. + * @type {string} + * @memberof ACHResponse + */ + 'investigation_notes'?: string | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof ACHResponse + */ + 'member_guid'?: string; + /** + * Any errors that occurred during processing. + * @type {string} + * @memberof ACHResponse + */ + 'processing_errors'?: string | null; + /** + * A short, machine-readable code that categorizes the type of resolution or reason for the status. See [Resolution Codes](/api-reference/platform-api/reference/ach-return-fields#resolution-codes) for a complete list. + * @type {string} + * @memberof ACHResponse + */ + 'resolution_code'?: string | null; + /** + * A more detailed, human-readable message providing context and next steps related to the `return_status` and `resolution_code`. + * @type {string} + * @memberof ACHResponse + */ + 'resolution_detail'?: string | null; + /** + * Date and time when the return was marked as resolved. + * @type {string} + * @memberof ACHResponse + */ + 'resolved_status_at'?: string | null; + /** + * The associated ACH return codes and notice of change codes (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 ACHResponse + */ + 'return_code'?: string; + /** + * Notes that you set to inform MX on internal ACH processing. + * @type {string} + * @memberof ACHResponse + */ + 'return_notes'?: string | null; + /** + * Incorrect account number used in the ACH transaction. + * @type {string} + * @memberof ACHResponse + */ + 'return_account_number'?: string | null; + /** + * Incorrect routing number used in the ACH transaction. + * @type {string} + * @memberof ACHResponse + */ + 'return_routing_number'?: string | null; + /** + * The current processing status of the ACH return. See [Return Status](/api-reference/platform-api/reference/ach-return-fields#return-status) for a complete list of statuses. + * @type {string} + * @memberof ACHResponse + */ + 'return_status'?: string | null; + /** + * 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 ACHResponse + */ + 'returned_at'?: string | null; + /** + * The three-letter SEC code (Standard Entry Class 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 ACHResponse + */ + 'sec_code'?: string | null; + /** + * Date and time when MX started processing the return. + * @type {string} + * @memberof ACHResponse + */ + 'started_processing_at'?: string | null; + /** + * Date and time when the record was submitted through the API. + * @type {string} + * @memberof ACHResponse + */ + 'submitted_at'?: string | null; + /** + * The amount of the transaction. + * @type {number} + * @memberof ACHResponse + */ + 'transaction_amount'?: number | null; + /** + * Date and time when the ACH return record was last updated. + * @type {string} + * @memberof ACHResponse + */ + 'updated_at'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof ACHResponse + */ + 'user_guid'?: string; +} + +export const ACHResponseAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type ACHResponseAccountTypeEnum = typeof ACHResponseAccountTypeEnum[keyof typeof ACHResponseAccountTypeEnum]; + +/** + * + * @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 | null; + /** + * 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 | null; + /** + * 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 | null; + /** + * The routing number correction reported by the RDFI. Populated 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 | null; + /** + * 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; + /** + * A short, machine-readable code that categorizes the type of resolution or reason for the status. See [Resolution Codes](https://docs.mx.com/api-reference/platform-api/reference/ach-return-fields/#resolution-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](#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 + * @interface AccountCreateRequest + */ +export interface AccountCreateRequest { + /** + * The account\'s subtype, for example, `PLAN_401_K`, `MONEY_MARKET`, or `HOME_EQUITY`. Each subtype belongs to an account `type`. For a full list of account subtypes and types, see [Accounts](/api-reference/platform-api/reference/account-types). + * @type {string} + * @memberof AccountCreateRequest + */ + 'account_subtype'?: string | null; + /** + * The type of account. Some account types may include subtypes. For a full list of account types and subtypes, see [Account Types](/api-reference/platform-api/reference/account-types). + * @type {string} + * @memberof AccountCreateRequest + */ + 'account_type': AccountCreateRequestAccountTypeEnum; + /** + * The annual percentage rate associated with the `account`. + * @type {number} + * @memberof AccountCreateRequest + */ + 'apr'?: number; + /** + * The annual percentage yield associated with the `account`. + * @type {number} + * @memberof AccountCreateRequest + */ + 'apy'?: number; + /** + * The balance that is available for use in asset accounts like checking and savings. `PENDING` transactions are typically (not always) taken into account with the available balance. `available_balance` will usually be a positive value for all account types, determined in the same way as the balance field. + * @type {number} + * @memberof AccountCreateRequest + */ + 'available_balance'?: number; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof AccountCreateRequest + */ + 'balance'?: number; + /** + * The sum of money paid to the policyholder or annuity holder in the event the policy is voluntarily terminated before it matures, or the insured event occurs. + * @type {number} + * @memberof AccountCreateRequest + */ + 'cash_surrender_value'?: number; + /** + * The credit limit associated with the `account`. + * @type {number} + * @memberof AccountCreateRequest + */ + 'credit_limit'?: number; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof AccountCreateRequest + */ + 'currency_code'?: string | null; + /** + * The amount paid to the beneficiary of the account upon death of the account owner. + * @type {number} + * @memberof AccountCreateRequest + */ + 'death_benefit'?: number; + /** + * The interest rate associated with the account. + * @type {number} + * @memberof AccountCreateRequest + */ + 'interest_rate'?: number; + /** + * Indicates whether the account is a business account. + * @type {boolean} + * @memberof AccountCreateRequest + */ + 'is_business'?: boolean; + /** + * Indicates whether an account has been closed. Closed accounts will no longer update balance or transaction information. + * @type {boolean} + * @memberof AccountCreateRequest + */ + 'is_closed'?: boolean; + /** + * Indicates whether the account is hidden. Hidden accounts can still have an active balance and receive transactions. Defaults to `false`. + * @type {boolean} + * @memberof AccountCreateRequest + */ + 'is_hidden'?: boolean; + /** + * The amount of the loan associated with the `account`. + * @type {number} + * @memberof AccountCreateRequest + */ + 'loan_amount'?: number; + /** + * Additional information you can store about the `account`. + * @type {string} + * @memberof AccountCreateRequest + */ + 'metadata'?: string; + /** + * The human-readable name for the `account`. + * @type {string} + * @memberof AccountCreateRequest + */ + 'name': string; + /** + * An alternate name for the `account`. + * @type {string} + * @memberof AccountCreateRequest + */ + 'nickname'?: string; + /** + * The original balance associated with the `account`. This will always be positive. + * @type {number} + * @memberof AccountCreateRequest + */ + 'original_balance'?: number; + /** + * Subtype if the account type is `PROPERTY`. This field should be ignored unless the type is set to `PROPERTY`. For a full list of property types, see [Account Types](/api-reference/platform-api/reference/account-types). + * @type {string} + * @memberof AccountCreateRequest + */ + 'property_type'?: AccountCreateRequestPropertyTypeEnum; + /** + * If set to `true`, prevents sending an account webhook for the update if that webhook type is enabled for you. + * @type {boolean} + * @memberof AccountCreateRequest + */ + 'skip_webhook'?: boolean; +} + +export const AccountCreateRequestAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type AccountCreateRequestAccountTypeEnum = typeof AccountCreateRequestAccountTypeEnum[keyof typeof AccountCreateRequestAccountTypeEnum]; +export const AccountCreateRequestPropertyTypeEnum = { + Appliances: 'APPLIANCES', + Art: 'ART', + Computer: 'COMPUTER', + Electronics: 'ELECTRONICS', + Furniture: 'FURNITURE', + Jewelry: 'JEWELRY', + Miscellaneous: 'MISCELLANEOUS', + RealEstate: 'REAL_ESTATE', + SportsEquipment: 'SPORTS_EQUIPMENT', + Vehicle: 'VEHICLE' +} as const; + +export type AccountCreateRequestPropertyTypeEnum = typeof AccountCreateRequestPropertyTypeEnum[keyof typeof AccountCreateRequestPropertyTypeEnum]; + +/** + * + * @export + * @interface AccountCreateRequestBody + */ +export interface AccountCreateRequestBody { + /** + * + * @type {AccountCreateRequest} + * @memberof AccountCreateRequestBody + */ + 'account'?: AccountCreateRequest; +} +/** + * + * @export + * @interface AccountNumberResponse + */ +export interface AccountNumberResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof AccountNumberResponse + */ + 'account_guid'?: string; + /** + * The account number associated with the account. This will typically be a masked or partial account number. + * @type {string} + * @memberof AccountNumberResponse + */ + 'account_number'?: string | null; + /** + * Unique identifier for the account number. Defined by MX. + * @type {string} + * @memberof AccountNumberResponse + */ + 'guid'?: string | null; + /** + * The three-digit number identifying a Canadian banking institution. + * @type {string} + * @memberof AccountNumberResponse + */ + 'institution_number'?: string | null; + /** + * The guarantor of the student loan. + * @type {string} + * @memberof AccountNumberResponse + */ + 'loan_guarantor'?: string | null; + /** + * The reference number of the student loan. + * @type {string} + * @memberof AccountNumberResponse + */ + 'loan_reference_number'?: string | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof AccountNumberResponse + */ + 'member_guid'?: string | null; + /** + * This indicates whether the account and routing numbers passed MX\'s internal validity checks. If true, the account and routing/transit numbers are likely (but not guaranteed) to be valid. If false, either the account number, routing/transit number, or both are likely invalid. + * @type {boolean} + * @memberof AccountNumberResponse + */ + 'passed_validation'?: boolean | null; + /** + * The routing number for the `account`. + * @type {string} + * @memberof AccountNumberResponse + */ + 'routing_number'?: string | null; + /** + * The sequence number of the student loan. + * @type {string} + * @memberof AccountNumberResponse + */ + 'sequence_number'?: string | null; + /** + * The five-digit number identifying the branch of a Canadian financial institution. + * @type {string} + * @memberof AccountNumberResponse + */ + 'transit_number'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof AccountNumberResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface AccountNumbersResponseBody + */ +export interface AccountNumbersResponseBody { + /** + * + * @type {Array} + * @memberof AccountNumbersResponseBody + */ + 'account_numbers'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof AccountNumbersResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface AccountOwnerResponse + */ +export interface AccountOwnerResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'account_guid'?: string; + /** + * The account owner\'s street address. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'address'?: string | null; + /** + * The account owner\'s city. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'city'?: string | null; + /** + * The account owner\'s country. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'country'?: string | null; + /** + * The email address associated with the account. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'email'?: string; + /** + * The account owner\'s first name. This may also include a middle name. This field will be `null` unless name splitting has been enabled. Contact MX to have this feature enabled. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'first_name'?: string | null; + /** + * Unique identifier for the account owner. Defined by MX. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'guid'?: string | null; + /** + * The last name of the account holder. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'last_name'?: string | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'member_guid'?: string | null; + /** + * The account owner\'s name. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'owner_name'?: string | null; + /** + * The account owner\'s phone number. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'phone'?: string | null; + /** + * The account owner\'s postal code. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'postal_code'?: string | null; + /** + * The account owner\'s state. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'state'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof AccountOwnerResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface AccountOwnersResponseBody + */ +export interface AccountOwnersResponseBody { + /** + * + * @type {Array} + * @memberof AccountOwnersResponseBody + */ + 'account_owners'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof AccountOwnersResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface AccountResponse + */ +export interface AccountResponse { + /** + * The account number associated with the account. This will typically be a masked or partial account number. + * @type {string} + * @memberof AccountResponse + */ + 'account_number'?: string | null; + /** + * The type of ownership associated with the account. `NULL` is returned if not received in the data feed. + * @type {string} + * @memberof AccountResponse + */ + 'account_ownership'?: AccountResponseAccountOwnershipEnum; + /** + * The date until which the policy is in effect. + * @type {string} + * @memberof AccountResponse + */ + 'annuity_policy_to_date'?: string | null; + /** + * The provider of the insurance policy. + * @type {string} + * @memberof AccountResponse + */ + 'annuity_provider'?: string | null; + /** + * The effective duration of an insurance policy (one year, five years, etc.). + * @type {number} + * @memberof AccountResponse + */ + 'annuity_term_year'?: number | null; + /** + * The annual percentage rate associated with the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'apr'?: number | null; + /** + * The annual percentage yield associated with the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'apy'?: number | null; + /** + * The balance that is available for use in asset accounts like checking and savings. `PENDING` transactions are typically (not always) taken into account with the available balance. `available_balance` will usually be a positive value for all account types, determined in the same way as the balance field. + * @type {number} + * @memberof AccountResponse + */ + 'available_balance'?: number | null; + /** + * The amount of credit available for use in liability accounts like credit cards and lines of credit. `PENDING` transactions are typically (not always) taken into account with available credit. `available_credit` will usually be a positive value for all account types, determined in the same way as the `balance` field. + * @type {number} + * @memberof AccountResponse + */ + 'available_credit'?: number | null; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof AccountResponse + */ + 'balance'?: number | null; + /** + * The cash balance of the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'cash_balance'?: number | null; + /** + * The sum of money paid to the policyholder or annuity holder in the event the policy is voluntarily terminated before it matures, or the insured event occurs. + * @type {number} + * @memberof AccountResponse + */ + 'cash_surrender_value'?: number | null; + /** + * The date and time the account was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof AccountResponse + */ + 'created_at'?: string; + /** + * The credit limit associated with the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'credit_limit'?: number | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof AccountResponse + */ + 'currency_code'?: string | null; + /** + * The day of the month the payment is due. For example, the 14th is passed as `14`. + * @type {number} + * @memberof AccountResponse + */ + 'day_payment_is_due'?: number | null; + /** + * The amount paid to the beneficiary of the account upon death of the account owner. + * @type {number} + * @memberof AccountResponse + */ + 'death_benefit'?: number | null; + /** + * The federal insurance status of the account. Indicates whether the account is insured by the FDIC (banks) or NCUA (credit unions). Returns an integer (`UNKNOWN_INSURED` = 0, `INSURED` = 1, `NOT_INSURED` = 2). + * @type {string} + * @memberof AccountResponse + */ + 'federal_insurance_status'?: AccountResponseFederalInsuranceStatusEnum; + /** + * Unique identifier for the account. Defined by MX. + * @type {string} + * @memberof AccountResponse + */ + 'guid'?: string | null; + /** + * The unique partner-defined identifier for the account. + * @type {string} + * @memberof AccountResponse + */ + 'id'?: string | null; + /** + * The date and time at which the `account` was last successfully aggregated and received data. + * @type {string} + * @memberof AccountResponse + */ + 'imported_at'?: string | null; + /** + * The interest rate associated with the account. + * @type {number} + * @memberof AccountResponse + */ + 'interest_rate'?: number | null; + /** + * The code identifying a financial institution. + * @type {string} + * @memberof AccountResponse + */ + 'institution_code'?: string | null; + /** + * The name of the insured person. + * @type {string} + * @memberof AccountResponse + */ + 'insured_name'?: string | null; + /** + * Indicates whether an account has been closed. Closed accounts will no longer update balance or transaction information. + * @type {boolean} + * @memberof AccountResponse + */ + 'is_closed'?: boolean; + /** + * Indicates whether the account is hidden. Hidden accounts can still have an active balance and receive transactions. Defaults to `false`. + * @type {boolean} + * @memberof AccountResponse + */ + 'is_hidden'?: boolean | null; + /** + * Indicates whether the transaction was manually created or belongs to a manual account. + * @type {boolean} + * @memberof AccountResponse + */ + 'is_manual'?: boolean | null; + /** + * The amount of the most recent payment on the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'last_payment'?: number | null; + /** + * The date and time when the last payment was made, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof AccountResponse + */ + 'last_payment_at'?: string | null; + /** + * The amount of the loan associated with the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'loan_amount'?: number | null; + /** + * Represents the amount of debt the investor owes to the broker for the use of margin. It can be positive or negative, depending on the performance of the investments made with the borrowed funds. A positive margin balance indicates that the securities purchased on margin have increased in value, whereas a negative margin balance signifies that the securities have decreased in value. + * @type {number} + * @memberof AccountResponse + */ + 'margin_balance'?: number | null; + /** + * The date on which the `account` matures. + * @type {string} + * @memberof AccountResponse + */ + 'matures_on'?: string | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof AccountResponse + */ + 'member_guid'?: string | null; + /** + * The unique, partner-defined, identifier for the member associated with this `account`. + * @type {string} + * @memberof AccountResponse + */ + 'member_id'?: string | null; + /** + * This indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to `false`. + * @type {boolean} + * @memberof AccountResponse + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * Additional information you stored about the `account`. + * @type {string} + * @memberof AccountResponse + */ + 'metadata'?: string | null; + /** + * The minimum balance associated with the `account`. + * @type {number} + * @memberof AccountResponse + */ + 'minimum_balance'?: number | null; + /** + * The minimum payment required for an account. This can apply to any debt account. + * @type {number} + * @memberof AccountResponse + */ + 'minimum_payment'?: number | null; + /** + * The human-readable name for the resource. + * @type {string} + * @memberof AccountResponse + */ + 'name'?: string | null; + /** + * An alternate name for the `account`. + * @type {string} + * @memberof AccountResponse + */ + 'nickname'?: string | null; + /** + * The original balance associated with the `account`. This will always be positive. + * @type {number} + * @memberof AccountResponse + */ + 'original_balance'?: number | null; + /** + * The amount paid out to the insured individual or beneficiary under the conditions of the insurance policy. + * @type {number} + * @memberof AccountResponse + */ + 'pay_out_amount'?: number | null; + /** + * The date and time at which the next payment is due on the `account`. + * @type {string} + * @memberof AccountResponse + */ + 'payment_due_at'?: string | null; + /** + * The payoff balance for a debt `account`. This will normally be a positive number. + * @type {number} + * @memberof AccountResponse + */ + 'payoff_balance'?: number | null; + /** + * The insurance policy\'s premium amount. + * @type {number} + * @memberof AccountResponse + */ + 'premium_amount'?: number | null; + /** + * Subtype if the account type is `PROPERTY`. This field should be ignored unless the type is set to PROPERTY. + * @type {string} + * @memberof AccountResponse + */ + 'property_type'?: AccountResponsePropertyTypeEnum; + /** + * The routing number for the `account`. + * @type {string} + * @memberof AccountResponse + */ + 'routing_number'?: string | null; + /** + * The date on which the loan from a debt account started. + * @type {string} + * @memberof AccountResponse + */ + 'started_on'?: string | null; + /** + * The balance at the end of the account\'s last statement period. + * @type {number} + * @memberof AccountResponse + */ + 'statement_balance'?: number | null; + /** + * The account\'s subtype, for example, `PLAN_401_K`, `MONEY_MARKET`, or `HOME_EQUITY`. Each subtype belongs to an account `type`. For a full list of account subtypes and types, see [Accounts](/api-reference/platform-api/reference/accounts). + * @type {string} + * @memberof AccountResponse + */ + 'subtype'?: string | null; + /** + * The unrealized gain/loss amount for the day for the account. + * @type {number} + * @memberof AccountResponse + */ + 'today_ugl_amount'?: number | null; + /** + * The unrealized gain/loss percentage for the date for the account. + * @type {number} + * @memberof AccountResponse + */ + 'today_ugl_percentage'?: number | null; + /** + * The sum of the long and short positions, the sweep account and/or cash balance, and any margin debt associated with a particular account. This amount includes the market value of all positions held in the account and is reduced by any debit balance and the amount of short options positions that are \"in the money\". This may sum to a negative value, and it does not represent an account balance. + * @type {number} + * @memberof AccountResponse + */ + 'total_account_value'?: number | null; + /** + * The unrealized gains and losses represent the amount the account has gained or lost based on the purchase price. This is calculated by subtracting the purchase price from the current market value. It does not affect the account until the positions are sold and \"realized\". This may sum to a negative value, and it does not represent an account balance. + * @type {number} + * @memberof AccountResponse + */ + 'total_account_value_ugl'?: number | null; + /** + * The type of account. Some account types may include subtypes. + * @type {string} + * @memberof AccountResponse + */ + 'type'?: AccountResponseTypeEnum; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof AccountResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof AccountResponse + */ + 'user_guid'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof AccountResponse + */ + 'user_id'?: string | null; +} + +export const AccountResponseAccountOwnershipEnum = { + Unknown: 'UNKNOWN', + Individual: 'INDIVIDUAL', + Joint: 'JOINT', + Multiple: 'MULTIPLE', + Null: 'null' +} as const; + +export type AccountResponseAccountOwnershipEnum = typeof AccountResponseAccountOwnershipEnum[keyof typeof AccountResponseAccountOwnershipEnum]; +export const AccountResponseFederalInsuranceStatusEnum = { + UnknownInsured: 'UNKNOWN_INSURED', + Insured: 'INSURED', + NotInsured: 'NOT_INSURED' +} as const; + +export type AccountResponseFederalInsuranceStatusEnum = typeof AccountResponseFederalInsuranceStatusEnum[keyof typeof AccountResponseFederalInsuranceStatusEnum]; +export const AccountResponsePropertyTypeEnum = { + Appliances: 'APPLIANCES', + Art: 'ART', + Computer: 'COMPUTER', + Electronics: 'ELECTRONICS', + Furniture: 'FURNITURE', + Jewelry: 'JEWELRY', + Miscellaneous: 'MISCELLANEOUS', + RealEstate: 'REAL_ESTATE', + SportsEquipment: 'SPORTS_EQUIPMENT', + Vehicle: 'VEHICLE' +} as const; + +export type AccountResponsePropertyTypeEnum = typeof AccountResponsePropertyTypeEnum[keyof typeof AccountResponsePropertyTypeEnum]; +export const AccountResponseTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type AccountResponseTypeEnum = typeof AccountResponseTypeEnum[keyof typeof AccountResponseTypeEnum]; + +/** + * + * @export + * @interface AccountResponseBody + */ +export interface AccountResponseBody { + /** + * + * @type {AccountResponse} + * @memberof AccountResponseBody + */ + 'account'?: AccountResponse; +} +/** + * + * @export + * @interface AccountUpdateRequest + */ +export interface AccountUpdateRequest { + /** + * Can only be updated for manual accounts. + * @type {string} + * @memberof AccountUpdateRequest + */ + 'account_subtype'?: string | null; + /** + * The type of account. Some account types may include subtypes. For a full list of account types and subtypes, see [Account Types](/api-reference/platform-api/reference/account-types). + * @type {string} + * @memberof AccountUpdateRequest + */ + 'account_type'?: AccountUpdateRequestAccountTypeEnum; + /** + * Can only be updated for manual accounts. The annual percentage rate associated with the `account`. + * @type {number} + * @memberof AccountUpdateRequest + */ + 'apr'?: number | null; + /** + * Can only be updated for manual accounts. The annual percentage yield associated with the `account`. + * @type {number} + * @memberof AccountUpdateRequest + */ + 'apy'?: number; + /** + * Can only be updated for manual accounts. The balance that is available for use in asset accounts like checking and savings. + * @type {number} + * @memberof AccountUpdateRequest + */ + 'available_balance'?: number; + /** + * Can only be updated for manual accounts. The current balance of the account. + * @type {number} + * @memberof AccountUpdateRequest + */ + 'balance'?: number; + /** + * Can only be updated for manual accounts. The sum of money paid to the policyholder or annuity holder in the event the policy is voluntarily terminated before it matures, or the insured event occurs. + * @type {number} + * @memberof AccountUpdateRequest + */ + 'cash_surrender_value'?: number; + /** + * Can only be updated for manual accounts. The credit limit associated with the `account`. + * @type {number} + * @memberof AccountUpdateRequest + */ + 'credit_limit'?: number | null; + /** + * Can only be updated for manual accounts. The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof AccountUpdateRequest + */ + 'currency_code'?: string | null; + /** + * Can only be updated for manual accounts. The amount paid to the beneficiary of the account upon death of the account owner. + * @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 + */ + 'skip_webhook'?: boolean; +} + +export const AccountUpdateRequestAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type AccountUpdateRequestAccountTypeEnum = typeof AccountUpdateRequestAccountTypeEnum[keyof typeof AccountUpdateRequestAccountTypeEnum]; + +/** + * + * @export + * @interface AccountUpdateRequestBody + */ +export interface AccountUpdateRequestBody { + /** + * + * @type {AccountUpdateRequest} + * @memberof AccountUpdateRequestBody + */ + 'account'?: AccountUpdateRequest; +} +/** + * + * @export + * @interface AccountsMergeRequest + */ +export interface AccountsMergeRequest { + /** + * A list of account GUIDs to merge. Must include at least two GUIDs belonging to the same user. + * @type {Array} + * @memberof AccountsMergeRequest + */ + 'account_guids': Array; +} +/** + * + * @export + * @interface AccountsMergeRequestBody + */ +export interface AccountsMergeRequestBody { + /** + * + * @type {AccountsMergeRequest} + * @memberof AccountsMergeRequestBody + */ + 'account'?: AccountsMergeRequest; +} +/** + * + * @export + * @interface AccountsResponseBody + */ +export interface AccountsResponseBody { + /** + * + * @type {Array} + * @memberof AccountsResponseBody + */ + 'accounts'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof AccountsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface AuthorizationCodeRequest + */ +export interface AuthorizationCodeRequest { + /** + * + * @type {string} + * @memberof AuthorizationCodeRequest + */ + 'scope'?: string | null; +} +/** + * + * @export + * @interface AuthorizationCodeRequestBody + */ +export interface AuthorizationCodeRequestBody { + /** + * + * @type {AuthorizationCodeRequest} + * @memberof AuthorizationCodeRequestBody + */ + 'authorization_code'?: AuthorizationCodeRequest; +} +/** + * + * @export + * @interface AuthorizationCodeResponse + */ +export interface AuthorizationCodeResponse { + /** + * + * @type {string} + * @memberof AuthorizationCodeResponse + */ + 'code'?: string | null; +} +/** + * + * @export + * @interface AuthorizationCodeResponseBody + */ +export interface AuthorizationCodeResponseBody { + /** + * + * @type {AuthorizationCodeResponse} + * @memberof AuthorizationCodeResponseBody + */ + 'authorization_code'?: AuthorizationCodeResponse; +} +/** + * + * @export + * @interface BudgetCreateRequest + */ +export interface BudgetCreateRequest { + /** + * The unique identifier for the category. + * @type {string} + * @memberof BudgetCreateRequest + */ + 'category_guid': string; + /** + * Unique identifier of the parent budget. This is only required when creating a budget on a sub-category. + * @type {string} + * @memberof BudgetCreateRequest + */ + 'parent_guid': string; + /** + * Amount of the budget. + * @type {number} + * @memberof BudgetCreateRequest + */ + 'amount'?: number; + /** + * Additional information you can store on the `budget`. + * @type {string} + * @memberof BudgetCreateRequest + */ + 'metadata'?: string; + /** + * When set to true, this parameter will prevent a webhook from being triggered by the request. + * @type {boolean} + * @memberof BudgetCreateRequest + */ + 'skip_webhook'?: boolean; +} +/** + * + * @export + * @interface BudgetCreateRequestBody + */ +export interface BudgetCreateRequestBody { + /** + * + * @type {BudgetCreateRequest} + * @memberof BudgetCreateRequestBody + */ + 'budget'?: BudgetCreateRequest; +} +/** + * + * @export + * @interface BudgetResponse + */ +export interface BudgetResponse { + /** + * A goal amount set by the user for a category\'s transaction total during a month. + * @type {number} + * @memberof BudgetResponse + */ + 'amount'?: number; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof BudgetResponse + */ + 'category_guid'?: string; + /** + * The date and time the budget was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof BudgetResponse + */ + 'created_at'?: string; + /** + * Unique identifier for the `budget`. Defined by MX. + * @type {string} + * @memberof BudgetResponse + */ + 'guid'?: string; + /** + * If the budget has been exceeded, this field will be true. Otherwise, this field will be false. + * @type {boolean} + * @memberof BudgetResponse + */ + 'is_exceeded'?: boolean; + /** + * If the budget is off track, this field will be true. Otherwise, this field will be false. + * @type {boolean} + * @memberof BudgetResponse + */ + 'is_off_track'?: boolean; + /** + * Additional information you stored about the `budget`. + * @type {string} + * @memberof BudgetResponse + */ + 'metadata'?: string | null; + /** + * The name of the budget that is visible to the user (ie \"Food\", \"Bills\", \"Entertainment\", etc). + * @type {string} + * @memberof BudgetResponse + */ + 'name'?: string | null; + /** + * The percentage amount of off track spending. (Deprecated). + * @type {number} + * @memberof BudgetResponse + */ + 'off_track_percentage'?: number | null; + /** + * Unique identifier for the parent budget. Defined by MX. + * @type {string} + * @memberof BudgetResponse + */ + 'parent_guid'?: string | null; + /** + * The percentage of a budget that has been spent during the current calendar month Calculated as the transaction total divided by the amount and then multiplied by 100.A value of zero will be returned when `amount` is zero. + * @type {number} + * @memberof BudgetResponse + */ + 'percent_spent'?: number | null; + /** + * The projected amount of spending for the budget. + * @type {number} + * @memberof BudgetResponse + */ + 'projected_spending'?: number; + /** + * The revision number of this budget record. + * @type {number} + * @memberof BudgetResponse + */ + 'revision'?: number; + /** + * The cumulative amount of all transactions under the budget. + * @type {any} + * @memberof BudgetResponse + */ + 'transaction_total'?: any; + /** + * Date and time the budget was updated, represented in ISO 8601 format with timestamp. + * @type {any} + * @memberof BudgetResponse + */ + 'updated_at'?: any; + /** + * Unique identifier for the user. Defined by MX. + * @type {any} + * @memberof BudgetResponse + */ + 'user_guid'?: any; +} +/** + * + * @export + * @interface BudgetResponseBody + */ +export interface BudgetResponseBody { + /** + * + * @type {BudgetResponse} + * @memberof BudgetResponseBody + */ + 'budget'?: BudgetResponse; +} +/** + * + * @export + * @interface BudgetUpdateRequest + */ +export interface BudgetUpdateRequest { + /** + * Amount of the budget. + * @type {number} + * @memberof BudgetUpdateRequest + */ + 'amount'?: number; + /** + * Additional information you can store on the `budget`. + * @type {string} + * @memberof BudgetUpdateRequest + */ + 'metadata'?: string; + /** + * When set to true, this parameter will prevent a webhook from being triggered by the request. + * @type {boolean} + * @memberof BudgetUpdateRequest + */ + 'skip_webhook'?: boolean; +} +/** + * + * @export + * @interface BudgetUpdateRequestBody + */ +export interface BudgetUpdateRequestBody { + /** + * + * @type {BudgetUpdateRequest} + * @memberof BudgetUpdateRequestBody + */ + 'budget'?: BudgetUpdateRequest; +} +/** + * + * @export + * @interface CategoriesResponseBody + */ +export interface CategoriesResponseBody { + /** + * + * @type {Array} + * @memberof CategoriesResponseBody + */ + 'categories'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof CategoriesResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface CategoryCreateRequest + */ +export interface CategoryCreateRequest { + /** + * Additional information you can store on the `category`. + * @type {string} + * @memberof CategoryCreateRequest + */ + 'metadata'?: string; + /** + * The name of the category. + * @type {string} + * @memberof CategoryCreateRequest + */ + 'name': string; + /** + * The unique identifier for the parent category. + * @type {string} + * @memberof CategoryCreateRequest + */ + 'parent_guid': string; +} +/** + * + * @export + * @interface CategoryCreateRequestBody + */ +export interface CategoryCreateRequestBody { + /** + * + * @type {CategoryCreateRequest} + * @memberof CategoryCreateRequestBody + */ + 'category'?: CategoryCreateRequest; +} +/** + * + * @export + * @interface CategoryResponse + */ +export interface CategoryResponse { + /** + * The date and time the category was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof CategoryResponse + */ + 'created_at'?: string | null; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof CategoryResponse + */ + 'guid'?: string | null; + /** + * Indicates whether the category is an MX-created default category. This will always be `false` for custom categories. + * @type {boolean} + * @memberof CategoryResponse + */ + 'is_default'?: boolean | null; + /** + * Indicates whether the transaction is income. + * @type {boolean} + * @memberof CategoryResponse + */ + 'is_income'?: boolean | null; + /** + * Additional information you stored on the `category`. + * @type {string} + * @memberof CategoryResponse + */ + 'metadata'?: string | null; + /** + * The name of the category. + * @type {string} + * @memberof CategoryResponse + */ + 'name'?: string | null; + /** + * The unique identifier for the parent category. Defined by MX. + * @type {string} + * @memberof CategoryResponse + */ + 'parent_guid'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof CategoryResponse + */ + 'updated_at'?: string | null; +} +/** + * + * @export + * @interface CategoryResponseBody + */ +export interface CategoryResponseBody { + /** + * + * @type {CategoryResponse} + * @memberof CategoryResponseBody + */ + 'category'?: CategoryResponse; +} +/** + * + * @export + * @interface CategoryUpdateRequest + */ +export interface CategoryUpdateRequest { + /** + * Additional information you can store on the `category`. + * @type {string} + * @memberof CategoryUpdateRequest + */ + 'metadata'?: string; + /** + * The name of the category. + * @type {string} + * @memberof CategoryUpdateRequest + */ + 'name'?: string; +} +/** + * + * @export + * @interface CategoryUpdateRequestBody + */ +export interface CategoryUpdateRequestBody { + /** + * + * @type {CategoryUpdateRequest} + * @memberof CategoryUpdateRequestBody + */ + 'category'?: CategoryUpdateRequest; +} +/** + * + * @export + * @interface ChallengeResponse + */ +export interface ChallengeResponse { + /** + * + * @type {string} + * @memberof ChallengeResponse + */ + 'field_name'?: string | null; + /** + * + * @type {string} + * @memberof ChallengeResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof ChallengeResponse + */ + 'image_data'?: string | null; + /** + * + * @type {Array} + * @memberof ChallengeResponse + */ + 'image_options'?: Array; + /** + * + * @type {string} + * @memberof ChallengeResponse + */ + 'label'?: string | null; + /** + * + * @type {Array} + * @memberof ChallengeResponse + */ + 'options'?: Array; + /** + * + * @type {string} + * @memberof ChallengeResponse + */ + 'type'?: string | null; +} +/** + * + * @export + * @interface ChallengesResponseBody + */ +export interface ChallengesResponseBody { + /** + * + * @type {Array} + * @memberof ChallengesResponseBody + */ + 'challenges'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof ChallengesResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface CredentialRequest + */ +export interface CredentialRequest { + /** + * + * @type {string} + * @memberof CredentialRequest + */ + 'guid'?: string; + /** + * + * @type {string} + * @memberof CredentialRequest + */ + 'value'?: string; +} +/** + * + * @export + * @interface CredentialResponse + */ +export interface CredentialResponse { + /** + * + * @type {number} + * @memberof CredentialResponse + */ + 'display_order'?: number | null; + /** + * + * @type {string} + * @memberof CredentialResponse + */ + 'field_name'?: string | null; + /** + * + * @type {string} + * @memberof CredentialResponse + */ + 'field_type'?: string | null; + /** + * + * @type {string} + * @memberof CredentialResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof CredentialResponse + */ + 'label'?: string | null; + /** + * + * @type {string} + * @memberof CredentialResponse + */ + 'type'?: string | null; +} +/** + * + * @export + * @interface CredentialsResponseBody + */ +export interface CredentialsResponseBody { + /** + * + * @type {Array} + * @memberof CredentialsResponseBody + */ + 'credentials'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof CredentialsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface CreditCardProduct + */ +export interface CreditCardProduct { + /** + * The annual fee associated with the `credit_card_product`. + * @type {number} + * @memberof CreditCardProduct + */ + 'annual_fee'?: number; + /** + * The duration of an introductory rate on balance transfers, given in months. + * @type {number} + * @memberof CreditCardProduct + */ + 'duration_of_introductory_rate_on_balance_transfer'?: number | null; + /** + * + * @type {number} + * @memberof CreditCardProduct + */ + 'duration_of_introductory_rate_on_purchases'?: number | null; + /** + * Unique identifier for the account. Defined by MX. + * @type {string} + * @memberof CreditCardProduct + */ + 'guid'?: string; + /** + * Indicates if the credit card product has cashback rewards. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'has_cashback_rewards'?: boolean; + /** + * This indicates whether the credit card offers a rewards system that is different than standard cashback or travel rewards. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'has_other_rewards'?: boolean; + /** + * This indicates whether the credit card offers travel rewards. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'has_travel_rewards'?: boolean; + /** + * This indicates whether the credit card offers a limited time period where a membership fee is waived. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'has_zero_introductory_annual_fee'?: boolean; + /** + * This indicates whether the credit card offers a zero percent introductory rate. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'has_zero_percent_introductory_rate'?: boolean; + /** + * This indicates that the credit card offers a zero percent rate when transferring a balance from a different credit card. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'has_zero_percent_introductory_rate_on_balance_transfer'?: boolean; + /** + * This indicates whether the financial institution is still accepting applicants for the credit card. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'is_accepting_applicants'?: boolean; + /** + * This indicates whether the credit card is still supported by the financial institution. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'is_active_credit_card_product'?: boolean; + /** + * This indicates whether the credit card is associated with a small business. + * @type {boolean} + * @memberof CreditCardProduct + */ + 'is_small_business_card'?: boolean; + /** + * The name associated with the `credit_card_product`. + * @type {string} + * @memberof CreditCardProduct + */ + 'name'?: string; +} +/** + * + * @export + * @interface CreditCardProductResponse + */ +export interface CreditCardProductResponse { + /** + * + * @type {CreditCardProduct} + * @memberof CreditCardProductResponse + */ + 'credit_card_product'?: CreditCardProduct; +} +/** + * Contains a products array that specifies the products you want to aggregate. + * @export + * @interface DataRequest + */ +export interface DataRequest { + /** + * Contains the products you want to aggregate upon a successful connection. For accepted products, see [Defining Products](/products/connectivity/overview/intro-to-unified-product-ordering/#defining-products). + * @type {Array} + * @memberof DataRequest + */ + 'products': Array; +} +/** + * Enables direct deposit within the Actionable Integration Widget. + * @export + * @interface DeepLinkParams + */ +export interface DeepLinkParams { + /** + * Launches a deep link integration. Valid value is `direct-deposit`. + * @type {string} + * @memberof DeepLinkParams + */ + 'launch_integration'?: string; +} +/** + * + * @export + * @interface EnhanceTransactionResponse + */ +export interface EnhanceTransactionResponse { + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof EnhanceTransactionResponse + */ + 'amount'?: number | null; + /** + * The method used to determine the category assigned to the transaction. + * @type {number} + * @memberof EnhanceTransactionResponse + */ + 'categorized_by'?: number | null; + /** + * The category of the `transaction`. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'category'?: string | null; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'category_guid'?: string | null; + /** + * The method used to describe the `transaction`. + * @type {number} + * @memberof EnhanceTransactionResponse + */ + 'described_by'?: number | null; + /** + * A human-readable version of the `original_description` field. This is provided by the MX Platform. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'description'?: string | null; + /** + * The transaction type assigned by the partner. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'extended_transaction_type'?: string | null; + /** + * The unique partner-defined identifier for the transaction. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'id'?: string | null; + /** + * Indicates whether the transaction is a bill payment. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_bill_pay'?: boolean | null; + /** + * Indicates whether the transaction is a direct deposit. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_direct_deposit'?: boolean | null; + /** + * Indicates whether the transaction is an expense. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_expense'?: boolean | null; + /** + * Indicates whether the transaction is a fee. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_fee'?: boolean | null; + /** + * Indicates whether the transaction is income. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_income'?: boolean | null; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_international'?: boolean; + /** + * Indicates whether the transaction is an overdraft fee. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_overdraft_fee'?: boolean | null; + /** + * Indicates whether the transaction is a payroll advance. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_payroll_advance'?: boolean | null; + /** + * Indicates whether the transaction is a subscription payment. + * @type {boolean} + * @memberof EnhanceTransactionResponse + */ + 'is_subscription'?: boolean | null; + /** + * This field contains additional descriptive information about the `transaction`. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'memo'?: string | null; + /** + * The ISO 18245 category code for the `transaction`. + * @type {number} + * @memberof EnhanceTransactionResponse + */ + 'merchant_category_code'?: number | null; + /** + * The unique identifier for the merchant associated with this `transaction`. Defined by MX. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'merchant_guid'?: string | null; + /** + * The unique identifier for the `merchant_location` associated with this `transaction`. Defined by MX. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'merchant_location_guid'?: string | null; + /** + * The original description of the `transaction` as provided by our data feed. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'original_description'?: string | null; + /** + * The unique identifier for the `top_level_category` associated with this `transaction`. Defined by MX. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'top_level_category_guid'?: string | null; + /** + * The type of transaction. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'type'?: EnhanceTransactionResponseTypeEnum; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof EnhanceTransactionResponse + */ + 'user_guid'?: string | null; +} + +export const EnhanceTransactionResponseTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type EnhanceTransactionResponseTypeEnum = typeof EnhanceTransactionResponseTypeEnum[keyof typeof EnhanceTransactionResponseTypeEnum]; + +/** + * + * @export + * @interface EnhanceTransactionsRequest + */ +export interface EnhanceTransactionsRequest { + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof EnhanceTransactionsRequest + */ + 'amount'?: number | null; + /** + * The description of the `transaction` to be enhanced. + * @type {string} + * @memberof EnhanceTransactionsRequest + */ + 'description': string; + /** + * The transaction type assigned by the partner. + * @type {string} + * @memberof EnhanceTransactionsRequest + */ + 'extended_transaction_type'?: string; + /** + * The unique partner-defined identifier for the `transaction`. + * @type {string} + * @memberof EnhanceTransactionsRequest + */ + 'id': string; + /** + * This field contains additional descriptive information about the `transaction`. + * @type {string} + * @memberof EnhanceTransactionsRequest + */ + 'memo'?: string; + /** + * The ISO 18245 category code for the `transaction`. + * @type {number} + * @memberof EnhanceTransactionsRequest + */ + 'merchant_category_code'?: number; + /** + * The type of transaction. Can be either `CREDIT` or `DEBIT`. + * @type {string} + * @memberof EnhanceTransactionsRequest + */ + 'type'?: EnhanceTransactionsRequestTypeEnum; +} + +export const EnhanceTransactionsRequestTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type EnhanceTransactionsRequestTypeEnum = typeof EnhanceTransactionsRequestTypeEnum[keyof typeof EnhanceTransactionsRequestTypeEnum]; + +/** + * + * @export + * @interface EnhanceTransactionsRequestBody + */ +export interface EnhanceTransactionsRequestBody { + /** + * + * @type {Array} + * @memberof EnhanceTransactionsRequestBody + */ + 'transactions'?: Array; +} +/** + * + * @export + * @interface EnhanceTransactionsResponseBody + */ +export interface EnhanceTransactionsResponseBody { + /** + * + * @type {Array} + * @memberof EnhanceTransactionsResponseBody + */ + 'transactions'?: Array; +} +/** + * + * @export + * @interface GoalRequest + */ +export interface GoalRequest { + /** + * The unique identifier for an account. + * @type {string} + * @memberof GoalRequest + */ + 'account_guid': string; + /** + * The amount of the `goal`. + * @type {number} + * @memberof GoalRequest + */ + 'amount': number; + /** + * The type of goal. Can be `SAVE_AMOUNT` or `PAYOFF`. + * @type {string} + * @memberof GoalRequest + */ + 'goal_type_name': GoalRequestGoalTypeNameEnum; + /** + * The category of the `goal`. + * @type {string} + * @memberof GoalRequest + */ + 'meta_type_name': string; + /** + * The name of the `goal`. + * @type {string} + * @memberof GoalRequest + */ + 'name': string; + /** + * Date and time the `goal` was completed, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof GoalRequest + */ + 'completed_at'?: string; + /** + * Determines if the `goal` has been spent. + * @type {boolean} + * @memberof GoalRequest + */ + 'has_been_spent'?: boolean; + /** + * Determines if the `goal` is complete. + * @type {boolean} + * @memberof GoalRequest + */ + 'is_complete'?: boolean; + /** + * Additional information you can store about the `goal`. + * @type {string} + * @memberof GoalRequest + */ + 'metadata'?: string; + /** + * The priority of the goal in relation to multiple goals. + * @type {number} + * @memberof GoalRequest + */ + 'position'?: number; + /** + * Date and time the `goal` is to complete. Intended for users to set their own goal completion dates. + * @type {string} + * @memberof GoalRequest + */ + 'targeted_to_complete_at'?: string; +} + +export const GoalRequestGoalTypeNameEnum = { + SaveAmount: 'SAVE_AMOUNT', + Payoff: 'PAYOFF' +} as const; + +export type GoalRequestGoalTypeNameEnum = typeof GoalRequestGoalTypeNameEnum[keyof typeof GoalRequestGoalTypeNameEnum]; + +/** + * + * @export + * @interface GoalRequestBody + */ +export interface GoalRequestBody { + /** + * + * @type {GoalRequest} + * @memberof GoalRequestBody + */ + 'goal'?: GoalRequest; +} +/** + * + * @export + * @interface GoalResponse + */ +export interface GoalResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof GoalResponse + */ + 'account_guid'?: string; + /** + * The amount of the `goal`. + * @type {number} + * @memberof GoalResponse + */ + 'amount'?: number; + /** + * Date and time the `goal` was completed, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof GoalResponse + */ + 'completed_at'?: string; + /** + * The current amount of the `goal`. + * @type {number} + * @memberof GoalResponse + */ + 'current_amount'?: number; + /** + * The type of goal. + * @type {string} + * @memberof GoalResponse + */ + 'goal_type_name'?: GoalResponseGoalTypeNameEnum; + /** + * Unique identifier for the goal. Defined by MX. + * @type {string} + * @memberof GoalResponse + */ + 'guid'?: string; + /** + * Determines if the goal has been spent. + * @type {boolean} + * @memberof GoalResponse + */ + 'has_been_spent'?: boolean; + /** + * Determines if the goal is complete. + * @type {boolean} + * @memberof GoalResponse + */ + 'is_complete'?: boolean; + /** + * Additional information you stored about the `goal`. + * @type {string} + * @memberof GoalResponse + */ + 'metadata'?: string; + /** + * The category of the `goal`. + * @type {string} + * @memberof GoalResponse + */ + 'meta_type_name'?: string; + /** + * The name of the `goal`. + * @type {string} + * @memberof GoalResponse + */ + 'name'?: string; + /** + * The priority of the `goal` in relation to multiple goals. + * @type {number} + * @memberof GoalResponse + */ + 'position'?: number; + /** + * Date and time the `goal` is projected to be completed. + * @type {string} + * @memberof GoalResponse + */ + 'projected_to_complete_at'?: string; + /** + * Date and time the `goal` is to complete. Intended for users to set their own goal completion dates. + * @type {string} + * @memberof GoalResponse + */ + 'targeted_to_complete_at'?: string; + /** + * The track of the `goal`. + * @type {string} + * @memberof GoalResponse + */ + 'track_type_name'?: GoalResponseTrackTypeNameEnum; + /** + * The unique identifier for the the user. Defined by MX. + * @type {string} + * @memberof GoalResponse + */ + 'user_guid'?: string; +} + +export const GoalResponseGoalTypeNameEnum = { + SaveAmount: 'SAVE_AMOUNT', + Payoff: 'PAYOFF' +} as const; + +export type GoalResponseGoalTypeNameEnum = typeof GoalResponseGoalTypeNameEnum[keyof typeof GoalResponseGoalTypeNameEnum]; +export const GoalResponseTrackTypeNameEnum = { + DebtTrack: 'DEBT_TRACK', + SavingsTrack: 'SAVINGS_TRACK', + RetirementTrack: 'RETIREMENT_TRACK', + EmergencyFundTrack: 'EMERGENCY_FUND_TRACK' +} as const; + +export type GoalResponseTrackTypeNameEnum = typeof GoalResponseTrackTypeNameEnum[keyof typeof GoalResponseTrackTypeNameEnum]; + +/** + * + * @export + * @interface GoalResponseBody + */ +export interface GoalResponseBody { + /** + * + * @type {GoalResponse} + * @memberof GoalResponseBody + */ + 'goal'?: GoalResponse; +} +/** + * + * @export + * @interface GoalsResponse + */ +export interface GoalsResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof GoalsResponse + */ + 'account_guid'?: string; + /** + * The amount of the `goal`. + * @type {number} + * @memberof GoalsResponse + */ + 'amount'?: number; + /** + * The current amount of the `goal`. + * @type {number} + * @memberof GoalsResponse + */ + 'current_amount'?: number; + /** + * The unique identifier for the goal. Defined by MX. + * @type {string} + * @memberof GoalsResponse + */ + 'guid'?: string; + /** + * The type of goal. + * @type {string} + * @memberof GoalsResponse + */ + 'goal_type_name'?: GoalsResponseGoalTypeNameEnum; + /** + * The category of the goal. + * @type {string} + * @memberof GoalsResponse + */ + 'meta_type_name'?: string; + /** + * The name of the goal. + * @type {string} + * @memberof GoalsResponse + */ + 'name'?: string; + /** + * Date and time the `goal` was completed, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof GoalsResponse + */ + 'completed_at'?: string; + /** + * Determines if the goal has been spent. + * @type {boolean} + * @memberof GoalsResponse + */ + 'has_been_spent'?: boolean; + /** + * Determines if the goal is complete. + * @type {boolean} + * @memberof GoalsResponse + */ + 'is_complete'?: boolean; + /** + * Additional information you stored about the `goal`. + * @type {string} + * @memberof GoalsResponse + */ + 'metadata'?: string; + /** + * The priority of the goal in relation to multiple goals. + * @type {number} + * @memberof GoalsResponse + */ + 'position'?: number; + /** + * The date on which the project was completed. + * @type {string} + * @memberof GoalsResponse + */ + 'projected_to_complete_at'?: string; + /** + * Date and time the goal is to complete, represented in ISO 8601 format with timestamp. Intended for users to set their own goal completion dates. + * @type {string} + * @memberof GoalsResponse + */ + 'targeted_to_complete_at'?: string; + /** + * The track of the goal. + * @type {string} + * @memberof GoalsResponse + */ + 'track_type_name'?: GoalsResponseTrackTypeNameEnum; + /** + * The unique identifier for the the user. Defined by MX. + * @type {string} + * @memberof GoalsResponse + */ + 'user_guid'?: string; +} + +export const GoalsResponseGoalTypeNameEnum = { + SaveAmount: 'SAVE_AMOUNT', + Payoff: 'PAYOFF' +} as const; + +export type GoalsResponseGoalTypeNameEnum = typeof GoalsResponseGoalTypeNameEnum[keyof typeof GoalsResponseGoalTypeNameEnum]; +export const GoalsResponseTrackTypeNameEnum = { + DebtTrack: 'DEBT_TRACK', + SavingsTrack: 'SAVINGS_TRACK', + RetirementTrack: 'RETIREMENT_TRACK', + EmergencyFundTrack: 'EMERGENCY_FUND_TRACK' +} as const; + +export type GoalsResponseTrackTypeNameEnum = typeof GoalsResponseTrackTypeNameEnum[keyof typeof GoalsResponseTrackTypeNameEnum]; + +/** + * + * @export + * @interface GoalsResponseBody + */ +export interface GoalsResponseBody { + /** + * + * @type {Array} + * @memberof GoalsResponseBody + */ + 'goals'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof GoalsResponseBody + */ + '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 + */ + 'label'?: string | null; + /** + * + * @type {string} + * @memberof ImageOptionResponse + */ + 'value'?: string | null; +} +/** + * + * @export + * @interface InsightResponse + */ +export interface InsightResponse { + /** + * The date and time when the insight was activated, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof InsightResponse + */ + 'active_at'?: string | null; + /** + * The unique identifier for the client associated with the insight. Defined by MX. + * @type {string} + * @memberof InsightResponse + */ + 'client_guid'?: string; + /** + * The date and time the insight was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof InsightResponse + */ + 'created_at'?: string | null; + /** + * The date and time when a call-to-action was clicked, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof InsightResponse + */ + 'cta_clicked_at'?: string | null; + /** + * The human-readable information being delivered to the end user. + * @type {string} + * @memberof InsightResponse + */ + 'description'?: string | null; + /** + * The unique identifier for the `insight`. Defined by MX. + * @type {string} + * @memberof InsightResponse + */ + 'guid'?: string | null; + /** + * Indicates whether there are accounts associated with the insight. + * @type {boolean} + * @memberof InsightResponse + */ + 'has_associated_accounts'?: boolean | null; + /** + * Indicates whether there are categories associated with the insight. + * @type {boolean} + * @memberof InsightResponse + */ + 'has_associated_categories'?: boolean | null; + /** + * Indicates whether there are merchants associated with the insight. + * @type {boolean} + * @memberof InsightResponse + */ + 'has_associated_merchants'?: boolean | null; + /** + * Indicates whether there are scheduled payments associated with the insight. + * @type {boolean} + * @memberof InsightResponse + */ + 'has_associated_scheduled_payments'?: boolean | null; + /** + * Indicates whether there are transactions associated with the insight. + * @type {boolean} + * @memberof InsightResponse + */ + 'has_associated_transactions'?: boolean | null; + /** + * Indicates whether the insight has been shown to the end user. + * @type {boolean} + * @memberof InsightResponse + */ + 'has_been_displayed'?: boolean | null; + /** + * Indicates whether the insight has been dismissed by the user. + * @type {boolean} + * @memberof InsightResponse + */ + 'is_dismissed'?: boolean | null; + /** + * A short call-to-action text for prompting user engagement. + * @type {string} + * @memberof InsightResponse + */ + 'micro_call_to_action'?: string | null; + /** + * A condensed description of the insight. + * @type {string} + * @memberof InsightResponse + */ + 'micro_description'?: string | null; + /** + * A shorter version of title. For example, `Price Increase` or `Paycheck Deposit`. + * @type {string} + * @memberof InsightResponse + */ + 'micro_title'?: string | null; + /** + * A short label for the type of `insight` being delivered, for example, `SubscriptionPriceIncrease` or `MonthlyCategoryTotal`. + * @type {string} + * @memberof InsightResponse + */ + 'template'?: string | null; + /** + * The title for the specific `insight`, for example, `Price Increase` or `Paycheck Deposit`. + * @type {string} + * @memberof InsightResponse + */ + 'title'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof InsightResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof InsightResponse + */ + 'user_guid'?: string; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof InsightResponse + */ + 'user_id'?: string; +} +/** + * + * @export + * @interface InsightResponseBody + */ +export interface InsightResponseBody { + /** + * + * @type {InsightResponse} + * @memberof InsightResponseBody + */ + 'insight'?: InsightResponse; +} +/** + * + * @export + * @interface InsightUpdateRequest + */ +export interface InsightUpdateRequest { + /** + * Indicates whether the insight has been shown to the end user. + * @type {boolean} + * @memberof InsightUpdateRequest + */ + 'has_been_displayed'?: boolean; + /** + * Indicates whether the insight has been dismissed by the user. + * @type {boolean} + * @memberof InsightUpdateRequest + */ + 'is_dismissed'?: boolean; +} +/** + * + * @export + * @interface InsightUpdateRequestBody + */ +export interface InsightUpdateRequestBody { + /** + * + * @type {InsightUpdateRequest} + * @memberof InsightUpdateRequestBody + */ + 'insight'?: InsightUpdateRequest; +} +/** + * + * @export + * @interface InsightsResponseBody + */ +export interface InsightsResponseBody { + /** + * + * @type {Array} + * @memberof InsightsResponseBody + */ + 'insights'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof InsightsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface InstitutionResponse + */ +export interface InstitutionResponse { + /** + * The code identifying a financial institution. + * @type {string} + * @memberof InstitutionResponse + */ + 'code'?: string | null; + /** + * The date and time the institution was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof InstitutionResponse + */ + 'created_at'?: string; + /** + * URL for the forgot password page of the institution. + * @type {string} + * @memberof InstitutionResponse + */ + 'forgot_password_url'?: string | null; + /** + * URL for the forgot username page of the institution. + * @type {string} + * @memberof InstitutionResponse + */ + 'forgot_username_url'?: string | null; + /** + * The unique identifier for the institution. Defined by MX. + * @type {string} + * @memberof InstitutionResponse + */ + 'guid'?: string; + /** + * Render this text when end users are asked for their credentials, as it helps end users provide the correct credentials when creating a new member. May contain `` tags to link to explanatory material. + * @type {string} + * @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; + /** + * Indicates whether the institution is disabled by the client. + * @type {boolean} + * @memberof InstitutionResponse + */ + 'is_disabled_by_client'?: boolean | null; + /** + * If the institution is available for creating new member connections, this field will be `false`. Otherwise, this field will be `true`. + * @type {boolean} + * @memberof InstitutionResponse + */ + 'is_hidden'?: boolean; + /** + * The ISO country code associated with the institution. + * @type {string} + * @memberof InstitutionResponse + */ + 'iso_country_code'?: InstitutionResponseIsoCountryCodeEnum; + /** + * The URL for a 100px X 100px logo for each `institution`. A generic logo is returned for institutions that don\'t have one. + * @type {string} + * @memberof InstitutionResponse + */ + 'medium_logo_url'?: string | null; + /** + * The name of the institution. + * @type {string} + * @memberof InstitutionResponse + */ + 'name'?: string | null; + /** + * The URL for a 50px X 50px logo for each `institution`. A generic logo is returned for institutions that don\'t have one. + * @type {string} + * @memberof InstitutionResponse + */ + 'small_logo_url'?: string | null; + /** + * + * @type {Array} + * @memberof InstitutionResponse + */ + 'supported_products'?: Array; + /** + * If true, this indicates that the institution supports OAuth and that you have been properly registered for OAuth with that institution. + * @type {boolean} + * @memberof InstitutionResponse + */ + 'supports_oauth'?: boolean | null; + /** + * This indicates whether the institution supports tax documents. + * @type {boolean} + * @memberof InstitutionResponse + */ + 'supports_tax_document'?: boolean | null; + /** + * The URL of the institution for helping users troubleshoot any other sign-in issue. + * @type {string} + * @memberof InstitutionResponse + */ + 'trouble_signing_in_url'?: string | null; + /** + * The URL for an institution\'s website. + * @type {string} + * @memberof InstitutionResponse + */ + 'url'?: string | null; +} + +export const InstitutionResponseIsoCountryCodeEnum = { + Us: 'US', + Ca: 'CA' +} as const; + +export type InstitutionResponseIsoCountryCodeEnum = typeof InstitutionResponseIsoCountryCodeEnum[keyof typeof InstitutionResponseIsoCountryCodeEnum]; + +/** + * + * @export + * @interface InstitutionResponseBody + */ +export interface InstitutionResponseBody { + /** + * + * @type {InstitutionResponse} + * @memberof InstitutionResponseBody + */ + 'institution'?: InstitutionResponse; +} +/** + * + * @export + * @interface InstitutionsResponseBody + */ +export interface InstitutionsResponseBody { + /** + * + * @type {Array} + * @memberof InstitutionsResponseBody + */ + 'institutions'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof InstitutionsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface InvestmentHoldingResponse + */ +export interface InvestmentHoldingResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'account_guid'?: string; + /** + * The original value of an asset for tax purposes, usually the purchase price, used to calculate capital gains or losses. Accumulated price. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'cost_basis'?: number | null; + /** + * The rate of return the bonds coupon rate generates. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'coupon_yield'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'currency_code'?: string | null; + /** + * The present market price of a single unit of the holding (for example, stock price per share). + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'current_price'?: number | null; + /** + * The daily change in the `current_price` of the holding since the previous trading day. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'daily_change'?: number | null; + /** + * A brief description of the holding, such as the company name for stocks or the bond type for bonds. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'description'?: string | null; + /** + * The expiration date associated with the holding. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'expiration'?: string | null; + /** + * The nominal value of a bond or fixed-income security, paid to the holder at maturity. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'face_value'?: number | null; + /** + * The frequency of the interest paid on the bond (i.e. Annually, Monthly, etc.) + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'frequency'?: string | null; + /** + * The unique identifier for the holding. Defined by MX. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'guid'?: string | null; + /** + * The current market value of the holding, calculated as the current price times the number of units (shares) owned. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'market_value'?: number | null; + /** + * The maturity date associated with the holding. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'maturity_date'?: string | null; + /** + * The percent change in the `current_price` of the holding compared to a previous time period. It is the percentage change that reflects the `daily_change`. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'percentage_change'?: number | null; + /** + * The average price paid for the holding. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'purchase_price'?: number | null; + /** + * The number of units of the holding owned (for example, number of shares of stock). + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'quantity'?: string | null; + /** + * The interest on the bond, subject to determining the payout amount of the bond. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'rate'?: number | null; + /** + * The strike price associated to the option. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'strike_price'?: number | null; + /** + * The ticker symbol or unique identifier of the holding, used in stock exchanges. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'symbol'?: string | null; + /** + * The length of time until the bond\'s principal amount is due to be repaid. It is the period from when the bond is issued until it reaches its maturity date. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'term'?: string | null; + /** + * The unrealized gain/loss amount for today. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'today_ugl_amount'?: number | null; + /** + * The unrealized gain/loss percentage for today. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'today_ugl_percentage'?: number | null; + /** + * The total unrealized gain/loss amount for an investment. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'total_ugl_amount'?: number | null; + /** + * The total unrealized gain/loss for the holding since it was acquired. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'total_ugl_percentage'?: number | null; + /** + * The number of units (for example, shares) of the holding that are not yet vested or owned outright by the holder. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'unvested_quantity'?: number | null; + /** + * The value of the portion of the holding that is unvested. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'unvested_value'?: number | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'user_guid'?: string | null; + /** + * The number of units (for example, shares) of the holding that are vested and fully owned by the holder. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'vested_quantity'?: number | null; + /** + * The value of the portion of the holding that is vested and fully owned by the holder. + * @type {number} + * @memberof InvestmentHoldingResponse + */ + 'vested_value'?: number | null; + /** + * The date and time the investment holding was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'created_at'?: string | null; + /** + * The date and time when the current price was last updated, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'current_price_as_of'?: string | null; + /** + * The date on which a security was issued or made available for sale. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'issue_date'?: string | null; + /** + * The date from which the vesting schedule for a holding begins. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'vesting_start_date'?: string | null; + /** + * The date from which the vesting schedule for a holding ends. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'vesting_end_date'?: string | null; + /** + * States whether the option is a `PUT` or `CALL`. + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'put_or_call'?: string | null; + /** + * The type of investment (e.g., equity, fixed income, mutual fund, etc.) + * @type {string} + * @memberof InvestmentHoldingResponse + */ + 'holding_type'?: string | null; + /** + * The unit type of the term associated to the bond. (Year, Month, etc.) + * @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 { + /** + * The account number associated with the account. This will typically be a masked or partial account number. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'account_number'?: string; + /** + * The annual percentage rate associated with the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'apr'?: number; + /** + * The annual percentage yield associated with the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'apy'?: number; + /** + * The balance that is available for use in asset accounts like checking and savings. `PENDING` transactions are typically (not always) taken into account with the available balance. `available_balance` will usually be a positive value for all account types, determined in the same way as the balance field. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'available_balance'?: number; + /** + * The amount of credit available for use in liability accounts like credit cards and lines of credit. `PENDING` transactions are typically (not always) taken into account with available credit. `available_credit` will usually be a positive value for all account types, determined in the same way as the `balance` field. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'available_credit'?: number | null; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'balance': number; + /** + * Can only be updated for manual accounts. The sum of money paid to the policyholder or annuity holder in the event the policy is voluntarily terminated before it matures, or the insured event occurs. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'cash_surrender_value'?: number; + /** + * The credit limit associated with the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'credit_limit'?: number; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'currency_code'?: string | null; + /** + * The day of the month the payment is due. For example, the 14th is passed as `14`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'day_payment_is_due'?: number | null; + /** + * The amount paid to the beneficiary of the account upon death of the account owner. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'death_benefit'?: number; + /** + * The unique partner-defined identifier for the account. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'id': string; + /** + * The interest rate associated with the account. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'interest_rate'?: number; + /** + * Indicates whether an account has been closed. Closed accounts will no longer update balance or transaction information. + * @type {boolean} + * @memberof ManagedAccountCreateRequest + */ + 'is_closed'?: boolean; + /** + * Indicates whether the account is hidden. Hidden accounts can still have an active balance and receive transactions. Defaults to `false`. + * @type {boolean} + * @memberof ManagedAccountCreateRequest + */ + 'is_hidden'?: boolean; + /** + * The amount of the most recent payment on the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'last_payment'?: number; + /** + * The date and time when the last payment was made, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'last_payment_at'?: string; + /** + * The amount of the loan associated with the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'loan_amount'?: number; + /** + * The date on which the `account` matures. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'matures_on'?: string; + /** + * Additional information you can store about the `account`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'metadata'?: string; + /** + * The minimum balance associated with the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'minimum_balance'?: number; + /** + * The minimum payment required for an account. This can apply to any debt account. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'minimum_payment'?: number; + /** + * The name of the account. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'name': string; + /** + * An alternate name for the `account`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'nickname'?: string; + /** + * The original balance associated with the `account`. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'original_balance'?: number; + /** + * The date and time at which the next payment is due on the `account`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'payment_due_at'?: string; + /** + * The payoff balance for a debt account. This will normally be a positive number. + * @type {number} + * @memberof ManagedAccountCreateRequest + */ + 'payoff_balance'?: number; + /** + * The routing number for the `account`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'routing_number'?: string; + /** + * The date on which the loan from a debt account started. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'started_on'?: string; + /** + * The account\'s subtype, e.g., `PLAN_401_K`, `MONEY_MARKET`, or `HOME_EQUITY`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'subtype'?: string; + /** + * The general or parent type of the `account`. + * @type {string} + * @memberof ManagedAccountCreateRequest + */ + 'type': string; +} +/** + * + * @export + * @interface ManagedAccountCreateRequestBody + */ +export interface ManagedAccountCreateRequestBody { + /** + * + * @type {ManagedAccountCreateRequest} + * @memberof ManagedAccountCreateRequestBody + */ + 'account'?: ManagedAccountCreateRequest; +} +/** + * + * @export + * @interface ManagedAccountUpdateRequest + */ +export interface ManagedAccountUpdateRequest { + /** + * The account number associated with the account. This will typically be a masked or partial account number. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'account_number'?: string; + /** + * The annual percentage rate associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'apr'?: number; + /** + * The annual percentage yield associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'apy'?: number; + /** + * The balance that is available for use in asset accounts like checking and savings. `PENDING` transactions are typically (not always) taken into account with the available balance. `available_balance` will usually be a positive value for all account types, determined in the same way as the balance field. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'available_balance'?: number; + /** + * The amount of credit available for use in liability accounts like credit cards and lines of credit. `PENDING` transactions are typically (not always) taken into account with available credit. `available_credit` will usually be a positive value for all account types, determined in the same way as the `balance` field. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'available_credit'?: number | null; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'balance'?: number | null; + /** + * Can only be updated for manual accounts. The sum of money paid to the policyholder or annuity holder in the event the policy is voluntarily terminated before it matures, or the insured event occurs. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'cash_surrender_value'?: number; + /** + * The credit limit associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'credit_limit'?: number; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'currency_code'?: string | null; + /** + * The day of the month the payment is due. For example, the 14th is passed as `14`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'day_payment_is_due'?: number | null; + /** + * The amount paid to the beneficiary of the account upon death of the account owner. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'death_benefit'?: number; + /** + * The unique partner-defined identifier for the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'id'?: string; + /** + * The interest rate associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'interest_rate'?: number; + /** + * Indicates whether an account has been closed. Closed accounts will no longer update balance or transaction information. + * @type {boolean} + * @memberof ManagedAccountUpdateRequest + */ + 'is_closed'?: boolean; + /** + * Indicates whether the account is hidden. Hidden accounts can still have an active balance and receive transactions. Defaults to `false`. + * @type {boolean} + * @memberof ManagedAccountUpdateRequest + */ + 'is_hidden'?: boolean; + /** + * The amount of the most recent payment on the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'last_payment'?: number; + /** + * The date and time when the last payment was made, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'last_payment_at'?: string; + /** + * The amount of the loan associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'loan_amount'?: number; + /** + * The date on which the `account` matures. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'matures_on'?: string; + /** + * Additional information you can store about the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'metadata'?: string; + /** + * The minimum balance associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'minimum_balance'?: number; + /** + * The minimum payment required for an `account`. This can apply to any debt `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'minimum_payment'?: number; + /** + * The name of the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'name'?: string; + /** + * A short, informal name for the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'nickname'?: string; + /** + * The original balance associated with the `account`. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'original_balance'?: number; + /** + * The date and time at which the next payment is due on the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'payment_due_at'?: string; + /** + * The payoff balance for a debt account. This will normally be a positive number. + * @type {number} + * @memberof ManagedAccountUpdateRequest + */ + 'payoff_balance'?: number; + /** + * The routing number for the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'routing_number'?: string; + /** + * The date on which the loan from a debt account started. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'started_on'?: string; + /** + * The account\'s subtype, e.g., `PLAN_401_K`, `MONEY_MARKET`, or `HOME_EQUITY`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'subtype'?: string; + /** + * The general or parent type of the `account`. + * @type {string} + * @memberof ManagedAccountUpdateRequest + */ + 'type'?: string; +} +/** + * + * @export + * @interface ManagedAccountUpdateRequestBody + */ +export interface ManagedAccountUpdateRequestBody { + /** + * + * @type {ManagedAccountUpdateRequest} + * @memberof ManagedAccountUpdateRequestBody + */ + 'account'?: ManagedAccountUpdateRequest; +} +/** + * + * @export + * @interface ManagedMemberCreateRequest + */ +export interface ManagedMemberCreateRequest { + /** + * The unique partner-defined identifier for the member. + * @type {string} + * @memberof ManagedMemberCreateRequest + */ + 'id'?: string; + /** + * The code identifying a financial institution. + * @type {string} + * @memberof ManagedMemberCreateRequest + */ + 'institution_code': string; + /** + * Additional information you can store about the `member`. + * @type {string} + * @memberof ManagedMemberCreateRequest + */ + 'metadata'?: string; + /** + * The name of the `member`. + * @type {string} + * @memberof ManagedMemberCreateRequest + */ + 'name'?: string; +} +/** + * + * @export + * @interface ManagedMemberCreateRequestBody + */ +export interface ManagedMemberCreateRequestBody { + /** + * + * @type {ManagedMemberCreateRequest} + * @memberof ManagedMemberCreateRequestBody + */ + 'member'?: ManagedMemberCreateRequest; +} +/** + * + * @export + * @interface ManagedMemberUpdateRequest + */ +export interface ManagedMemberUpdateRequest { + /** + * The unique partner-defined identifier for the member. + * @type {string} + * @memberof ManagedMemberUpdateRequest + */ + 'id'?: string; + /** + * Additional information you can store about the `member`. + * @type {string} + * @memberof ManagedMemberUpdateRequest + */ + 'metadata'?: string; + /** + * The name of the `member`. + * @type {string} + * @memberof ManagedMemberUpdateRequest + */ + 'name'?: string; +} +/** + * + * @export + * @interface ManagedMemberUpdateRequestBody + */ +export interface ManagedMemberUpdateRequestBody { + /** + * + * @type {ManagedMemberUpdateRequest} + * @memberof ManagedMemberUpdateRequestBody + */ + 'member'?: ManagedMemberUpdateRequest; +} +/** + * + * @export + * @interface ManagedTransactionCreateRequest + */ +export interface ManagedTransactionCreateRequest { + /** + * The monetary amount of the `transaction`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'amount': string; + /** + * The category of the `transaction`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'category'?: string | null; + /** + * The check number for the `transaction`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'check_number_string'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'currency_code'?: string | null; + /** + * A human-readable description of the transaction. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'description': string; + /** + * The unique partner-defined identifier for the `transaction`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'id'?: string; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof ManagedTransactionCreateRequest + */ + 'is_international'?: boolean; + /** + * The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s latitude is -22.9027800 and Tokyo\'s latitude is 35.689488). + * @type {number} + * @memberof ManagedTransactionCreateRequest + */ + 'latitude'?: number; + /** + * A human-readable description of the transaction, provided in a local language. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'localized_description'?: string; + /** + * Additional descriptive information about the transaction, provided in a local language. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'localized_memo'?: string; + /** + * The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s longitude is -43.2075000 and Tokyo\'s longitude is 139.691706). + * @type {number} + * @memberof ManagedTransactionCreateRequest + */ + 'longitude'?: number; + /** + * A human-readable note about the transaction. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'memo'?: string; + /** + * The ISO 18245 category code for the transaction. + * @type {number} + * @memberof ManagedTransactionCreateRequest + */ + 'merchant_category_code'?: number; + /** + * The unique identifier for the `merchant`. Defined by MX. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'merchant_guid'?: string; + /** + * The unique identifier for the `merchant_location`. Defined by MX. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'merchant_location_guid'?: string; + /** + * Additional information you can store about the `transaction`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'metadata'?: string; + /** + * The date and time the transaction was posted to the account. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'posted_at': string; + /** + * The status of the transaction. Can be either `POSTED` or `PENDING`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'status': ManagedTransactionCreateRequestStatusEnum; + /** + * The date and time the transaction took place. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'transacted_at': string; + /** + * The type of transaction. Can be either `CREDIT` or `DEBIT`. + * @type {string} + * @memberof ManagedTransactionCreateRequest + */ + 'type': ManagedTransactionCreateRequestTypeEnum; +} + +export const ManagedTransactionCreateRequestStatusEnum = { + Posted: 'POSTED', + Pending: 'PENDING' +} as const; + +export type ManagedTransactionCreateRequestStatusEnum = typeof ManagedTransactionCreateRequestStatusEnum[keyof typeof ManagedTransactionCreateRequestStatusEnum]; +export const ManagedTransactionCreateRequestTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type ManagedTransactionCreateRequestTypeEnum = typeof ManagedTransactionCreateRequestTypeEnum[keyof typeof ManagedTransactionCreateRequestTypeEnum]; + +/** + * + * @export + * @interface ManagedTransactionCreateRequestBody + */ +export interface ManagedTransactionCreateRequestBody { + /** + * + * @type {ManagedTransactionCreateRequest} + * @memberof ManagedTransactionCreateRequestBody + */ + 'transaction'?: ManagedTransactionCreateRequest; +} +/** + * + * @export + * @interface ManagedTransactionUpdateRequest + */ +export interface ManagedTransactionUpdateRequest { + /** + * The monetary amount of the `transaction`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'amount'?: string | null; + /** + * The category of the `transaction`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'category'?: string | null; + /** + * The check number for the `transaction`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'check_number_string'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'currency_code'?: string | null; + /** + * A human-readable version of the `original_description` field. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'description'?: string; + /** + * The unique partner-defined identifier for the `transaction`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'id'?: string; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof ManagedTransactionUpdateRequest + */ + 'is_international'?: boolean; + /** + * The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s latitude is -22.9027800 and Tokyo\'s latitude is 35.689488). + * @type {number} + * @memberof ManagedTransactionUpdateRequest + */ + 'latitude'?: number; + /** + * A human-readable description of the transaction, provided in a local language. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'localized_description'?: string; + /** + * Additional descriptive information about the transaction, provided in a local language. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'localized_memo'?: string; + /** + * The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s longitude is -43.2075000 and Tokyo\'s longitude is 139.691706). + * @type {number} + * @memberof ManagedTransactionUpdateRequest + */ + 'longitude'?: number; + /** + * Additional information about the `transaction`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'memo'?: string; + /** + * The ISO 18245 category code for the transaction. + * @type {number} + * @memberof ManagedTransactionUpdateRequest + */ + 'merchant_category_code'?: number; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'merchant_guid'?: string; + /** + * The unique identifier for the merchant location. Defined by MX. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'merchant_location_guid'?: string; + /** + * Additional information you can store about the `transaction`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'metadata'?: string; + /** + * The date and time the transaction was posted to the account. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'posted_at'?: string; + /** + * The status of the transaction. Can be either `POSTED` or `PENDING`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'status'?: ManagedTransactionUpdateRequestStatusEnum; + /** + * The date and time the transaction took place. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'transacted_at'?: string; + /** + * The type of transaction. Can be either `CREDIT` or `DEBIT`. + * @type {string} + * @memberof ManagedTransactionUpdateRequest + */ + 'type'?: ManagedTransactionUpdateRequestTypeEnum; +} + +export const ManagedTransactionUpdateRequestStatusEnum = { + Posted: 'POSTED', + Pending: 'PENDING' +} as const; + +export type ManagedTransactionUpdateRequestStatusEnum = typeof ManagedTransactionUpdateRequestStatusEnum[keyof typeof ManagedTransactionUpdateRequestStatusEnum]; +export const ManagedTransactionUpdateRequestTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type ManagedTransactionUpdateRequestTypeEnum = typeof ManagedTransactionUpdateRequestTypeEnum[keyof typeof ManagedTransactionUpdateRequestTypeEnum]; + +/** + * + * @export + * @interface ManagedTransactionUpdateRequestBody + */ +export interface ManagedTransactionUpdateRequestBody { + /** + * + * @type {ManagedTransactionUpdateRequest} + * @memberof ManagedTransactionUpdateRequestBody + */ + 'transaction'?: ManagedTransactionUpdateRequest; +} +/** + * + * @export + * @interface MemberCreateRequest + */ +export interface MemberCreateRequest { + /** + * Indicates whether background aggregation is disabled for the `member`. + * @type {boolean} + * @memberof MemberCreateRequest + */ + 'background_aggregation_is_disabled'?: boolean; + /** + * + * @type {Array} + * @memberof MemberCreateRequest + */ + 'credentials': Array; + /** + * The unique partner-defined identifier for the member. + * @type {string} + * @memberof MemberCreateRequest + */ + 'id'?: string; + /** + * The code identifying a financial institution. + * @type {string} + * @memberof MemberCreateRequest + */ + 'institution_code': string; + /** + * Indicates whether the member uses OAuth to authenticate. Defaults to `false`. + * @type {boolean} + * @memberof MemberCreateRequest + */ + 'is_oauth'?: boolean; + /** + * Additional information you can store about the `member`. + * @type {string} + * @memberof MemberCreateRequest + */ + 'metadata'?: string; + /** + * 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 + */ + '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 { + /** + * 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 MemberCreateRequestBody + */ + 'client_redirect_url'?: string; + /** + * + * @type {DataRequest} + * @memberof MemberCreateRequestBody + */ + 'data_request'?: DataRequest; + /** + * 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 + */ + 'enable_app2app'?: boolean; + /** + * + * @type {MemberCreateRequest} + * @memberof MemberCreateRequestBody + */ + 'member'?: MemberCreateRequest; + /** + * + * @type {string} + * @memberof MemberCreateRequestBody + */ + 'referral_source'?: string; + /** + * A client-defined scheme used in OAuth redirects in WebViews. Defaults to `mx`. + * @type {string} + * @memberof MemberCreateRequestBody + */ + 'ui_message_webview_url_scheme'?: string; +} +/** + * + * @export + * @interface MemberElements + */ +export interface MemberElements { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof MemberElements + */ + 'account_guid'?: string; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof MemberElements + */ + 'member_guid'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof MemberElements + */ + 'user_guid'?: string; +} +/** + * + * @export + * @interface MemberResponse + */ +export interface MemberResponse { + /** + * The date and time the most recent aggregation-type job was started, given in ISO 8601 format with a time component. A job will automatically be started when a member is created or its credentials are updated, unless the `skip_aggregation` parameter is used. Jobs can also be started via manual aggregations, background aggregations, API endpoints, or when opening an MX widget. A job can be a normal aggregation, or a premium job such as identification, verification, fetching statements, or fetching an extended transaction history. If a member is deleted and then re-created with the `skip_aggregation` parameter set to `true` or if it is re-created within the throttle window (typically three hours), the previous value will be returned. + * @type {string} + * @memberof MemberResponse + */ + 'aggregated_at'?: string | null; + /** + * Indicates whether background aggregation is disabled for the `member`. + * @type {boolean} + * @memberof MemberResponse + */ + 'background_aggregation_is_disabled'?: boolean; + /** + * The status of a user\'s connection to an institution. See [Member Connection Status](/api-reference/platform-api/reference/member-connection-statuses). + * @type {string} + * @memberof MemberResponse + */ + 'connection_status'?: MemberResponseConnectionStatusEnum; + /** + * A human-readable message describing the connection status. See [Member Connection Status](/api-reference/platform-api/reference/member-connection-statuses). + * @type {string} + * @memberof MemberResponse + */ + 'connection_status_message'?: string | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof MemberResponse + */ + 'guid'?: string | null; + /** + * The unique partner-defined identifier for the member. + * @type {string} + * @memberof MemberResponse + */ + 'id'?: string | null; + /** + * The code identifying a financial institution. + * @type {string} + * @memberof MemberResponse + */ + 'institution_code'?: string | null; + /** + * The unique identifier for the institution. Defined by MX. + * @type {string} + * @memberof MemberResponse + */ + 'institution_guid'?: string; + /** + * Indicates whether the member was being aggregated at the time of the request. + * @type {boolean} + * @memberof MemberResponse + */ + 'is_being_aggregated'?: boolean | null; + /** + * Indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to `false`. + * @type {boolean} + * @memberof MemberResponse + */ + 'is_managed_by_user'?: boolean | null; + /** + * Indicates whether the transaction was manually created or belongs to a manual account. + * @type {boolean} + * @memberof MemberResponse + */ + 'is_manual'?: boolean | null; + /** + * Indicates whether the member uses OAuth to authenticate. Defaults to `false`. + * @type {boolean} + * @memberof MemberResponse + */ + 'is_oauth'?: boolean | null; + /** + * Additional information you stored about the `member`. + * @type {string} + * @memberof MemberResponse + */ + 'metadata'?: string | null; + /** + * (Deprecated) This field is no longer used and will be removed at a future date. + * @type {number} + * @memberof MemberResponse + */ + 'most_recent_job_detail_code'?: number | null; + /** + * (Deprecated) This field is no longer used and will be removed at a future date. + * @type {boolean} + * @memberof MemberResponse + */ + 'most_recent_job_detail_text'?: boolean | null; + /** + * The unique identifier for the most recent job. Defined by MX. + * @type {string} + * @memberof MemberResponse + */ + 'most_recent_job_guid'?: string | null; + /** + * The name of the `member`. + * @type {string} + * @memberof MemberResponse + */ + 'name'?: string | null; + /** + * Internal field used by MX in some circumstances. When set to `true`, MX will not attempt to aggregate the member. It will be set to `false` automatically when the member\'s credentials are updated. + * @type {boolean} + * @memberof MemberResponse + */ + 'needs_updated_credentials'?: boolean | null; + /** + * When connecting a member using OAuth, this field will contain the URL to send the user to in order to authenticate, otherwise it will be blank. + * @type {string} + * @memberof MemberResponse + */ + 'oauth_window_uri'?: string | null; + /** + * The date and time when the member was last successfully aggregated, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof MemberResponse + */ + 'successfully_aggregated_at'?: string | null; + /** + * 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 MemberResponse + */ + 'use_cases'?: Array; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof MemberResponse + */ + 'user_guid'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof MemberResponse + */ + 'user_id'?: string | null; +} + +export const MemberResponseConnectionStatusEnum = { + Null: 'null', + Created: 'CREATED', + Prevented: 'PREVENTED', + Denied: 'DENIED', + Challenged: 'CHALLENGED', + Rejected: 'REJECTED', + Locked: 'LOCKED', + Connected: 'CONNECTED', + Impeded: 'IMPEDED', + Reconnected: 'RECONNECTED', + Degraded: 'DEGRADED', + Disconnected: 'DISCONNECTED', + Discontinued: 'DISCONTINUED', + Closed: 'CLOSED', + Delayed: 'DELAYED', + Failed: 'FAILED', + Updated: 'UPDATED', + Disabled: 'DISABLED', + Imported: 'IMPORTED', + Resumed: 'RESUMED', + Expired: 'EXPIRED', + Impaired: 'IMPAIRED', + Pending: 'PENDING' +} as const; + +export type MemberResponseConnectionStatusEnum = typeof MemberResponseConnectionStatusEnum[keyof typeof MemberResponseConnectionStatusEnum]; +export const MemberResponseUseCasesEnum = { + MoneyMovement: 'MONEY_MOVEMENT', + Pfm: 'PFM' +} as const; + +export type MemberResponseUseCasesEnum = typeof MemberResponseUseCasesEnum[keyof typeof MemberResponseUseCasesEnum]; + +/** + * + * @export + * @interface MemberResponseBody + */ +export interface MemberResponseBody { + /** + * + * @type {MemberResponse} + * @memberof MemberResponseBody + */ + 'member'?: MemberResponse; +} +/** + * + * @export + * @interface MemberResumeRequest + */ +export interface MemberResumeRequest { + /** + * + * @type {Array} + * @memberof MemberResumeRequest + */ + 'challenges'?: Array; +} +/** + * + * @export + * @interface MemberResumeRequestBody + */ +export interface MemberResumeRequestBody { + /** + * + * @type {MemberResumeRequest} + * @memberof MemberResumeRequestBody + */ + 'member'?: MemberResumeRequest; +} +/** + * + * @export + * @interface MemberStatusResponse + */ +export interface MemberStatusResponse { + /** + * The date and time the most recent aggregation-type job was started, given in ISO 8601 format with a time component. A job will automatically be started when a member is created or its credentials are updated, unless the `skip_aggregation` parameter is used. Jobs can also be started via manual aggregations, background aggregations, API endpoints, or when opening an MX widget. A job can be a normal aggregation, or a premium job such as identification, verification, fetching statements, or fetching an extended transaction history. If a member is deleted and then re-created with the `skip_aggregation` parameter set to `true` or if it is re-created within the throttle window (typically three hours), the previous value will be returned. + * @type {string} + * @memberof MemberStatusResponse + */ + 'aggregated_at'?: string | null; + /** + * + * @type {Array} + * @memberof MemberStatusResponse + */ + 'challenges'?: Array; + /** + * The status of a user\'s connection to an institution. See [Member Connection Status](/api-reference/platform-api/reference/member-connection-statuses). + * @type {string} + * @memberof MemberStatusResponse + */ + 'connection_status'?: MemberStatusResponseConnectionStatusEnum; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof MemberStatusResponse + */ + 'guid'?: string | null; + /** + * Indicates whether the member has processed account numbers. + * @type {boolean} + * @memberof MemberStatusResponse + */ + 'has_processed_account_numbers'?: boolean | null; + /** + * Indicates whether the member has processed accounts. + * @type {boolean} + * @memberof MemberStatusResponse + */ + 'has_processed_accounts'?: boolean | null; + /** + * Indicates whether the member has processed transactions. + * @type {boolean} + * @memberof MemberStatusResponse + */ + 'has_processed_transactions'?: boolean | null; + /** + * + * @type {boolean} + * @memberof MemberStatusResponse + */ + 'is_authenticated'?: boolean | null; + /** + * + * @type {boolean} + * @memberof MemberStatusResponse + */ + 'is_being_aggregated'?: boolean | null; + /** + * The date and time when the member was last successfully aggregated, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof MemberStatusResponse + */ + 'successfully_aggregated_at'?: string | null; +} + +export const MemberStatusResponseConnectionStatusEnum = { + Null: 'null', + Created: 'CREATED', + Prevented: 'PREVENTED', + Denied: 'DENIED', + Challenged: 'CHALLENGED', + Rejected: 'REJECTED', + Locked: 'LOCKED', + Connected: 'CONNECTED', + Impeded: 'IMPEDED', + Reconnected: 'RECONNECTED', + Degraded: 'DEGRADED', + Disconnected: 'DISCONNECTED', + Discontinued: 'DISCONTINUED', + Closed: 'CLOSED', + Delayed: 'DELAYED', + Failed: 'FAILED', + Updated: 'UPDATED', + Disabled: 'DISABLED', + Imported: 'IMPORTED', + Resumed: 'RESUMED', + Expired: 'EXPIRED', + Impaired: 'IMPAIRED', + Pending: 'PENDING' +} as const; + +export type MemberStatusResponseConnectionStatusEnum = typeof MemberStatusResponseConnectionStatusEnum[keyof typeof MemberStatusResponseConnectionStatusEnum]; + +/** + * + * @export + * @interface MemberStatusResponseBody + */ +export interface MemberStatusResponseBody { + /** + * + * @type {MemberStatusResponse} + * @memberof MemberStatusResponseBody + */ + 'member'?: MemberStatusResponse; +} +/** + * + * @export + * @interface MemberUpdateRequest + */ +export interface MemberUpdateRequest { + /** + * Indicates whether background aggregation is disabled for the `member`. + * @type {boolean} + * @memberof MemberUpdateRequest + */ + 'background_aggregation_is_disabled'?: boolean; + /** + * + * @type {Array} + * @memberof MemberUpdateRequest + */ + 'credentials'?: Array; + /** + * The unique partner-defined identifier for the member. + * @type {string} + * @memberof MemberUpdateRequest + */ + 'id'?: string; + /** + * Additional information you can store about the `member`. + * @type {string} + * @memberof MemberUpdateRequest + */ + 'metadata'?: string; + /** + * 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 + * @interface MemberUpdateRequestBody + */ +export interface MemberUpdateRequestBody { + /** + * + * @type {MemberUpdateRequest} + * @memberof MemberUpdateRequestBody + */ + 'member'?: MemberUpdateRequest; +} +/** + * + * @export + * @interface MembersResponseBody + */ +export interface MembersResponseBody { + /** + * + * @type {Array} + * @memberof MembersResponseBody + */ + 'members'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof MembersResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface MerchantLocationResponse + */ +export interface MerchantLocationResponse { + /** + * The city name. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'city'?: string | null; + /** + * The country name. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'country'?: string | null; + /** + * The date and time the merchant was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'created_at'?: string | null; + /** + * The unique identifier for the merchant location. Defined by MX. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'guid'?: string | null; + /** + * The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s latitude is -22.9027800 and Tokyo\'s latitude is 35.689488). + * @type {number} + * @memberof MerchantLocationResponse + */ + 'latitude'?: number | null; + /** + * The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s longitude is -43.2075000 and Tokyo\'s longitude is 139.691706). + * @type {number} + * @memberof MerchantLocationResponse + */ + 'longitude'?: number | null; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'merchant_guid'?: string | null; + /** + * The phone number of the merchant location. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'phone_number'?: string | null; + /** + * The postal code of the merchant location. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'postal_code'?: string | null; + /** + * The state abbreviation of the merchant location. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'state'?: string | null; + /** + * The street address of the merchant location. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'street_address'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof MerchantLocationResponse + */ + 'updated_at'?: string | null; +} +/** + * + * @export + * @interface MerchantLocationResponseBody + */ +export interface MerchantLocationResponseBody { + /** + * + * @type {MerchantLocationResponse} + * @memberof MerchantLocationResponseBody + */ + 'merchant_location'?: MerchantLocationResponse; +} +/** + * + * @export + * @interface MerchantResponse + */ +export interface MerchantResponse { + /** + * The date and time the merchant was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof MerchantResponse + */ + 'created_at'?: string | null; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof MerchantResponse + */ + 'guid'?: string | null; + /** + * The URL for a 100px X 100px logo for the merchant. + * @type {string} + * @memberof MerchantResponse + */ + 'logo_url'?: string | null; + /** + * The name of the merchant. + * @type {string} + * @memberof MerchantResponse + */ + 'name'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof MerchantResponse + */ + 'updated_at'?: string | null; + /** + * URL to the merchant\'s website. + * @type {string} + * @memberof MerchantResponse + */ + 'website_url'?: string | null; +} +/** + * + * @export + * @interface MerchantResponseBody + */ +export interface MerchantResponseBody { + /** + * + * @type {MerchantResponse} + * @memberof MerchantResponseBody + */ + 'merchant'?: MerchantResponse; +} +/** + * + * @export + * @interface MerchantsResponseBody + */ +export interface MerchantsResponseBody { + /** + * + * @type {Array} + * @memberof MerchantsResponseBody + */ + 'merchants'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof MerchantsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface MicrodepositElements + */ +export interface MicrodepositElements { + /** + * The human-readable name for the account. + * @type {string} + * @memberof MicrodepositElements + */ + 'account_name'?: string; + /** + * The account number associated with the account. This will typically be a masked or partial account number. + * @type {string} + * @memberof MicrodepositElements + */ + 'account_number': string; + /** + * The type of account. Some account types may include subtypes. + * @type {string} + * @memberof MicrodepositElements + */ + 'account_type': MicrodepositElementsAccountTypeEnum; + /** + * The email address associated with the account. + * @type {string} + * @memberof MicrodepositElements + */ + 'email'?: string; + /** + * The account owner\'s first name. This may also include a middle name. This field will be `null` unless name splitting has been enabled. Contact MX to have this feature enabled. + * @type {string} + * @memberof MicrodepositElements + */ + 'first_name'?: string; + /** + * The last name of the account holder. + * @type {string} + * @memberof MicrodepositElements + */ + 'last_name'?: string; + /** + * The routing number for the `account`. + * @type {string} + * @memberof MicrodepositElements + */ + 'routing_number': string; +} + +export const MicrodepositElementsAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type MicrodepositElementsAccountTypeEnum = typeof MicrodepositElementsAccountTypeEnum[keyof typeof MicrodepositElementsAccountTypeEnum]; + +/** + * + * @export + * @interface MicrodepositRequestBody + */ +export interface MicrodepositRequestBody { + /** + * + * @type {MicrodepositElements} + * @memberof MicrodepositRequestBody + */ + 'micro_deposit'?: MicrodepositElements; +} +/** + * + * @export + * @interface MicrodepositResponse + */ +export interface MicrodepositResponse { + /** + * A message describing an error that occurred. + * @type {string} + * @memberof MicrodepositResponse + */ + 'error_message'?: string | null; + /** + * The unique identifier for the microdeposit. Defined by MX. + * @type {string} + * @memberof MicrodepositResponse + */ + 'guid'?: string; + /** + * The code identifying a financial institution. + * @type {string} + * @memberof MicrodepositResponse + */ + 'institution_code'?: string; + /** + * An easy-to-read name for an institution. May be `null` for institutions that are not in the MX system. + * @type {string} + * @memberof MicrodepositResponse + */ + 'institution_name'?: string; + /** + * The name of the current status. See [Microdeposit Statuses](/api-reference/platform-api/reference/microdeposit-fields#microdeposit-statuses). + * @type {string} + * @memberof MicrodepositResponse + */ + 'status'?: string; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof MicrodepositResponse + */ + 'updated_at'?: string; + /** + * The date and time at which the microdeposit status changed from `DEPOSITED` to `VERIFIED`. + * @type {string} + * @memberof MicrodepositResponse + */ + 'verified_at'?: string | null; +} +/** + * + * @export + * @interface MicrodepositResponseBody + */ +export interface MicrodepositResponseBody { + /** + * + * @type {Array} + * @memberof MicrodepositResponseBody + */ + 'micro_deposit'?: Array; +} +/** + * + * @export + * @interface MicrodepositResponseBodyMicroDepositInner + */ +export interface MicrodepositResponseBodyMicroDepositInner { + /** + * The human-readable name for the account. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'account_name'?: string; + /** + * The account number associated with the account. This will typically be a masked or partial account number. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'account_number': string; + /** + * The type of account. Some account types may include subtypes. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'account_type': MicrodepositResponseBodyMicroDepositInnerAccountTypeEnum; + /** + * The email address associated with the account. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'email'?: string; + /** + * The account owner\'s first name. This may also include a middle name. This field will be `null` unless name splitting has been enabled. Contact MX to have this feature enabled. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'first_name'?: string; + /** + * The last name of the account holder. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'last_name'?: string; + /** + * The routing number for the `account`. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'routing_number': string; + /** + * A message describing an error that occurred. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'error_message'?: string | null; + /** + * The unique identifier for the microdeposit. Defined by MX. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'guid'?: string; + /** + * The code identifying a financial institution. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'institution_code'?: string; + /** + * An easy-to-read name for an institution. May be `null` for institutions that are not in the MX system. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'institution_name'?: string; + /** + * The name of the current status. See [Microdeposit Statuses](/api-reference/platform-api/reference/microdeposit-fields#microdeposit-statuses). + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'status'?: string; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'updated_at'?: string; + /** + * The date and time at which the microdeposit status changed from `DEPOSITED` to `VERIFIED`. + * @type {string} + * @memberof MicrodepositResponseBodyMicroDepositInner + */ + 'verified_at'?: string | null; +} + +export const MicrodepositResponseBodyMicroDepositInnerAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type MicrodepositResponseBodyMicroDepositInnerAccountTypeEnum = typeof MicrodepositResponseBodyMicroDepositInnerAccountTypeEnum[keyof typeof MicrodepositResponseBodyMicroDepositInnerAccountTypeEnum]; + +/** + * + * @export + * @interface MicrodepositVerifyRequest + */ +export interface MicrodepositVerifyRequest { + /** + * The amount of the first microdeposit sent for account verification. + * @type {number} + * @memberof MicrodepositVerifyRequest + */ + 'deposit_amount_1'?: number; + /** + * The amount of the second microdeposit sent for account verification. + * @type {number} + * @memberof MicrodepositVerifyRequest + */ + 'deposit_amount_2'?: number; +} +/** + * + * @export + * @interface MicrodepositVerifyRequestBody + */ +export interface MicrodepositVerifyRequestBody { + /** + * + * @type {MicrodepositVerifyRequest} + * @memberof MicrodepositVerifyRequestBody + */ + 'micro_deposit'?: MicrodepositVerifyRequest; +} +/** + * + * @export + * @interface MicrodepositsResponseBody + */ +export interface MicrodepositsResponseBody { + /** + * + * @type {Array} + * @memberof MicrodepositsResponseBody + */ + 'micro_deposits'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof MicrodepositsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface MonthlyCashFlowProfileRequest + */ +export interface MonthlyCashFlowProfileRequest { + /** + * The monthly dollar amount allocated for goals. + * @type {number} + * @memberof MonthlyCashFlowProfileRequest + */ + 'goals_contribution'?: number; + /** + * Determines if the user uses estimated goals contribution. + * @type {boolean} + * @memberof MonthlyCashFlowProfileRequest + */ + 'uses_estimated_goals_contribution'?: boolean; +} +/** + * + * @export + * @interface MonthlyCashFlowProfileRequestBody + */ +export interface MonthlyCashFlowProfileRequestBody { + /** + * + * @type {MonthlyCashFlowProfileRequest} + * @memberof MonthlyCashFlowProfileRequestBody + */ + 'monthly_cash_flow_profile'?: MonthlyCashFlowProfileRequest; +} +/** + * + * @export + * @interface MonthlyCashFlowResponse + */ +export interface MonthlyCashFlowResponse { + /** + * Unique identifier for the monthly cash flow profile. Defined by MX. + * @type {string} + * @memberof MonthlyCashFlowResponse + */ + 'guid'?: string; + /** + * Unique identifier for the user the monthly cash flow profile is attached to. Defined by MX. + * @type {string} + * @memberof MonthlyCashFlowResponse + */ + 'user_guid'?: string; + /** + * The amount of the budgeted income for the user. + * @type {number} + * @memberof MonthlyCashFlowResponse + */ + 'budgeted_income'?: number; + /** + * The amount of the budgeted expenses for the user. + * @type {number} + * @memberof MonthlyCashFlowResponse + */ + 'budgeted_expenses'?: number; + /** + * The monthly dollar amount allocated for goals. + * @type {number} + * @memberof MonthlyCashFlowResponse + */ + 'goals_contribution'?: number; + /** + * The estimated monthly dollar amount allocated for goals calculated from income and budgets. + * @type {number} + * @memberof MonthlyCashFlowResponse + */ + 'estimated_goals_contribution'?: number | null; + /** + * Indicates if the user uses estimated goals contribution. + * @type {boolean} + * @memberof MonthlyCashFlowResponse + */ + 'uses_estimated_goals_contribution'?: boolean; +} +/** + * + * @export + * @interface MonthlyCashFlowResponseBody + */ +export interface MonthlyCashFlowResponseBody { + /** + * + * @type {MonthlyCashFlowResponse} + * @memberof MonthlyCashFlowResponseBody + */ + 'monthly_cash_flow_profile'?: MonthlyCashFlowResponse; +} +/** + * + * @export + * @interface NotificationRequest + */ +export interface NotificationRequest { + /** + * The main body of the notification text sent to the user. + * @type {string} + * @memberof NotificationRequest + */ + 'content': string; + /** + * The notification summary text. Usually the same text used for “in-app” or SMS notifications. + * @type {string} + * @memberof NotificationRequest + */ + 'subject': string; +} +/** + * + * @export + * @interface NotificationRequestBody + */ +export interface NotificationRequestBody { + /** + * + * @type {NotificationRequest} + * @memberof NotificationRequestBody + */ + 'notification'?: NotificationRequest; +} +/** + * + * @export + * @interface NotificationResponse + */ +export interface NotificationResponse { + /** + * The way the notification will be delivered to the user. 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. + * @type {string} + * @memberof NotificationResponse + */ + 'channel'?: NotificationResponseChannelEnum; + /** + * The main body of the notification text sent to the user. + * @type {string} + * @memberof NotificationResponse + */ + 'content'?: string; + /** + * The date and time the notification was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof NotificationResponse + */ + 'created_at'?: string; + /** + * The unique identifier for objects that directly trigger a notification. For example, `TRANSACTION_FEE_CHARGE` and `TRANSACTION_EXPENSE_LARGE` notification types will have a transaction guid in this field. + * @type {any} + * @memberof NotificationResponse + */ + 'deep_link_guid'?: any; + /** + * Date and time the notification was delivered, represented in ISO 8601 format with timestamp. + * @type {any} + * @memberof NotificationResponse + */ + 'delivered_at'?: any; + /** + * The unique identifier of the entity that the notification is attached to. + * @type {any} + * @memberof NotificationResponse + */ + 'entity_guid'?: any; + /** + * Unique identifier for the notification. Defined by MX. + * @type {any} + * @memberof NotificationResponse + */ + 'guid'?: any; + /** + * Indicates if the notification has been delivered to the user. + * @type {any} + * @memberof NotificationResponse + */ + 'has_been_delivered'?: any; + /** + * Indicates if the notification has been viewed by the user. + * @type {any} + * @memberof NotificationResponse + */ + 'has_been_viewed'?: any; + /** + * The type of notification. See [Notification Types](/api-reference/platform-api/reference/notifications-fields#notification-types). + * @type {any} + * @memberof NotificationResponse + */ + 'notification_type'?: any; + /** + * The notification summary text. Usually the same text used for “in-app” or SMS notifications. + * @type {any} + * @memberof NotificationResponse + */ + 'subject'?: any; + /** + * + * @type {any} + * @memberof NotificationResponse + */ + 'threshold'?: any; +} + +export const NotificationResponseChannelEnum = { + Email: 'EMAIL', + Sms: 'SMS', + Push: 'PUSH', + InApp: 'IN_APP' +} as const; + +export type NotificationResponseChannelEnum = typeof NotificationResponseChannelEnum[keyof typeof NotificationResponseChannelEnum]; + +/** + * + * @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 + * @interface OAuthWindowResponse + */ +export interface OAuthWindowResponse { + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof OAuthWindowResponse + */ + 'guid'?: string | null; + /** + * When connecting a member using OAuth, this field will contain the URL to send the user to in order to authenticate, otherwise it will be blank. + * @type {string} + * @memberof OAuthWindowResponse + */ + 'oauth_window_uri'?: string | null; +} +/** + * + * @export + * @interface OAuthWindowResponseBody + */ +export interface OAuthWindowResponseBody { + /** + * + * @type {OAuthWindowResponse} + * @memberof OAuthWindowResponseBody + */ + 'member'?: OAuthWindowResponse; +} +/** + * + * @export + * @interface OptionResponse + */ +export interface OptionResponse { + /** + * + * @type {string} + * @memberof OptionResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof OptionResponse + */ + 'label'?: string | null; + /** + * + * @type {string} + * @memberof OptionResponse + */ + 'value'?: string | null; +} +/** + * + * @export + * @interface PaginationResponse + */ +export interface PaginationResponse { + /** + * The page delivered by the current response. + * @type {number} + * @memberof PaginationResponse + */ + 'current_page'?: number; + /** + * The number of records delivered with each page. + * @type {number} + * @memberof PaginationResponse + */ + 'per_page'?: number; + /** + * The total number of records available. + * @type {number} + * @memberof PaginationResponse + */ + 'total_entries'?: number; + /** + * The total number of pages available. + * @type {number} + * @memberof PaginationResponse + */ + 'total_pages'?: number; +} +/** + * + * @export + * @interface PaymentAccount + */ +export interface PaymentAccount { + /** + * The human-readable name for the account. + * @type {string} + * @memberof PaymentAccount + */ + 'account_name'?: string; + /** + * The banking account number associated with a particular account. + * @type {any} + * @memberof PaymentAccount + */ + 'account_number'?: any; + /** + * The type of account. Some account types may include subtypes. + * @type {string} + * @memberof PaymentAccount + */ + 'account_type'?: PaymentAccountAccountTypeEnum; + /** + * The balance that is available for use in asset accounts like checking and savings. `PENDING` transactions are typically (not always) taken into account with the available balance. `available_balance` will usually be a positive value for all account types, determined in the same way as the balance field. + * @type {number} + * @memberof PaymentAccount + */ + 'available_balance'?: number; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof PaymentAccount + */ + 'balance'?: number; + /** + * The date and time the resource was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof PaymentAccount + */ + 'created_at'?: string; + /** + * The routing number for the `account`. + * @type {any} + * @memberof PaymentAccount + */ + 'routing_number'?: any; + /** + * The five-digit number identifying the branch of a Canadian financial institution. + * @type {any} + * @memberof PaymentAccount + */ + 'transit_number'?: any; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof PaymentAccount + */ + 'updated_at'?: string | null; +} + +export const PaymentAccountAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type PaymentAccountAccountTypeEnum = typeof PaymentAccountAccountTypeEnum[keyof typeof PaymentAccountAccountTypeEnum]; + +/** + * + * @export + * @interface PaymentAccountBody + */ +export interface PaymentAccountBody { + /** + * + * @type {PaymentAccountBodyPaymentAccount} + * @memberof PaymentAccountBody + */ + 'payment_account'?: PaymentAccountBodyPaymentAccount; +} +/** + * + * @export + * @interface PaymentAccountBodyPaymentAccount + */ +export interface PaymentAccountBodyPaymentAccount { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'account_guid'?: string; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'member_guid'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'user_guid'?: string; + /** + * The human-readable name for the account. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'account_name'?: string; + /** + * The banking account number associated with a particular account. + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'account_number'?: any; + /** + * The type of account. Some account types may include subtypes. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'account_type'?: PaymentAccountBodyPaymentAccountAccountTypeEnum; + /** + * The balance that is available for use in asset accounts like checking and savings. `PENDING` transactions are typically (not always) taken into account with the available balance. `available_balance` will usually be a positive value for all account types, determined in the same way as the balance field. + * @type {number} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'available_balance'?: number; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'balance'?: number; + /** + * The date and time the resource was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'created_at'?: string; + /** + * The routing number for the `account`. + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'routing_number'?: any; + /** + * The five-digit number identifying the branch of a Canadian financial institution. + * @type {any} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'transit_number'?: any; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof PaymentAccountBodyPaymentAccount + */ + 'updated_at'?: string | null; +} + +export const PaymentAccountBodyPaymentAccountAccountTypeEnum = { + Any: 'ANY', + Cash: 'CASH', + Checking: 'CHECKING', + CheckingLineOfCredit: 'CHECKING_LINE_OF_CREDIT', + CreditCard: 'CREDIT_CARD', + Loan: 'LOAN', + LineOfCredit: 'LINE_OF_CREDIT', + Savings: 'SAVINGS', + Investment: 'INVESTMENT', + Mortgage: 'MORTGAGE', + Insurance: 'INSURANCE', + Prepaid: 'PREPAID', + Property: 'PROPERTY' +} as const; + +export type PaymentAccountBodyPaymentAccountAccountTypeEnum = typeof PaymentAccountBodyPaymentAccountAccountTypeEnum[keyof typeof PaymentAccountBodyPaymentAccountAccountTypeEnum]; + +/** + * + * @export + * @interface ProcessorAccountNumber + */ +export interface ProcessorAccountNumber { + /** + * The banking account number associated with a particular account. + * @type {number} + * @memberof ProcessorAccountNumber + */ + 'account_number'?: number; + /** + * The unique identifier for the account number. Defined by MX. + * @type {string} + * @memberof ProcessorAccountNumber + */ + 'guid'?: string; + /** + * The three-digit number identifying a Canadian banking institution. + * @type {any} + * @memberof ProcessorAccountNumber + */ + 'institution_number'?: any; + /** + * The guarantor of the student loan. + * @type {any} + * @memberof ProcessorAccountNumber + */ + 'loan_guarantor'?: any; + /** + * The reference number for the student loan. + * @type {any} + * @memberof ProcessorAccountNumber + */ + 'loan_reference_number'?: any; + /** + * Indicates whether the account number has passed validation. + * @type {any} + * @memberof ProcessorAccountNumber + */ + 'passed_validation'?: any; + /** + * The routing number for the `account`. + * @type {number} + * @memberof ProcessorAccountNumber + */ + 'routing_number'?: number; + /** + * The sequence number for the account. + * @type {any} + * @memberof ProcessorAccountNumber + */ + 'sequence_number'?: any; + /** + * The five-digit number identifying the branch of a Canadian financial institution. + * @type {any} + * @memberof ProcessorAccountNumber + */ + 'transit_number'?: any; +} +/** + * + * @export + * @interface ProcessorAccountNumberBody + */ +export interface ProcessorAccountNumberBody { + /** + * + * @type {Array} + * @memberof ProcessorAccountNumberBody + */ + 'account_numbers'?: Array; +} +/** + * + * @export + * @interface ProcessorAccountNumberBodyAccountNumbersInner + */ +export interface ProcessorAccountNumberBodyAccountNumbersInner { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'account_guid'?: string; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'member_guid'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'user_guid'?: string; + /** + * The banking account number associated with a particular account. + * @type {number} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'account_number'?: number; + /** + * The unique identifier for the account number. Defined by MX. + * @type {string} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'guid'?: string; + /** + * The three-digit number identifying a Canadian banking institution. + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'institution_number'?: any; + /** + * The guarantor of the student loan. + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'loan_guarantor'?: any; + /** + * The reference number for the student loan. + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'loan_reference_number'?: any; + /** + * Indicates whether the account number has passed validation. + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'passed_validation'?: any; + /** + * The routing number for the `account`. + * @type {number} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'routing_number'?: number; + /** + * The sequence number for the account. + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'sequence_number'?: any; + /** + * The five-digit number identifying the branch of a Canadian financial institution. + * @type {any} + * @memberof ProcessorAccountNumberBodyAccountNumbersInner + */ + 'transit_number'?: any; +} +/** + * + * @export + * @interface ProcessorOwner + */ +export interface ProcessorOwner { + /** + * The unique identifier for an account owner. Defined by MX. + * @type {string} + * @memberof ProcessorOwner + */ + 'guid'?: string; + /** + * The account owner\'s name. + * @type {string} + * @memberof ProcessorOwner + */ + 'owner_name'?: string; + /** + * The account owner\'s street address. + * @type {string} + * @memberof ProcessorOwner + */ + 'address'?: string; + /** + * The account owner\'s city. + * @type {string} + * @memberof ProcessorOwner + */ + 'city'?: string; + /** + * The account owner\'s state. + * @type {string} + * @memberof ProcessorOwner + */ + 'state'?: string; + /** + * The account owner\'s postal code. + * @type {string} + * @memberof ProcessorOwner + */ + 'postal_code'?: string; + /** + * The country name. + * @type {string} + * @memberof ProcessorOwner + */ + 'country'?: string | null; + /** + * The email address associated with the account. + * @type {string} + * @memberof ProcessorOwner + */ + 'email'?: string; + /** + * The phone number associated with the account owner. + * @type {string} + * @memberof ProcessorOwner + */ + 'phone'?: string; +} +/** + * + * @export + * @interface ProcessorOwnerBody + */ +export interface ProcessorOwnerBody { + /** + * + * @type {Array} + * @memberof ProcessorOwnerBody + */ + 'account_owners'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof ProcessorOwnerBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface ProcessorOwnerBodyAccountOwnersInner + */ +export interface ProcessorOwnerBodyAccountOwnersInner { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'account_guid'?: string; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'member_guid'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'user_guid'?: string; + /** + * The unique identifier for an account owner. Defined by MX. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'guid'?: string; + /** + * The account owner\'s name. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'owner_name'?: string; + /** + * The account owner\'s street address. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'address'?: string; + /** + * The account owner\'s city. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'city'?: string; + /** + * The account owner\'s state. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'state'?: string; + /** + * The account owner\'s postal code. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'postal_code'?: string; + /** + * The country name. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'country'?: string | null; + /** + * The email address associated with the account. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'email'?: string; + /** + * The phone number associated with the account owner. + * @type {string} + * @memberof ProcessorOwnerBodyAccountOwnersInner + */ + 'phone'?: string; +} +/** + * + * @export + * @interface RepeatingTransactionResponse + */ +export interface RepeatingTransactionResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'account_guid'?: string; + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof RepeatingTransactionResponse + */ + 'amount'?: number | null; + /** + * Merchant or bill description. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'description'?: string; + /** + * The unique identifier for the repeating transaction. Defined by MX. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'guid'?: string; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'member_guid'?: string; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'merchant_guid'?: string; + /** + * Last occurrence date. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'last_posted_date'?: string; + /** + * Predicted next occurrence. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'predicted_occurs_on'?: string; + /** + * The frequency at which a transaction is expected to repeat based on historical patterns. See [Supported Recurrence Types](/api-reference/platform-api/reference/repeating-transactions-overview#supported-recurrence-types) for full list. This field appears on transaction endpoints where the optional query parameter is defined. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'recurrence_type'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'user_guid'?: string; + /** + * The type of repeating transaction. This field appears on transaction endpoints where the optional query parameter is defined. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + 'repeating_transaction_type'?: RepeatingTransactionResponseRepeatingTransactionTypeEnum; + /** + * The type of transaction. + * @type {string} + * @memberof RepeatingTransactionResponse + */ + '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 RepositionRequest + */ + 'guid': string; + /** + * The priority of the goal in relation to multiple goals. + * @type {number} + * @memberof RepositionRequest + */ + 'position': number; +} +/** + * + * @export + * @interface RepositionRequestBody + */ +export interface RepositionRequestBody { + /** + * + * @type {Array} + * @memberof RepositionRequestBody + */ + 'goals'?: Array; +} +/** + * + * @export + * @interface RepositionResponseBody + */ +export interface RepositionResponseBody { + /** + * + * @type {Array} + * @memberof RepositionResponseBody + */ + 'goals'?: Array; +} +/** + * + * @export + * @interface RequestWidgetURLRequest + */ +export interface RequestWidgetURLRequest { + /** + * + * @type {WidgetRequest} + * @memberof RequestWidgetURLRequest + */ + 'widget_url'?: WidgetRequest; +} +/** + * + * @export + * @interface RewardElements + */ +export interface RewardElements { + /** + * The type of balance associated with the reward, for example, `BALANCE_TO_LEVEL`, or `TOTAL_BALANCE`. + * @type {string} + * @memberof RewardElements + */ + 'balance_type'?: string; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof RewardElements + */ + 'balance'?: number; + /** + * The date and time the resource was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof RewardElements + */ + 'created_at'?: string; + /** + * The description for the reward as given by the data provider. + * @type {string} + * @memberof RewardElements + */ + 'description'?: string; + /** + * The date on which the balance expires. + * @type {string} + * @memberof RewardElements + */ + 'expires_on'?: string; + /** + * The unique identifier for the reward. Defined by MX. + * @type {string} + * @memberof RewardElements + */ + 'guid'?: string; + /** + * The units in which the balance is given, for example, `MILES` or `POINTS`. + * @type {string} + * @memberof RewardElements + */ + 'unit_type'?: string; + /** + * The date and time at which the account was last updated. + * @type {string} + * @memberof RewardElements + */ + 'updated_at'?: string; +} +/** + * + * @export + * @interface RewardResponseBody + */ +export interface RewardResponseBody { + /** + * + * @type {RewardsResponseBodyRewardsInner} + * @memberof RewardResponseBody + */ + 'reward'?: RewardsResponseBodyRewardsInner; +} +/** + * + * @export + * @interface RewardsResponseBody + */ +export interface RewardsResponseBody { + /** + * + * @type {Array} + * @memberof RewardsResponseBody + */ + 'rewards'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof RewardsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface RewardsResponseBodyRewardsInner + */ +export interface RewardsResponseBodyRewardsInner { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'account_guid'?: string; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'member_guid'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'user_guid'?: string; + /** + * The type of balance associated with the reward, for example, `BALANCE_TO_LEVEL`, or `TOTAL_BALANCE`. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'balance_type'?: string; + /** + * The current balance of the account. `PENDING` transactions are typically not taken into account with the current balance, but this may not always be the case. The balance will usually be a positive value for all account types. Asset-type accounts (`CHECKING`, `SAVINGS`, `INVESTMENT`) may have a negative balance if they are in overdraft. Debt-type accounts (`CREDIT_CARD`, `LOAN`, `LINE_OF_CREDIT`, `MORTGAGE`) may have a negative balance if they are overpaid. + * @type {number} + * @memberof RewardsResponseBodyRewardsInner + */ + 'balance'?: number; + /** + * The date and time the resource was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'created_at'?: string; + /** + * The description for the reward as given by the data provider. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'description'?: string; + /** + * The date on which the balance expires. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'expires_on'?: string; + /** + * The unique identifier for the reward. Defined by MX. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'guid'?: string; + /** + * The units in which the balance is given, for example, `MILES` or `POINTS`. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'unit_type'?: string; + /** + * The date and time at which the account was last updated. + * @type {string} + * @memberof RewardsResponseBodyRewardsInner + */ + 'updated_at'?: string; +} +/** + * + * @export + * @interface ScheduledPaymentResponse + */ +export interface ScheduledPaymentResponse { + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof ScheduledPaymentResponse + */ + 'amount'?: number; + /** + * The date and time the scheduled payment was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'created_at'?: string; + /** + * A human-readable description of the `scheduled_payment`, for example, Power bill. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'description'?: string; + /** + * The unique identifier for the scheduled payment. Defined by MX. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'guid'?: string; + /** + * Indicates whether the `scheduled_payment` has been paid or not. This field is only applicable to one-time transactions. + * @type {boolean} + * @memberof ScheduledPaymentResponse + */ + 'is_completed'?: boolean; + /** + * Deprecated. If required, reach out to MX to discuss an alternative. + * @type {boolean} + * @memberof ScheduledPaymentResponse + */ + 'is_recurring'?: boolean; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'merchant_guid'?: string; + /** + * The date on which the payment is scheduled to occur, given in ISO 8601 format without a timestamp. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'occurs_on'?: string; + /** + * The day of the month where the next payment is expected to occur. + * @type {number} + * @memberof ScheduledPaymentResponse + */ + 'recurrence_day'?: number; + /** + * The type of recurrence schedule. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'recurrence_type'?: string; + /** + * The type of transaction. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'transaction_type'?: ScheduledPaymentResponseTransactionTypeEnum; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'updated_at'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof ScheduledPaymentResponse + */ + 'user_guid'?: string; +} + +export const ScheduledPaymentResponseTransactionTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type ScheduledPaymentResponseTransactionTypeEnum = typeof ScheduledPaymentResponseTransactionTypeEnum[keyof typeof ScheduledPaymentResponseTransactionTypeEnum]; + +/** + * + * @export + * @interface ScheduledPaymentsResponseBody + */ +export interface ScheduledPaymentsResponseBody { + /** + * + * @type {Array} + * @memberof ScheduledPaymentsResponseBody + */ + 'scheduled_payments'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof ScheduledPaymentsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface SpendingPlanAccountResponse + */ +export interface SpendingPlanAccountResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'account_guid'?: string; + /** + * The unique identifier for the client associated with the insight. Defined by MX. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'client_guid'?: string; + /** + * The date and time the spending plan account was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'created_at'?: string; + /** + * The unique identifier for the spending plan account. Defined by MX. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'guid'?: string; + /** + * The unique identifier for the spending plan. Defined by MX. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'spending_plan_guid'?: string; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'updated_at'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof SpendingPlanAccountResponse + */ + 'user_guid'?: string; +} +/** + * + * @export + * @interface SpendingPlanAccountsResponse + */ +export interface SpendingPlanAccountsResponse { + /** + * + * @type {Array} + * @memberof SpendingPlanAccountsResponse + */ + 'spending_plan_accounts'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof SpendingPlanAccountsResponse + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface SpendingPlanIterationItemCreateRequestBody + */ +export interface SpendingPlanIterationItemCreateRequestBody { + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemCreateRequestBody + */ + 'category_guid'?: string; + /** + * The type of transaction grouping for the spending plan `iteration_item` (0 = `RECURRING_EXPENSE`, 1 = `PLANNED_EXPENSE`, 2 = `OTHER_EXPENSE`, 3 = `INCOME`). + * @type {number} + * @memberof SpendingPlanIterationItemCreateRequestBody + */ + 'item_type'?: number; + /** + * The total amount planned for a spending plan `iteration_item`. + * @type {number} + * @memberof SpendingPlanIterationItemCreateRequestBody + */ + 'planned_amount': number; + /** + * The unique identifier for the `scheduled_payment_guid` associated with the spending plan `iteration_item`. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemCreateRequestBody + */ + 'scheduled_payment_guid'?: string; + /** + * The unique identifier for the `top_level_category_guid` associated with the spending plan `iteration_item`. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemCreateRequestBody + */ + 'top_level_category_guid'?: string; +} +/** + * + * @export + * @interface SpendingPlanIterationItemResponse + */ +export interface SpendingPlanIterationItemResponse { + /** + * The sum of the transactions associated with the spending plan `iteration_item`. + * @type {number} + * @memberof SpendingPlanIterationItemResponse + */ + 'actual_amount'?: number | null; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'category_guid'?: string | null; + /** + * The date and time the spending plan iteration item was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'created_at'?: string | null; + /** + * The unique identifier for the spending plan `iteration_item`. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'guid'?: string | null; + /** + * The type of transaction grouping for the spending plan `iteration_item` (0 = `RECURRING_EXPENSE`, 1 = `PLANNED_EXPENSE`, 2 = `OTHER_EXPENSE`, 3 = `INCOME`). + * @type {number} + * @memberof SpendingPlanIterationItemResponse + */ + 'item_type'?: SpendingPlanIterationItemResponseItemTypeEnum; + /** + * The total amount planned for a spending plan `iteration_item`. + * @type {number} + * @memberof SpendingPlanIterationItemResponse + */ + 'planned_amount'?: number | null; + /** + * The unique identifier for the `scheduled_payment_guid` associated with the spending plan `iteration_item`. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'scheduled_payment_guid'?: string | null; + /** + * The unique identifier for the spending plan `iteration_item`. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'spending_plan_iteration_guid'?: string | null; + /** + * The unique identifier for the `top_level_category_guid` associated with the spending plan `iteration_item`. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'top_level_category_guid'?: string | null; + /** + * An array of transaction GUIDs that are relevant to the spending plan `iteration_item`. Defined by MX. + * @type {Array} + * @memberof SpendingPlanIterationItemResponse + */ + 'transaction_guids'?: Array; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationItemResponse + */ + 'user_guid'?: string | null; +} + +export const SpendingPlanIterationItemResponseItemTypeEnum = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; + +export type SpendingPlanIterationItemResponseItemTypeEnum = typeof SpendingPlanIterationItemResponseItemTypeEnum[keyof typeof SpendingPlanIterationItemResponseItemTypeEnum]; + +/** + * + * @export + * @interface SpendingPlanIterationItemsResponseBody + */ +export interface SpendingPlanIterationItemsResponseBody { + /** + * + * @type {Array} + * @memberof SpendingPlanIterationItemsResponseBody + */ + 'iteration_items'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof SpendingPlanIterationItemsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface SpendingPlanIterationResponse + */ +export interface SpendingPlanIterationResponse { + /** + * The date and time the spending plan iteration was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'created_at'?: string | null; + /** + * The date on which the spending plan iteration ends. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'end_on'?: string | null; + /** + * The unique identifier for the spending plan iteration. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'guid'?: string | null; + /** + * The current iteration number for the spending plan iteration. + * @type {number} + * @memberof SpendingPlanIterationResponse + */ + 'iteration_number'?: number | null; + /** + * The unique identifier for the spending plan. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'spending_plan_guid'?: string | null; + /** + * The date on which the spending plan iteration starts. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'start_on'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof SpendingPlanIterationResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface SpendingPlanIterationsResponse + */ +export interface SpendingPlanIterationsResponse { + /** + * + * @type {Array} + * @memberof SpendingPlanIterationsResponse + */ + 'iterations'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof SpendingPlanIterationsResponse + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface SpendingPlanResponse + */ +export interface SpendingPlanResponse { + /** + * The date and time the spending plan was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof SpendingPlanResponse + */ + 'created_at'?: string | null; + /** + * The current active associated `spending_plan_iteration` number for a given `spending_plan`. + * @type {number} + * @memberof SpendingPlanResponse + */ + 'current_iteration_number'?: number | null; + /** + * The unique identifier for the `spending_plan`. Defined by MX. + * @type {string} + * @memberof SpendingPlanResponse + */ + 'guid'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof SpendingPlanResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof SpendingPlanResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface SpendingPlansResponseBody + */ +export interface SpendingPlansResponseBody { + /** + * + * @type {Array} + * @memberof SpendingPlansResponseBody + */ + 'spending_plans'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof SpendingPlansResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface SplitTransactionRequest + */ +export interface SplitTransactionRequest { + /** + * The amount of money you want to recategorize. + * @type {number} + * @memberof SplitTransactionRequest + */ + 'amount': number; + /** + * Description for the split transaction. + * @type {string} + * @memberof SplitTransactionRequest + */ + 'description'?: string; + /** + * The unique identifier for the category. + * @type {string} + * @memberof SplitTransactionRequest + */ + 'category_guid'?: string | null; + /** + * Memo for the split transaction + * @type {string} + * @memberof SplitTransactionRequest + */ + 'memo'?: string; +} +/** + * + * @export + * @interface SplitTransactionRequestBody + */ +export interface SplitTransactionRequestBody { + /** + * + * @type {SplitTransactionRequest} + * @memberof SplitTransactionRequestBody + */ + 'transactions': SplitTransactionRequest; +} +/** + * + * @export + * @interface SplitTransactionsResponseBody + */ +export interface SplitTransactionsResponseBody { + /** + * + * @type {Array} + * @memberof SplitTransactionsResponseBody + */ + 'transactions'?: Array; +} +/** + * + * @export + * @interface StatementResponse + */ +export interface StatementResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof StatementResponse + */ + 'account_guid'?: string; + /** + * An SHA-256 hash value of the statement\'s byte payload. + * @type {string} + * @memberof StatementResponse + */ + 'content_hash'?: string | null; + /** + * The date and time the statement was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof StatementResponse + */ + 'created_at'?: string | null; + /** + * The unique identifier for the `statement`. Defined by MX. + * @type {string} + * @memberof StatementResponse + */ + 'guid'?: string | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof StatementResponse + */ + 'member_guid'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof StatementResponse + */ + 'updated_at'?: string | null; + /** + * A URI for accessing the byte payload of the `statement`. + * @type {string} + * @memberof StatementResponse + */ + 'uri'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof StatementResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface StatementResponseBody + */ +export interface StatementResponseBody { + /** + * + * @type {StatementResponse} + * @memberof StatementResponseBody + */ + 'statement'?: StatementResponse; +} +/** + * + * @export + * @interface StatementsResponseBody + */ +export interface StatementsResponseBody { + /** + * + * @type {Array} + * @memberof StatementsResponseBody + */ + 'statements'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof StatementsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * Contains fields to customize the appearance of a widget. + * @export + * @interface Style + */ +export interface Style { + /** + * Sets the widget\'s font. Pass any Google font to change it. + * @type {string} + * @memberof Style + */ + 'font_name': string; +} +/** + * + * @export + * @enum {string} + */ + +export const SupportedProducts = { + AccountVerification: 'account_verification', + IdentityVerification: 'identity_verification', + Transactions: 'transactions', + TransactionHistory: 'transaction_history', + Statements: 'statements', + Investments: 'investments', + Rewards: 'rewards' +} as const; + +export type SupportedProducts = typeof SupportedProducts[keyof typeof SupportedProducts]; + + +/** + * + * @export + * @interface TagCreateRequest + */ +export interface TagCreateRequest { + /** + * The name of the tag. + * @type {string} + * @memberof TagCreateRequest + */ + 'name': string; +} +/** + * + * @export + * @interface TagCreateRequestBody + */ +export interface TagCreateRequestBody { + /** + * + * @type {TagCreateRequest} + * @memberof TagCreateRequestBody + */ + 'tag'?: TagCreateRequest; +} +/** + * + * @export + * @interface TagResponse + */ +export interface TagResponse { + /** + * The unique identifier for the tag. Defined by MX. + * @type {string} + * @memberof TagResponse + */ + 'guid'?: string | null; + /** + * The name of the tag. + * @type {string} + * @memberof TagResponse + */ + 'name'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof TagResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface TagResponseBody + */ +export interface TagResponseBody { + /** + * + * @type {TagResponse} + * @memberof TagResponseBody + */ + 'tag'?: TagResponse; +} +/** + * + * @export + * @interface TagUpdateRequest + */ +export interface TagUpdateRequest { + /** + * The name of the tag. + * @type {string} + * @memberof TagUpdateRequest + */ + 'name': string; +} +/** + * + * @export + * @interface TagUpdateRequestBody + */ +export interface TagUpdateRequestBody { + /** + * + * @type {TagUpdateRequest} + * @memberof TagUpdateRequestBody + */ + 'tag'?: TagUpdateRequest; +} +/** + * + * @export + * @interface TaggingCreateRequest + */ +export interface TaggingCreateRequest { + /** + * The unique identifier for the tag. + * @type {string} + * @memberof TaggingCreateRequest + */ + 'tag_guid': string; + /** + * The unique identifier for the `transaction`. + * @type {string} + * @memberof TaggingCreateRequest + */ + 'transaction_guid': string; +} +/** + * + * @export + * @interface TaggingCreateRequestBody + */ +export interface TaggingCreateRequestBody { + /** + * + * @type {TaggingCreateRequest} + * @memberof TaggingCreateRequestBody + */ + 'tagging'?: TaggingCreateRequest; +} +/** + * + * @export + * @interface TaggingResponse + */ +export interface TaggingResponse { + /** + * The unique identifier for the tagging. Defined by MX. + * @type {string} + * @memberof TaggingResponse + */ + 'guid'?: string | null; + /** + * This indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to `false`. + * @type {boolean} + * @memberof TaggingResponse + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * The unique identifier for the tag. Defined by MX. + * @type {string} + * @memberof TaggingResponse + */ + 'tag_guid'?: string | null; + /** + * The unique identifier for the transaction. Defined by MX. + * @type {string} + * @memberof TaggingResponse + */ + 'transaction_guid'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof TaggingResponse + */ + 'user_guid'?: string | null; +} +/** + * + * @export + * @interface TaggingResponseBody + */ +export interface TaggingResponseBody { + /** + * + * @type {TaggingResponse} + * @memberof TaggingResponseBody + */ + 'tagging'?: TaggingResponse; +} +/** + * + * @export + * @interface TaggingUpdateRequest + */ +export interface TaggingUpdateRequest { + /** + * The unique identifier for the tagging. + * @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 {Array} + * @memberof TaggingsResponseBody + */ + 'taggings'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof TaggingsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TagsResponseBody + */ +export interface TagsResponseBody { + /** + * + * @type {Array} + * @memberof TagsResponseBody + */ + 'tags'?: Array; + /** + * + * @type {PaginationResponse} + * @memberof TagsResponseBody + */ + 'pagination'?: PaginationResponse; +} +/** + * + * @export + * @interface TokenRequestBody + */ +export interface TokenRequestBody { + /** + * + * @type {MemberElements} + * @memberof TokenRequestBody + */ + 'scope'?: MemberElements; +} +/** + * + * @export + * @interface TokenResponse + */ +export interface TokenResponse { + /** + * The unique identifier for the payment processor. Defined by MX. + * @type {string} + * @memberof TokenResponse + */ + 'payment_processor_guid'?: string; + /** + * The date and time the access token expires in ISO 8601 format with a timestamp. + * @type {string} + * @memberof TokenResponse + */ + 'expires_at'?: string; + /** + * The access token you\'ll use to retrieve data. Every `access_token` expires after 60 days. To get a new token after an old one has expired, you must get a new code from the client. See [How-to Guide for Processors](https://docs.mx.com/products/connectivity/instant-account-verification/processor-token/processor-guide/#1-request-an-access-token). + * @type {string} + * @memberof TokenResponse + */ + 'access_token'?: string | null; + /** + * Indicates whether the token is active. + * @type {boolean} + * @memberof TokenResponse + */ + 'active'?: boolean; +} +/** + * + * @export + * @interface TokenResponseBody + */ +export interface TokenResponseBody { + /** + * + * @type {Array} + * @memberof TokenResponseBody + */ + 'tokens'?: Array; +} +/** + * + * @export + * @interface TransactionCreateRequest + */ +export interface TransactionCreateRequest { + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof TransactionCreateRequest + */ + 'amount': number | null; + /** + * The date of the `transaction`. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'date': string; + /** + * A human-readable version of the `original_description` field. Provided by MX. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'description': string; + /** + * The type of transaction, which must be `CREDIT` or `DEBIT`. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'type': TransactionCreateRequestTypeEnum; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'category_guid'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'currency_code'?: string | null; + /** + * Indicates whether the transaction has been viewed. + * @type {boolean} + * @memberof TransactionCreateRequest + */ + 'has_been_viewed'?: boolean; + /** + * Indicates whether the account is hidden. Hidden accounts can still have an active balance and receive transactions. Defaults to `false`. + * @type {boolean} + * @memberof TransactionCreateRequest + */ + 'is_hidden'?: boolean; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof TransactionCreateRequest + */ + 'is_international'?: boolean; + /** + * A note about the transaction. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'memo'?: string; + /** + * Additional information you can store about the `transaction`. + * @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 + */ + 'skip_webhook'?: boolean; +} + +export const TransactionCreateRequestTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type TransactionCreateRequestTypeEnum = typeof TransactionCreateRequestTypeEnum[keyof typeof TransactionCreateRequestTypeEnum]; + +/** + * + * @export + * @interface TransactionCreateRequestBody + */ +export interface TransactionCreateRequestBody { + /** + * + * @type {TransactionCreateRequest} + * @memberof TransactionCreateRequestBody + */ + 'transaction'?: TransactionCreateRequest; +} +/** + * + * @export + * @interface TransactionCreateResponseBody + */ +export interface TransactionCreateResponseBody { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'account_guid'?: string; + /** + * The unique client-defined identifier for the account. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'account_id'?: string | null; + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'amount'?: number; + /** + * The category of the `transaction`. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'category'?: string | null; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'category_guid'?: string | null; + /** + * The check number for the `transaction`. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'check_number_string'?: string | null; + /** + * The date and time the transaction was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'created_at'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'currency_code'?: string | null; + /** + * The date of the `transaction`. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'date'?: string | null; + /** + * A human-readable version of the `original_description` field. Provided by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'description'?: string | null; + /** + * The transaction type assigned by the partner. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'extended_transaction_type'?: string | null; + /** + * The unique identifier for the transaction. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'guid'?: string | null; + /** + * The unique partner-defined identifier for the transaction. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'id'?: string | null; + /** + * Indicates whether the transaction is a bill payment. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_bill_pay'?: boolean | null; + /** + * Indicates whether the transaction is a direct deposit. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_direct_deposit'?: boolean | null; + /** + * Indicates whether the transaction is an expense. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_expense'?: boolean | null; + /** + * Indicates whether the transaction is a fee. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_fee'?: boolean | null; + /** + * Indicates whether the transaction is income. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_income'?: boolean | null; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_international'?: boolean | null; + /** + * Indicates whether the transaction was manually created or belongs to a manual account. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_manual'?: boolean | null; + /** + * Indicates whether the transaction is an overdraft fee. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_overdraft_fee'?: boolean | null; + /** + * Indicates whether the transaction is a payroll advance. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_payroll_advance'?: boolean | null; + /** + * Deprecated. If required, reach out to MX to discuss an alternative. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_recurring'?: boolean | null; + /** + * Indicates whether the transaction is a subscription payment. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'is_subscription'?: boolean | null; + /** + * The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s latitude is -22.9027800 and Tokyo\'s latitude is 35.689488). + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'latitude'?: number | null; + /** + * A human-readable description of the transaction, provided in a local language. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'localized_description'?: string | null; + /** + * Additional descriptive information about the transaction, provided in a local language. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'localized_memo'?: string | null; + /** + * The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s longitude is -43.2075000 and Tokyo\'s longitude is 139.691706). + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'longitude'?: number | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'member_guid'?: string | null; + /** + * This indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to `false`. + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * A note about the transaction. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'memo'?: string | null; + /** + * The category code assigned to the merchant. Defined by MX. + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'merchant_category_code'?: number | null; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'merchant_guid'?: string | null; + /** + * The unique identifier for the merchant location. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'merchant_location_guid'?: string | null; + /** + * Additional information you stored about the `transaction`. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'metadata'?: string | null; + /** + * The original description of the transaction as provided by the MX data feed. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'original_description'?: string | null; + /** + * The date and time the transaction was posted to the account. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'posted_at'?: string | null; + /** + * The status of the transaction. All transaction data on our systems represent what we get through our data feed which depends what institutions make available for aggregation. Many institutions do not provide data for pending transactions; transactions from those accounts always have a status of `POSTED`. When we do receive data for pending transactions, a single transaction may be updated from `PENDING` to `POSTED` and keep the same `guid`. This is done through various matching methods performed automatically by MX. If a single transaction can\'t be updated, the `PENDING` transaction will often be deleted and replaced with a new `POSTED` transaction (with a new `guid`) when it is sent to us; this is the most common scenario when pending data is available. In unusual circumstances, there may be separate `PENDING` and `POSTED` transactions on MX systems for up to 14 days. All `PENDING` transactions are deleted after 14 days as a failsafe. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'status'?: TransactionCreateResponseBodyStatusEnum; + /** + * The parent category assigned to this transaction\'s category. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'top_level_category'?: string | null; + /** + * The date and time the transaction took place. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'transacted_at'?: string | null; + /** + * The type of transaction. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'type'?: TransactionCreateResponseBodyTypeEnum; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'updated_at'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'user_guid'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'user_id'?: string | null; +} + +export const TransactionCreateResponseBodyStatusEnum = { + Posted: 'POSTED', + Pending: 'PENDING' +} as const; + +export type TransactionCreateResponseBodyStatusEnum = typeof TransactionCreateResponseBodyStatusEnum[keyof typeof TransactionCreateResponseBodyStatusEnum]; +export const TransactionCreateResponseBodyTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type TransactionCreateResponseBodyTypeEnum = typeof TransactionCreateResponseBodyTypeEnum[keyof typeof TransactionCreateResponseBodyTypeEnum]; + +/** + * + * @export + * @interface TransactionIncludesResponse + */ +export interface TransactionIncludesResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'account_guid'?: string; + /** + * The unique client-defined identifier for the account. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'account_id'?: string | null; + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof TransactionIncludesResponse + */ + 'amount'?: number | null; + /** + * The category of the `transaction`. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'category'?: string | null; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'category_guid'?: string | null; + /** + * The check number for the `transaction`. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'check_number_string'?: string | null; + /** + * The date and time the transaction was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'created_at'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'currency_code'?: string | null; + /** + * The date on which the transaction took place. This is the field used when searching for transactions by date and is generally the same as `transacted_at`, but uses `posted_at` as a fallback. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'date'?: string | null; + /** + * A human-readable description of the transaction. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'description'?: string | null; + /** + * The transaction type assigned by the partner. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'extended_transaction_type'?: string | null; + /** + * The unique identifier for the transaction. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'guid'?: string | null; + /** + * The unique partner-defined identifier for the transaction. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'id'?: string | null; + /** + * Indicates whether the transaction is a bill payment. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_bill_pay'?: boolean | null; + /** + * Indicates whether the transaction is a direct deposit. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_direct_deposit'?: boolean | null; + /** + * Indicates whether the transaction is an expense. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_expense'?: boolean | null; + /** + * Indicates whether the transaction is a fee. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_fee'?: boolean | null; + /** + * Indicates whether the transaction is income. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_income'?: boolean | null; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_international'?: boolean; + /** + * Indicates whether the transaction was manually created or belongs to a manual account. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_manual'?: boolean | null; + /** + * Indicates whether the transaction is an overdraft fee. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_overdraft_fee'?: boolean | null; + /** + * Indicates whether the transaction is a payroll advance. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_payroll_advance'?: boolean | null; + /** + * Deprecated. If required, reach out to MX to discuss an alternative. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_recurring'?: boolean | null; + /** + * Indicates whether the transaction is a subscription payment. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'is_subscription'?: boolean | null; + /** + * The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s latitude is -22.9027800 and Tokyo\'s latitude is 35.689488). + * @type {number} + * @memberof TransactionIncludesResponse + */ + 'latitude'?: number | null; + /** + * A human-readable description of the transaction, provided in a local language. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'localized_description'?: string | null; + /** + * Additional descriptive information about the transaction, provided in a local language. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'localized_memo'?: string | null; + /** + * The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s longitude is -43.2075000 and Tokyo\'s longitude is 139.691706). + * @type {number} + * @memberof TransactionIncludesResponse + */ + 'longitude'?: number | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'member_guid'?: string | null; + /** + * This indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to `false`. + * @type {boolean} + * @memberof TransactionIncludesResponse + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * Additional information about the transaction. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'memo'?: string | null; + /** + * The ISO 18245 category code for the transaction. + * @type {number} + * @memberof TransactionIncludesResponse + */ + 'merchant_category_code'?: number | null; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'merchant_guid'?: string | null; + /** + * The unique identifier for the merchant location. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'merchant_location_guid'?: string | null; + /** + * Additional information you stored about the `transaction`. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'metadata'?: string | null; + /** + * The original description of the transaction as provided by our data feed. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'original_description'?: string | null; + /** + * The date and time the transaction was posted to the account. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'posted_at'?: string | null; + /** + * The status of the transaction. All transaction data on our systems represent what we get through our data feed which depends what institutions make available for aggregation. Many institutions do not provide data for pending transactions; transactions from those accounts always have a status of `POSTED`. When we do receive data for pending transactions, a single transaction may be updated from `PENDING` to `POSTED` and keep the same `guid`. This is done through various matching methods performed automatically by MX. If a single transaction can\'t be updated, the `PENDING` transaction will often be deleted and replaced with a new `POSTED` transaction (with a new `guid`) when it is sent to us; this is the most common scenario when pending data is available. In unusual circumstances, there may be separate `PENDING` and `POSTED` transactions on MX systems for up to 14 days. All `PENDING` transactions are deleted after 14 days as a failsafe. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'status'?: TransactionIncludesResponseStatusEnum; + /** + * The parent category assigned to this transaction\'s category. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'top_level_category'?: string | null; + /** + * The date and time the transaction took place. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'transacted_at'?: string | null; + /** + * The type of transaction. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'type'?: TransactionIncludesResponseTypeEnum; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'user_guid'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof TransactionIncludesResponse + */ + 'user_id'?: string | null; + /** + * + * @type {TransactionIncludesResponseAllOfClassification} + * @memberof TransactionIncludesResponse + */ + 'classification'?: TransactionIncludesResponseAllOfClassification | null; + /** + * + * @type {TransactionIncludesResponseAllOfGeolocation} + * @memberof TransactionIncludesResponse + */ + 'geolocation'?: TransactionIncludesResponseAllOfGeolocation | null; + /** + * + * @type {TransactionIncludesResponseAllOfMerchant} + * @memberof TransactionIncludesResponse + */ + 'merchant'?: TransactionIncludesResponseAllOfMerchant | null; + /** + * + * @type {TransactionIncludesResponseAllOfRepeatingTransaction} + * @memberof TransactionIncludesResponse + */ + 'repeating_transaction'?: TransactionIncludesResponseAllOfRepeatingTransaction | null; +} + +export const TransactionIncludesResponseStatusEnum = { + Posted: 'POSTED', + Pending: 'PENDING' +} as const; + +export type TransactionIncludesResponseStatusEnum = typeof TransactionIncludesResponseStatusEnum[keyof typeof TransactionIncludesResponseStatusEnum]; +export const TransactionIncludesResponseTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type TransactionIncludesResponseTypeEnum = typeof TransactionIncludesResponseTypeEnum[keyof typeof TransactionIncludesResponseTypeEnum]; + +/** + * + * @export + * @interface TransactionIncludesResponseAllOfClassification + */ +export interface TransactionIncludesResponseAllOfClassification { + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfClassification + */ + 'parent_class'?: TransactionIncludesResponseAllOfClassificationParentClassEnum; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfClassification + */ + '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 TransactionIncludesResponseAllOfGeolocation + */ +export interface TransactionIncludesResponseAllOfGeolocation { + /** + * The country name. + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'country'?: string | null; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'state'?: string; + /** + * The city name. + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'city'?: string | null; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfGeolocation + */ + 'postal code'?: string; +} +/** + * + * @export + * @interface TransactionIncludesResponseAllOfMerchant + */ +export interface TransactionIncludesResponseAllOfMerchant { + /** + * The name of the merchant. + * @type {string} + * @memberof TransactionIncludesResponseAllOfMerchant + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof TransactionIncludesResponseAllOfMerchant + */ + 'guid'?: string; + /** + * The URL for a 100px X 100px logo for the merchant. + * @type {string} + * @memberof TransactionIncludesResponseAllOfMerchant + */ + 'logo_url'?: string; + /** + * URL to the merchant\'s website. + * @type {string} + * @memberof TransactionIncludesResponseAllOfMerchant + */ + 'website_url'?: string; +} +/** + * + * @export + * @interface TransactionIncludesResponseAllOfRepeatingTransaction + */ +export interface TransactionIncludesResponseAllOfRepeatingTransaction { + /** + * The type of the repeating transaction. + * @type {string} + * @memberof TransactionIncludesResponseAllOfRepeatingTransaction + */ + 'repeating_transaction_type'?: TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum; + /** + * The recurrence type of the repeating transaction. + * @type {string} + * @memberof TransactionIncludesResponseAllOfRepeatingTransaction + */ + 'recurrence_type'?: TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum; + /** + * The unique identifier for the repeating transaction. Defined by MX. + * @type {string} + * @memberof TransactionIncludesResponseAllOfRepeatingTransaction + */ + 'guid'?: string; +} + +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; + +export type TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum = typeof TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum[keyof typeof TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum]; + +/** + * + * @export + * @interface TransactionResponse + */ +export interface TransactionResponse { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'account_guid'?: string; + /** + * The unique client-defined identifier for the account. + * @type {string} + * @memberof TransactionResponse + */ + 'account_id'?: string | null; + /** + * The monetary amount of the `transaction`. + * @type {number} + * @memberof TransactionResponse + */ + 'amount'?: number | null; + /** + * The category of the `transaction`. + * @type {string} + * @memberof TransactionResponse + */ + 'category'?: string | null; + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'category_guid'?: string | null; + /** + * The check number for the `transaction`. + * @type {string} + * @memberof TransactionResponse + */ + 'check_number_string'?: string | null; + /** + * The date and time the transaction was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof TransactionResponse + */ + 'created_at'?: string | null; + /** + * The three-character ISO 4217 currency code, for example, `USD`. + * @type {string} + * @memberof TransactionResponse + */ + 'currency_code'?: string | null; + /** + * The date on which the transaction took place. This is the field used when searching for transactions by date and is generally the same as `transacted_at`, but uses `posted_at` as a fallback. + * @type {string} + * @memberof TransactionResponse + */ + 'date'?: string | null; + /** + * A human-readable description of the transaction. + * @type {string} + * @memberof TransactionResponse + */ + 'description'?: string | null; + /** + * The transaction type assigned by the partner. + * @type {string} + * @memberof TransactionResponse + */ + 'extended_transaction_type'?: string | null; + /** + * The unique identifier for the transaction. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'guid'?: string | null; + /** + * The unique partner-defined identifier for the transaction. + * @type {string} + * @memberof TransactionResponse + */ + 'id'?: string | null; + /** + * Indicates whether the transaction is a bill payment. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_bill_pay'?: boolean | null; + /** + * Indicates whether the transaction is a direct deposit. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_direct_deposit'?: boolean | null; + /** + * Indicates whether the transaction is an expense. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_expense'?: boolean | null; + /** + * Indicates whether the transaction is a fee. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_fee'?: boolean | null; + /** + * Indicates whether the transaction is income. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_income'?: boolean | null; + /** + * Indicates whether the transaction is international. If the data provider determines it isn\'t international then it will be `false`. It will be `null` if the data provider does not have this information. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_international'?: boolean; + /** + * Indicates whether the transaction was manually created or belongs to a manual account. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_manual'?: boolean | null; + /** + * Indicates whether the transaction is an overdraft fee. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_overdraft_fee'?: boolean | null; + /** + * Indicates whether the transaction is a payroll advance. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_payroll_advance'?: boolean | null; + /** + * Deprecated. If required, reach out to MX to discuss an alternative. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_recurring'?: boolean | null; + /** + * Indicates whether the transaction is a subscription payment. + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_subscription'?: boolean | null; + /** + * The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s latitude is -22.9027800 and Tokyo\'s latitude is 35.689488). + * @type {number} + * @memberof TransactionResponse + */ + 'latitude'?: number | null; + /** + * A human-readable description of the transaction, provided in a local language. + * @type {string} + * @memberof TransactionResponse + */ + 'localized_description'?: string | null; + /** + * Additional descriptive information about the transaction, provided in a local language. + * @type {string} + * @memberof TransactionResponse + */ + 'localized_memo'?: string | null; + /** + * The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro\'s longitude is -43.2075000 and Tokyo\'s longitude is 139.691706). + * @type {number} + * @memberof TransactionResponse + */ + 'longitude'?: number | null; + /** + * The unique identifier for the member. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'member_guid'?: string | null; + /** + * This indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to `false`. + * @type {boolean} + * @memberof TransactionResponse + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * Additional information about the transaction. + * @type {string} + * @memberof TransactionResponse + */ + 'memo'?: string | null; + /** + * The ISO 18245 category code for the transaction. + * @type {number} + * @memberof TransactionResponse + */ + 'merchant_category_code'?: number | null; + /** + * The unique identifier for the merchant. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'merchant_guid'?: string | null; + /** + * The unique identifier for the merchant location. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'merchant_location_guid'?: string | null; + /** + * Additional information you stored about the `transaction`. + * @type {string} + * @memberof TransactionResponse + */ + 'metadata'?: string | null; + /** + * The original description of the transaction as provided by our data feed. + * @type {string} + * @memberof TransactionResponse + */ + 'original_description'?: string | null; + /** + * The date and time the transaction was posted to the account. + * @type {string} + * @memberof TransactionResponse + */ + 'posted_at'?: string | null; + /** + * The status of the transaction. All transaction data on our systems represent what we get through our data feed which depends what institutions make available for aggregation. Many institutions do not provide data for pending transactions; transactions from those accounts always have a status of `POSTED`. When we do receive data for pending transactions, a single transaction may be updated from `PENDING` to `POSTED` and keep the same `guid`. This is done through various matching methods performed automatically by MX. If a single transaction can\'t be updated, the `PENDING` transaction will often be deleted and replaced with a new `POSTED` transaction (with a new `guid`) when it is sent to us; this is the most common scenario when pending data is available. In unusual circumstances, there may be separate `PENDING` and `POSTED` transactions on MX systems for up to 14 days. All `PENDING` transactions are deleted after 14 days as a failsafe. + * @type {string} + * @memberof TransactionResponse + */ + 'status'?: TransactionResponseStatusEnum; + /** + * The parent category assigned to this transaction\'s category. + * @type {string} + * @memberof TransactionResponse + */ + 'top_level_category'?: string | null; + /** + * The date and time the transaction took place. + * @type {string} + * @memberof TransactionResponse + */ + 'transacted_at'?: string | null; + /** + * The type of transaction. + * @type {string} + * @memberof TransactionResponse + */ + 'type'?: TransactionResponseTypeEnum; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof TransactionResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof TransactionResponse + */ + 'user_guid'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof TransactionResponse + */ + 'user_id'?: string | null; +} + +export const TransactionResponseStatusEnum = { + Posted: 'POSTED', + Pending: 'PENDING' +} as const; + +export type TransactionResponseStatusEnum = typeof TransactionResponseStatusEnum[keyof typeof TransactionResponseStatusEnum]; +export const TransactionResponseTypeEnum = { + Credit: 'CREDIT', + Debit: 'DEBIT' +} as const; + +export type TransactionResponseTypeEnum = typeof TransactionResponseTypeEnum[keyof typeof TransactionResponseTypeEnum]; + +/** + * + * @export + * @interface TransactionResponseBody + */ +export interface TransactionResponseBody { + /** + * + * @type {TransactionResponse} + * @memberof TransactionResponseBody + */ + 'transaction'?: TransactionResponse; +} +/** + * + * @export + * @interface TransactionRuleCreateRequest + */ +export interface TransactionRuleCreateRequest { + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionRuleCreateRequest + */ + 'category_guid': string | null; + /** + * + * @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 { + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionRuleResponse + */ + 'category_guid'?: string | null; + /** + * The date and time the resource was created, represented in ISO 8601 format with a timestamp. + * @type {string} + * @memberof TransactionRuleResponse + */ + 'created_at'?: string | null; + /** + * The matched transaction\'s `description` will be updated to the string provided here. + * @type {string} + * @memberof TransactionRuleResponse + */ + 'description'?: string | null; + /** + * A unique identifier for the `transaction_rule`. Defined by MX. + * @type {string} + * @memberof TransactionRuleResponse + */ + 'guid'?: string | null; + /** + * A string used to find a transaction to which the rule will be applied. Transaction matching is based on a comparison of `match_description` to a transaction\'s cleansed description. + * @type {string} + * @memberof TransactionRuleResponse + */ + 'match_description'?: string | null; + /** + * The date and time the resource was last updated in ISO 8601 format with a timestamp. For categories, this field will always be `null` when `is_default` is `true`. + * @type {string} + * @memberof TransactionRuleResponse + */ + 'updated_at'?: string | null; + /** + * The unique identifier for the user. Defined by MX. + * @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 { + /** + * The unique identifier for the category. Defined by MX. + * @type {string} + * @memberof TransactionRuleUpdateRequest + */ + 'category_guid'?: string | null; + /** + * The matched transaction\'s `description` will be updated to the string provided here. + * @type {string} + * @memberof TransactionRuleUpdateRequest + */ + 'description'?: string; + /** + * A string used to find a transaction to which the rule will be applied. Transaction matching is based on a comparison of `match_description` to a transaction\'s cleansed description. + * @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 + */ + '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 { + /** + * The unique identifier for an account. Defined by MX. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'account_guid'?: string; + /** + * The amount of the `goal`. + * @type {number} + * @memberof UpdateGoalRequest + */ + 'amount'?: number; + /** + * The type of goal. Can be `SAVE_AMOUNT` or `PAYOFF`. + * @type {string} + * @memberof UpdateGoalRequest + */ + 'goal_type_name'?: UpdateGoalRequestGoalTypeNameEnum; + /** + * 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, represented in ISO 8601 format with a timestamp. + * @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 you can store about 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 const UpdateGoalRequestGoalTypeNameEnum = { + SaveAmount: 'SAVE_AMOUNT', + Payoff: 'PAYOFF' +} as const; + +export type UpdateGoalRequestGoalTypeNameEnum = typeof UpdateGoalRequestGoalTypeNameEnum[keyof typeof UpdateGoalRequestGoalTypeNameEnum]; + +/** + * + * @export + * @interface UpdateGoalRequestBody + */ +export interface UpdateGoalRequestBody { + /** + * + * @type {UpdateGoalRequest} + * @memberof UpdateGoalRequestBody + */ + 'goal'?: UpdateGoalRequest; +} +/** + * + * @export + * @interface UserCreateRequest + */ +export interface UserCreateRequest { + /** + * The email address associated with the account. + * @type {string} + * @memberof UserCreateRequest + */ + 'email'?: string; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof UserCreateRequest + */ + 'id'?: string; + /** + * Indicates whether the user has been disabled. Defaults to `false`. + * @type {boolean} + * @memberof UserCreateRequest + */ + 'is_disabled'?: boolean; + /** + * Additional information you can store about the `user`. + * @type {string} + * @memberof UserCreateRequest + */ + 'metadata'?: string; +} +/** + * + * @export + * @interface UserCreateRequestBody + */ +export interface UserCreateRequestBody { + /** + * + * @type {UserCreateRequest} + * @memberof UserCreateRequestBody + */ + 'user'?: UserCreateRequest; +} +/** + * + * @export + * @interface UserResponse + */ +export interface UserResponse { + /** + * The email address associated with the account. + * @type {string} + * @memberof UserResponse + */ + 'email'?: string; + /** + * The unique identifier for the user. Defined by MX. + * @type {string} + * @memberof UserResponse + */ + 'guid'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof UserResponse + */ + 'id'?: string | null; + /** + * Indicates whether the user has been disabled. Defaults to `false`. + * @type {boolean} + * @memberof UserResponse + */ + 'is_disabled'?: boolean | null; + /** + * Additional information you stored about the `user`. + * @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 { + /** + * The email address associated with the account. + * @type {string} + * @memberof UserUpdateRequest + */ + 'email'?: string; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof UserUpdateRequest + */ + 'id'?: string; + /** + * Indicates whether the user has been disabled. Defaults to `false`. + * @type {boolean} + * @memberof UserUpdateRequest + */ + 'is_disabled'?: boolean; + /** + * Additional information you can store about the `user`. + * @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 { + /** + * The MX-issued verifiable credential. + * @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`, `dark`, and `browser` (respects user\'s browser setting). Defaults to `light`. + * @type {string} + * @memberof WidgetRequest + */ + 'color_scheme'?: WidgetRequestColorSchemeEnum; + /** + * 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 | null; + /** + * 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. This option takes precedence over `current_institution_code` and `current_institution_guid`. + * @type {string} + * @memberof WidgetRequest + */ + 'current_member_guid'?: string | null; + /** + * Only use this option if the `widget_type` is set to `connect_widget`. This loads the Connect Widget to whichever step the microdeposit process is currently in, which may be the verify amounts step, an error state, and so on. This field is required if attempting to load a specific microdeposit for end users to enter amounts. + * @type {string} + * @memberof WidgetRequest + */ + 'current_microdeposit_guid'?: string; + /** + * + * @type {DataRequest} + * @memberof WidgetRequest + */ + 'data_request'?: DataRequest; + /** + * + * @type {DeepLinkParams} + * @memberof WidgetRequest + */ + 'deep_link_params'?: DeepLinkParams; + /** + * 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`. When set to `true`, the institution search feature in the Connect Widget will be disabled and end users will not be able to navigate to it. Defaults to `false`. This option must be used with `current_institution_code`, `current_institution_guid`, or `current_member_guid`. + * @type {boolean} + * @memberof WidgetRequest + */ + 'disable_institution_search'?: boolean | null; + /** + * 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; + /** + * You should use `data_request.products` instead to set your products. 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; + /** + * You should use `data_request.products` instead to set your products. 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 every `widget_type`. 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; + /** + * Sets the language of the widget. If you\'re requesting the Connect or Connections Widgets, you must use the Accept-Language header. + * @type {string} + * @memberof WidgetRequest + */ + 'locale'?: string; + /** + * 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; + /** + * + * @type {Style} + * @memberof WidgetRequest + */ + 'style'?: Style; + /** + * 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 and have opted in to using this field. + * @type {Array} + * @memberof WidgetRequest + */ + 'use_cases'?: Array; + /** + * This determines which widget URL you\'ll receive. See [Widget Types](https://docs.mx.com/api-reference/platform-api/reference/widgets) 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 WidgetRequestColorSchemeEnum = { + Light: 'light', + Browser: 'browser', + Dark: 'dark' +} as const; + +export type WidgetRequestColorSchemeEnum = typeof WidgetRequestColorSchemeEnum[keyof typeof WidgetRequestColorSchemeEnum]; +export const WidgetRequestUseCasesEnum = { + MoneyMovement: 'MONEY_MOVEMENT', + Pfm: 'PFM' +} as const; + +export type WidgetRequestUseCasesEnum = typeof WidgetRequestUseCasesEnum[keyof typeof WidgetRequestUseCasesEnum]; + +/** + * + * @export + * @interface WidgetResponse + */ +export interface WidgetResponse { + /** + * This determines which widget URL you\'ll receive. Additional request parameters may only apply to some widget types. + * @type {string} + * @memberof WidgetResponse + */ + 'type'?: WidgetResponseTypeEnum; + /** + * The URL for accessing the widget. + * @type {string} + * @memberof WidgetResponse + */ + 'url'?: string | null; + /** + * The unique partner-defined identifier for the user. + * @type {string} + * @memberof WidgetResponse + */ + 'user_id'?: string | null; +} + +export const WidgetResponseTypeEnum = { + AccountsWidget: 'accounts_widget', + MiniAccountsWidget: 'mini_accounts_widget', + ActionableIntegrationWidget: 'actionable_integration_widget', + BudgetsWidget: 'budgets_widget', + MiniBudgetsWidget: 'mini_budgets_widget', + CashFlowWidget: 'cash_flow_widget', + MiniCashFlowWidget: 'mini_cash_flow_widget', + ConnectWidget: 'connect_widget', + ConnectionsWidget: 'connections_widget', + DebtsWidget: 'debts_widget', + FinstrongWidget: 'finstrong_widget', + MiniFinstrongWidget: 'mini_finstrong_widget', + GoalsWidget: 'goals_widget', + HelpWidget: 'help_widget', + MasterWidget: 'master_widget', + MoneyDashboardWidget: 'money_dashboard_widget', + NetWorthWidget: 'net_worth_widget', + MiniNetWorthWidget: 'mini_net_worth_widget', + NotificationsSettingsWidget: 'notifications_settings_widget', + RecurringtransactionsWidget: 'recurringtransactions_widget', + MiniRecurringtransactionsWidget: 'mini_recurringtransactions_widget', + SettingsWidget: 'settings_widget', + SpendingWidget: 'spending_widget', + MiniSpendingWidget: 'mini_spending_widget', + SpendingPlanWidget: 'spending_plan_widget', + MiniSpendingPlanWidget: 'mini_spending_plan_widget', + TransactionRulesWidget: 'transaction_rules_widget', + TransactionsWidget: 'transactions_widget', + TrendsWidget: 'trends_widget', + MiniTrendsWidget: 'mini_trends_widget' +} as const; + +export type WidgetResponseTypeEnum = typeof WidgetResponseTypeEnum[keyof typeof WidgetResponseTypeEnum]; + +/** + * + * @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 { + /** + * 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. :::warning You must use the user `guid` when setting `user_identifier` in the path. ::: + * @summary Create manual account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createManualAccount: async (acceptVersion: string, userIdentifier: string, accountCreateRequestBody: AccountCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createManualAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('createManualAccount', 'userIdentifier', userIdentifier) + // verify required parameter 'accountCreateRequestBody' is not null or undefined + assertParamExists('createManualAccount', 'accountCreateRequestBody', accountCreateRequestBody) + const localVarPath = `/users/{user_identifier}/accounts` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * 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} acceptVersion MX Platform API version. + * @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} + */ + deleteManualAccount: async (acceptVersion: string, accountGuid: string, accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteManualAccount', 'acceptVersion', acceptVersion) + // 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('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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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, + }; + }, + /** + * This endpoint returns a list of account numbers associated with the specified `account`. + * @summary List account numbers by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listAccountNumbersByAccount: async (acceptVersion: string, accountIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listAccountNumbersByAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('listAccountNumbersByAccount', 'accountIdentifier', accountIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listAccountNumbersByAccount', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/accounts/{account_identifier}/account_numbers` + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 account numbers associated with the specified `member`. + * @summary List account numbers by member + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listAccountNumbersByMember', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listAccountOwnersByMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listAccountOwnersByMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('listAccountOwnersByMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listAccountOwnersByMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/account_owners` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 accounts associated with the specified `member`. + * @summary List member accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listMemberAccounts: async (acceptVersion: string, userIdentifier: string, memberIdentifier: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listMemberAccounts', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listMemberAccounts', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('listMemberAccounts', 'memberIdentifier', memberIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))); + // 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 (memberIsManagedByUser !== undefined) { + localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 accounts associated with the specified `user`. :::warning Account Numbers 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserAccounts: async (acceptVersion: string, accept: string, userIdentifier: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listUserAccounts', 'acceptVersion', acceptVersion) + // verify required parameter 'accept' is not null or undefined + assertParamExists('listUserAccounts', 'accept', accept) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listUserAccounts', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/accounts` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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, + }; + }, + /** + * Merge two or more financial accounts that an end user has identified as duplicates. Provide at least two account GUIDs belonging to the same user. :::danger The response will return a single consolidated account. Any other accounts you provided that were not included in the response will be deleted. This is a destructive action and can\'t be undone. ::: + * @summary Merge accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountsMergeRequestBody} accountsMergeRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + mergeAccounts: async (acceptVersion: string, userGuid: string, accountsMergeRequestBody: AccountsMergeRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('mergeAccounts', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('mergeAccounts', 'userGuid', userGuid) + // verify required parameter 'accountsMergeRequestBody' is not null or undefined + assertParamExists('mergeAccounts', 'accountsMergeRequestBody', accountsMergeRequestBody) + const localVarPath = `/users/{user_guid}/accounts/merge` + .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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(accountsMergeRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, accountGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('readAccount', 'accountGuid', accountGuid) + // 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))) + .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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 member account + * @param {string} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readAccountByMember: async (acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readAccountByMember', 'acceptVersion', acceptVersion) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('readAccountByMember', 'accountIdentifier', accountIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('readAccountByMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('readAccountByMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}` + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateAccountByMember: async (acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, accountUpdateRequestBody: AccountUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateAccountByMember', 'acceptVersion', acceptVersion) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('updateAccountByMember', 'accountIdentifier', accountIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('updateAccountByMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('updateAccountByMember', 'userIdentifier', userIdentifier) + // verify required parameter 'accountUpdateRequestBody' is not null or undefined + assertParamExists('updateAccountByMember', 'accountUpdateRequestBody', accountUpdateRequestBody) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}` + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AccountsApi - functional programming interface + * @export + */ +export const AccountsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AccountsApiAxiosParamCreator(configuration) + return { + /** + * 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. :::warning You must use the user `guid` when setting `user_identifier` in the path. ::: + * @summary Create manual account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createManualAccount(acceptVersion: string, userIdentifier: string, accountCreateRequestBody: AccountCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManualAccount(acceptVersion, userIdentifier, accountCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @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 deleteManualAccount(acceptVersion: string, accountGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManualAccount(acceptVersion, accountGuid, accept, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of account numbers associated with the specified `account`. + * @summary List account numbers by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 listAccountNumbersByAccount(acceptVersion: string, accountIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountNumbersByAccount(acceptVersion, accountIdentifier, userIdentifier, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of account numbers associated with the specified `member`. + * @summary List account numbers by member + * @param {string} acceptVersion MX Platform API version. + * @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 listAccountNumbersByMember(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountNumbersByMember(acceptVersion, memberGuid, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns an array with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 listAccountOwnersByMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountOwnersByMember(acceptVersion, memberIdentifier, userIdentifier, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List member accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, userIdentifier: string, memberIdentifier: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberAccounts(acceptVersion, userIdentifier, memberIdentifier, 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 Account Numbers 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listUserAccounts(acceptVersion: string, accept: string, userIdentifier: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserAccounts(acceptVersion, accept, userIdentifier, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Merge two or more financial accounts that an end user has identified as duplicates. Provide at least two account GUIDs belonging to the same user. :::danger The response will return a single consolidated account. Any other accounts you provided that were not included in the response will be deleted. This is a destructive action and can\'t be undone. ::: + * @summary Merge accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountsMergeRequestBody} accountsMergeRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async mergeAccounts(acceptVersion: string, userGuid: string, accountsMergeRequestBody: AccountsMergeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.mergeAccounts(acceptVersion, userGuid, accountsMergeRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readAccount(acceptVersion, accountGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read member account + * @param {string} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readAccountByMember(acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readAccountByMember(acceptVersion, accountIdentifier, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateAccountByMember(acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccountByMember(acceptVersion, accountIdentifier, memberIdentifier, userIdentifier, accountUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AccountsApi - factory interface + * @export + */ +export const AccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AccountsApiFp(configuration) + return { + /** + * 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. :::warning You must use the user `guid` when setting `user_identifier` in the path. ::: + * @summary Create manual account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createManualAccount(acceptVersion: string, userIdentifier: string, accountCreateRequestBody: AccountCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManualAccount(acceptVersion, userIdentifier, accountCreateRequestBody, 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} acceptVersion MX Platform API version. + * @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} + */ + deleteManualAccount(acceptVersion: string, accountGuid: string, accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManualAccount(acceptVersion, accountGuid, accept, 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} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listAccountNumbersByAccount(acceptVersion: string, accountIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountNumbersByAccount(acceptVersion, accountIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountNumbersByMember(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listAccountOwnersByMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountOwnersByMember(acceptVersion, memberIdentifier, userIdentifier, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List member accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listMemberAccounts(acceptVersion: string, userIdentifier: string, memberIdentifier: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMemberAccounts(acceptVersion, userIdentifier, memberIdentifier, memberIsManagedByUser, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns a list of all the accounts associated with the specified `user`. :::warning Account Numbers 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserAccounts(acceptVersion: string, accept: string, userIdentifier: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options?: any): AxiosPromise { + return localVarFp.listUserAccounts(acceptVersion, accept, userIdentifier, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options).then((request) => request(axios, basePath)); + }, + /** + * Merge two or more financial accounts that an end user has identified as duplicates. Provide at least two account GUIDs belonging to the same user. :::danger The response will return a single consolidated account. Any other accounts you provided that were not included in the response will be deleted. This is a destructive action and can\'t be undone. ::: + * @summary Merge accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountsMergeRequestBody} accountsMergeRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + mergeAccounts(acceptVersion: string, userGuid: string, accountsMergeRequestBody: AccountsMergeRequestBody, options?: any): AxiosPromise { + return localVarFp.mergeAccounts(acceptVersion, userGuid, accountsMergeRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readAccount(acceptVersion, accountGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read member account + * @param {string} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readAccountByMember(acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.readAccountByMember(acceptVersion, accountIdentifier, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateAccountByMember(acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateAccountByMember(acceptVersion, accountIdentifier, memberIdentifier, userIdentifier, accountUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * 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. :::warning You must use the user `guid` when setting `user_identifier` in the path. ::: + * @summary Create manual account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public createManualAccount(acceptVersion: string, userIdentifier: string, accountCreateRequestBody: AccountCreateRequestBody, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).createManualAccount(acceptVersion, userIdentifier, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).deleteManualAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, accountIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listAccountNumbersByAccount(acceptVersion, accountIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listAccountNumbersByMember(acceptVersion, memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns an array with information about every account associated with a particular member. + * @summary List account owners by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 listAccountOwnersByMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listAccountOwnersByMember(acceptVersion, memberIdentifier, userIdentifier, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of all the accounts associated with the specified `member`. + * @summary List member accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 AccountsApi + */ + public listMemberAccounts(acceptVersion: string, userIdentifier: string, memberIdentifier: string, memberIsManagedByUser?: boolean, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listMemberAccounts(acceptVersion, userIdentifier, memberIdentifier, memberIsManagedByUser, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of all the accounts associated with the specified `user`. :::warning Account Numbers 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public listUserAccounts(acceptVersion: string, accept: string, userIdentifier: string, page?: number, memberIsManagedByUser?: boolean, isManual?: boolean, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).listUserAccounts(acceptVersion, accept, userIdentifier, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Merge two or more financial accounts that an end user has identified as duplicates. Provide at least two account GUIDs belonging to the same user. :::danger The response will return a single consolidated account. Any other accounts you provided that were not included in the response will be deleted. This is a destructive action and can\'t be undone. ::: + * @summary Merge accounts + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {AccountsMergeRequestBody} accountsMergeRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public mergeAccounts(acceptVersion: string, userGuid: string, accountsMergeRequestBody: AccountsMergeRequestBody, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).mergeAccounts(acceptVersion, userGuid, accountsMergeRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns the specified `account` resource. + * @summary Read account + * @param {string} acceptVersion MX Platform API version. + * @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 AccountsApi + */ + public readAccount(acceptVersion: string, accountGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).readAccount(acceptVersion, accountGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint allows you to read the attributes of an `account` resource. + * @summary Read member account + * @param {string} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public readAccountByMember(acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).readAccountByMember(acceptVersion, accountIdentifier, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.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} acceptVersion MX Platform API version. + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {AccountUpdateRequestBody} accountUpdateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateAccountByMember(acceptVersion: string, accountIdentifier: string, memberIdentifier: string, userIdentifier: string, accountUpdateRequestBody: AccountUpdateRequestBody, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateAccountByMember(acceptVersion, accountIdentifier, memberIdentifier, userIdentifier, accountUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AchReturnApi - axios parameter creator + * @export + */ +export const AchReturnApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * :::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} + */ + 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; + 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(aCHReturnCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * :::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](https://docs.mx.com/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](https://docs.mx.com/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} + */ + 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; + 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 (institutionGuid !== undefined) { + localVarQueryParameter['institution_guid'] = institutionGuid; + } + + if (returnedAt !== undefined) { + localVarQueryParameter['returned_at'] = returnedAt; + } + + if (resolvedStatusAt !== undefined) { + localVarQueryParameter['resolved_status_at'] = resolvedStatusAt; + } + + if (returnCode !== undefined) { + localVarQueryParameter['return_code'] = returnCode; + } + + if (returnStatus !== undefined) { + localVarQueryParameter['return_status'] = returnStatus; + } + + 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, + }; + }, + /** + * :::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} + */ + 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; + 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, + }; + }, + } +}; + +/** + * AchReturnApi - functional programming interface + * @export + */ +export const AchReturnApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AchReturnApiAxiosParamCreator(configuration) + return { + /** + * :::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 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); + }, + /** + * :::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](https://docs.mx.com/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](https://docs.mx.com/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 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); + }, + /** + * :::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 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); + }, + } +}; + +/** + * AchReturnApi - factory interface + * @export + */ +export const AchReturnApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AchReturnApiFp(configuration) + return { + /** + * :::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} + */ + createACHReturn(aCHReturnCreateRequestBody: ACHReturnCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createACHReturn(aCHReturnCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * :::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](https://docs.mx.com/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](https://docs.mx.com/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} + */ + 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)); + }, + /** + * :::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} + */ + readACHRetrun(achReturnGuid: string, options?: any): AxiosPromise { + return localVarFp.readACHRetrun(achReturnGuid, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AchReturnApi - object-oriented interface + * @export + * @class AchReturnApi + * @extends {BaseAPI} + */ +export class AchReturnApi extends BaseAPI { + /** + * :::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 AchReturnApi + */ + public createACHReturn(aCHReturnCreateRequestBody: ACHReturnCreateRequestBody, options?: AxiosRequestConfig) { + return AchReturnApiFp(this.configuration).createACHReturn(aCHReturnCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * :::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](https://docs.mx.com/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](https://docs.mx.com/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 AchReturnApi + */ + 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)); + } + + /** + * :::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 AchReturnApi + */ + public readACHRetrun(achReturnGuid: string, options?: AxiosRequestConfig) { + return AchReturnApiFp(this.configuration).readACHRetrun(achReturnGuid, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * BudgetsApi - axios parameter creator + * @export + */ +export const BudgetsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + autoGenerateBudgets: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('autoGenerateBudgets', 'acceptVersion', acceptVersion) + // 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; + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + createBudget: async (acceptVersion: string, userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createBudget', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * Delete a budget. + * @summary Delete a budget + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteBudget: async (acceptVersion: string, userGuid: string, budgetGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteBudget', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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; + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all budgets + * @summary List all budgets + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllBudgets: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listAllBudgets', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, userGuid: string, budgetGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readSpecificBudget', 'acceptVersion', acceptVersion) + // 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(`{${"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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + updateSpecificBudget: async (acceptVersion: string, userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateSpecificBudget', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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; + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + } +}; + +/** + * BudgetsApi - functional programming interface + * @export + */ +export const BudgetsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BudgetsApiAxiosParamCreator(configuration) + return { + /** + * 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async autoGenerateBudgets(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.autoGenerateBudgets(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 createBudget(acceptVersion: string, userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBudget(acceptVersion, userGuid, budgetCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Delete a budget. + * @summary Delete a budget + * @param {string} acceptVersion MX Platform API version. + * @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 deleteBudget(acceptVersion: string, userGuid: string, budgetGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBudget(acceptVersion, userGuid, budgetGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * List all budgets + * @summary List all budgets + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllBudgets(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllBudgets(acceptVersion, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Read a specific budget. + * @summary Read a specific budget + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, budgetGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpecificBudget(acceptVersion, userGuid, budgetGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Update a specific budget. + * @summary Update a specific budget + * @param {string} acceptVersion MX Platform API version. + * @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 updateSpecificBudget(acceptVersion: string, userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSpecificBudget(acceptVersion, userGuid, budgetGuid, budgetUpdateRequestBody, 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 { + /** + * 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + autoGenerateBudgets(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.autoGenerateBudgets(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + createBudget(acceptVersion: string, userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createBudget(acceptVersion, userGuid, budgetCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a budget. + * @summary Delete a budget + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteBudget(acceptVersion: string, userGuid: string, budgetGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteBudget(acceptVersion, userGuid, budgetGuid, options).then((request) => request(axios, basePath)); + }, + /** + * List all budgets + * @summary List all budgets + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllBudgets(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.listAllBudgets(acceptVersion, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Read a specific budget. + * @summary Read a specific budget + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, budgetGuid: string, options?: any): AxiosPromise { + return localVarFp.readSpecificBudget(acceptVersion, userGuid, budgetGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Update a specific budget. + * @summary Update a specific budget + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + updateSpecificBudget(acceptVersion: string, userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateSpecificBudget(acceptVersion, userGuid, budgetGuid, budgetUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BudgetsApi - object-oriented interface + * @export + * @class BudgetsApi + * @extends {BaseAPI} + */ +export class BudgetsApi extends BaseAPI { + /** + * 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BudgetsApi + */ + public autoGenerateBudgets(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).autoGenerateBudgets(acceptVersion, userGuid, options).then((request) => request(this.axios, this.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} acceptVersion MX Platform API version. + * @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 BudgetsApi + */ + public createBudget(acceptVersion: string, userGuid: string, budgetCreateRequestBody: BudgetCreateRequestBody, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).createBudget(acceptVersion, userGuid, budgetCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a budget. + * @summary Delete a budget + * @param {string} acceptVersion MX Platform API version. + * @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 BudgetsApi + */ + public deleteBudget(acceptVersion: string, userGuid: string, budgetGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).deleteBudget(acceptVersion, userGuid, budgetGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all budgets + * @summary List all budgets + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BudgetsApi + */ + public listAllBudgets(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).listAllBudgets(acceptVersion, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Read a specific budget. + * @summary Read a specific budget + * @param {string} acceptVersion MX Platform API version. + * @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 BudgetsApi + */ + public readSpecificBudget(acceptVersion: string, userGuid: string, budgetGuid: string, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).readSpecificBudget(acceptVersion, userGuid, budgetGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update a specific budget. + * @summary Update a specific budget + * @param {string} acceptVersion MX Platform API version. + * @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 updateSpecificBudget(acceptVersion: string, userGuid: string, budgetGuid: string, budgetUpdateRequestBody?: BudgetUpdateRequestBody, options?: AxiosRequestConfig) { + return BudgetsApiFp(this.configuration).updateSpecificBudget(acceptVersion, userGuid, budgetGuid, budgetUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * CategoriesApi - axios parameter creator + * @export + */ +export const CategoriesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Use this endpoint to create a new custom category for a specific `user`. + * @summary Create category + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createCategory', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createCategory', 'userGuid', userGuid) + // verify required parameter 'categoryCreateRequestBody' is not null or undefined + assertParamExists('createCategory', 'categoryCreateRequestBody', categoryCreateRequestBody) + 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(categoryCreateRequestBody, localVarRequestOptions, configuration) + + 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} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, categoryGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteCategory', 'acceptVersion', acceptVersion) + // verify required parameter 'categoryGuid' is not null or undefined + assertParamExists('deleteCategory', 'categoryGuid', categoryGuid) + // 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))) + .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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 categories associated with a `user`, including both default and custom categories. + * @summary List categories + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listCategories', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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 {string} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listDefaultCategories', 'acceptVersion', acceptVersion) + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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} acceptVersion MX Platform API version. + * @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} + */ + listDefaultCategoriesByUser: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listDefaultCategoriesByUser', 'acceptVersion', acceptVersion) + // 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; + } + + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 either a default category or a custom category. + * @summary Read a custom category + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, categoryGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readCategory', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 default category. + * @summary Read a default category + * @param {string} acceptVersion MX Platform API version. + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readDefaultCategory: async (acceptVersion: string, categoryGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readDefaultCategory', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateCategory', 'acceptVersion', acceptVersion) + // verify required parameter 'categoryGuid' is not null or undefined + assertParamExists('updateCategory', 'categoryGuid', categoryGuid) + // 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))) + .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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCategories(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listDefaultCategories(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listDefaultCategoriesByUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readDefaultCategory(acceptVersion: string, categoryGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readDefaultCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listCategories(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listDefaultCategories(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + listDefaultCategoriesByUser(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listDefaultCategoriesByUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readDefaultCategory(acceptVersion: string, categoryGuid: string, options?: any): AxiosPromise { + return localVarFp.readDefaultCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateCategory(acceptVersion, categoryGuid, userGuid, categoryUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, categoryCreateRequestBody: CategoryCreateRequestBody, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).createCategory(acceptVersion, userGuid, categoryCreateRequestBody, options).then((request) => request(this.axios, this.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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).deleteCategory(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).listCategories(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.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 {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).listDefaultCategories(acceptVersion, page, recordsPerPage, options).then((request) => request(this.axios, this.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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).listDefaultCategoriesByUser(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of either a default category or a custom category. + * @summary Read a custom category + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).readCategory(acceptVersion, categoryGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a default category. + * @summary Read a default category + * @param {string} acceptVersion MX Platform API version. + * @param {string} categoryGuid The unique id for a `category`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CategoriesApi + */ + public readDefaultCategory(acceptVersion: string, categoryGuid: string, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).readDefaultCategory(acceptVersion, categoryGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of a custom category according to its unique GUID. + * @summary Update category + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, categoryGuid: string, userGuid: string, categoryUpdateRequestBody: CategoryUpdateRequestBody, options?: AxiosRequestConfig) { + return CategoriesApiFp(this.configuration).updateCategory(acceptVersion, categoryGuid, userGuid, categoryUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * GoalsApi - axios parameter creator + * @export + */ +export const GoalsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + * @summary Create a goal + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, goalRequestBody: GoalRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createGoal', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * Delete a goal. + * @summary Delete a goal + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, goalGuid: string, userGuid: string, accept: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteGoal', 'acceptVersion', acceptVersion) + // verify required parameter 'goalGuid' is not null or undefined + assertParamExists('deleteGoal', 'goalGuid', goalGuid) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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, + }; + }, + /** + * List all goals a user can set. + * @summary List goals + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, accept: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listGoals', 'acceptVersion', acceptVersion) + // verify required parameter 'accept' is not null or undefined + assertParamExists('listGoals', 'accept', accept) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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, + }; + }, + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, goalGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readGoal', 'acceptVersion', acceptVersion) + // verify required parameter 'goalGuid' is not null or undefined + assertParamExists('readGoal', 'goalGuid', goalGuid) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, repositionRequestBody: RepositionRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('repositionGoals', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/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), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateGoal', 'acceptVersion', acceptVersion) + // verify required parameter 'goalGuid' is not null or undefined + assertParamExists('updateGoal', 'goalGuid', goalGuid) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, goalRequestBody: GoalRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGoal(acceptVersion, userGuid, goalRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Delete a goal. + * @summary Delete a goal + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async deleteGoal(acceptVersion: string, goalGuid: string, userGuid: string, accept: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGoal(acceptVersion, goalGuid, userGuid, accept, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * List all goals a user can set. + * @summary List goals + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accept: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGoals(acceptVersion, accept, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readGoal(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, repositionRequestBody: RepositionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.repositionGoals(acceptVersion, userGuid, repositionRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGoal(acceptVersion, goalGuid, userGuid, updateGoalRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, goalRequestBody: GoalRequestBody, options?: any): AxiosPromise { + return localVarFp.createGoal(acceptVersion, userGuid, goalRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a goal. + * @summary Delete a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, accept: string, options?: any): AxiosPromise { + return localVarFp.deleteGoal(acceptVersion, goalGuid, userGuid, accept, options).then((request) => request(axios, basePath)); + }, + /** + * List all goals a user can set. + * @summary List goals + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accept: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listGoals(acceptVersion, accept, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readGoal(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, repositionRequestBody: RepositionRequestBody, options?: any): AxiosPromise { + return localVarFp.repositionGoals(acceptVersion, userGuid, repositionRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: any): AxiosPromise { + return localVarFp.updateGoal(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, goalRequestBody: GoalRequestBody, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).createGoal(acceptVersion, userGuid, goalRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a goal. + * @summary Delete a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, accept: string, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).deleteGoal(acceptVersion, goalGuid, userGuid, accept, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all goals a user can set. + * @summary List goals + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accept: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).listGoals(acceptVersion, accept, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Read a specific goal. + * @summary Read a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).readGoal(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, repositionRequestBody: RepositionRequestBody, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).repositionGoals(acceptVersion, userGuid, repositionRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint updates a specific goal. + * @summary Update a goal + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, goalGuid: string, userGuid: string, updateGoalRequestBody: UpdateGoalRequestBody, options?: AxiosRequestConfig) { + return GoalsApiFp(this.configuration).updateGoal(acceptVersion, goalGuid, userGuid, updateGoalRequestBody, 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} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listAccountsInsight', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listCategoriesInsight', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 an account GUID. + * @summary List insights by account + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listInsightsByAccount', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 transaction GUID. + * @summary List insights by transaction + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listInsightsByTransaction', 'acceptVersion', acceptVersion) + // verify required parameter 'transactionGuid' is not null or undefined + assertParamExists('listInsightsByTransaction', 'transactionGuid', transactionGuid) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + listInsightsUser: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listInsightsUser', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 merchants associated with the insight. + * @summary List all merchants associated with an insight + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listMerchantsInsight: async (acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listMerchantsInsight', 'acceptVersion', acceptVersion) + // 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))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listScheduledPaymentsInsight: async (acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listScheduledPaymentsInsight', 'acceptVersion', acceptVersion) + // 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))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + listTransactionsInsight: async (acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactionsInsight', 'acceptVersion', acceptVersion) + // 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; + } + + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 an insight according to its unique GUID. + * @summary Read insight + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readInsightUser: async (acceptVersion: string, userGuid: string, insightGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readInsightUser', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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; + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 an insight according to its unique GUID. + * @summary Update insight + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateInsight', 'acceptVersion', acceptVersion) + // 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 '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; + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCategoriesInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsByAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsByTransaction(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInsightsUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMerchantsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listScheduledPaymentsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readInsightUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listAccountsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listCategoriesInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsByAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsByTransaction(acceptVersion, transactionGuid, 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} acceptVersion MX Platform API version. + * @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} + */ + listInsightsUser(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + listMerchantsInsight(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMerchantsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + listScheduledPaymentsInsight(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listScheduledPaymentsInsight(acceptVersion, userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listTransactionsInsight(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTransactionsInsight(acceptVersion, userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of an insight according to its unique GUID. + * @summary Read insight + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readInsightUser(acceptVersion: string, userGuid: string, insightGuid: string, options?: any): AxiosPromise { + return localVarFp.readInsightUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listAccountsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listCategoriesInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsByAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, transactionGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsByTransaction(acceptVersion, transactionGuid, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listMerchantsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listScheduledPaymentsInsight(acceptVersion, userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listTransactionsInsight(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).readInsightUser(acceptVersion, userGuid, insightGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of an insight according to its unique GUID. + * @summary Update insight + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, insightGuid: string, insightUpdateRequestBody: InsightUpdateRequestBody, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).updateInsight(acceptVersion, userGuid, insightGuid, insightUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * 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 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: 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); + 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 (isoCountryCode) { + localVarQueryParameter['iso_country_code'] = isoCountryCode; + } + + 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 see which credentials will be needed to create a member for a specific institution. Passing an invalid `institution_identifier` returns a `404`. + * @summary List institution credentials + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionIdentifier The identifier for the institution. For this identifier, use either the `institution_code` or the institution `guid`. + * @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: async (acceptVersion: string, institutionIdentifier: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listInstitutionCredentials', 'acceptVersion', acceptVersion) + // verify required parameter 'institutionIdentifier' is not null or undefined + assertParamExists('listInstitutionCredentials', 'institutionIdentifier', institutionIdentifier) + const localVarPath = `/institutions/{institution_identifier}/credentials` + .replace(`{${"institution_identifier"}}`, encodeURIComponent(String(institutionIdentifier))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists financial institutions available through the MX platform. This endpoint has been updated in `v20250224` to enhance search and filtering capabilities based on the products supported by each institution. + * @summary List institutions + * @param {string} acceptVersion MX Platform API version. + * @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 {Array} [supportedProducts] Filters institutions that support specific products. Values may include account_verification, identity_verification, transactions, history, statements, investments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInstitutions: async (acceptVersion: string, name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportedProducts?: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listInstitutions', 'acceptVersion', acceptVersion) + 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 (isoCountryCode) { + localVarQueryParameter['iso_country_code'] = isoCountryCode; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (supportedProducts) { + localVarQueryParameter['supported_products'] = supportedProducts; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 information about the institution specified by `institution_code`. The `v20250224` update enhances the granularity of the information provided about the services and products supported by the institution. + * @summary Read institution + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionCode A unique identifier for each institution, defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readInstitution: async (acceptVersion: string, institutionCode: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readInstitution', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + 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 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_identifier` returns a `404`. + * @summary List institution credentials + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionIdentifier The identifier for the institution. For this identifier, use either the `institution_code` or the institution `guid`. + * @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(acceptVersion: string, institutionIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInstitutionCredentials(acceptVersion, institutionIdentifier, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists financial institutions available through the MX platform. This endpoint has been updated in `v20250224` to enhance search and filtering capabilities based on the products supported by each institution. + * @summary List institutions + * @param {string} acceptVersion MX Platform API version. + * @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 {Array} [supportedProducts] Filters institutions that support specific products. Values may include account_verification, identity_verification, transactions, history, statements, investments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInstitutions(acceptVersion: string, name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportedProducts?: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInstitutions(acceptVersion, name, isoCountryCode, page, recordsPerPage, supportedProducts, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns information about the institution specified by `institution_code`. The `v20250224` update enhances the granularity of the information provided about the services and products supported by the institution. + * @summary Read institution + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionCode A unique identifier for each institution, defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readInstitution(acceptVersion: string, institutionCode: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readInstitution(acceptVersion, 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 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_identifier` returns a `404`. + * @summary List institution credentials + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionIdentifier The identifier for the institution. For this identifier, use either the `institution_code` or the institution `guid`. + * @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(acceptVersion: string, institutionIdentifier: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInstitutionCredentials(acceptVersion, institutionIdentifier, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Lists financial institutions available through the MX platform. This endpoint has been updated in `v20250224` to enhance search and filtering capabilities based on the products supported by each institution. + * @summary List institutions + * @param {string} acceptVersion MX Platform API version. + * @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 {Array} [supportedProducts] Filters institutions that support specific products. Values may include account_verification, identity_verification, transactions, history, statements, investments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInstitutions(acceptVersion: string, name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportedProducts?: Array, options?: any): AxiosPromise { + return localVarFp.listInstitutions(acceptVersion, name, isoCountryCode, page, recordsPerPage, supportedProducts, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns information about the institution specified by `institution_code`. The `v20250224` update enhances the granularity of the information provided about the services and products supported by the institution. + * @summary Read institution + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionCode A unique identifier for each institution, defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readInstitution(acceptVersion: string, institutionCode: string, options?: any): AxiosPromise { + return localVarFp.readInstitution(acceptVersion, institutionCode, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * 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 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)); + } + + /** + * Use this endpoint to see which credentials will be needed to create a member for a specific institution. Passing an invalid `institution_identifier` returns a `404`. + * @summary List institution credentials + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionIdentifier The identifier for the institution. For this identifier, use either the `institution_code` or the institution `guid`. + * @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(acceptVersion: string, institutionIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).listInstitutionCredentials(acceptVersion, institutionIdentifier, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists financial institutions available through the MX platform. This endpoint has been updated in `v20250224` to enhance search and filtering capabilities based on the products supported by each institution. + * @summary List institutions + * @param {string} acceptVersion MX Platform API version. + * @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 {Array} [supportedProducts] Filters institutions that support specific products. Values may include account_verification, identity_verification, transactions, history, statements, investments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstitutionsApi + */ + public listInstitutions(acceptVersion: string, name?: string, isoCountryCode?: Array, page?: number, recordsPerPage?: number, supportedProducts?: Array, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).listInstitutions(acceptVersion, name, isoCountryCode, page, recordsPerPage, supportedProducts, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns information about the institution specified by `institution_code`. The `v20250224` update enhances the granularity of the information provided about the services and products supported by the institution. + * @summary Read institution + * @param {string} acceptVersion MX Platform API version. + * @param {string} institutionCode A unique identifier for each institution, defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstitutionsApi + */ + public readInstitution(acceptVersion: string, institutionCode: string, options?: AxiosRequestConfig) { + return InstitutionsApiFp(this.configuration).readInstitution(acceptVersion, institutionCode, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const ListInstitutionsSupportedProductsEnum = { + AccountVerification: 'account_verification', + IdentityVerification: 'identity_verification', + Transactions: 'transactions', + History: 'history', + Statements: 'statements', + Investments: 'investments', + Rewards: 'rewards' +} as const; +export type ListInstitutionsSupportedProductsEnum = typeof ListInstitutionsSupportedProductsEnum[keyof typeof ListInstitutionsSupportedProductsEnum]; + + +/** + * InvestmentHoldingsApi - axios parameter creator + * @export + */ +export const InvestmentHoldingsApiAxiosParamCreator = function (configuration?: 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deactivateUser: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deactivateUser', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listHoldings', 'acceptVersion', acceptVersion) + // 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; + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint lists all holdings associated with the particular account defined. + * @summary List holdings by account + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listHoldingsByAccount', 'acceptVersion', acceptVersion) + // 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}/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); + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This endpoint lists all holdings associated with the specified member. + * @summary List holdings by member + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listHoldingsByMember: async (acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listHoldingsByMember', 'acceptVersion', acceptVersion) + // 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}/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. + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific `holding`. + * @summary Read holding + * @param {string} acceptVersion MX Platform API version. + * @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: async (acceptVersion: string, holdingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readHolding', 'acceptVersion', acceptVersion) + // 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}/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; + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deactivateUser(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deactivateUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldings(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldingsByAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listHoldingsByMember(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, holdingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readHolding(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deactivateUser(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deactivateUser(acceptVersion, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listHoldings(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listHoldingsByAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + listHoldingsByMember(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listHoldingsByMember(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, holdingGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readHolding(acceptVersion, holdingGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).deactivateUser(acceptVersion, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint lists all holdings associated with the user across all accounts. + * @summary List holdings by user + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).listHoldings(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint lists all holdings associated with the particular account defined. + * @summary List holdings by account + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).listHoldingsByAccount(acceptVersion, accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint lists all holdings associated with the specified member. + * @summary List holdings by member + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).listHoldingsByMember(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, holdingGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return InvestmentHoldingsApiFp(this.configuration).readHolding(acceptVersion, holdingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ManagedDataDeprecatedApi - axios parameter creator + * @export + */ +export const ManagedDataDeprecatedApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Use this endpoint to create a partner-managed account. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + createManagedAccount: async (acceptVersion: string, memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createManagedAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('createManagedAccount', 'memberGuid', memberGuid) + // 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))) + .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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to create a new partner-managed `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + createManagedMember: async (acceptVersion: string, userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createManagedMember', 'acceptVersion', acceptVersion) + // 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` + .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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + createManagedTransaction: async (acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createManagedTransaction', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + deleteManagedAccount: async (acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteManagedAccount', 'acceptVersion', acceptVersion) + // 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) + // 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))) + .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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 partner-managed `member`. The endpoint will respond with a status of `204 No Content` without a resource. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + deleteManagedMember: async (acceptVersion: string, memberGuid: string, accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteManagedMember', 'acceptVersion', acceptVersion) + // 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('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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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 delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + deleteManagedTransaction: async (acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteManagedTransaction', 'acceptVersion', acceptVersion) + // 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('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); + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 retrieve a list of all the partner-managed accounts associated with the given partner-managed member. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed accounts + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedAccounts: async (acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listManagedAccounts', 'acceptVersion', acceptVersion) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listManagedAccounts', 'memberGuid', memberGuid) + // 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))) + .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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration) ::: + * @summary List managed institutions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedInstitutions: async (acceptVersion: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listManagedInstitutions', 'acceptVersion', acceptVersion) + 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; + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed members + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedMembers: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listManagedMembers', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + 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); + 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 transactions associated with the specified `account`, scoped through a `user` and a `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed transactions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedTransactions: async (acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listManagedTransactions', 'acceptVersion', acceptVersion) + // verify required parameter 'accountGuid' is not null or undefined + 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('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); + 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 (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 partner-managed account according to its unique guid. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + readManagedAccount: async (acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readManagedAccount', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 attributes of the specified partner-managed`member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + readManagedMember: async (acceptVersion: string, memberGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readManagedMember', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + readManagedTransaction: async (acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readManagedTransaction', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 partner-managed account according to its unique GUID. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + updateManagedAccount: async (acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateManagedAccount', 'acceptVersion', acceptVersion) + // 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; + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed member + * @param {string} acceptVersion MX Platform API version. + * @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). :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + updateManagedMember: async (acceptVersion: string, memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateManagedMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('updateManagedMember', '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}` + .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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + updateManagedTransaction: async (acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateManagedTransaction', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + } +}; + +/** + * ManagedDataDeprecatedApi - functional programming interface + * @export + */ +export const ManagedDataDeprecatedApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ManagedDataDeprecatedApiAxiosParamCreator(configuration) + return { + /** + * Use this endpoint to create a partner-managed account. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async createManagedAccount(acceptVersion: string, memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedAccount(acceptVersion, memberGuid, userGuid, managedAccountCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to create a new partner-managed `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async createManagedMember(acceptVersion: string, userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedMember(acceptVersion, userGuid, managedMemberCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to create a new partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async createManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManagedTransaction(acceptVersion, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async deleteManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedAccount(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async deleteManagedMember(acceptVersion: string, memberGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedMember(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async deleteManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManagedTransaction(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed accounts + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async listManagedAccounts(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedAccounts(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration) ::: + * @summary List managed institutions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async listManagedInstitutions(acceptVersion: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedInstitutions(acceptVersion, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed members + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async listManagedMembers(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listManagedMembers(acceptVersion, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed transactions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async listManagedTransactions(acceptVersion: string, 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(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async readManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedAccount(acceptVersion, accountGuid, memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns the attributes of the specified partner-managed`member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async readManagedMember(acceptVersion: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedMember(acceptVersion, memberGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async readManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readManagedTransaction(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async updateManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedAccount(acceptVersion, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed member + * @param {string} acceptVersion MX Platform API version. + * @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). :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async updateManagedMember(acceptVersion: string, memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedMember(acceptVersion, memberGuid, userGuid, managedMemberUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + async updateManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateManagedTransaction(acceptVersion, accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ManagedDataDeprecatedApi - factory interface + * @export + */ +export const ManagedDataDeprecatedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ManagedDataDeprecatedApiFp(configuration) + return { + /** + * Use this endpoint to create a partner-managed account. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + createManagedAccount(acceptVersion: string, memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManagedAccount(acceptVersion, memberGuid, userGuid, managedAccountCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to create a new partner-managed `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + createManagedMember(acceptVersion: string, userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManagedMember(acceptVersion, userGuid, managedMemberCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to create a new partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + createManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManagedTransaction(acceptVersion, accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + deleteManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManagedAccount(acceptVersion, accountGuid, memberGuid, userGuid, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + deleteManagedMember(acceptVersion: string, memberGuid: string, accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManagedMember(acceptVersion, memberGuid, accept, userGuid, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + deleteManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManagedTransaction(acceptVersion, accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-managed member. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed accounts + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedAccounts(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedAccounts(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration) ::: + * @summary List managed institutions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedInstitutions(acceptVersion: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedInstitutions(acceptVersion, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns a list of all the partner-managed members associated with the specified `user`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed members + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedMembers(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedMembers(acceptVersion, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed transactions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + listManagedTransactions(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listManagedTransactions(acceptVersion, accountGuid, memberGuid, userGuid, page, fromDate, toDate, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + readManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readManagedAccount(acceptVersion, accountGuid, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns the attributes of the specified partner-managed`member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + readManagedMember(acceptVersion: string, memberGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readManagedMember(acceptVersion, memberGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + readManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readManagedTransaction(acceptVersion, accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of a partner-managed account according to its unique GUID. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + updateManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateManagedAccount(acceptVersion, accountGuid, memberGuid, userGuid, managedAccountUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed member + * @param {string} acceptVersion MX Platform API version. + * @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). :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + updateManagedMember(acceptVersion: string, memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateManagedMember(acceptVersion, memberGuid, userGuid, managedMemberUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + */ + updateManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateManagedTransaction(acceptVersion, accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ManagedDataDeprecatedApi - object-oriented interface + * @export + * @class ManagedDataDeprecatedApi + * @extends {BaseAPI} + */ +export class ManagedDataDeprecatedApi extends BaseAPI { + /** + * Use this endpoint to create a partner-managed account. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public createManagedAccount(acceptVersion: string, memberGuid: string, userGuid: string, managedAccountCreateRequestBody: ManagedAccountCreateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).createManagedAccount(acceptVersion, memberGuid, userGuid, managedAccountCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to create a new partner-managed `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public createManagedMember(acceptVersion: string, userGuid: string, managedMemberCreateRequestBody: ManagedMemberCreateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).createManagedMember(acceptVersion, userGuid, managedMemberCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to create a new partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Create managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public createManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedTransactionCreateRequestBody: ManagedTransactionCreateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).createManagedTransaction(acceptVersion, accountGuid, memberGuid, userGuid, managedTransactionCreateRequestBody, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public deleteManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).deleteManagedAccount(acceptVersion, accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public deleteManagedMember(acceptVersion: string, memberGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).deleteManagedMember(acceptVersion, memberGuid, accept, userGuid, options).then((request) => request(this.axios, this.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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Delete managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public deleteManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).deleteManagedTransaction(acceptVersion, accountGuid, memberGuid, transactionGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-managed member. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed accounts + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public listManagedAccounts(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).listManagedAccounts(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration) ::: + * @summary List managed institutions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public listManagedInstitutions(acceptVersion: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).listManagedInstitutions(acceptVersion, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of all the partner-managed members associated with the specified `user`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed members + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public listManagedMembers(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).listManagedMembers(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary List managed transactions + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public listManagedTransactions(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, page?: number, fromDate?: string, toDate?: string, recordsPerPage?: number, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).listManagedTransactions(acceptVersion, accountGuid, memberGuid, userGuid, page, fromDate, toDate, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a partner-managed account according to its unique guid. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public readManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).readManagedAccount(acceptVersion, accountGuid, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns the attributes of the specified partner-managed`member`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed member + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public readManagedMember(acceptVersion: string, memberGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).readManagedMember(acceptVersion, memberGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Requests to this endpoint will return the attributes of the specified partner-managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Read managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public readManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).readManagedTransaction(acceptVersion, 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. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed account + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public updateManagedAccount(acceptVersion: string, accountGuid: string, memberGuid: string, userGuid: string, managedAccountUpdateRequestBody: ManagedAccountUpdateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).updateManagedAccount(acceptVersion, 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`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed member + * @param {string} acceptVersion MX Platform API version. + * @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). :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public updateManagedMember(acceptVersion: string, memberGuid: string, userGuid: string, managedMemberUpdateRequestBody: ManagedMemberUpdateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).updateManagedMember(acceptVersion, memberGuid, userGuid, managedMemberUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of the specified partner_managed `transaction`. :::warning Deprecated This endpoint has been deprecated. For more information, reference the [Migration guide](https://docs.mx.com/api-reference/platform-api/overview/migration). ::: + * @summary Update managed transaction + * @param {string} acceptVersion MX Platform API version. + * @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. + * @deprecated + * @throws {RequiredError} + * @memberof ManagedDataDeprecatedApi + */ + public updateManagedTransaction(acceptVersion: string, accountGuid: string, memberGuid: string, transactionGuid: string, userGuid: string, managedTransactionUpdateRequestBody: ManagedTransactionUpdateRequestBody, options?: AxiosRequestConfig) { + return ManagedDataDeprecatedApiFp(this.configuration).updateManagedTransaction(acceptVersion, accountGuid, memberGuid, transactionGuid, userGuid, managedTransactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MembersApi - axios parameter creator + * @export + */ +export const MembersApiAxiosParamCreator = 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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} + */ + aggregateMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('aggregateMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('aggregateMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('aggregateMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/aggregate` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } + + + + 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkBalances: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('checkBalances', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('checkBalances', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('checkBalances', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/check_balance` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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, you\'ll 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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: async (acceptVersion: string, userIdentifier: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createMember', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('createMember', 'userIdentifier', userIdentifier) + // verify required parameter 'memberCreateRequestBody' is not null or undefined + assertParamExists('createMember', 'memberCreateRequestBody', memberCreateRequestBody) + const localVarPath = `/users/{user_identifier}/members` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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), + options: localVarRequestOptions, + }; + }, + /** + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('deleteMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('deleteMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + identifyMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('identifyMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('identifyMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('identifyMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/identify` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 (acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listMemberChallenges', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('listMemberChallenges', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listMemberChallenges', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/challenges` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listMemberCredentials: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listMemberCredentials', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('listMemberCredentials', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listMemberCredentials', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/credentials` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 member associated with a specific user. + * @summary List members + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listMembers: async (acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, useCase?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listMembers', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listMembers', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (useCase !== undefined) { + localVarQueryParameter['use_case'] = useCase; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific member. + * @summary Read member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('readMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('readMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. The results returned by this endpoint should determine what you do next in order to successfully aggregate a member. + * @summary Read member status + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMemberStatus: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readMemberStatus', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('readMemberStatus', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('readMemberStatus', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/status` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resumeAggregation: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberResumeRequestBody: MemberResumeRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('resumeAggregation', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('resumeAggregation', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('resumeAggregation', 'userIdentifier', userIdentifier) + // verify required parameter 'memberResumeRequestBody' is not null or undefined + assertParamExists('resumeAggregation', 'memberResumeRequestBody', memberResumeRequestBody) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/resume` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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} + */ + updateMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('updateMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('updateMember', 'userIdentifier', userIdentifier) + // verify required parameter 'memberUpdateRequestBody' is not null or undefined + assertParamExists('updateMember', 'memberUpdateRequestBody', memberUpdateRequestBody) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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(memberUpdateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * The verify endpoint begins a verification process for a member. + * @summary Verify member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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} + */ + verifyMember: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('verifyMember', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('verifyMember', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('verifyMember', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/verify` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + if (xCALLBACKPAYLOAD != null) { + localVarHeaderParameter['X-CALLBACK-PAYLOAD'] = String(xCALLBACKPAYLOAD); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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 aggregateMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.aggregateMember(acceptVersion, memberIdentifier, userIdentifier, xCALLBACKPAYLOAD, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async checkBalances(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkBalances(acceptVersion, memberIdentifier, userIdentifier, 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, you\'ll 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, userIdentifier: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMember(acceptVersion, userIdentifier, memberCreateRequestBody, xCALLBACKPAYLOAD, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMember(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async identifyMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.identifyMember(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberChallenges(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMemberCredentials(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listMembers(acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMembers(acceptVersion, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMember(acceptVersion, memberIdentifier, userIdentifier, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint provides the status of the members most recent aggregation event. The results returned by this endpoint should determine what you do next in order to successfully aggregate a member. + * @summary Read member status + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMemberStatus(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMemberStatus(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resumeAggregation(acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberResumeRequestBody: MemberResumeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resumeAggregation(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateMember(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.verifyMember(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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} + */ + aggregateMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.aggregateMember(acceptVersion, memberIdentifier, userIdentifier, xCALLBACKPAYLOAD, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkBalances(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.checkBalances(acceptVersion, memberIdentifier, userIdentifier, 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, you\'ll 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, userIdentifier: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.createMember(acceptVersion, userIdentifier, memberCreateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); + }, + /** + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.deleteMember(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(axios, basePath)); + }, + /** + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + identifyMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.identifyMember(acceptVersion, memberIdentifier, userIdentifier, 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 + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMemberChallenges(acceptVersion, memberIdentifier, userIdentifier, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + * @summary List member credentials + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + listMemberCredentials(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMemberCredentials(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listMembers(acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, useCase?: string, options?: any): AxiosPromise { + return localVarFp.listMembers(acceptVersion, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.readMember(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint provides the status of the members most recent aggregation event. The results returned by this endpoint should determine what you do next in order to successfully aggregate a member. + * @summary Read member status + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMemberStatus(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.readMemberStatus(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resumeAggregation(acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberResumeRequestBody: MemberResumeRequestBody, options?: any): AxiosPromise { + return localVarFp.resumeAggregation(acceptVersion, memberIdentifier, userIdentifier, memberResumeRequestBody, 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 + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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} + */ + updateMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.updateMember(acceptVersion, memberIdentifier, userIdentifier, memberUpdateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); + }, + /** + * The verify endpoint begins a verification process for a member. + * @summary Verify member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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} + */ + verifyMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.verifyMember(acceptVersion, memberIdentifier, userIdentifier, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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 aggregateMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).aggregateMember(acceptVersion, memberIdentifier, userIdentifier, xCALLBACKPAYLOAD, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public checkBalances(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).checkBalances(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.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, you\'ll 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, userIdentifier: string, memberCreateRequestBody: MemberCreateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).createMember(acceptVersion, userIdentifier, memberCreateRequestBody, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Accessing this endpoint will permanently delete a member. + * @summary Delete member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public deleteMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).deleteMember(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * The identify endpoint begins an identification process for an already-existing member. + * @summary Identify member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public identifyMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).identifyMember(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.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 + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).listMemberChallenges(acceptVersion, memberIdentifier, userIdentifier, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + * @summary List member credentials + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).listMemberCredentials(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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/or `MONEY_MOVEMENT`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public listMembers(acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, useCase?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).listMembers(acceptVersion, userIdentifier, page, recordsPerPage, useCase, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific member. + * @summary Read member + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public readMember(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).readMember(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint provides the status of the members most recent aggregation event. The results returned by this endpoint should determine what you do next in order to successfully aggregate a member. + * @summary Read member status + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public readMemberStatus(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).readMemberStatus(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication. + * @summary Resume aggregation + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {MemberResumeRequestBody} memberResumeRequestBody Member object with MFA challenge answers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MembersApi + */ + public resumeAggregation(acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberResumeRequestBody: MemberResumeRequestBody, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).resumeAggregation(acceptVersion, memberIdentifier, userIdentifier, memberResumeRequestBody, options).then((request) => request(this.axios, this.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 + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, memberUpdateRequestBody: MemberUpdateRequestBody, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).updateMember(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} [xCALLBACKPAYLOAD] The base64 encoded string defined in this header will be returned in the [Member](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return MembersApiFp(this.configuration).verifyMember(acceptVersion, memberIdentifier, userIdentifier, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MerchantsApi - axios parameter creator + * @export + */ +export const MerchantsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This endpoint returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listMerchants: async (acceptVersion: string, name?: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listMerchants', 'acceptVersion', acceptVersion) + 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 (name !== undefined) { + localVarQueryParameter['name'] = name; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about a particular merchant, such as a logo, name, and website. + * @summary Read merchant + * @param {string} acceptVersion MX Platform API version. + * @param {string} merchantGuid The unique id for a `merchant`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMerchant: async (acceptVersion: string, merchantGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readMerchant', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. The `merchant_location_guid` can be found on `transaction` objects. + * @summary Read merchant location + * @param {string} acceptVersion MX Platform API version. + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMerchantLocation: async (acceptVersion: string, merchantLocationGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readMerchantLocation', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * This endpoint returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} acceptVersion MX Platform API version. + * @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 listMerchants(acceptVersion: string, name?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMerchants(acceptVersion, name, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @param {string} merchantGuid The unique id for a `merchant`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMerchant(acceptVersion: string, merchantGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMerchant(acceptVersion, merchantGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This endpoint returns the specified `merchant_location` resource. The `merchant_location_guid` can be found on `transaction` objects. + * @summary Read merchant location + * @param {string} acceptVersion MX Platform API version. + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMerchantLocation(acceptVersion: string, merchantLocationGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMerchantLocation(acceptVersion, 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 returns a paginated list of all the merchants in the MX system. + * @summary List merchants + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listMerchants(acceptVersion: string, name?: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMerchants(acceptVersion, name, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Returns information about a particular merchant, such as a logo, name, and website. + * @summary Read merchant + * @param {string} acceptVersion MX Platform API version. + * @param {string} merchantGuid The unique id for a `merchant`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMerchant(acceptVersion: string, merchantGuid: string, options?: any): AxiosPromise { + return localVarFp.readMerchant(acceptVersion, merchantGuid, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMerchantLocation(acceptVersion: string, merchantLocationGuid: string, options?: any): AxiosPromise { + return localVarFp.readMerchantLocation(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, name?: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return MerchantsApiFp(this.configuration).listMerchants(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} merchantGuid The unique id for a `merchant`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantsApi + */ + public readMerchant(acceptVersion: string, merchantGuid: string, options?: AxiosRequestConfig) { + return MerchantsApiFp(this.configuration).readMerchant(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} merchantLocationGuid The unique id for a `merchant_location`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantsApi + */ + public readMerchantLocation(acceptVersion: string, merchantLocationGuid: string, options?: AxiosRequestConfig) { + return MerchantsApiFp(this.configuration).readMerchantLocation(acceptVersion, 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 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} acceptVersion MX Platform API version. + * @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} + */ + createMicrodeposit: async (acceptVersion: string, userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createMicrodeposit', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteMicrodeposit: async (acceptVersion: string, microDepositGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteMicrodeposit', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserMicrodeposits: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listUserMicrodeposits', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 the account verifications associated with the user, as well as the status of those verifications. + * @summary List all verifications for a user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserVerifications: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listUserVerifications', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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} acceptVersion MX Platform API version. + * @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} + */ + readUserMicrodeposit: async (acceptVersion: string, microDepositGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readUserMicrodeposit', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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} acceptVersion MX Platform API version. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + verifyMicrodeposit: async (acceptVersion: string, microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('verifyMicrodeposit', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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} acceptVersion MX Platform API version. + * @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 createMicrodeposit(acceptVersion: string, userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMicrodeposit(acceptVersion, userGuid, microdepositRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} acceptVersion MX Platform API version. + * @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 deleteMicrodeposit(acceptVersion: string, microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMicrodeposit(acceptVersion, microDepositGuid, 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listUserMicrodeposits(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserMicrodeposits(acceptVersion, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listUserVerifications(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserVerifications(acceptVersion, 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.

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} acceptVersion MX Platform API version. + * @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 readUserMicrodeposit(acceptVersion: string, microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readUserMicrodeposit(acceptVersion, microDepositGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async verifyMicrodeposit(acceptVersion: string, microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.verifyMicrodeposit(acceptVersion, 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 { + /** + * 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} acceptVersion MX Platform API version. + * @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} + */ + createMicrodeposit(acceptVersion: string, userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: any): AxiosPromise { + return localVarFp.createMicrodeposit(acceptVersion, userGuid, microdepositRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteMicrodeposit(acceptVersion: string, microDepositGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteMicrodeposit(acceptVersion, microDepositGuid, userGuid, 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserMicrodeposits(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.listUserMicrodeposits(acceptVersion, userGuid, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listUserVerifications(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.listUserVerifications(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + readUserMicrodeposit(acceptVersion: string, microDepositGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readUserMicrodeposit(acceptVersion, microDepositGuid, userGuid, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + verifyMicrodeposit(acceptVersion: string, microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: any): AxiosPromise { + return localVarFp.verifyMicrodeposit(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).createMicrodeposit(acceptVersion, userGuid, microdepositRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).deleteMicrodeposit(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).listUserMicrodeposits(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).listUserVerifications(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).readUserMicrodeposit(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, microDepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).verifyMicrodeposit(acceptVersion, microDepositGuid, microdepositVerifyRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MonthlyCashFlowProfileApi - axios parameter creator + * @export + */ +export const MonthlyCashFlowProfileApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMonthlyCashFlowProfile: async (userIdentifier: string, acceptVersion: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('readMonthlyCashFlowProfile', 'userIdentifier', userIdentifier) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readMonthlyCashFlowProfile', 'acceptVersion', acceptVersion) + const localVarPath = `/users/{user_identifier}/monthly_cash_flow_profile` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateMonthlyCashFlowProfile: async (userIdentifier: string, acceptVersion: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('updateMonthlyCashFlowProfile', 'userIdentifier', userIdentifier) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateMonthlyCashFlowProfile', 'acceptVersion', acceptVersion) + // verify required parameter 'monthlyCashFlowProfileRequestBody' is not null or undefined + assertParamExists('updateMonthlyCashFlowProfile', 'monthlyCashFlowProfileRequestBody', monthlyCashFlowProfileRequestBody) + const localVarPath = `/users/{user_identifier}/monthly_cash_flow_profile` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readMonthlyCashFlowProfile(userIdentifier: string, acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readMonthlyCashFlowProfile(userIdentifier, acceptVersion, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateMonthlyCashFlowProfile(userIdentifier: string, acceptVersion: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateMonthlyCashFlowProfile(userIdentifier, acceptVersion, 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 { + /** + * Read monthly cash flow profile. + * @summary Read monthly cash flow profile + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readMonthlyCashFlowProfile(userIdentifier: string, acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.readMonthlyCashFlowProfile(userIdentifier, acceptVersion, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + * @summary Update monthly cash flow profile + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateMonthlyCashFlowProfile(userIdentifier: string, acceptVersion: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: any): AxiosPromise { + return localVarFp.updateMonthlyCashFlowProfile(userIdentifier, acceptVersion, 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} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MonthlyCashFlowProfileApi + */ + public readMonthlyCashFlowProfile(userIdentifier: string, acceptVersion: string, options?: AxiosRequestConfig) { + return MonthlyCashFlowProfileApiFp(this.configuration).readMonthlyCashFlowProfile(userIdentifier, acceptVersion, 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} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {MonthlyCashFlowProfileRequestBody} monthlyCashFlowProfileRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MonthlyCashFlowProfileApi + */ + public updateMonthlyCashFlowProfile(userIdentifier: string, acceptVersion: string, monthlyCashFlowProfileRequestBody: MonthlyCashFlowProfileRequestBody, options?: AxiosRequestConfig) { + return MonthlyCashFlowProfileApiFp(this.configuration).updateMonthlyCashFlowProfile(userIdentifier, acceptVersion, monthlyCashFlowProfileRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * NotificationsApi - axios parameter creator + * @export + */ +export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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} acceptVersion MX Platform API version. + * @param {NotificationRequestBody} notificationRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNotification: async (userGuid: string, acceptVersion: string, notificationRequestBody: NotificationRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('createNotification', 'userGuid', userGuid) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createNotification', 'acceptVersion', acceptVersion) + // verify required parameter 'notificationRequestBody' is not null or undefined + assertParamExists('createNotification', 'notificationRequestBody', notificationRequestBody) + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(notificationRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listNotifications: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listNotifications', 'acceptVersion', acceptVersion) + // 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 (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (recordsPerPage !== undefined) { + localVarQueryParameter['records_per_page'] = recordsPerPage; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readNotifications: async (userGuid: string, notificationGuid: string, acceptVersion: 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) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readNotifications', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * 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} acceptVersion MX Platform API version. + * @param {NotificationRequestBody} notificationRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createNotification(userGuid: string, acceptVersion: string, notificationRequestBody: NotificationRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createNotification(userGuid, acceptVersion, notificationRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} acceptVersion MX Platform API version. + * @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 listNotifications(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listNotifications(acceptVersion, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readNotifications(userGuid: string, notificationGuid: string, acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readNotifications(userGuid, notificationGuid, acceptVersion, 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 { + /** + * 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} acceptVersion MX Platform API version. + * @param {NotificationRequestBody} notificationRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNotification(userGuid: string, acceptVersion: string, notificationRequestBody: NotificationRequestBody, options?: any): AxiosPromise { + return localVarFp.createNotification(userGuid, acceptVersion, notificationRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * All notifications for the user can be listed, including notifications created by MX for other channels besides `PUSH`. + * @summary List notifications + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listNotifications(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listNotifications(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(axios, 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readNotifications(userGuid: string, notificationGuid: string, acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.readNotifications(userGuid, notificationGuid, acceptVersion, 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} acceptVersion MX Platform API version. + * @param {NotificationRequestBody} notificationRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public createNotification(userGuid: string, acceptVersion: string, notificationRequestBody: NotificationRequestBody, options?: AxiosRequestConfig) { + return NotificationsApiFp(this.configuration).createNotification(userGuid, acceptVersion, notificationRequestBody, 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} acceptVersion MX Platform API version. + * @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 NotificationsApi + */ + public listNotifications(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return NotificationsApiFp(this.configuration).listNotifications(acceptVersion, userGuid, 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public readNotifications(userGuid: string, notificationGuid: string, acceptVersion: string, options?: AxiosRequestConfig) { + return NotificationsApiFp(this.configuration).readNotifications(userGuid, notificationGuid, acceptVersion, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ProcessorTokenApi - axios parameter creator + * @export + */ +export const ProcessorTokenApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkRealTimeAccountBalance: async (acceptVersion: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('checkRealTimeAccountBalance', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccountOwnerInfo: async (acceptVersion: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('getAccountOwnerInfo', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {string} acceptVersion MX Platform API version. + * @param {TokenRequestBody} [tokenRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTokens: async (acceptVersion: string, tokenRequestBody?: TokenRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTokens', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readAccountBalance: async (acceptVersion: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readAccountBalance', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestAccountNumber: async (acceptVersion: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('requestAccountNumber', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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 {string} acceptVersion MX Platform API version. + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestAuthorizationCode: async (acceptVersion: string, authorizationCodeRequestBody: AuthorizationCodeRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('requestAuthorizationCode', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async checkRealTimeAccountBalance(acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkRealTimeAccountBalance(acceptVersion, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAccountOwnerInfo(acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountOwnerInfo(acceptVersion, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {string} acceptVersion MX Platform API version. + * @param {TokenRequestBody} [tokenRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTokens(acceptVersion: string, tokenRequestBody?: TokenRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTokens(acceptVersion, tokenRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readAccountBalance(acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readAccountBalance(acceptVersion, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestAccountNumber(acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestAccountNumber(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestAuthorizationCode(acceptVersion: string, authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestAuthorizationCode(acceptVersion, 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 { + /** + * Check the real-time account balance using your access token. + * @summary Check Real Time Account Balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkRealTimeAccountBalance(acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.checkRealTimeAccountBalance(acceptVersion, options).then((request) => request(axios, basePath)); + }, + /** + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccountOwnerInfo(acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.getAccountOwnerInfo(acceptVersion, options).then((request) => request(axios, basePath)); + }, + /** + * View a list of tokens that exist for a user, member, or account. + * @summary View a List of Tokens + * @param {string} acceptVersion MX Platform API version. + * @param {TokenRequestBody} [tokenRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTokens(acceptVersion: string, tokenRequestBody?: TokenRequestBody, options?: any): AxiosPromise { + return localVarFp.listTokens(acceptVersion, tokenRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readAccountBalance(acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.readAccountBalance(acceptVersion, options).then((request) => request(axios, basePath)); + }, + /** + * Get account information such as routing number and account number, scoped to your access token. + * @summary Request an account number (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestAccountNumber(acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.requestAccountNumber(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestAuthorizationCode(acceptVersion: string, authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: any): AxiosPromise { + return localVarFp.requestAuthorizationCode(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public checkRealTimeAccountBalance(acceptVersion: string, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).checkRealTimeAccountBalance(acceptVersion, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get account owner information (Processors Only) + * @summary Get account owner information (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public getAccountOwnerInfo(acceptVersion: string, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).getAccountOwnerInfo(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {TokenRequestBody} [tokenRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public listTokens(acceptVersion: string, tokenRequestBody?: TokenRequestBody, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).listTokens(acceptVersion, tokenRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Read the account balance (Processors Only) + * @summary Read the account balance (Processors Only) + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public readAccountBalance(acceptVersion: string, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).readAccountBalance(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public requestAccountNumber(acceptVersion: string, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).requestAccountNumber(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {AuthorizationCodeRequestBody} authorizationCodeRequestBody The scope for the authorization code. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessorTokenApi + */ + public requestAuthorizationCode(acceptVersion: string, authorizationCodeRequestBody: AuthorizationCodeRequestBody, options?: AxiosRequestConfig) { + return ProcessorTokenApiFp(this.configuration).requestAuthorizationCode(acceptVersion, authorizationCodeRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * RewardsApi - axios parameter creator + * @export + */ +export const RewardsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, creditCardProductGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('creditCard', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchRewards: async (acceptVersion: string, userIdentifier: string, memberIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('fetchRewards', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('fetchRewards', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('fetchRewards', 'memberIdentifier', memberIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/fetch_rewards` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 `rewards` associated with a specified `member`. Member guids are defined by MX. + * @summary List Rewards + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listRewards: async (acceptVersion: string, userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listRewards', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. Member and Rewards guids are defined by MX. + * @summary Read Reward + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readRewards: async (acceptVersion: string, userGuid: string, memberGuid: string, rewardGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readRewards', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, creditCardProductGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.creditCard(acceptVersion, creditCardProductGuid, 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. Member and Rewards guids are defined by MX. + * @summary Fetch Rewards + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchRewards(acceptVersion: string, userIdentifier: string, memberIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRewards(acceptVersion, userIdentifier, memberIdentifier, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to list all the `rewards` associated with a specified `member`. Member guids are defined by MX. + * @summary List Rewards + * @param {string} acceptVersion MX Platform API version. + * @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 listRewards(acceptVersion: string, userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRewards(acceptVersion, userGuid, memberGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @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 readRewards(acceptVersion: string, userGuid: string, memberGuid: string, rewardGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readRewards(acceptVersion, 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 { + /** + * This endpoint returns the specified `credit_card_product` according to the unique GUID. + * @summary Read a Credit Card Product + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, creditCardProductGuid: string, options?: any): AxiosPromise { + return localVarFp.creditCard(acceptVersion, creditCardProductGuid, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchRewards(acceptVersion: string, userIdentifier: string, memberIdentifier: string, options?: any): AxiosPromise { + return localVarFp.fetchRewards(acceptVersion, userIdentifier, memberIdentifier, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @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} + */ + listRewards(acceptVersion: string, userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.listRewards(acceptVersion, userGuid, memberGuid, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @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} + */ + readRewards(acceptVersion: string, userGuid: string, memberGuid: string, rewardGuid: string, options?: any): AxiosPromise { + return localVarFp.readRewards(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, creditCardProductGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).creditCard(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RewardsApi + */ + public fetchRewards(acceptVersion: string, userIdentifier: string, memberIdentifier: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).fetchRewards(acceptVersion, userIdentifier, memberIdentifier, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).listRewards(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, memberGuid: string, rewardGuid: string, options?: AxiosRequestConfig) { + return RewardsApiFp(this.configuration).readRewards(acceptVersion, 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 creates a new `spending_plan` for the user. + * @summary Create spending plan + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSpendingPlan: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createSpendingPlan', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 a new `spending_plan_iteration_item`. + * @summary Create spending plan iteration item + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createSpendingPlanIterationItem: async (acceptVersion: string, spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createSpendingPlanIterationItem', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * Use this endpoint to delete a user\'s `spending_plan`. + * @summary Delete spending plan + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteSpendingPlan: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteSpendingPlan', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 a `spending_plan_account`. + * @summary Delete spending plan account + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteSpendingPlanAccount: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteSpendingPlanAccount', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 a spending plan `iteration_item`. + * @summary Delete spending plan iteration item + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteSpendingPlanIterationItem: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteSpendingPlanIterationItem', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlanAccounts: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listSpendingPlanAccounts', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlanIterationItems: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listSpendingPlanIterationItems', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlanIterations: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listSpendingPlanIterations', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 plans associated with the user. + * @summary List spending plans + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlans: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listSpendingPlans', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readCurrentSpendingPlanIteration: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readCurrentSpendingPlanIteration', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific spending plan account according to its unique GUID. + * @summary Read spending plan account + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanAccount: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readSpendingPlanAccount', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific spending plan `iteration` according to its `iteration_number`. + * @summary Read a spending plan iteration + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanIteration: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readSpendingPlanIteration', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific spending plan `iteration_item` according to its unique GUID. + * @summary Read a spending plan iteration item + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanIterationItem: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readSpendingPlanIterationItem', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific spending plan according to its unique GUID. + * @summary Read a spending plan for a user + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanUser: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readSpendingPlanUser', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 an existing `spending_plan_iteration_item`. + * @summary Update a spending plan iteration item + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + updateSpendingPlanIterationItem: async (acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateSpendingPlanIterationItem', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSpendingPlan(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSpendingPlan(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 createSpendingPlanIterationItem(acceptVersion: string, spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSpendingPlanIterationItem(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 deleteSpendingPlan(acceptVersion: string, userGuid: string, spendingPlanGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlan(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 deleteSpendingPlanAccount(acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlanAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 deleteSpendingPlanIterationItem(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSpendingPlanIterationItem(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 listSpendingPlanAccounts(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanAccounts(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 listSpendingPlanIterationItems(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanIterationItems(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 listSpendingPlanIterations(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlanIterations(acceptVersion, 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} acceptVersion MX Platform API version. + * @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 listSpendingPlans(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSpendingPlans(acceptVersion, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of the current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} acceptVersion MX Platform API version. + * @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 readCurrentSpendingPlanIteration(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readCurrentSpendingPlanIteration(acceptVersion, userGuid, spendingPlanGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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 readSpendingPlanAccount(acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanAccount(acceptVersion, userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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 readSpendingPlanIteration(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanIteration(acceptVersion, userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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 readSpendingPlanIterationItem(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanIterationItem(acceptVersion, userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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 readSpendingPlanUser(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readSpendingPlanUser(acceptVersion, userGuid, spendingPlanGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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 updateSpendingPlanIterationItem(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSpendingPlanIterationItem(acceptVersion, 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 { + /** + * This endpoint creates a new `spending_plan` for the user. + * @summary Create spending plan + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSpendingPlan(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.createSpendingPlan(acceptVersion, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * This endpoint creates a new `spending_plan_iteration_item`. + * @summary Create spending plan iteration item + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createSpendingPlanIterationItem(acceptVersion: string, spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createSpendingPlanIterationItem(acceptVersion, spendingPlanGuid, userGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to delete a user\'s `spending_plan`. + * @summary Delete spending plan + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteSpendingPlan(acceptVersion: string, userGuid: string, spendingPlanGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSpendingPlan(acceptVersion, userGuid, spendingPlanGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to delete a `spending_plan_account`. + * @summary Delete spending plan account + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteSpendingPlanAccount(acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSpendingPlanAccount(acceptVersion, userGuid, spendingPlanGuid, spendingPlanAccountGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to delete a spending plan `iteration_item`. + * @summary Delete spending plan iteration item + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + deleteSpendingPlanIterationItem(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteSpendingPlanIterationItem(acceptVersion, userGuid, spendingPlanGuid, iterationItemGuid, 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlanAccounts(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlanAccounts(acceptVersion, 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlanIterationItems(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlanIterationItems(acceptVersion, userGuid, spendingPlanGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlanIterations(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlanIterations(acceptVersion, userGuid, spendingPlanGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + listSpendingPlans(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listSpendingPlans(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of the current spending plan `iteration`. + * @summary Read current spending plan iteration + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readCurrentSpendingPlanIteration(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readCurrentSpendingPlanIteration(acceptVersion, userGuid, spendingPlanGuid, page, recordsPerPage, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanAccount(acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanAccount(acceptVersion, userGuid, spendingPlanGuid, spendingPlanAccountGuid, page, recordsPerPage, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanIteration(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanIteration(acceptVersion, userGuid, spendingPlanGuid, iterationNumber, page, recordsPerPage, options).then((request) => request(axios, 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} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanIterationItem(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanIterationItem(acceptVersion, userGuid, spendingPlanGuid, iterationItemGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + readSpendingPlanUser(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.readSpendingPlanUser(acceptVersion, userGuid, spendingPlanGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + updateSpendingPlanIterationItem(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateSpendingPlanIterationItem(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).createSpendingPlan(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, spendingPlanGuid: string, userGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).createSpendingPlanIterationItem(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).deleteSpendingPlan(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).deleteSpendingPlanAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).deleteSpendingPlanIterationItem(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlanAccounts(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlanIterationItems(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlanIterations(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).listSpendingPlans(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readCurrentSpendingPlanIteration(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, spendingPlanAccountGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanAccount(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationNumber: number, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanIteration(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanIterationItem(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).readSpendingPlanUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, spendingPlanGuid: string, iterationItemGuid: string, spendingPlanIterationItemCreateRequestBody: SpendingPlanIterationItemCreateRequestBody, options?: AxiosRequestConfig) { + return SpendingPlanApiFp(this.configuration).updateSpendingPlanIterationItem(acceptVersion, userGuid, spendingPlanGuid, iterationItemGuid, spendingPlanIterationItemCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * StatementsApi - axios parameter creator + * @export + */ +export const StatementsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Use this endpoint to download a specified statement PDF. + * @summary Download statement pdf + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + downloadStatementPDF: async (acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('downloadStatementPDF', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchStatements: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('fetchStatements', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('fetchStatements', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('fetchStatements', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/fetch_statements` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + listStatementsByMember: async (acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listStatementsByMember', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + readStatementByMember: async (acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readStatementByMember', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * Use this endpoint to download a specified statement PDF. + * @summary Download statement pdf + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async downloadStatementPDF(acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadStatementPDF(acceptVersion, memberGuid, statementGuid, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchStatements(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchStatements(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @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 listStatementsByMember(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listStatementsByMember(acceptVersion, memberGuid, userGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + async readStatementByMember(acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readStatementByMember(acceptVersion, 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 download a specified statement PDF. + * @summary Download statement pdf + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + downloadStatementPDF(acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.downloadStatementPDF(acceptVersion, memberGuid, statementGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to fetch the statements associated with a particular member. + * @summary Fetch statements + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchStatements(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.fetchStatements(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to get an array of available statements. + * @summary List statements by member + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listStatementsByMember(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listStatementsByMember(acceptVersion, memberGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read a JSON representation of the statement. + * @summary Read statement by member + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readStatementByMember(acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readStatementByMember(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).downloadStatementPDF(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatementsApi + */ + public fetchStatements(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).fetchStatements(acceptVersion, memberIdentifier, userIdentifier, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).listStatementsByMember(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, memberGuid: string, statementGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return StatementsApiFp(this.configuration).readStatementByMember(acceptVersion, 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 create a new association between a tag and a particular transaction, according to their unique GUIDs. + * @summary Create tagging + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createTagging: async (acceptVersion: string, userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createTagging', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * 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} acceptVersion MX Platform API version. + * @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} + */ + deleteTagging: async (acceptVersion: string, taggingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteTagging', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 retrieve a list of all the taggings associated with a specific user. + * @summary List taggings + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listTaggings: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTaggings', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 `tagging` according to its unique GUID. + * @summary Read tagging + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readTagging: async (acceptVersion: string, taggingGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readTagging', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + updateTagging: async (acceptVersion: string, taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateTagging', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 create a new association between a tag and a particular transaction, according to their unique GUIDs. + * @summary Create tagging + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async createTagging(acceptVersion: string, userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTagging(acceptVersion, userGuid, taggingCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @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} + */ + async deleteTagging(acceptVersion: string, taggingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTagging(acceptVersion, taggingGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to retrieve a list of all the taggings associated with a specific user. + * @summary List taggings + * @param {string} acceptVersion MX Platform API version. + * @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 listTaggings(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTaggings(acceptVersion, userGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + async readTagging(acceptVersion: string, taggingGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTagging(acceptVersion, taggingGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async updateTagging(acceptVersion: string, taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTagging(acceptVersion, 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 { + /** + * 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} acceptVersion MX Platform API version. + * @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} + */ + createTagging(acceptVersion: string, userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createTagging(acceptVersion, userGuid, taggingCreateRequestBody, 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} acceptVersion MX Platform API version. + * @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} + */ + deleteTagging(acceptVersion: string, taggingGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteTagging(acceptVersion, taggingGuid, userGuid, 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} acceptVersion MX Platform API version. + * @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} + */ + listTaggings(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTaggings(acceptVersion, userGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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} + */ + readTagging(acceptVersion: string, taggingGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readTagging(acceptVersion, taggingGuid, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + updateTagging(acceptVersion: string, taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTagging(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, taggingCreateRequestBody: TaggingCreateRequestBody, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).createTagging(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, taggingGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).deleteTagging(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).listTaggings(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, taggingGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).readTagging(acceptVersion, taggingGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update a tagging. + * @summary Update tagging + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, taggingGuid: string, userGuid: string, taggingUpdateRequestBody: TaggingUpdateRequestBody, options?: AxiosRequestConfig) { + return TaggingsApiFp(this.configuration).updateTagging(acceptVersion, taggingGuid, userGuid, taggingUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TagsApi - axios parameter creator + * @export + */ +export const TagsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createTag: async (acceptVersion: string, userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createTag', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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} acceptVersion MX Platform API version. + * @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} + */ + deleteTag: async (acceptVersion: string, tagGuid: string, accept: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteTag', 'acceptVersion', acceptVersion) + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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 list all tags associated with the specified `user`. Each user includes the `Business` tag by default. + * @summary List tags + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listTags: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTags', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + readTag: async (acceptVersion: string, tagGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readTag', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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} + */ + updateTag: async (acceptVersion: string, tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateTag', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async createTag(acceptVersion: string, userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTag(acceptVersion, userGuid, tagCreateRequestBody, 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} acceptVersion MX Platform API version. + * @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} + */ + async deleteTag(acceptVersion: string, tagGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTag(acceptVersion, tagGuid, accept, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @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 listTags(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTags(acceptVersion, userGuid, page, recordsPerPage, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a particular tag according to its unique GUID. + * @summary Read tag + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async readTag(acceptVersion: string, tagGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTag(acceptVersion, tagGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the name of a specific tag according to its unique GUID. + * @summary Update tag + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async updateTag(acceptVersion: string, tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTag(acceptVersion, 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 { + /** + * Use this endpoint to create a new custom tag. + * @summary Create tag + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createTag(acceptVersion: string, userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createTag(acceptVersion, userGuid, tagCreateRequestBody, 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} acceptVersion MX Platform API version. + * @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} + */ + deleteTag(acceptVersion: string, tagGuid: string, accept: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteTag(acceptVersion, tagGuid, accept, userGuid, 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} acceptVersion MX Platform API version. + * @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} + */ + listTags(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTags(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a particular tag according to its unique GUID. + * @summary Read tag + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readTag(acceptVersion: string, tagGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readTag(acceptVersion, tagGuid, 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} acceptVersion MX Platform API version. + * @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} + */ + updateTag(acceptVersion: string, tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTag(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, tagCreateRequestBody: TagCreateRequestBody, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).createTag(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, tagGuid: string, accept: string, userGuid: string, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).deleteTag(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).listTags(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, tagGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).readTag(acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, tagGuid: string, userGuid: string, tagUpdateRequestBody: TagUpdateRequestBody, options?: AxiosRequestConfig) { + return TagsApiFp(this.configuration).updateTag(acceptVersion, 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 create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Create transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createTransactionRule: async (acceptVersion: string, userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createTransactionRule', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listTransactionRules: async (acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactionRules', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 an existing transaction rule based on the rule’s unique GUID. + * @summary Read transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + readTransactionRule: async (acceptVersion: string, transactionRuleGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readTransactionRule', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Update transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + updateTransactionRule: async (acceptVersion: string, transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateTransactionRule', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Create transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async createTransactionRule(acceptVersion: string, userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTransactionRule(acceptVersion, userGuid, transactionRuleCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} acceptVersion MX Platform API version. + * @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 listTransactionRules(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionRules(acceptVersion, userGuid, page, recordsPerPage, 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} acceptVersion MX Platform API version. + * @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 readTransactionRule(acceptVersion: string, transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTransactionRule(acceptVersion, 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. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Update transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async updateTransactionRule(acceptVersion: string, transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransactionRule(acceptVersion, 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 create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Create transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + createTransactionRule(acceptVersion: string, userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createTransactionRule(acceptVersion, userGuid, transactionRuleCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listTransactionRules(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTransactionRules(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * 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} acceptVersion MX Platform API version. + * @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} + */ + readTransactionRule(acceptVersion: string, transactionRuleGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.readTransactionRule(acceptVersion, transactionRuleGuid, userGuid, 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. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Update transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + updateTransactionRule(acceptVersion: string, transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTransactionRule(acceptVersion, transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransactionRulesApi - object-oriented interface + * @export + * @class TransactionRulesApi + * @extends {BaseAPI} + */ +export class TransactionRulesApi extends BaseAPI { + /** + * Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Create transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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 TransactionRulesApi + */ + public createTransactionRule(acceptVersion: string, userGuid: string, transactionRuleCreateRequestBody: TransactionRuleCreateRequestBody, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).createTransactionRule(acceptVersion, userGuid, transactionRuleCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of all existing transaction rules belonging to the user. + * @summary List transaction rules + * @param {string} acceptVersion MX Platform API version. + * @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 TransactionRulesApi + */ + public listTransactionRules(acceptVersion: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).listTransactionRules(acceptVersion, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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} acceptVersion MX Platform API version. + * @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 TransactionRulesApi + */ + public readTransactionRule(acceptVersion: string, transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).readTransactionRule(acceptVersion, transactionRuleGuid, userGuid, options).then((request) => request(this.axios, this.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. For more information about transaction rules, see the [Transaction Rules Guide](/products/experience/pfm/developer-guides/personalization/tranasaction-rules). + * @summary Update transaction rule + * @param {string} acceptVersion MX Platform API version. + * @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 TransactionRulesApi + */ + public updateTransactionRule(acceptVersion: string, transactionRuleGuid: string, userGuid: string, transactionRuleUpdateRequestBody: TransactionRuleUpdateRequestBody, options?: AxiosRequestConfig) { + return TransactionRulesApiFp(this.configuration).updateTransactionRule(acceptVersion, transactionRuleGuid, userGuid, transactionRuleUpdateRequestBody, 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} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createManualTransaction', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSplitTransactions: async (transactionGuid: string, userGuid: string, acceptVersion: 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) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createSplitTransactions', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * 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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSplitTransactionsByAccount: async (transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionIdentifier' is not null or undefined + assertParamExists('createSplitTransactionsByAccount', 'transactionIdentifier', transactionIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('createSplitTransactionsByAccount', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('createSplitTransactionsByAccount', 'memberIdentifier', memberIdentifier) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('createSplitTransactionsByAccount', 'accountIdentifier', accountIdentifier) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createSplitTransactionsByAccount', 'acceptVersion', acceptVersion) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}/split` + .replace(`{${"transaction_identifier"}}`, encodeURIComponent(String(transactionIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, userGuid: string, transactionGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteManualTransactions', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSplitTransactionByAccount: async (transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionIdentifier' is not null or undefined + assertParamExists('deleteSplitTransactionByAccount', 'transactionIdentifier', transactionIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('deleteSplitTransactionByAccount', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('deleteSplitTransactionByAccount', 'memberIdentifier', memberIdentifier) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('deleteSplitTransactionByAccount', 'accountIdentifier', accountIdentifier) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteSplitTransactionByAccount', 'acceptVersion', acceptVersion) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}/split` + .replace(`{${"transaction_identifier"}}`, encodeURIComponent(String(transactionIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSplitTransactions: async (transactionGuid: string, userGuid: string, acceptVersion: 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) + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteSplitTransactions', 'acceptVersion', acceptVersion) + 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, transactionRuleGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteTransactionRule', 'acceptVersion', acceptVersion) + // 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; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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.

For more information on returned data, please see the [Enhanced Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {string} acceptVersion MX Platform API version. + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + enhanceTransactions: async (acceptVersion: string, enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('enhanceTransactions', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + extendHistory: async (acceptVersion: string, memberIdentifier: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('extendHistory', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('extendHistory', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('extendHistory', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/extend_history` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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`, 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. + * @summary List transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and/or `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 (acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, useCase?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactions', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listTransactions', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/transactions` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } + + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } + + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } + + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } + + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } + + if (useCase !== undefined) { + localVarQueryParameter['use_case'] = useCase; + } + + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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. + * @summary List transactions by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `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 {string} [fromDate] Filter transactions from this date. This only supports unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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 (acceptVersion: string, userGuid: string, accountGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactionsByAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactionsByAccount', 'userGuid', userGuid) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('listTransactionsByAccount', 'accountGuid', accountGuid) + 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: '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; + } + + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } + + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } + + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } + + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } + + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } + + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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. + * @summary List transactions by account per member + * @param {string} acceptVersion MX Platform API version. + * @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} memberGuid The unique id for a `member`. + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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} + */ + listTransactionsByAccountPerMember: async (acceptVersion: string, userGuid: string, accountGuid: string, memberGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactionsByAccountPerMember', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('listTransactionsByAccountPerMember', 'userGuid', userGuid) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('listTransactionsByAccountPerMember', 'accountGuid', accountGuid) + // verify required parameter 'memberGuid' is not null or undefined + assertParamExists('listTransactionsByAccountPerMember', 'memberGuid', memberGuid) + const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))) + .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) + + 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 (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } + + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } + + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } + + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } + + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 `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. + * @summary List transactions by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromTimestamp] Filter transactions from the date the transaction was created. This only supports unix timestamp format. + * @param {string} [toTimestamp] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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 (acceptVersion: string, userIdentifier: string, memberIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromTimestamp?: string, toTimestamp?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactionsByMember', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listTransactionsByMember', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('listTransactionsByMember', 'memberIdentifier', memberIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/transactions` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))); + // 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; + } + + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } + + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } + + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } + + if (fromTimestamp !== undefined) { + localVarQueryParameter['from_timestamp'] = fromTimestamp; + } + + if (toTimestamp !== undefined) { + localVarQueryParameter['to_timestamp'] = toTimestamp; + } + + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } + + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } + + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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. + * @summary List transactions by tag + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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 (acceptVersion: string, userIdentifier: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listTransactionsByTag', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('listTransactionsByTag', 'userIdentifier', userIdentifier) + // verify required parameter 'tagGuid' is not null or undefined + assertParamExists('listTransactionsByTag', 'tagGuid', tagGuid) + const localVarPath = `/users/{user_identifier}/tags/{tag_guid}/transactions` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .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; + } + + 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; + } + + if (fromDate !== undefined) { + localVarQueryParameter['from_date'] = fromDate; + } + + if (toDate !== undefined) { + localVarQueryParameter['to_date'] = toDate; + } + + if (fromCreatedAt !== undefined) { + localVarQueryParameter['from_created_at'] = fromCreatedAt; + } + + if (toCreatedAt !== undefined) { + localVarQueryParameter['to_created_at'] = toCreatedAt; + } + + if (fromUpdatedAt !== undefined) { + localVarQueryParameter['from_updated_at'] = fromUpdatedAt; + } + + if (toUpdatedAt !== undefined) { + localVarQueryParameter['to_updated_at'] = toUpdatedAt; + } + + if (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. + * @summary Read transaction + * @param {string} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, userGuid: string, transactionGuid: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readTransaction', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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. + * @summary Read transaction by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + readTransactionByAccount: async (acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, includes?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readTransactionByAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('readTransactionByAccount', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('readTransactionByAccount', 'memberIdentifier', memberIdentifier) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('readTransactionByAccount', 'accountIdentifier', accountIdentifier) + // verify required parameter 'transactionIdentifier' is not null or undefined + assertParamExists('readTransactionByAccount', 'transactionIdentifier', transactionIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))) + .replace(`{${"transaction_identifier"}}`, encodeURIComponent(String(transactionIdentifier))); + // 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 (includes !== undefined) { + localVarQueryParameter['includes'] = includes; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve a list of all recurring transactions for a user.

For more see the [Repeating Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview). + * @summary List Repeating Transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + repeatingTransactions: async (acceptVersion: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('repeatingTransactions', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview) + * @summary Get a Repeating Transaction + * @param {string} acceptVersion MX Platform API version. + * @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 (acceptVersion: string, userGuid: string, repeatingTransactionGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('specificRepeatingTransaction', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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 to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTransaction: async (acceptVersion: string, userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateTransaction', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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, + }; + }, + /** + * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTransactionByAccount: async (acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateTransactionByAccount', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('updateTransactionByAccount', 'userIdentifier', userIdentifier) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('updateTransactionByAccount', 'memberIdentifier', memberIdentifier) + // verify required parameter 'accountIdentifier' is not null or undefined + assertParamExists('updateTransactionByAccount', 'accountIdentifier', accountIdentifier) + // verify required parameter 'transactionIdentifier' is not null or undefined + assertParamExists('updateTransactionByAccount', 'transactionIdentifier', transactionIdentifier) + // verify required parameter 'transactionUpdateRequestBody' is not null or undefined + assertParamExists('updateTransactionByAccount', 'transactionUpdateRequestBody', transactionUpdateRequestBody) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))) + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"account_identifier"}}`, encodeURIComponent(String(accountIdentifier))) + .replace(`{${"transaction_identifier"}}`, encodeURIComponent(String(transactionIdentifier))); + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createManualTransaction(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSplitTransactions(transactionGuid: string, userGuid: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSplitTransactions(transactionGuid, userGuid, acceptVersion, splitTransactionRequestBody, 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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSplitTransactionsByAccount(transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSplitTransactionsByAccount(transactionIdentifier, userIdentifier, memberIdentifier, accountIdentifier, acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, transactionGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManualTransactions(acceptVersion, 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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSplitTransactionByAccount(transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSplitTransactionByAccount(transactionIdentifier, userIdentifier, memberIdentifier, accountIdentifier, acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSplitTransactions(transactionGuid: string, userGuid: string, acceptVersion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSplitTransactions(transactionGuid, userGuid, acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTransactionRule(acceptVersion, 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 guide](https://docs.mx.com/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {string} acceptVersion MX Platform API version. + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async enhanceTransactions(acceptVersion: string, enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.enhanceTransactions(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async extendHistory(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.extendHistory(acceptVersion, memberIdentifier, userIdentifier, 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. + * @summary List transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and/or `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(acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, useCase?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(acceptVersion, userIdentifier, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, 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. + * @summary List transactions by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `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 {string} [fromDate] Filter transactions from this date. This only supports unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userGuid: string, accountGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByAccount(acceptVersion, userGuid, accountGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, 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. + * @summary List transactions by account per member + * @param {string} acceptVersion MX Platform API version. + * @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} memberGuid The unique id for a `member`. + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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 listTransactionsByAccountPerMember(acceptVersion: string, userGuid: string, accountGuid: string, memberGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByAccountPerMember(acceptVersion, userGuid, accountGuid, memberGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, 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. + * @summary List transactions by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromTimestamp] Filter transactions from the date the transaction was created. This only supports unix timestamp format. + * @param {string} [toTimestamp] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userIdentifier: string, memberIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromTimestamp?: string, toTimestamp?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByMember(acceptVersion, userIdentifier, memberIdentifier, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromTimestamp, toTimestamp, fromUpdatedAt, toUpdatedAt, 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. + * @summary List transactions by tag + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userIdentifier: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactionsByTag(acceptVersion, userIdentifier, tagGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, 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. + * @summary Read transaction + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, transactionGuid: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTransaction(acceptVersion, userGuid, transactionGuid, 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. + * @summary Read transaction by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 readTransactionByAccount(acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, includes?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readTransactionByAccount(acceptVersion, userIdentifier, memberIdentifier, accountIdentifier, transactionIdentifier, 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](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview). + * @summary List Repeating Transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async repeatingTransactions(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.repeatingTransactions(acceptVersion, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview) + * @summary Get a Repeating Transaction + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, repeatingTransactionGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.specificRepeatingTransaction(acceptVersion, userGuid, repeatingTransactionGuid, 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} acceptVersion MX Platform API version. + * @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 to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateTransaction(acceptVersion: string, userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransaction(acceptVersion, userGuid, transactionGuid, transactionUpdateRequestBody, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateTransactionByAccount(acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTransactionByAccount(acceptVersion, userIdentifier, memberIdentifier, accountIdentifier, transactionIdentifier, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createManualTransaction(acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSplitTransactions(transactionGuid: string, userGuid: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: any): AxiosPromise { + return localVarFp.createSplitTransactions(transactionGuid, userGuid, acceptVersion, splitTransactionRequestBody, 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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSplitTransactionsByAccount(transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: any): AxiosPromise { + return localVarFp.createSplitTransactionsByAccount(transactionIdentifier, userIdentifier, memberIdentifier, accountIdentifier, acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, transactionGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteManualTransactions(acceptVersion, 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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSplitTransactionByAccount(transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.deleteSplitTransactionByAccount(transactionIdentifier, userIdentifier, memberIdentifier, accountIdentifier, acceptVersion, 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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSplitTransactions(transactionGuid: string, userGuid: string, acceptVersion: string, options?: any): AxiosPromise { + return localVarFp.deleteSplitTransactions(transactionGuid, userGuid, acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, transactionRuleGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.deleteTransactionRule(acceptVersion, 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 guide](https://docs.mx.com/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {string} acceptVersion MX Platform API version. + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + enhanceTransactions(acceptVersion: string, enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: any): AxiosPromise { + return localVarFp.enhanceTransactions(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + extendHistory(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.extendHistory(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(axios, basePath)); + }, + /** + * 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. + * @summary List transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and/or `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(acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, useCase?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactions(acceptVersion, userIdentifier, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, useCase, includes, options).then((request) => request(axios, basePath)); + }, + /** + * 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. + * @summary List transactions by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `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 {string} [fromDate] Filter transactions from this date. This only supports unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userGuid: string, accountGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByAccount(acceptVersion, userGuid, accountGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(axios, basePath)); + }, + /** + * 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. + * @summary List transactions by account per member + * @param {string} acceptVersion MX Platform API version. + * @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} memberGuid The unique id for a `member`. + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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} + */ + listTransactionsByAccountPerMember(acceptVersion: string, userGuid: string, accountGuid: string, memberGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByAccountPerMember(acceptVersion, userGuid, accountGuid, memberGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(axios, basePath)); + }, + /** + * 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. + * @summary List transactions by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromTimestamp] Filter transactions from the date the transaction was created. This only supports unix timestamp format. + * @param {string} [toTimestamp] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userIdentifier: string, memberIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromTimestamp?: string, toTimestamp?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByMember(acceptVersion, userIdentifier, memberIdentifier, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromTimestamp, toTimestamp, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(axios, basePath)); + }, + /** + * 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. + * @summary List transactions by tag + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userIdentifier: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.listTransactionsByTag(acceptVersion, userIdentifier, tagGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(axios, 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. + * @summary Read transaction + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, transactionGuid: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.readTransaction(acceptVersion, userGuid, transactionGuid, includes, options).then((request) => request(axios, 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. + * @summary Read transaction by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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} + */ + readTransactionByAccount(acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, includes?: string, options?: any): AxiosPromise { + return localVarFp.readTransactionByAccount(acceptVersion, userIdentifier, memberIdentifier, accountIdentifier, transactionIdentifier, includes, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve a list of all recurring transactions for a user.

For more see the [Repeating Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview). + * @summary List Repeating Transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + repeatingTransactions(acceptVersion: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.repeatingTransactions(acceptVersion, userGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview) + * @summary Get a Repeating Transaction + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, repeatingTransactionGuid: string, options?: any): AxiosPromise { + return localVarFp.specificRepeatingTransaction(acceptVersion, userGuid, repeatingTransactionGuid, 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} acceptVersion MX Platform API version. + * @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 to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTransaction(acceptVersion: string, userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTransaction(acceptVersion, userGuid, transactionGuid, transactionUpdateRequestBody, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTransactionByAccount(acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateTransactionByAccount(acceptVersion, userIdentifier, memberIdentifier, accountIdentifier, transactionIdentifier, transactionUpdateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).createManualTransaction(acceptVersion, userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(this.axios, this.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 {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public createSplitTransactions(transactionGuid: string, userGuid: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).createSplitTransactions(transactionGuid, userGuid, acceptVersion, splitTransactionRequestBody, options).then((request) => request(this.axios, this.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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {SplitTransactionRequestBody} [splitTransactionRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public createSplitTransactionsByAccount(transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, splitTransactionRequestBody?: SplitTransactionRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).createSplitTransactionsByAccount(transactionIdentifier, userIdentifier, memberIdentifier, accountIdentifier, acceptVersion, splitTransactionRequestBody, options).then((request) => request(this.axios, this.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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, transactionGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteManualTransactions(acceptVersion, userGuid, transactionGuid, options).then((request) => request(this.axios, this.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 by account + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public deleteSplitTransactionByAccount(transactionIdentifier: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, acceptVersion: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteSplitTransactionByAccount(transactionIdentifier, userIdentifier, memberIdentifier, accountIdentifier, acceptVersion, options).then((request) => request(this.axios, this.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 {string} acceptVersion MX Platform API version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public deleteSplitTransactions(transactionGuid: string, userGuid: string, acceptVersion: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteSplitTransactions(transactionGuid, userGuid, acceptVersion, 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} acceptVersion MX Platform API version. + * @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(acceptVersion: string, transactionRuleGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).deleteTransactionRule(acceptVersion, 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 guide](https://docs.mx.com/api-reference/platform-api/reference/transactions-overview#enhanced-transactions). + * @summary Enhance transactions + * @param {string} acceptVersion MX Platform API version. + * @param {EnhanceTransactionsRequestBody} enhanceTransactionsRequestBody Transaction object to be enhanced + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public enhanceTransactions(acceptVersion: string, enhanceTransactionsRequestBody: EnhanceTransactionsRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).enhanceTransactions(acceptVersion, enhanceTransactionsRequestBody, options).then((request) => request(this.axios, this.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} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public extendHistory(acceptVersion: string, memberIdentifier: string, userIdentifier: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).extendHistory(acceptVersion, memberIdentifier, userIdentifier, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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. + * @summary List transactions + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and/or `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(acceptVersion: string, userIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, useCase?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactions(acceptVersion, userIdentifier, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, useCase, includes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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. + * @summary List transactions by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {string} accountGuid The unique id for an `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 {string} [fromDate] Filter transactions from this date. This only supports unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userGuid: string, accountGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByAccount(acceptVersion, userGuid, accountGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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. + * @summary List transactions by account per member + * @param {string} acceptVersion MX Platform API version. + * @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} memberGuid The unique id for a `member`. + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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 listTransactionsByAccountPerMember(acceptVersion: string, userGuid: string, accountGuid: string, memberGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByAccountPerMember(acceptVersion, userGuid, accountGuid, memberGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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. + * @summary List transactions by member + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromTimestamp] Filter transactions from the date the transaction was created. This only supports unix timestamp format. + * @param {string} [toTimestamp] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userIdentifier: string, memberIdentifier: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromTimestamp?: string, toTimestamp?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByMember(acceptVersion, userIdentifier, memberIdentifier, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromTimestamp, toTimestamp, fromUpdatedAt, toUpdatedAt, includes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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. + * @summary List transactions by tag + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 unix timestamp format. Defaults to 120 days ago if not provided. + * @param {string} [toDate] Filter transactions to this date (at midnight). This only supports unix timestamp format. 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 unix timestamp format. + * @param {string} [toCreatedAt] Filter transaction to the date in which the transaction was created. This only supports unix timestamp format. + * @param {string} [fromUpdatedAt] Filter transactions from the date in which the transaction was updated. This only supports unix timestamp format. + * @param {string} [toUpdatedAt] Filter transactions to the date in which the transaction was updated. This only supports unix timestamp format. + * @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(acceptVersion: string, userIdentifier: string, tagGuid: string, page?: number, recordsPerPage?: number, fromDate?: string, toDate?: string, fromCreatedAt?: string, toCreatedAt?: string, fromUpdatedAt?: string, toUpdatedAt?: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).listTransactionsByTag(acceptVersion, userIdentifier, tagGuid, page, recordsPerPage, fromDate, toDate, fromCreatedAt, toCreatedAt, fromUpdatedAt, toUpdatedAt, 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. + * @summary Read transaction + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, transactionGuid: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).readTransaction(acceptVersion, userGuid, transactionGuid, 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. + * @summary Read transaction by account + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 readTransactionByAccount(acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, includes?: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).readTransactionByAccount(acceptVersion, userIdentifier, memberIdentifier, accountIdentifier, transactionIdentifier, 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](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview). + * @summary List Repeating Transactions + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).repeatingTransactions(acceptVersion, userGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a Specific Repeating Transaction.

List For more see the [Repeating Transactions guide](https://docs.mx.com/api-reference/platform-api/reference/repeating-transactions-overview) + * @summary Get a Repeating Transaction + * @param {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userGuid: string, repeatingTransactionGuid: string, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).specificRepeatingTransaction(acceptVersion, userGuid, repeatingTransactionGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} acceptVersion MX Platform API version. + * @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 to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public updateTransaction(acceptVersion: string, userGuid: string, transactionGuid: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).updateTransaction(acceptVersion, userGuid, transactionGuid, transactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the `description` of a specific transaction according to its unique GUID. + * @summary Update transaction + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} accountIdentifier Use either the account `id` you defined or the MX-defined account `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} transactionIdentifier Use either the transaction `id` you defined or the MX-defined transaction `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {TransactionUpdateRequestBody} transactionUpdateRequestBody Transaction object to be updated with a new description + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public updateTransactionByAccount(acceptVersion: string, userIdentifier: string, memberIdentifier: string, accountIdentifier: string, transactionIdentifier: string, transactionUpdateRequestBody: TransactionUpdateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).updateTransactionByAccount(acceptVersion, userIdentifier, memberIdentifier, accountIdentifier, transactionIdentifier, transactionUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * UsersApi - axios parameter creator + * @export + */ +export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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 {string} acceptVersion MX Platform API version. + * @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} + */ + createUser: async (acceptVersion: string, userCreateRequestBody: UserCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('createUser', 'acceptVersion', acceptVersion) + // 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; + } + + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser: async (acceptVersion: string, accept: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('deleteUser', 'acceptVersion', acceptVersion) + // verify required parameter 'accept' is not null or undefined + assertParamExists('deleteUser', 'accept', accept) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('deleteUser', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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 list every user you\'ve created in the MX Platform API. + * @summary List users + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listUsers: async (acceptVersion: string, page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('listUsers', 'acceptVersion', acceptVersion) + 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; + } + + 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; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (email !== undefined) { + localVarQueryParameter['email'] = email; + } + + if (isDisabled !== undefined) { + localVarQueryParameter['is_disabled'] = isDisabled; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 specific user. + * @summary Read user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readUser: async (acceptVersion: string, userIdentifier: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('readUser', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('readUser', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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: async (acceptVersion: string, userIdentifier: string, userUpdateRequestBody: UserUpdateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('updateUser', 'acceptVersion', acceptVersion) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('updateUser', 'userIdentifier', userIdentifier) + // verify required parameter 'userUpdateRequestBody' is not null or undefined + assertParamExists('updateUser', 'userUpdateRequestBody', userUpdateRequestBody) + const localVarPath = `/users/{user_identifier}` + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 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 {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userCreateRequestBody: UserCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(acceptVersion, userCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteUser(acceptVersion: string, accept: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(acceptVersion, accept, userIdentifier, 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 {string} acceptVersion MX Platform API version. + * @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 listUsers(acceptVersion: string, page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(acceptVersion, page, recordsPerPage, id, email, isDisabled, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a specific user. + * @summary Read user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readUser(acceptVersion: string, userIdentifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readUser(acceptVersion, userIdentifier, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 updateUser(acceptVersion: string, userIdentifier: string, userUpdateRequestBody: UserUpdateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(acceptVersion, userIdentifier, userUpdateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UsersApi - factory interface + * @export + */ +export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UsersApiFp(configuration) + return { + /** + * 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 {string} acceptVersion MX Platform API version. + * @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} + */ + createUser(acceptVersion: string, userCreateRequestBody: UserCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.createUser(acceptVersion, userCreateRequestBody, 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. :::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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser(acceptVersion: string, accept: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.deleteUser(acceptVersion, accept, userIdentifier, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list every user you\'ve created in the MX Platform API. + * @summary List users + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + listUsers(acceptVersion: string, page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: any): AxiosPromise { + return localVarFp.listUsers(acceptVersion, page, recordsPerPage, id, email, isDisabled, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a specific user. + * @summary Read user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readUser(acceptVersion: string, userIdentifier: string, options?: any): AxiosPromise { + return localVarFp.readUser(acceptVersion, userIdentifier, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, userIdentifier: string, userUpdateRequestBody: UserUpdateRequestBody, options?: any): AxiosPromise { + return localVarFp.updateUser(acceptVersion, userIdentifier, 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 {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, userCreateRequestBody: UserCreateRequestBody, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).createUser(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} accept Specifies the media type expected in the response. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public deleteUser(acceptVersion: string, accept: string, userIdentifier: string, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).deleteUser(acceptVersion, accept, userIdentifier, 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 {string} acceptVersion MX Platform API version. + * @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(acceptVersion: string, page?: number, recordsPerPage?: number, id?: string, email?: string, isDisabled?: boolean, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).listUsers(acceptVersion, 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} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public readUser(acceptVersion: string, userIdentifier: string, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).readUser(acceptVersion, userIdentifier, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of the specified user. + * @summary Update user + * @param {string} acceptVersion MX Platform API version. + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, userIdentifier: string, userUpdateRequestBody: UserUpdateRequestBody, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).updateUser(acceptVersion, userIdentifier, userUpdateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * VerifiableCredentialsApi - axios parameter creator + * @export + */ +export const VerifiableCredentialsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + getAccountsData: async (acceptVersion: string, userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('getAccountsData', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + getIdentityData: async (acceptVersion: string, userGuid: string, memberGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('getIdentityData', 'acceptVersion', acceptVersion) + // 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) + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + getTransactionsData: async (acceptVersion: string, userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('getTransactionsData', 'acceptVersion', acceptVersion) + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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 { + /** + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} acceptVersion MX Platform API version. + * @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 getAccountsData(acceptVersion: string, userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountsData(acceptVersion, userGuid, memberGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} acceptVersion MX Platform API version. + * @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 getIdentityData(acceptVersion: string, userGuid: string, memberGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentityData(acceptVersion, userGuid, memberGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + async getTransactionsData(acceptVersion: string, userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionsData(acceptVersion, 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 { + /** + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + getAccountsData(acceptVersion: string, userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.getAccountsData(acceptVersion, userGuid, memberGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + getIdentityData(acceptVersion: string, userGuid: string, memberGuid: string, options?: any): AxiosPromise { + return localVarFp.getIdentityData(acceptVersion, userGuid, memberGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} acceptVersion MX Platform API version. + * @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} + */ + getTransactionsData(acceptVersion: string, userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options?: any): AxiosPromise { + return localVarFp.getTransactionsData(acceptVersion, userGuid, accountGuid, startTime, endTime, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * VerifiableCredentialsApi - object-oriented interface + * @export + * @class VerifiableCredentialsApi + * @extends {BaseAPI} + */ +export class VerifiableCredentialsApi extends BaseAPI { + /** + * Get an MX-issued verifiable credential of a user\'s accounts data. + * @summary Get Accounts Data + * @param {string} acceptVersion MX Platform API version. + * @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 VerifiableCredentialsApi + */ + public getAccountsData(acceptVersion: string, userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return VerifiableCredentialsApiFp(this.configuration).getAccountsData(acceptVersion, userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an MX-issued verifiable credential of a user\'s identity data. + * @summary Get Identity Data + * @param {string} acceptVersion MX Platform API version. + * @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 VerifiableCredentialsApi + */ + public getIdentityData(acceptVersion: string, userGuid: string, memberGuid: string, options?: AxiosRequestConfig) { + return VerifiableCredentialsApiFp(this.configuration).getIdentityData(acceptVersion, userGuid, memberGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an MX-issued verifiable credential of a user\'s transaction data. + * @summary Get Transactions Data + * @param {string} acceptVersion MX Platform API version. + * @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 VerifiableCredentialsApi + */ + public getTransactionsData(acceptVersion: string, userGuid: string, accountGuid: string, startTime?: string, endTime?: string, options?: AxiosRequestConfig) { + return VerifiableCredentialsApiFp(this.configuration).getTransactionsData(acceptVersion, userGuid, accountGuid, startTime, endTime, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * WidgetsApi - axios parameter creator + * @export + */ +export const WidgetsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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 (acceptVersion: string, memberIdentifier: string, userIdentifier: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('requestOAuthWindowURI', 'acceptVersion', acceptVersion) + // verify required parameter 'memberIdentifier' is not null or undefined + assertParamExists('requestOAuthWindowURI', 'memberIdentifier', memberIdentifier) + // verify required parameter 'userIdentifier' is not null or undefined + assertParamExists('requestOAuthWindowURI', 'userIdentifier', userIdentifier) + const localVarPath = `/users/{user_identifier}/members/{member_identifier}/oauth_window_uri` + .replace(`{${"member_identifier"}}`, encodeURIComponent(String(memberIdentifier))) + .replace(`{${"user_identifier"}}`, encodeURIComponent(String(userIdentifier))); + // 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; + } + + if (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + + + 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](https://docs.mx.com/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RequestWidgetURLRequest} requestWidgetURLRequest 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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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 (acceptVersion: string, userGuid: string, requestWidgetURLRequest: RequestWidgetURLRequest, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'acceptVersion' is not null or undefined + assertParamExists('requestWidgetURL', 'acceptVersion', acceptVersion) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('requestWidgetURL', 'userGuid', userGuid) + // verify required parameter 'requestWidgetURLRequest' is not null or undefined + assertParamExists('requestWidgetURL', 'requestWidgetURLRequest', requestWidgetURLRequest) + 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 (acceptVersion != null) { + localVarHeaderParameter['Accept-Version'] = String(acceptVersion); + } + + 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(requestWidgetURLRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WidgetsApi - functional programming interface + * @export + */ +export const WidgetsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WidgetsApiAxiosParamCreator(configuration) + return { + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestOAuthWindowURI(acceptVersion, memberIdentifier, userIdentifier, 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](https://docs.mx.com/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RequestWidgetURLRequest} requestWidgetURLRequest 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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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 requestWidgetURL(acceptVersion: string, userGuid: string, requestWidgetURLRequest: RequestWidgetURLRequest, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestWidgetURL(acceptVersion, userGuid, requestWidgetURLRequest, acceptLanguage, xCALLBACKPAYLOAD, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * WidgetsApi - factory interface + * @export + */ +export const WidgetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WidgetsApiFp(configuration) + return { + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: any): AxiosPromise { + return localVarFp.requestOAuthWindowURI(acceptVersion, memberIdentifier, userIdentifier, 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](https://docs.mx.com/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RequestWidgetURLRequest} requestWidgetURLRequest 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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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(acceptVersion: string, userGuid: string, requestWidgetURLRequest: RequestWidgetURLRequest, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options?: any): AxiosPromise { + return localVarFp.requestWidgetURL(acceptVersion, userGuid, requestWidgetURLRequest, acceptLanguage, xCALLBACKPAYLOAD, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WidgetsApi - object-oriented interface + * @export + * @class WidgetsApi + * @extends {BaseAPI} + */ +export class WidgetsApi extends BaseAPI { + /** + * This endpoint will generate an `oauth_window_uri` for the specified `member`. + * @summary Request oauth window uri + * @param {string} acceptVersion MX Platform API version. + * @param {string} memberIdentifier Use either the member `id` you defined or the MX-defined member `guid`. See [MX-Defined GUIDs vs IDs Defined by You](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @param {string} userIdentifier Use either the user `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs IDs Defined by You​](https://docs.mx.com/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-defined-by-you). + * @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(acceptVersion: string, memberIdentifier: string, userIdentifier: string, clientRedirectUrl?: string, enableApp2app?: string, referralSource?: string, skipAggregation?: boolean, uiMessageWebviewUrlScheme?: string, options?: AxiosRequestConfig) { + return WidgetsApiFp(this.configuration).requestOAuthWindowURI(acceptVersion, memberIdentifier, userIdentifier, 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](https://docs.mx.com/api-reference/platform-api/reference/widgets#widget-types). + * @summary Request widget URL + * @param {string} acceptVersion MX Platform API version. + * @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`. + * @param {RequestWidgetURLRequest} requestWidgetURLRequest 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](https://docs.mx.com/resources/webhooks/member/) and [Member Data Updated](https://docs.mx.com/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 requestWidgetURL(acceptVersion: string, userGuid: string, requestWidgetURLRequest: RequestWidgetURLRequest, acceptLanguage?: string, xCALLBACKPAYLOAD?: string, options?: AxiosRequestConfig) { + return WidgetsApiFp(this.configuration).requestWidgetURL(acceptVersion, userGuid, requestWidgetURLRequest, acceptLanguage, xCALLBACKPAYLOAD, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/v20250224/base.ts b/v20250224/base.ts new file mode 100644 index 0000000..abf0acf --- /dev/null +++ b/v20250224/base.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* 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. ## What\'s Changed? Several endpoints, headers, and fields changed in `v20250224`. For more on breaking changes, refer to our [versioning](https://docs.mx.com/api-reference/platform-api/overview/versioning#v20250224) and [migration](https://docs.mx.com/api-reference/platform-api/overview/migration) guides. ## Version Header Versions are set in the `Accept-Version` header of API requests. Version numbers correspond with the date associated with that version. The example below uses the version `v20250224`. ``` -H \'Accept: application/json\' -H \'Accept-Version: v20250224\' ``` --- + * + * The version of the OpenAPI document: 20250224 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://int-api.mx.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} diff --git a/v20250224/common.ts b/v20250224/common.ts new file mode 100644 index 0000000..ca3c605 --- /dev/null +++ b/v20250224/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* 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. ## What\'s Changed? Several endpoints, headers, and fields changed in `v20250224`. For more on breaking changes, refer to our [versioning](https://docs.mx.com/api-reference/platform-api/overview/versioning#v20250224) and [migration](https://docs.mx.com/api-reference/platform-api/overview/migration) guides. ## Version Header Versions are set in the `Accept-Version` header of API requests. Version numbers correspond with the date associated with that version. The example below uses the version `v20250224`. ``` -H \'Accept: application/json\' -H \'Accept-Version: v20250224\' ``` --- + * + * The version of the OpenAPI document: 20250224 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/v20250224/configuration.ts b/v20250224/configuration.ts new file mode 100644 index 0000000..368197e --- /dev/null +++ b/v20250224/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* 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. ## What\'s Changed? Several endpoints, headers, and fields changed in `v20250224`. For more on breaking changes, refer to our [versioning](https://docs.mx.com/api-reference/platform-api/overview/versioning#v20250224) and [migration](https://docs.mx.com/api-reference/platform-api/overview/migration) guides. ## Version Header Versions are set in the `Accept-Version` header of API requests. Version numbers correspond with the date associated with that version. The example below uses the version `v20250224`. ``` -H \'Accept: application/json\' -H \'Accept-Version: v20250224\' ``` --- + * + * The version of the OpenAPI document: 20250224 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/v20250224/index.ts b/v20250224/index.ts new file mode 100644 index 0000000..3a2673a --- /dev/null +++ b/v20250224/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* 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. ## What\'s Changed? Several endpoints, headers, and fields changed in `v20250224`. For more on breaking changes, refer to our [versioning](https://docs.mx.com/api-reference/platform-api/overview/versioning#v20250224) and [migration](https://docs.mx.com/api-reference/platform-api/overview/migration) guides. ## Version Header Versions are set in the `Accept-Version` header of API requests. Version numbers correspond with the date associated with that version. The example below uses the version `v20250224`. ``` -H \'Accept: application/json\' -H \'Accept-Version: v20250224\' ``` --- + * + * The version of the OpenAPI document: 20250224 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/v20250224/package.json b/v20250224/package.json new file mode 100644 index 0000000..22199e3 --- /dev/null +++ b/v20250224/package.json @@ -0,0 +1,32 @@ +{ + "name": "mx-platform-node", + "version": "3.0.0", + "description": "A Node.js SDK for the MX Platform API (v20250224)", + "apiVersion": "v20250224", + "author": "MX", + "keywords": [ + "mx", + "mx.com", + "mx platform api", + "mx-platform-node" + ], + "license": "MIT", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "files": [ + "dist/", + "*.md" + ], + "scripts": { + "build": "tsc --outDir dist/", + "prepare": "npm run build" + }, + "_comment": "IMPORTANT: Keep these dependency versions in sync with security updates. If package.json is manually updated for security fixes, this template MUST also be updated to prevent automated generation from overwriting the fixes.", + "dependencies": { + "axios": "^1.6.8" + }, + "devDependencies": { + "@types/node": "^20.12.7", + "typescript": "^5.4.5" + } +} diff --git a/v20250224/tsconfig.esm.json b/v20250224/tsconfig.esm.json new file mode 100644 index 0000000..2c0331c --- /dev/null +++ b/v20250224/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/v20250224/tsconfig.json b/v20250224/tsconfig.json new file mode 100644 index 0000000..30dc264 --- /dev/null +++ b/v20250224/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "ES6", + "module": "commonjs", + "noImplicitAny": true, + "outDir": "dist", + "rootDir": ".", + "moduleResolution": "node", + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +}