diff --git a/api.ts b/api.ts index 93f3865..08e27a5 100644 --- a/api.ts +++ b/api.ts @@ -4065,6 +4065,223 @@ export interface MerchantsResponseBody { */ 'pagination'?: PaginationResponse; } +/** + * + * @export + * @interface MicrodepositRequest + */ +export interface MicrodepositRequest { + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'account_number': string; + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'account_type': string; + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'routing_number': string; + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'account_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'first_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositRequest + */ + 'last_name'?: string; +} +/** + * + * @export + * @interface MicrodepositRequestBody + */ +export interface MicrodepositRequestBody { + /** + * + * @type {MicrodepositRequest} + * @memberof MicrodepositRequestBody + */ + 'micro_deposit'?: MicrodepositRequest; +} +/** + * + * @export + * @interface MicrodepositResponse + */ +export interface MicrodepositResponse { + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'account_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'account_number'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'account_type'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'first_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'last_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'routing_number'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'error_message'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'guid'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'institution_code'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'institution_name'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'status'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof MicrodepositResponse + */ + 'verified_at'?: string; +} +/** + * + * @export + * @interface MicrodepositResponseBody + */ +export interface MicrodepositResponseBody { + /** + * + * @type {MicrodepositResponse} + * @memberof MicrodepositResponseBody + */ + 'micro_deposit'?: MicrodepositResponse; +} +/** + * + * @export + * @interface MicrodepositVerifyRequest + */ +export interface MicrodepositVerifyRequest { + /** + * + * @type {number} + * @memberof MicrodepositVerifyRequest + */ + 'deposit_amount_1'?: number; + /** + * + * @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 @@ -5447,151 +5664,514 @@ export interface TaxDocumentsResponseBody { /** * * @export - * @interface TransactionResponse + * @interface TransactionCreateRequest */ -export interface TransactionResponse { +export interface TransactionCreateRequest { + /** + * + * @type {number} + * @memberof TransactionCreateRequest + */ + 'amount': number; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateRequest + */ + 'date': string; + /** + * + * @type {string} + * @memberof TransactionCreateRequest + */ + 'description': string; + /** + * The type of transaction, which must be CREDIT or DEBIT. See Transaction Fields for more information. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'type': string; + /** + * Unique identifier of the category. + * @type {string} + * @memberof TransactionCreateRequest + */ + 'category_guid'?: string; + /** + * + * @type {string} + * @memberof TransactionCreateRequest + */ + 'currency_code'?: string; + /** + * + * @type {boolean} + * @memberof TransactionCreateRequest + */ + 'has_been_viewed'?: boolean; + /** + * + * @type {boolean} + * @memberof TransactionCreateRequest + */ + 'is_hidden'?: boolean; + /** + * + * @type {boolean} + * @memberof TransactionCreateRequest + */ + 'is_international'?: boolean; + /** + * + * @type {string} + * @memberof TransactionCreateRequest + */ + 'memo'?: string; + /** + * + * @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 + * @interface TransactionCreateRequestBody + */ +export interface TransactionCreateRequestBody { + /** + * + * @type {TransactionCreateRequest} + * @memberof TransactionCreateRequestBody + */ + 'transaction'?: TransactionCreateRequest; +} +/** + * + * @export + * @interface TransactionCreateResponseBody + */ +export interface TransactionCreateResponseBody { + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody */ 'account_guid'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'account_id'?: string | null; /** * * @type {number} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ - 'amount'?: number | null; + 'amount'?: number; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'category'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'category_guid'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'check_number_string'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'created_at'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'currency_code'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'date'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'description'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'extended_transaction_type'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'guid'?: string | null; /** * * @type {string} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'id'?: string | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_bill_pay'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_direct_deposit'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_expense'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_fee'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_income'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_international'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody + */ + 'is_manual'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionCreateResponseBody */ 'is_overdraft_fee'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_payroll_advance'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_recurring'?: boolean | null; /** * * @type {boolean} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody */ 'is_subscription'?: boolean | null; /** * * @type {number} - * @memberof TransactionResponse + * @memberof TransactionCreateResponseBody + */ + 'latitude'?: number | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'localized_description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'localized_memo'?: string | null; + /** + * + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'longitude'?: number | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'member_guid'?: string | null; + /** + * + * @type {boolean} + * @memberof TransactionCreateResponseBody + */ + 'member_is_managed_by_user'?: boolean | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'memo'?: string | null; + /** + * + * @type {number} + * @memberof TransactionCreateResponseBody + */ + 'merchant_category_code'?: number | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'merchant_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'merchant_location_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'metadata'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'original_description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'posted_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'status'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'top_level_category'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'transacted_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'type'?: string; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'user_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionCreateResponseBody + */ + 'user_id'?: string | null; +} +/** + * + * @export + * @interface TransactionResponse + */ +export interface TransactionResponse { + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'account_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'account_id'?: string | null; + /** + * + * @type {number} + * @memberof TransactionResponse + */ + 'amount'?: number | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'category'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'category_guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'check_number_string'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'created_at'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'currency_code'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'date'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'description'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'extended_transaction_type'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'guid'?: string | null; + /** + * + * @type {string} + * @memberof TransactionResponse + */ + 'id'?: string | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_bill_pay'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_direct_deposit'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_expense'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_fee'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_income'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_international'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_overdraft_fee'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_payroll_advance'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_recurring'?: boolean | null; + /** + * + * @type {boolean} + * @memberof TransactionResponse + */ + 'is_subscription'?: boolean | null; + /** + * + * @type {number} + * @memberof TransactionResponse */ 'latitude'?: number | null; /** @@ -7977,244 +8557,668 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP return localVarFp.listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to list all the categories associated with the insight. - * @summary List all categories associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to list all the categories associated with the insight. + * @summary List all categories associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all insights associated with a specified account GUID. + * @summary List insights by account + * @param {string} accountGuid The unique id for the `account`. + * @param {string} userGuid The unique id for the `user`. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the insights associated with the user. + * @summary List all insights for a user. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the merchants associated with the insight. + * @summary List all merchants associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { + return localVarFp.listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to read the attributes of a specific insight according to its unique GUID. + * @summary Read a specific insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readInsightsUser(userGuid: string, insightGuid: string, options?: any): AxiosPromise { + return localVarFp.readInsightsUser(userGuid, insightGuid, options).then((request) => request(axios, basePath)); + }, + /** + * Use this endpoint to update the attributes of a particular insight according to its unique GUID. + * @summary Update insight + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: any): AxiosPromise { + return localVarFp.updateInsight(userGuid, insightGuid, insightUpdateRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * InsightsApi - object-oriented interface + * @export + * @class InsightsApi + * @extends {BaseAPI} + */ +export class InsightsApi extends BaseAPI { + /** + * Use this endpoint to list all the accounts associated with the insight. + * @summary List all accounts associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the categories associated with the insight. + * @summary List all categories associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all insights associated with a specified account GUID. + * @summary List insights by account + * @param {string} accountGuid The unique id for the `account`. + * @param {string} userGuid The unique id for the `user`. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the insights associated with the user. + * @summary List all insights for a user. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the merchants associated with the insight. + * @summary List all merchants associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the scheduled payments associated with the insight. + * @summary List all scheduled payments associated with an insight + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to list all the transactions associated with the insight. + * @summary List all transactions associated with an insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {number} [page] Specify current page. + * @param {number} [recordsPerPage] Specify records per page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to read the attributes of a specific insight according to its unique GUID. + * @summary Read a specific insight. + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public readInsightsUser(userGuid: string, insightGuid: string, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).readInsightsUser(userGuid, insightGuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Use this endpoint to update the attributes of a particular insight according to its unique GUID. + * @summary Update insight + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InsightsApi + */ + public updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: AxiosRequestConfig) { + return InsightsApiFp(this.configuration).updateInsight(userGuid, insightGuid, insightUpdateRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MicrodepositsApi - axios parameter creator + * @export + */ +export const MicrodepositsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + microDepositsMicrodepositGuidVerifyPut: async (microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'microdepositGuid' is not null or undefined + assertParamExists('microDepositsMicrodepositGuidVerifyPut', 'microdepositGuid', microdepositGuid) + const localVarPath = `/micro_deposits/{microdeposit_guid}/verify` + .replace(`{${"microdeposit_guid"}}`, encodeURIComponent(String(microdepositGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(microdepositVerifyRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserGuidMicroDepositsGet: async (userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsGet', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/micro_deposits` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique id for a `user`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserGuidMicroDepositsMicroDepositGuidDelete: async (microDepositGuid: string, userGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'microDepositGuid' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidDelete', 'microDepositGuid', microDepositGuid) + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidDelete', 'userGuid', userGuid) + const localVarPath = `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` + .replace(`{${"micro_deposit_guid"}}`, encodeURIComponent(String(microDepositGuid))) + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserGuidMicroDepositsMicroDepositGuidGet: async (userGuid: string, microDepositGuid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidGet', 'userGuid', userGuid) + // verify required parameter 'microDepositGuid' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsMicroDepositGuidGet', 'microDepositGuid', microDepositGuid) + const localVarPath = `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. + * @summary Create a microdeposit + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {MicrodepositRequestBody} microdepositRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserGuidMicroDepositsPost: async (userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsPost', 'userGuid', userGuid) + // verify required parameter 'microdepositRequestBody' is not null or undefined + assertParamExists('usersUserGuidMicroDepositsPost', 'microdepositRequestBody', microdepositRequestBody) + const localVarPath = `/users/{user_guid}/micro_deposits` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(microdepositRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MicrodepositsApi - functional programming interface + * @export + */ +export const MicrodepositsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MicrodepositsApiAxiosParamCreator(configuration) + return { + /** + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async microDepositsMicrodepositGuidVerifyPut(microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.microDepositsMicrodepositGuidVerifyPut(microdepositGuid, microdepositVerifyRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async usersUserGuidMicroDepositsGet(userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsGet(userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique id for a `user`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid, userGuid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to list all insights associated with a specified account GUID. - * @summary List insights by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user + * @param {string} userGuid The unique identifier for the user. Defined by MX. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid: string, microDepositGuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid, microDepositGuid, 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. + * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. + * @summary Create a microdeposit * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * @param {MicrodepositRequestBody} microdepositRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + async usersUserGuidMicroDepositsPost(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidMicroDepositsPost(userGuid, microdepositRequestBody, 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 list all the merchants associated with the insight. - * @summary List all merchants associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + microDepositsMicrodepositGuidVerifyPut(microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: any): AxiosPromise { + return localVarFp.microDepositsMicrodepositGuidVerifyPut(microdepositGuid, microdepositVerifyRequestBody, 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 + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + usersUserGuidMicroDepositsGet(userGuid: string, options?: any): AxiosPromise { + return localVarFp.usersUserGuidMicroDepositsGet(userGuid, 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} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique id for a `user`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: any): AxiosPromise { - return localVarFp.listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(axios, basePath)); + usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid: string, userGuid: string, options?: any): AxiosPromise { + return localVarFp.usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid, userGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to read the attributes of a specific insight according to its unique GUID. - * @summary Read a specific insight. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - readInsightsUser(userGuid: string, insightGuid: string, options?: any): AxiosPromise { - return localVarFp.readInsightsUser(userGuid, insightGuid, options).then((request) => request(axios, basePath)); + usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid: string, microDepositGuid: string, options?: any): AxiosPromise { + return localVarFp.usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid, microDepositGuid, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to update the attributes of a particular insight according to its unique GUID. - * @summary Update insight + * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. + * @summary Create a microdeposit * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {MicrodepositRequestBody} microdepositRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: any): AxiosPromise { - return localVarFp.updateInsight(userGuid, insightGuid, insightUpdateRequest, options).then((request) => request(axios, basePath)); + usersUserGuidMicroDepositsPost(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: any): AxiosPromise { + return localVarFp.usersUserGuidMicroDepositsPost(userGuid, microdepositRequestBody, options).then((request) => request(axios, basePath)); }, }; }; /** - * InsightsApi - object-oriented interface + * MicrodepositsApi - object-oriented interface * @export - * @class InsightsApi + * @class MicrodepositsApi * @extends {BaseAPI} */ -export class InsightsApi extends BaseAPI { - /** - * Use this endpoint to list all the accounts associated with the insight. - * @summary List all accounts associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listAccountsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listAccountsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the categories associated with the insight. - * @summary List all categories associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listCategoriesInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listCategoriesInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all insights associated with a specified account GUID. - * @summary List insights by account - * @param {string} accountGuid The unique id for the `account`. - * @param {string} userGuid The unique id for the `user`. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listInsightsByAccount(accountGuid: string, userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listInsightsByAccount(accountGuid, userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Use this endpoint to list all the insights associated with the user. - * @summary List all insights for a user. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InsightsApi - */ - public listInsightsUser(userGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listInsightsUser(userGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); - } - +export class MicrodepositsApi extends BaseAPI { /** - * Use this endpoint to list all the merchants associated with the insight. - * @summary List all merchants associated with an insight. - * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + * @summary Verify a Microdeposit + * @param {string} microdepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {MicrodepositVerifyRequestBody} [microdepositVerifyRequestBody] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof MicrodepositsApi */ - public listMerchantsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listMerchantsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + public microDepositsMicrodepositGuidVerifyPut(microdepositGuid: string, microdepositVerifyRequestBody?: MicrodepositVerifyRequestBody, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).microDepositsMicrodepositGuidVerifyPut(microdepositGuid, microdepositVerifyRequestBody, 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 + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + * @summary List all microdeposits for a user * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof MicrodepositsApi */ - public listScheduledPaymentsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listScheduledPaymentsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + public usersUserGuidMicroDepositsGet(userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsGet(userGuid, 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} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {number} [page] Specify current page. - * @param {number} [recordsPerPage] Specify records per page. + * Use this endpoint to delete the specified microdeposit. + * @summary Delete a microdeposit + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. + * @param {string} userGuid The unique id for a `user`. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof MicrodepositsApi */ - public listTransactionsInsight(userGuid: string, insightGuid: string, page?: number, recordsPerPage?: number, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).listTransactionsInsight(userGuid, insightGuid, page, recordsPerPage, options).then((request) => request(this.axios, this.basePath)); + public usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid: string, userGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsMicroDepositGuidDelete(microDepositGuid, userGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to read the attributes of a specific insight according to its unique GUID. - * @summary Read a specific insight. + * Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + * @summary Read a microdeposit for a user * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. + * @param {string} microDepositGuid The unique identifier for the microdeposit. Defined by MX. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof MicrodepositsApi */ - public readInsightsUser(userGuid: string, insightGuid: string, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).readInsightsUser(userGuid, insightGuid, options).then((request) => request(this.axios, this.basePath)); + public usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid: string, microDepositGuid: string, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsMicroDepositGuidGet(userGuid, microDepositGuid, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to update the attributes of a particular insight according to its unique GUID. - * @summary Update insight + * Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. + * @summary Create a microdeposit * @param {string} userGuid The unique identifier for the user. Defined by MX. - * @param {string} insightGuid The unique identifier for the insight. Defined by MX. - * @param {InsightUpdateRequest} insightUpdateRequest The insight to be updated (None of these parameters are required, but the user object cannot be empty.) + * @param {MicrodepositRequestBody} microdepositRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InsightsApi + * @memberof MicrodepositsApi */ - public updateInsight(userGuid: string, insightGuid: string, insightUpdateRequest: InsightUpdateRequest, options?: AxiosRequestConfig) { - return InsightsApiFp(this.configuration).updateInsight(userGuid, insightGuid, insightUpdateRequest, options).then((request) => request(this.axios, this.basePath)); + public usersUserGuidMicroDepositsPost(userGuid: string, microdepositRequestBody: MicrodepositRequestBody, options?: AxiosRequestConfig) { + return MicrodepositsApiFp(this.configuration).usersUserGuidMicroDepositsPost(userGuid, microdepositRequestBody, options).then((request) => request(this.axios, this.basePath)); } } @@ -18705,3 +19709,129 @@ export class SpendingPlanApi extends BaseAPI { +/** + * TransactionsApi - axios parameter creator + * @export + */ +export const TransactionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for the user. + * @param {string} accountGuid The unique identifier for the account. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserGuidAccountsAccountGuidTransactionsPost: async (userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'userGuid' is not null or undefined + assertParamExists('usersUserGuidAccountsAccountGuidTransactionsPost', 'userGuid', userGuid) + // verify required parameter 'accountGuid' is not null or undefined + assertParamExists('usersUserGuidAccountsAccountGuidTransactionsPost', 'accountGuid', accountGuid) + // verify required parameter 'transactionCreateRequestBody' is not null or undefined + assertParamExists('usersUserGuidAccountsAccountGuidTransactionsPost', 'transactionCreateRequestBody', transactionCreateRequestBody) + const localVarPath = `/users/{user_guid}/accounts/{account_guid}/transactions` + .replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid))) + .replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactionCreateRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransactionsApi - functional programming interface + * @export + */ +export const TransactionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration) + return { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for the user. + * @param {string} accountGuid The unique identifier for the account. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async usersUserGuidAccountsAccountGuidTransactionsPost(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserGuidAccountsAccountGuidTransactionsPost(userGuid, accountGuid, transactionCreateRequestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TransactionsApi - factory interface + * @export + */ +export const TransactionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionsApiFp(configuration) + return { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for the user. + * @param {string} accountGuid The unique identifier for the account. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserGuidAccountsAccountGuidTransactionsPost(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: any): AxiosPromise { + return localVarFp.usersUserGuidAccountsAccountGuidTransactionsPost(userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransactionsApi - object-oriented interface + * @export + * @class TransactionsApi + * @extends {BaseAPI} + */ +export class TransactionsApi extends BaseAPI { + /** + * This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + * @summary Create manual transaction + * @param {string} userGuid The unique identifier for the user. + * @param {string} accountGuid The unique identifier for the account. + * @param {TransactionCreateRequestBody} transactionCreateRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApi + */ + public usersUserGuidAccountsAccountGuidTransactionsPost(userGuid: string, accountGuid: string, transactionCreateRequestBody: TransactionCreateRequestBody, options?: AxiosRequestConfig) { + return TransactionsApiFp(this.configuration).usersUserGuidAccountsAccountGuidTransactionsPost(userGuid, accountGuid, transactionCreateRequestBody, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/openapi/config.yml b/openapi/config.yml index 6182255..a87f2bc 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -1,4 +1,4 @@ --- npmName: mx-platform-node -npmVersion: 0.40.0 +npmVersion: 0.41.0 supportsES6: true diff --git a/package.json b/package.json index 7e7d8a0..50e0448 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mx-platform-node", - "version": "0.40.0", + "version": "0.41.0", "description": "A Node library for the MX Platform API.", "author": "MX", "keywords": [