diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 88a356b..a1652bd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -19,6 +19,13 @@ docs/AuthorizationCodeRequest.md docs/AuthorizationCodeRequestBody.md docs/AuthorizationCodeResponse.md docs/AuthorizationCodeResponseBody.md +docs/BudgetCreateRequest.md +docs/BudgetCreateRequestBody.md +docs/BudgetResponse.md +docs/BudgetResponseBody.md +docs/BudgetUpdateRequest.md +docs/BudgetUpdateRequestBody.md +docs/BudgetsApi.md docs/CategoriesResponseBody.md docs/CategoryCreateRequest.md docs/CategoryCreateRequestBody.md @@ -41,6 +48,13 @@ docs/EnhanceTransactionResponse.md docs/EnhanceTransactionsRequest.md docs/EnhanceTransactionsRequestBody.md docs/EnhanceTransactionsResponseBody.md +docs/GoalRequest.md +docs/GoalRequestBody.md +docs/GoalResponse.md +docs/GoalResponseBody.md +docs/GoalsApi.md +docs/GoalsResponse.md +docs/GoalsResponseBody.md docs/HoldingResponse.md docs/HoldingResponseBody.md docs/HoldingsResponseBody.md @@ -81,6 +95,10 @@ docs/MerchantLocationResponseBody.md docs/MerchantResponse.md docs/MerchantResponseBody.md docs/MerchantsResponseBody.md +docs/MonthlyCashFlowProfileRequest.md +docs/MonthlyCashFlowProfileRequestBody.md +docs/MonthlyCashFlowResponse.md +docs/MonthlyCashFlowResponseBody.md docs/MxPlatformApi.md docs/OAuthWindowResponse.md docs/OAuthWindowResponseBody.md @@ -90,6 +108,9 @@ docs/PaymentProcessorAuthorizationCodeRequest.md docs/PaymentProcessorAuthorizationCodeRequestBody.md docs/PaymentProcessorAuthorizationCodeResponse.md docs/PaymentProcessorAuthorizationCodeResponseBody.md +docs/RepositionRequest.md +docs/RepositionRequestBody.md +docs/RepositionResponseBody.md docs/RewardResponse.md docs/RewardResponseBody.md docs/RewardsResponse.md @@ -106,6 +127,9 @@ docs/SpendingPlanIterationResponse.md docs/SpendingPlanIterationsResponse.md docs/SpendingPlanResponse.md docs/SpendingPlansResponseBody.md +docs/SplitTransactionRequest.md +docs/SplitTransactionRequestBody.md +docs/SplitTransactionsResponseBody.md docs/StatementResponse.md docs/StatementResponseBody.md docs/StatementsResponseBody.md @@ -138,6 +162,8 @@ docs/TransactionRulesResponseBody.md docs/TransactionUpdateRequest.md docs/TransactionUpdateRequestBody.md docs/TransactionsResponseBody.md +docs/UpdateGoalRequest.md +docs/UpdateGoalRequestBody.md docs/UserCreateRequest.md docs/UserCreateRequestBody.md docs/UserResponse.md @@ -150,6 +176,8 @@ docs/WidgetRequestBody.md docs/WidgetResponse.md docs/WidgetResponseBody.md lib/mx-platform-ruby.rb +lib/mx-platform-ruby/api/budgets_api.rb +lib/mx-platform-ruby/api/goals_api.rb lib/mx-platform-ruby/api/insights_api.rb lib/mx-platform-ruby/api/mx_platform_api.rb lib/mx-platform-ruby/api/spending_plan_api.rb @@ -171,6 +199,12 @@ lib/mx-platform-ruby/models/authorization_code_request.rb lib/mx-platform-ruby/models/authorization_code_request_body.rb lib/mx-platform-ruby/models/authorization_code_response.rb lib/mx-platform-ruby/models/authorization_code_response_body.rb +lib/mx-platform-ruby/models/budget_create_request.rb +lib/mx-platform-ruby/models/budget_create_request_body.rb +lib/mx-platform-ruby/models/budget_response.rb +lib/mx-platform-ruby/models/budget_response_body.rb +lib/mx-platform-ruby/models/budget_update_request.rb +lib/mx-platform-ruby/models/budget_update_request_body.rb lib/mx-platform-ruby/models/categories_response_body.rb lib/mx-platform-ruby/models/category_create_request.rb lib/mx-platform-ruby/models/category_create_request_body.rb @@ -193,6 +227,12 @@ lib/mx-platform-ruby/models/enhance_transaction_response.rb lib/mx-platform-ruby/models/enhance_transactions_request.rb lib/mx-platform-ruby/models/enhance_transactions_request_body.rb lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +lib/mx-platform-ruby/models/goal_request.rb +lib/mx-platform-ruby/models/goal_request_body.rb +lib/mx-platform-ruby/models/goal_response.rb +lib/mx-platform-ruby/models/goal_response_body.rb +lib/mx-platform-ruby/models/goals_response.rb +lib/mx-platform-ruby/models/goals_response_body.rb lib/mx-platform-ruby/models/holding_response.rb lib/mx-platform-ruby/models/holding_response_body.rb lib/mx-platform-ruby/models/holdings_response_body.rb @@ -232,6 +272,10 @@ lib/mx-platform-ruby/models/merchant_location_response_body.rb lib/mx-platform-ruby/models/merchant_response.rb lib/mx-platform-ruby/models/merchant_response_body.rb lib/mx-platform-ruby/models/merchants_response_body.rb +lib/mx-platform-ruby/models/monthly_cash_flow_profile_request.rb +lib/mx-platform-ruby/models/monthly_cash_flow_profile_request_body.rb +lib/mx-platform-ruby/models/monthly_cash_flow_response.rb +lib/mx-platform-ruby/models/monthly_cash_flow_response_body.rb lib/mx-platform-ruby/models/o_auth_window_response.rb lib/mx-platform-ruby/models/o_auth_window_response_body.rb lib/mx-platform-ruby/models/option_response.rb @@ -240,6 +284,9 @@ lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +lib/mx-platform-ruby/models/reposition_request.rb +lib/mx-platform-ruby/models/reposition_request_body.rb +lib/mx-platform-ruby/models/reposition_response_body.rb lib/mx-platform-ruby/models/reward_response.rb lib/mx-platform-ruby/models/reward_response_body.rb lib/mx-platform-ruby/models/rewards_response.rb @@ -255,6 +302,9 @@ lib/mx-platform-ruby/models/spending_plan_iteration_response.rb lib/mx-platform-ruby/models/spending_plan_iterations_response.rb lib/mx-platform-ruby/models/spending_plan_response.rb lib/mx-platform-ruby/models/spending_plans_response_body.rb +lib/mx-platform-ruby/models/split_transaction_request.rb +lib/mx-platform-ruby/models/split_transaction_request_body.rb +lib/mx-platform-ruby/models/split_transactions_response_body.rb lib/mx-platform-ruby/models/statement_response.rb lib/mx-platform-ruby/models/statement_response_body.rb lib/mx-platform-ruby/models/statements_response_body.rb @@ -287,6 +337,8 @@ lib/mx-platform-ruby/models/transaction_rules_response_body.rb lib/mx-platform-ruby/models/transaction_update_request.rb lib/mx-platform-ruby/models/transaction_update_request_body.rb lib/mx-platform-ruby/models/transactions_response_body.rb +lib/mx-platform-ruby/models/update_goal_request.rb +lib/mx-platform-ruby/models/update_goal_request_body.rb lib/mx-platform-ruby/models/user_create_request.rb lib/mx-platform-ruby/models/user_create_request_body.rb lib/mx-platform-ruby/models/user_response.rb @@ -300,6 +352,8 @@ lib/mx-platform-ruby/models/widget_response.rb lib/mx-platform-ruby/models/widget_response_body.rb lib/mx-platform-ruby/version.rb mx-platform-ruby.gemspec +spec/api/budgets_api_spec.rb +spec/api/goals_api_spec.rb spec/api/insights_api_spec.rb spec/api/mx_platform_api_spec.rb spec/api/spending_plan_api_spec.rb @@ -320,6 +374,12 @@ spec/models/authorization_code_request_body_spec.rb spec/models/authorization_code_request_spec.rb spec/models/authorization_code_response_body_spec.rb spec/models/authorization_code_response_spec.rb +spec/models/budget_create_request_body_spec.rb +spec/models/budget_create_request_spec.rb +spec/models/budget_response_body_spec.rb +spec/models/budget_response_spec.rb +spec/models/budget_update_request_body_spec.rb +spec/models/budget_update_request_spec.rb spec/models/categories_response_body_spec.rb spec/models/category_create_request_body_spec.rb spec/models/category_create_request_spec.rb @@ -342,6 +402,12 @@ spec/models/enhance_transaction_response_spec.rb spec/models/enhance_transactions_request_body_spec.rb spec/models/enhance_transactions_request_spec.rb spec/models/enhance_transactions_response_body_spec.rb +spec/models/goal_request_body_spec.rb +spec/models/goal_request_spec.rb +spec/models/goal_response_body_spec.rb +spec/models/goal_response_spec.rb +spec/models/goals_response_body_spec.rb +spec/models/goals_response_spec.rb spec/models/holding_response_body_spec.rb spec/models/holding_response_spec.rb spec/models/holdings_response_body_spec.rb @@ -381,6 +447,10 @@ spec/models/merchant_location_response_spec.rb spec/models/merchant_response_body_spec.rb spec/models/merchant_response_spec.rb spec/models/merchants_response_body_spec.rb +spec/models/monthly_cash_flow_profile_request_body_spec.rb +spec/models/monthly_cash_flow_profile_request_spec.rb +spec/models/monthly_cash_flow_response_body_spec.rb +spec/models/monthly_cash_flow_response_spec.rb spec/models/o_auth_window_response_body_spec.rb spec/models/o_auth_window_response_spec.rb spec/models/option_response_spec.rb @@ -389,6 +459,9 @@ spec/models/payment_processor_authorization_code_request_body_spec.rb spec/models/payment_processor_authorization_code_request_spec.rb spec/models/payment_processor_authorization_code_response_body_spec.rb spec/models/payment_processor_authorization_code_response_spec.rb +spec/models/reposition_request_body_spec.rb +spec/models/reposition_request_spec.rb +spec/models/reposition_response_body_spec.rb spec/models/reward_response_body_spec.rb spec/models/reward_response_spec.rb spec/models/rewards_response_body_spec.rb @@ -404,6 +477,9 @@ spec/models/spending_plan_iteration_response_spec.rb spec/models/spending_plan_iterations_response_spec.rb spec/models/spending_plan_response_spec.rb spec/models/spending_plans_response_body_spec.rb +spec/models/split_transaction_request_body_spec.rb +spec/models/split_transaction_request_spec.rb +spec/models/split_transactions_response_body_spec.rb spec/models/statement_response_body_spec.rb spec/models/statement_response_spec.rb spec/models/statements_response_body_spec.rb @@ -436,6 +512,8 @@ spec/models/transaction_rules_response_body_spec.rb spec/models/transaction_update_request_body_spec.rb spec/models/transaction_update_request_spec.rb spec/models/transactions_response_body_spec.rb +spec/models/update_goal_request_body_spec.rb +spec/models/update_goal_request_spec.rb spec/models/user_create_request_body_spec.rb spec/models/user_create_request_spec.rb spec/models/user_response_body_spec.rb diff --git a/docs/BudgetCreateRequest.md b/docs/BudgetCreateRequest.md new file mode 100644 index 0000000..390eaf9 --- /dev/null +++ b/docs/BudgetCreateRequest.md @@ -0,0 +1,26 @@ +# MxPlatformRuby::BudgetCreateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **category_guid** | **String** | Unique identifier of the category. | | +| **parent_guid** | **String** | Unique identifier of the parent budget. This is only required when creating a budget on a sub-category. | | +| **amount** | **Integer** | Amount of the budget. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the budget. | [optional] | +| **skip_webhook** | **Boolean** | When set to true, this parameter will prevent a webhook from being triggered by the request. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::BudgetCreateRequest.new( + category_guid: CAT-bd56d35a-a9a7-6e10-66c1-5b9cc1b6c81a, + parent_guid: BGT-6be44a91-e105-f68a-4770-8c7c0a5c9778, + amount: 1000, + metadata: Additional information, + skip_webhook: true +) +``` + diff --git a/docs/BudgetCreateRequestBody.md b/docs/BudgetCreateRequestBody.md new file mode 100644 index 0000000..2c4bcaa --- /dev/null +++ b/docs/BudgetCreateRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::BudgetCreateRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **budget** | [**BudgetCreateRequest**](BudgetCreateRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::BudgetCreateRequestBody.new( + budget: null +) +``` + diff --git a/docs/BudgetResponse.md b/docs/BudgetResponse.md new file mode 100644 index 0000000..e4cd9b0 --- /dev/null +++ b/docs/BudgetResponse.md @@ -0,0 +1,48 @@ +# MxPlatformRuby::BudgetResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **amount** | **Float** | A goal amount set by the user for a category's transaction total during a month. | [optional] | +| **category_guid** | **String** | Unique identifier for the budget category. Defined by MX. | [optional] | +| **created_at** | **String** | Date and time the budget was created, represented in ISO 8601 format with timestamp. | [optional] | +| **guid** | **String** | Unique identifier for the budget. Defined by MX. | [optional] | +| **is_exceeded** | **Boolean** | If the budget has been exceeded, this field will be true. Otherwise, this field will be false. | [optional] | +| **is_off_track** | **Boolean** | If the budget is off track, this field will be true. Otherwise, this field will be false. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the budget. | [optional] | +| **name** | **String** | The name of the budget that is visible to the user (ie \"Food\", \"Bills\", \"Entertainment\", etc). | [optional] | +| **off_track_percentage** | **Float** | The percentage amount of off track spending. (Deprecated). | [optional] | +| **parent_guid** | **String** | Unique identifier for the parent budget. Defined by MX. | [optional] | +| **percent_spent** | **Float** | 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. | [optional] | +| **projected_spending** | **Float** | The projected amount of spending for the budget. | [optional] | +| **revision** | **Integer** | The revision number of this budget record. | [optional] | +| **transaction_total** | **Object** | The cumulative amount of all transactions under the budget. | [optional] | +| **updated_at** | **Object** | Date and time the budget was updated, represented in ISO 8601 format with timestamp. | [optional] | +| **user_guid** | **Object** | Unique identifier for the user. Defined by MX. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::BudgetResponse.new( + amount: 153.0, + category_guid: CAT-bd56d35a-a9a7-6e10-66c1-5b9cc1b6c81a, + created_at: 2018-10-18T19:51:26+00:00, + guid: BGT-6ca0e3ef-c65e-4655-8b5a-275a3c19c21d, + is_exceeded: true, + is_off_track: true, + metadata: some metadata, + name: Food & Dining, + off_track_percentage: null, + parent_guid: null, + percent_spent: 1276.34, + projected_spending: 3562.4, + revision: 561, + transaction_total: 1952.8, + updated_at: 2022-06-14T21:17:11+00:00, + user_guid: USR-11141024-90b3-1bce-cac9-c06ced52ab4c +) +``` + diff --git a/docs/BudgetResponseBody.md b/docs/BudgetResponseBody.md new file mode 100644 index 0000000..e2642ea --- /dev/null +++ b/docs/BudgetResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::BudgetResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **budget** | [**BudgetResponse**](BudgetResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::BudgetResponseBody.new( + budget: null +) +``` + diff --git a/docs/BudgetUpdateRequest.md b/docs/BudgetUpdateRequest.md new file mode 100644 index 0000000..ff0d323 --- /dev/null +++ b/docs/BudgetUpdateRequest.md @@ -0,0 +1,22 @@ +# MxPlatformRuby::BudgetUpdateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **amount** | **Integer** | Amount of the budget. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the budget. | [optional] | +| **skip_webhook** | **Boolean** | When set to true, this parameter will prevent a webhook from being triggered by the request. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::BudgetUpdateRequest.new( + amount: 1000, + metadata: Additional information, + skip_webhook: true +) +``` + diff --git a/docs/BudgetUpdateRequestBody.md b/docs/BudgetUpdateRequestBody.md new file mode 100644 index 0000000..04423ab --- /dev/null +++ b/docs/BudgetUpdateRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::BudgetUpdateRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **budget** | [**BudgetUpdateRequest**](BudgetUpdateRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::BudgetUpdateRequestBody.new( + budget: null +) +``` + diff --git a/docs/BudgetsApi.md b/docs/BudgetsApi.md new file mode 100644 index 0000000..6a770ca --- /dev/null +++ b/docs/BudgetsApi.md @@ -0,0 +1,444 @@ +# MxPlatformRuby::BudgetsApi + +All URIs are relative to *https://api.mx.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**users_user_guid_budgets_budget_guid_delete**](BudgetsApi.md#users_user_guid_budgets_budget_guid_delete) | **DELETE** /users/{user_guid}/budgets/{budget_guid} | Delete a budget | +| [**users_user_guid_budgets_budget_guid_get**](BudgetsApi.md#users_user_guid_budgets_budget_guid_get) | **GET** /users/{user_guid}/budgets/{budget_guid} | Read a specific budget | +| [**users_user_guid_budgets_budget_guid_put**](BudgetsApi.md#users_user_guid_budgets_budget_guid_put) | **PUT** /users/{user_guid}/budgets/{budget_guid} | Update a specific budget | +| [**users_user_guid_budgets_generate_post**](BudgetsApi.md#users_user_guid_budgets_generate_post) | **POST** /users/{user_guid}/budgets/generate | Auto-generate budgets | +| [**users_user_guid_budgets_get**](BudgetsApi.md#users_user_guid_budgets_get) | **GET** /users/{user_guid}/budgets | List all budgets | +| [**users_user_guid_budgets_post**](BudgetsApi.md#users_user_guid_budgets_post) | **POST** /users/{user_guid}/budgets | Create a budget | + + +## users_user_guid_budgets_budget_guid_delete + +> users_user_guid_budgets_budget_guid_delete(user_guid, budget_guid) + +Delete a budget + +Delete a budget. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::BudgetsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the budget. Defined by MX. +budget_guid = 'budget_guid_example' # String | The unique identifier for the budget. Defined by MX. + +begin + # Delete a budget + api_instance.users_user_guid_budgets_budget_guid_delete(user_guid, budget_guid) +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_delete: #{e}" +end +``` + +#### Using the users_user_guid_budgets_budget_guid_delete_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> users_user_guid_budgets_budget_guid_delete_with_http_info(user_guid, budget_guid) + +```ruby +begin + # Delete a budget + data, status_code, headers = api_instance.users_user_guid_budgets_budget_guid_delete_with_http_info(user_guid, budget_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_delete_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the budget. Defined by MX. | | +| **budget_guid** | **String** | The unique identifier for the budget. Defined by MX. | | + +### Return type + +nil (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## users_user_guid_budgets_budget_guid_get + +> users_user_guid_budgets_budget_guid_get(budget_guid, user_guid) + +Read a specific budget + +Read a specific budget. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::BudgetsApi.new +budget_guid = 'budget_guid_example' # String | The unique identifier for the budget. Defined by MX. +user_guid = 'user_guid_example' # String | The unique identifier for the budget. Defined by MX. + +begin + # Read a specific budget + result = api_instance.users_user_guid_budgets_budget_guid_get(budget_guid, user_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_get: #{e}" +end +``` + +#### Using the users_user_guid_budgets_budget_guid_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_budgets_budget_guid_get_with_http_info(budget_guid, user_guid) + +```ruby +begin + # Read a specific budget + data, status_code, headers = api_instance.users_user_guid_budgets_budget_guid_get_with_http_info(budget_guid, user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **budget_guid** | **String** | The unique identifier for the budget. Defined by MX. | | +| **user_guid** | **String** | The unique identifier for the budget. Defined by MX. | | + +### Return type + +[**BudgetResponseBody**](BudgetResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## users_user_guid_budgets_budget_guid_put + +> users_user_guid_budgets_budget_guid_put(user_guid, budget_guid, opts) + +Update a specific budget + +Update a specific budget. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::BudgetsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the budget. Defined by MX. +budget_guid = 'budget_guid_example' # String | The unique identifier for the budget. Defined by MX. +opts = { + budget_update_request_body: MxPlatformRuby::BudgetUpdateRequestBody.new # BudgetUpdateRequestBody | +} + +begin + # Update a specific budget + result = api_instance.users_user_guid_budgets_budget_guid_put(user_guid, budget_guid, opts) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_put: #{e}" +end +``` + +#### Using the users_user_guid_budgets_budget_guid_put_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_budgets_budget_guid_put_with_http_info(user_guid, budget_guid, opts) + +```ruby +begin + # Update a specific budget + data, status_code, headers = api_instance.users_user_guid_budgets_budget_guid_put_with_http_info(user_guid, budget_guid, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_put_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the budget. Defined by MX. | | +| **budget_guid** | **String** | The unique identifier for the budget. Defined by MX. | | +| **budget_update_request_body** | [**BudgetUpdateRequestBody**](BudgetUpdateRequestBody.md) | | [optional] | + +### Return type + +[**BudgetResponseBody**](BudgetResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## users_user_guid_budgets_generate_post + +> users_user_guid_budgets_generate_post(user_guid) + +Auto-generate budgets + +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`. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::BudgetsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX. + +begin + # Auto-generate budgets + result = api_instance.users_user_guid_budgets_generate_post(user_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_generate_post: #{e}" +end +``` + +#### Using the users_user_guid_budgets_generate_post_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_budgets_generate_post_with_http_info(user_guid) + +```ruby +begin + # Auto-generate budgets + data, status_code, headers = api_instance.users_user_guid_budgets_generate_post_with_http_info(user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_generate_post_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. Defined by MX. | | + +### Return type + +[**BudgetResponseBody**](BudgetResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## users_user_guid_budgets_get + +> users_user_guid_budgets_get(user_guid) + +List all budgets + +List all budgets + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::BudgetsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX. + +begin + # List all budgets + result = api_instance.users_user_guid_budgets_get(user_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_get: #{e}" +end +``` + +#### Using the users_user_guid_budgets_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_budgets_get_with_http_info(user_guid) + +```ruby +begin + # List all budgets + data, status_code, headers = api_instance.users_user_guid_budgets_get_with_http_info(user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. Defined by MX. | | + +### Return type + +[**BudgetResponseBody**](BudgetResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## users_user_guid_budgets_post + +> users_user_guid_budgets_post(user_guid, budget_create_request_body) + +Create a budget + +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. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::BudgetsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX. +budget_create_request_body = MxPlatformRuby::BudgetCreateRequestBody.new # BudgetCreateRequestBody | + +begin + # Create a budget + result = api_instance.users_user_guid_budgets_post(user_guid, budget_create_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_post: #{e}" +end +``` + +#### Using the users_user_guid_budgets_post_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_budgets_post_with_http_info(user_guid, budget_create_request_body) + +```ruby +begin + # Create a budget + data, status_code, headers = api_instance.users_user_guid_budgets_post_with_http_info(user_guid, budget_create_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling BudgetsApi->users_user_guid_budgets_post_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. Defined by MX. | | +| **budget_create_request_body** | [**BudgetCreateRequestBody**](BudgetCreateRequestBody.md) | | | + +### Return type + +[**BudgetResponseBody**](BudgetResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/CreditCardProduct.md b/docs/CreditCardProduct.md index 5b64292..6948ebc 100644 --- a/docs/CreditCardProduct.md +++ b/docs/CreditCardProduct.md @@ -4,18 +4,18 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **annual_fee** | **Object** | | [optional] | -| **duration_of_introductory_rate_on_balance_transfer** | **Object** | | [optional] | -| **duration_of_introductory_rate_on_purchases** | **Object** | | [optional] | -| **guid** | **Object** | | [optional] | +| **annual_fee** | **Float** | | [optional] | +| **duration_of_introductory_rate_on_balance_transfer** | **Integer** | | [optional] | +| **duration_of_introductory_rate_on_purchases** | **Integer** | | [optional] | +| **guid** | **String** | | [optional] | | **has_cashback_rewards** | **Boolean** | | [optional] | | **has_other_rewards** | **Boolean** | | [optional] | | **has_travel_rewards** | **Boolean** | | [optional] | | **has_zero_introductory_annual_fee** | **Boolean** | | [optional] | | **has_zero_percent_introductory_rate** | **Boolean** | | [optional] | | **has_zero_percent_introductory_rate_on_balance_transfer** | **Boolean** | | [optional] | -| **financial_institution** | **Boolean** | | [optional] | -| **is_accepting_applications** | **Boolean** | | [optional] | +| **is_accepting_applicants** | **Boolean** | | [optional] | +| **is_active_credit_card_product** | **Boolean** | | [optional] | | **is_small_business_card** | **Boolean** | | [optional] | | **name** | **String** | | [optional] | @@ -35,8 +35,8 @@ instance = MxPlatformRuby::CreditCardProduct.new( has_zero_introductory_annual_fee: true, has_zero_percent_introductory_rate: false, has_zero_percent_introductory_rate_on_balance_transfer: true, - financial_institution: true, - is_accepting_applications: true, + is_accepting_applicants: true, + is_active_credit_card_product: true, is_small_business_card: true, name: Chase Credit Card ) diff --git a/docs/CreditCardProductResponse.md b/docs/CreditCardProductResponse.md index 21302a3..32bd4d3 100644 --- a/docs/CreditCardProductResponse.md +++ b/docs/CreditCardProductResponse.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **reward** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional] | +| **credit_card_product** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional] | ## Example @@ -12,7 +12,7 @@ require 'mx-platform-ruby' instance = MxPlatformRuby::CreditCardProductResponse.new( - reward: null + credit_card_product: null ) ``` diff --git a/docs/GoalRequest.md b/docs/GoalRequest.md new file mode 100644 index 0000000..5b7c5eb --- /dev/null +++ b/docs/GoalRequest.md @@ -0,0 +1,38 @@ +# MxPlatformRuby::GoalRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | Unique identifier of the account for the goal. | | +| **amount** | **Float** | Amount of the goal. | | +| **goal_type_name** | **String** | The goal type. | | +| **meta_type_name** | **String** | The category of the goal. | | +| **name** | **String** | The name of the goal. | | +| **completed_at** | **String** | Date and time the goal was completed. | [optional] | +| **has_been_spent** | **Boolean** | Determines if the goal has been spent. | [optional] | +| **is_complete** | **Boolean** | Determines if the goal is complete. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the goal. | [optional] | +| **position** | **Integer** | The priority of the goal in relation to multiple goals. | [optional] | +| **targeted_to_complete_at** | **String** | Date and time the goal is to complete. Intended for users to set their own goal completion dates. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::GoalRequest.new( + account_guid: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf, + amount: 4500.5, + goal_type_name: PAYOFF, + meta_type_name: VACATION, + name: Save for Europe, + completed_at: 2015-06-19T10:37:04-06:00, + has_been_spent: false, + is_complete: false, + metadata: Additional information, + position: 3, + targeted_to_complete_at: 2026-12-08 00:00:00.000000 +) +``` + diff --git a/docs/GoalRequestBody.md b/docs/GoalRequestBody.md new file mode 100644 index 0000000..c9fa71e --- /dev/null +++ b/docs/GoalRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::GoalRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goal** | [**GoalRequest**](GoalRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::GoalRequestBody.new( + goal: null +) +``` + diff --git a/docs/GoalResponse.md b/docs/GoalResponse.md new file mode 100644 index 0000000..9e507b5 --- /dev/null +++ b/docs/GoalResponse.md @@ -0,0 +1,48 @@ +# MxPlatformRuby::GoalResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | Unique identifier of the account for the goal. | [optional] | +| **amount** | **Float** | Amount of the goal. | [optional] | +| **completed_at** | **String** | Date and time the goal was completed. | [optional] | +| **current_amount** | **Float** | The current amount of the goal. | [optional] | +| **goal_type_name** | **String** | The goal type. | [optional] | +| **guid** | **String** | Unique identifier for the goal. Defined by MX. | [optional] | +| **has_been_spent** | **Boolean** | Determines if the goal has been spent. | [optional] | +| **is_complete** | **Boolean** | Determines if the goal is complete. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the goal. | [optional] | +| **meta_type_name** | **String** | The category of the goal. | [optional] | +| **name** | **String** | The name of the goal. | [optional] | +| **position** | **Integer** | The priority of the goal in relation to multiple goals. | [optional] | +| **projected_to_complete_at** | **String** | Date and time the goal is projected to be completed. | [optional] | +| **targeted_to_complete_at** | **String** | Date and time the goal is to complete. Intended for users to set their own goal completion dates. | [optional] | +| **track_type_name** | **String** | | [optional] | +| **user_guid** | **String** | The unique identifier for the the user. Defined by MX. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::GoalResponse.new( + account_guid: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf, + amount: 4500.0, + completed_at: 2015-06-19T10:37:04-06:00, + current_amount: 1651.27, + goal_type_name: PAYOFF, + guid: GOL-f223463-4355-48d0-rce7-fe2rb345617c, + has_been_spent: false, + is_complete: false, + metadata: Additional information, + meta_type_name: VACATION, + name: Save for Europe, + position: 3, + projected_to_complete_at: 2022-06-14T16:03:53-00:00, + targeted_to_complete_at: 2026-12-08 00:00:00.000000, + track_type_name: Track Type Name, + user_guid: USR-11141024-90b3-1bce-cac9-c06ced52ab4c +) +``` + diff --git a/docs/GoalResponseBody.md b/docs/GoalResponseBody.md new file mode 100644 index 0000000..3111741 --- /dev/null +++ b/docs/GoalResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::GoalResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goal** | [**GoalResponse**](GoalResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::GoalResponseBody.new( + goal: null +) +``` + diff --git a/docs/GoalsApi.md b/docs/GoalsApi.md new file mode 100644 index 0000000..d35cc6d --- /dev/null +++ b/docs/GoalsApi.md @@ -0,0 +1,450 @@ +# MxPlatformRuby::GoalsApi + +All URIs are relative to *https://api.mx.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**users_user_guid_goals_get**](GoalsApi.md#users_user_guid_goals_get) | **GET** /users/{user_guid}/goals | List goals | +| [**users_user_guid_goals_goal_guid_delete**](GoalsApi.md#users_user_guid_goals_goal_guid_delete) | **DELETE** /users/{user_guid}/goals/{goal_guid} | Delete a goal | +| [**users_user_guid_goals_goal_guid_get**](GoalsApi.md#users_user_guid_goals_goal_guid_get) | **GET** /users/{user_guid}/goals/{goal_guid} | Read a goal | +| [**users_user_guid_goals_goal_guid_put**](GoalsApi.md#users_user_guid_goals_goal_guid_put) | **PUT** /users/{user_guid}/goals/{goal_guid} | Update a goal | +| [**users_user_guid_goals_post**](GoalsApi.md#users_user_guid_goals_post) | **POST** /users/{user_guid}/goals | Create a goal | +| [**users_user_guid_goals_reposition_put**](GoalsApi.md#users_user_guid_goals_reposition_put) | **PUT** /users/{user_guid}/goals/reposition | Reposition goals | + + +## users_user_guid_goals_get + +> users_user_guid_goals_get(user_guid, opts) + +List goals + +List all goals a user can set. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::GoalsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. +opts = { + page: 'page_example', # String | Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. + records_per_age: 'records_per_age_example' # String | The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. +} + +begin + # List goals + result = api_instance.users_user_guid_goals_get(user_guid, opts) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_get: #{e}" +end +``` + +#### Using the users_user_guid_goals_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_goals_get_with_http_info(user_guid, opts) + +```ruby +begin + # List goals + data, status_code, headers = api_instance.users_user_guid_goals_get_with_http_info(user_guid, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. | | +| **page** | **String** | Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. | [optional] | +| **records_per_age** | **String** | The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. | [optional] | + +### Return type + +[**GoalsResponseBody**](GoalsResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## users_user_guid_goals_goal_guid_delete + +> users_user_guid_goals_goal_guid_delete(goal_guid, user_guid) + +Delete a goal + +Delete a goal. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::GoalsApi.new +goal_guid = 'goal_guid_example' # String | The unique identifier for a goal. Defined by MX. +user_guid = 'user_guid_example' # String | The unique identifier for a user. + +begin + # Delete a goal + api_instance.users_user_guid_goals_goal_guid_delete(goal_guid, user_guid) +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_goal_guid_delete: #{e}" +end +``` + +#### Using the users_user_guid_goals_goal_guid_delete_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> users_user_guid_goals_goal_guid_delete_with_http_info(goal_guid, user_guid) + +```ruby +begin + # Delete a goal + data, status_code, headers = api_instance.users_user_guid_goals_goal_guid_delete_with_http_info(goal_guid, user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_goal_guid_delete_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goal_guid** | **String** | The unique identifier for a goal. Defined by MX. | | +| **user_guid** | **String** | The unique identifier for a user. | | + +### Return type + +nil (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## users_user_guid_goals_goal_guid_get + +> users_user_guid_goals_goal_guid_get(goal_guid, user_guid) + +Read a goal + +Read a specific goal. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::GoalsApi.new +goal_guid = 'goal_guid_example' # String | The unique identifier for a goal. Defined by MX. +user_guid = 'user_guid_example' # String | The unique identifier for a user. + +begin + # Read a goal + result = api_instance.users_user_guid_goals_goal_guid_get(goal_guid, user_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_goal_guid_get: #{e}" +end +``` + +#### Using the users_user_guid_goals_goal_guid_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_goals_goal_guid_get_with_http_info(goal_guid, user_guid) + +```ruby +begin + # Read a goal + data, status_code, headers = api_instance.users_user_guid_goals_goal_guid_get_with_http_info(goal_guid, user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_goal_guid_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goal_guid** | **String** | The unique identifier for a goal. Defined by MX. | | +| **user_guid** | **String** | The unique identifier for a user. | | + +### Return type + +[**GoalResponseBody**](GoalResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## users_user_guid_goals_goal_guid_put + +> users_user_guid_goals_goal_guid_put(goal_guid, user_guid, update_goal_request_body) + +Update a goal + +This endpoint updates a specific goal. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::GoalsApi.new +goal_guid = 'goal_guid_example' # String | The unique identifier for a goal. Defined by MX. +user_guid = 'user_guid_example' # String | The unique identifier for a user. +update_goal_request_body = MxPlatformRuby::UpdateGoalRequestBody.new # UpdateGoalRequestBody | + +begin + # Update a goal + result = api_instance.users_user_guid_goals_goal_guid_put(goal_guid, user_guid, update_goal_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_goal_guid_put: #{e}" +end +``` + +#### Using the users_user_guid_goals_goal_guid_put_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_goals_goal_guid_put_with_http_info(goal_guid, user_guid, update_goal_request_body) + +```ruby +begin + # Update a goal + data, status_code, headers = api_instance.users_user_guid_goals_goal_guid_put_with_http_info(goal_guid, user_guid, update_goal_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_goal_guid_put_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goal_guid** | **String** | The unique identifier for a goal. Defined by MX. | | +| **user_guid** | **String** | The unique identifier for a user. | | +| **update_goal_request_body** | [**UpdateGoalRequestBody**](UpdateGoalRequestBody.md) | | | + +### Return type + +[**GoalResponseBody**](GoalResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## users_user_guid_goals_post + +> users_user_guid_goals_post(user_guid, goal_request_body) + +Create a goal + +Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::GoalsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. +goal_request_body = MxPlatformRuby::GoalRequestBody.new # GoalRequestBody | + +begin + # Create a goal + result = api_instance.users_user_guid_goals_post(user_guid, goal_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_post: #{e}" +end +``` + +#### Using the users_user_guid_goals_post_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_goals_post_with_http_info(user_guid, goal_request_body) + +```ruby +begin + # Create a goal + data, status_code, headers = api_instance.users_user_guid_goals_post_with_http_info(user_guid, goal_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_post_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. | | +| **goal_request_body** | [**GoalRequestBody**](GoalRequestBody.md) | | | + +### Return type + +[**GoalResponseBody**](GoalResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## users_user_guid_goals_reposition_put + +> users_user_guid_goals_reposition_put(user_guid, reposition_request_body) + +Reposition goals + +This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::GoalsApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. +reposition_request_body = MxPlatformRuby::RepositionRequestBody.new # RepositionRequestBody | + +begin + # Reposition goals + result = api_instance.users_user_guid_goals_reposition_put(user_guid, reposition_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_reposition_put: #{e}" +end +``` + +#### Using the users_user_guid_goals_reposition_put_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_goals_reposition_put_with_http_info(user_guid, reposition_request_body) + +```ruby +begin + # Reposition goals + data, status_code, headers = api_instance.users_user_guid_goals_reposition_put_with_http_info(user_guid, reposition_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling GoalsApi->users_user_guid_goals_reposition_put_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. | | +| **reposition_request_body** | [**RepositionRequestBody**](RepositionRequestBody.md) | | | + +### Return type + +[**RepositionResponseBody**](RepositionResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/GoalsResponse.md b/docs/GoalsResponse.md new file mode 100644 index 0000000..f4286ed --- /dev/null +++ b/docs/GoalsResponse.md @@ -0,0 +1,48 @@ +# MxPlatformRuby::GoalsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | Unique identifier of the account for the goal. | [optional] | +| **amount** | **Float** | Amount of the goal. | [optional] | +| **current_amount** | **Float** | The current amount of the goal. | [optional] | +| **guid** | **String** | The unique identifier for the goal. Defined by MX. | [optional] | +| **goal_type_name** | **String** | The goal type. | [optional] | +| **meta_type_name** | **String** | The category of the goal. | [optional] | +| **name** | **String** | The name of the goal. | [optional] | +| **completed_at** | **String** | Date and time the goal was completed. | [optional] | +| **has_been_spent** | **Boolean** | Determines if the goal has been spent. | [optional] | +| **is_complete** | **Boolean** | Determines if the goal is complete. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the goal. | [optional] | +| **position** | **Integer** | The priority of the goal in relation to multiple goals. | [optional] | +| **projected_to_complete_at** | **String** | The date on which the project was completed. | [optional] | +| **targeted_to_complete_at** | **String** | | [optional] | +| **track_type_name** | **String** | | [optional] | +| **user_guid** | **String** | The unique identifier for the the user. Defined by MX. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::GoalsResponse.new( + account_guid: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf, + amount: 4500.0, + current_amount: 1651.27, + guid: GOL-524ca5db-a2d5-44f3-b048-16de16059024, + goal_type_name: PAYOFF, + meta_type_name: VACATION, + name: Save for Europe, + completed_at: 2015-06-19T10:37:04-06:00, + has_been_spent: false, + is_complete: false, + metadata: Additional information, + position: 3, + projected_to_complete_at: 2022-06-14T16:03:53-00:00, + targeted_to_complete_at: 2026-12-08 00:00:00.000000, + track_type_name: Track Type Name, + user_guid: USR-11141024-90b3-1bce-cac9-c06ced52ab4c +) +``` + diff --git a/docs/GoalsResponseBody.md b/docs/GoalsResponseBody.md new file mode 100644 index 0000000..043e309 --- /dev/null +++ b/docs/GoalsResponseBody.md @@ -0,0 +1,20 @@ +# MxPlatformRuby::GoalsResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goals** | [**Array<GoalsResponse>**](GoalsResponse.md) | | [optional] | +| **pagination** | [**PaginationResponse**](PaginationResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::GoalsResponseBody.new( + goals: null, + pagination: null +) +``` + diff --git a/docs/MonthlyCashFlowProfileRequest.md b/docs/MonthlyCashFlowProfileRequest.md new file mode 100644 index 0000000..45a005a --- /dev/null +++ b/docs/MonthlyCashFlowProfileRequest.md @@ -0,0 +1,20 @@ +# MxPlatformRuby::MonthlyCashFlowProfileRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goals_contribution** | **Float** | The monthly dollar amount allocated for goals. | [optional] | +| **uses_estimated_goals_contribution** | **Boolean** | Determines if the user uses estimated goals contribution. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::MonthlyCashFlowProfileRequest.new( + goals_contribution: 150.01, + uses_estimated_goals_contribution: false +) +``` + diff --git a/docs/MonthlyCashFlowProfileRequestBody.md b/docs/MonthlyCashFlowProfileRequestBody.md new file mode 100644 index 0000000..5c1ff95 --- /dev/null +++ b/docs/MonthlyCashFlowProfileRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::MonthlyCashFlowProfileRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **institution** | [**MonthlyCashFlowProfileRequest**](MonthlyCashFlowProfileRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::MonthlyCashFlowProfileRequestBody.new( + institution: null +) +``` + diff --git a/docs/MonthlyCashFlowResponse.md b/docs/MonthlyCashFlowResponse.md new file mode 100644 index 0000000..e8ff967 --- /dev/null +++ b/docs/MonthlyCashFlowResponse.md @@ -0,0 +1,30 @@ +# MxPlatformRuby::MonthlyCashFlowResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **guid** | **String** | Unique identifier for the monthly cash flow profile. Defined by MX. | [optional] | +| **user_guid** | **String** | Unique identifier for the user the monthly cash flow profile is attached to. Defined by MX. | [optional] | +| **budgeted_income** | **Float** | The amount of the budgeted income for the user. | [optional] | +| **budgeted_expenses** | **Float** | The amount of the budgeted expenses for the user. | [optional] | +| **goals_contribution** | **Float** | The monthly dollar amount allocated for goals. | [optional] | +| **estimated_goals_contribution** | **Integer** | The estimated monthly dollar amount allocated for goals calculated from income and budgets. | [optional] | +| **uses_estimated_goals_contribution** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::MonthlyCashFlowResponse.new( + guid: MCF-4e431124-4a29-abf9-f059-ab232ac14dbf, + user_guid: USR-6c83f63c-efcc-0189-3f14-100f0bad378a, + budgeted_income: 1200.12, + budgeted_expenses: 1000.0, + goals_contribution: 150.0, + estimated_goals_contribution: null, + uses_estimated_goals_contribution: false +) +``` + diff --git a/docs/MonthlyCashFlowResponseBody.md b/docs/MonthlyCashFlowResponseBody.md new file mode 100644 index 0000000..1876262 --- /dev/null +++ b/docs/MonthlyCashFlowResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::MonthlyCashFlowResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **monthly_cash_flow_profile** | [**MonthlyCashFlowResponse**](MonthlyCashFlowResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::MonthlyCashFlowResponseBody.new( + monthly_cash_flow_profile: null +) +``` + diff --git a/docs/MxPlatformApi.md b/docs/MxPlatformApi.md index 74c3e80..9d69025 100644 --- a/docs/MxPlatformApi.md +++ b/docs/MxPlatformApi.md @@ -106,6 +106,10 @@ All URIs are relative to *https://api.mx.com* | [**update_transaction**](MxPlatformApi.md#update_transaction) | **PUT** /users/{user_guid}/transactions/{transaction_guid} | Update transaction | | [**update_transaction_rule**](MxPlatformApi.md#update_transaction_rule) | **PUT** /users/{user_guid}/transaction_rules/{transaction_rule_guid} | Update transaction_rule | | [**update_user**](MxPlatformApi.md#update_user) | **PUT** /users/{user_guid} | Update user | +| [**users_user_guid_monthly_cash_flow_profile_get**](MxPlatformApi.md#users_user_guid_monthly_cash_flow_profile_get) | **GET** /users/{user_guid}/monthly_cash_flow_profile | Read monthly cash flow profile | +| [**users_user_guid_monthly_cash_flow_profile_put**](MxPlatformApi.md#users_user_guid_monthly_cash_flow_profile_put) | **PUT** /users/{user_guid}/monthly_cash_flow_profile | Update monthly cash flow profile | +| [**users_user_guid_transactions_transaction_guid_split_delete**](MxPlatformApi.md#users_user_guid_transactions_transaction_guid_split_delete) | **DELETE** /users/{user_guid}/transactions/{transaction_guid}/split | Delete split transactions | +| [**users_user_guid_transactions_transaction_guid_split_post**](MxPlatformApi.md#users_user_guid_transactions_transaction_guid_split_post) | **POST** /users/{user_guid}/transactions/{transaction_guid}/split | Create split transactions | | [**verify_member**](MxPlatformApi.md#verify_member) | **POST** /users/{user_guid}/members/{member_guid}/verify | Verify member | @@ -7695,6 +7699,293 @@ end - **Accept**: application/vnd.mx.api.v1+json +## users_user_guid_monthly_cash_flow_profile_get + +> users_user_guid_monthly_cash_flow_profile_get(user_guid) + +Read monthly cash flow profile + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. + +begin + # Read monthly cash flow profile + result = api_instance.users_user_guid_monthly_cash_flow_profile_get(user_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_monthly_cash_flow_profile_get: #{e}" +end +``` + +#### Using the users_user_guid_monthly_cash_flow_profile_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_monthly_cash_flow_profile_get_with_http_info(user_guid) + +```ruby +begin + # Read monthly cash flow profile + data, status_code, headers = api_instance.users_user_guid_monthly_cash_flow_profile_get_with_http_info(user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_monthly_cash_flow_profile_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. | | + +### Return type + +[**MonthlyCashFlowResponseBody**](MonthlyCashFlowResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## users_user_guid_monthly_cash_flow_profile_put + +> users_user_guid_monthly_cash_flow_profile_put(user_guid, monthly_cash_flow_profile_request_body) + +Update monthly cash flow profile + +Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. +monthly_cash_flow_profile_request_body = MxPlatformRuby::MonthlyCashFlowProfileRequestBody.new # MonthlyCashFlowProfileRequestBody | + +begin + # Update monthly cash flow profile + result = api_instance.users_user_guid_monthly_cash_flow_profile_put(user_guid, monthly_cash_flow_profile_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_monthly_cash_flow_profile_put: #{e}" +end +``` + +#### Using the users_user_guid_monthly_cash_flow_profile_put_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_monthly_cash_flow_profile_put_with_http_info(user_guid, monthly_cash_flow_profile_request_body) + +```ruby +begin + # Update monthly cash flow profile + data, status_code, headers = api_instance.users_user_guid_monthly_cash_flow_profile_put_with_http_info(user_guid, monthly_cash_flow_profile_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_monthly_cash_flow_profile_put_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. | | +| **monthly_cash_flow_profile_request_body** | [**MonthlyCashFlowProfileRequestBody**](MonthlyCashFlowProfileRequestBody.md) | | | + +### Return type + +[**MonthlyCashFlowResponseBody**](MonthlyCashFlowResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## users_user_guid_transactions_transaction_guid_split_delete + +> users_user_guid_transactions_transaction_guid_split_delete(transaction_guid, user_guid) + +Delete split transactions + +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. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +transaction_guid = 'TRN-810828b0-5210-4878-9bd3-f4ce514f90c4' # String | The unique id for a `transaction`. +user_guid = 'USR-85628b0-5210-4878-9bd3-f4ce154f90c4' # String | The unique id for a `user`. + +begin + # Delete split transactions + api_instance.users_user_guid_transactions_transaction_guid_split_delete(transaction_guid, user_guid) +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_transactions_transaction_guid_split_delete: #{e}" +end +``` + +#### Using the users_user_guid_transactions_transaction_guid_split_delete_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> users_user_guid_transactions_transaction_guid_split_delete_with_http_info(transaction_guid, user_guid) + +```ruby +begin + # Delete split transactions + data, status_code, headers = api_instance.users_user_guid_transactions_transaction_guid_split_delete_with_http_info(transaction_guid, user_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_transactions_transaction_guid_split_delete_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **transaction_guid** | **String** | The unique id for a `transaction`. | | +| **user_guid** | **String** | The unique id for a `user`. | | + +### Return type + +nil (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## users_user_guid_transactions_transaction_guid_split_post + +> users_user_guid_transactions_transaction_guid_split_post(user_guid, transaction_guid, opts) + +Create split transactions + +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. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX. +transaction_guid = 'transaction_guid_example' # String | The unique identifier for the transaction. Defined by MX. +opts = { + split_transaction_request_body: MxPlatformRuby::SplitTransactionRequestBody.new({transactions: MxPlatformRuby::SplitTransactionRequest.new({amount: 54.19})}) # SplitTransactionRequestBody | +} + +begin + # Create split transactions + result = api_instance.users_user_guid_transactions_transaction_guid_split_post(user_guid, transaction_guid, opts) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_transactions_transaction_guid_split_post: #{e}" +end +``` + +#### Using the users_user_guid_transactions_transaction_guid_split_post_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> users_user_guid_transactions_transaction_guid_split_post_with_http_info(user_guid, transaction_guid, opts) + +```ruby +begin + # Create split transactions + data, status_code, headers = api_instance.users_user_guid_transactions_transaction_guid_split_post_with_http_info(user_guid, transaction_guid, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->users_user_guid_transactions_transaction_guid_split_post_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique identifier for the user. Defined by MX. | | +| **transaction_guid** | **String** | The unique identifier for the transaction. Defined by MX. | | +| **split_transaction_request_body** | [**SplitTransactionRequestBody**](SplitTransactionRequestBody.md) | | [optional] | + +### Return type + +[**SplitTransactionsResponseBody**](SplitTransactionsResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.mx.api.v1+json + + ## verify_member > verify_member(member_guid, user_guid) diff --git a/docs/RepositionRequest.md b/docs/RepositionRequest.md new file mode 100644 index 0000000..3985e8e --- /dev/null +++ b/docs/RepositionRequest.md @@ -0,0 +1,20 @@ +# MxPlatformRuby::RepositionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **guid** | **String** | The unique identifier for the goal. Defined by MX. | | +| **position** | **Integer** | The priority of the goal in relation to multiple goals. | | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RepositionRequest.new( + guid: GOL-97665947-235c-b213-ca25-8cf0174774f5, + position: 1 +) +``` + diff --git a/docs/RepositionRequestBody.md b/docs/RepositionRequestBody.md new file mode 100644 index 0000000..f17627d --- /dev/null +++ b/docs/RepositionRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::RepositionRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goals** | [**Array<RepositionRequest>**](RepositionRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RepositionRequestBody.new( + goals: null +) +``` + diff --git a/docs/RepositionResponseBody.md b/docs/RepositionResponseBody.md new file mode 100644 index 0000000..283e652 --- /dev/null +++ b/docs/RepositionResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::RepositionResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goals** | [**Array<GoalsResponse>**](GoalsResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RepositionResponseBody.new( + goals: null +) +``` + diff --git a/docs/RewardResponse.md b/docs/RewardResponse.md index 9c3a62e..5343f4c 100644 --- a/docs/RewardResponse.md +++ b/docs/RewardResponse.md @@ -13,6 +13,7 @@ | **guid** | **String** | | [optional] | | **member_guid** | **String** | | [optional] | | **unit_type** | **String** | | [optional] | +| **updated_at** | **String** | | [optional] | | **user_guid** | **String** | | [optional] | ## Example @@ -30,6 +31,7 @@ instance = MxPlatformRuby::RewardResponse.new( guid: RWD-1234, member_guid: MBR-4567, unit_type: POINTS, + updated_at: 2023-06-01T19:18:06Z, user_guid: USR-1234 ) ``` diff --git a/docs/RewardsResponse.md b/docs/RewardsResponse.md index db1950d..89bcc90 100644 --- a/docs/RewardsResponse.md +++ b/docs/RewardsResponse.md @@ -13,6 +13,7 @@ | **guid** | **String** | | [optional] | | **member_guid** | **String** | | [optional] | | **unit_type** | **String** | | [optional] | +| **updated_at** | **String** | | [optional] | | **user_guid** | **String** | | [optional] | ## Example @@ -30,6 +31,7 @@ instance = MxPlatformRuby::RewardsResponse.new( guid: RWD-1234, member_guid: MBR-4567, unit_type: POINTS, + updated_at: 2023-06-01T19:18:06Z, user_guid: USR-1234 ) ``` diff --git a/docs/SplitTransactionRequest.md b/docs/SplitTransactionRequest.md new file mode 100644 index 0000000..39dab1c --- /dev/null +++ b/docs/SplitTransactionRequest.md @@ -0,0 +1,24 @@ +# MxPlatformRuby::SplitTransactionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **amount** | **Float** | Amount of money you want to re-categorize. | | +| **description** | **String** | Description for the split transaction. | [optional] | +| **category_guid** | **String** | Unique identifier of the category. | [optional] | +| **memo** | **String** | Memo for the split transaction | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::SplitTransactionRequest.new( + amount: 54.19, + description: Chevron Gas, + category_guid: CAT-b6d61a19-30a7-e852-2703-bdfb4072289e, + memo: Chips and Soda +) +``` + diff --git a/docs/SplitTransactionRequestBody.md b/docs/SplitTransactionRequestBody.md new file mode 100644 index 0000000..e20b81a --- /dev/null +++ b/docs/SplitTransactionRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::SplitTransactionRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **transactions** | [**SplitTransactionRequest**](SplitTransactionRequest.md) | | | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::SplitTransactionRequestBody.new( + transactions: null +) +``` + diff --git a/docs/SplitTransactionsResponseBody.md b/docs/SplitTransactionsResponseBody.md new file mode 100644 index 0000000..ffd8b2c --- /dev/null +++ b/docs/SplitTransactionsResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::SplitTransactionsResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **transactions** | [**Array<TransactionResponse>**](TransactionResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::SplitTransactionsResponseBody.new( + transactions: null +) +``` + diff --git a/docs/UpdateGoalRequest.md b/docs/UpdateGoalRequest.md new file mode 100644 index 0000000..5473214 --- /dev/null +++ b/docs/UpdateGoalRequest.md @@ -0,0 +1,38 @@ +# MxPlatformRuby::UpdateGoalRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | Unique identifier of the account for the goal. | [optional] | +| **amount** | **Float** | Amount of the goal. | [optional] | +| **goal_type_name** | **String** | The goal type. | [optional] | +| **meta_type_name** | **String** | The category of the goal. | [optional] | +| **name** | **String** | The name of the goal. | [optional] | +| **completed_at** | **String** | Date and time the goal was completed. | [optional] | +| **has_been_spent** | **Boolean** | Determines if the goal has been spent. | [optional] | +| **is_complete** | **Boolean** | Determines if the goal is complete. | [optional] | +| **metadata** | **String** | Additional information a partner can store on the goal. | [optional] | +| **position** | **Integer** | The priority of the goal in relation to multiple goals. | [optional] | +| **targeted_to_complete_at** | **String** | Date and time the goal is to complete. Intended for users to set their own goal completion dates. | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::UpdateGoalRequest.new( + account_guid: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf, + amount: 4500.5, + goal_type_name: PAYOFF, + meta_type_name: VACATION, + name: Save for Europe, + completed_at: 2015-06-19T10:37:04-06:00, + has_been_spent: false, + is_complete: false, + metadata: Additional information, + position: 3, + targeted_to_complete_at: 2026-12-08 00:00:00.000000 +) +``` + diff --git a/docs/UpdateGoalRequestBody.md b/docs/UpdateGoalRequestBody.md new file mode 100644 index 0000000..81078af --- /dev/null +++ b/docs/UpdateGoalRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::UpdateGoalRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **goal** | [**UpdateGoalRequest**](UpdateGoalRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::UpdateGoalRequestBody.new( + goal: null +) +``` + diff --git a/lib/mx-platform-ruby.rb b/lib/mx-platform-ruby.rb index ce11c82..6f9c582 100644 --- a/lib/mx-platform-ruby.rb +++ b/lib/mx-platform-ruby.rb @@ -32,6 +32,12 @@ require 'mx-platform-ruby/models/authorization_code_request_body' require 'mx-platform-ruby/models/authorization_code_response' require 'mx-platform-ruby/models/authorization_code_response_body' +require 'mx-platform-ruby/models/budget_create_request' +require 'mx-platform-ruby/models/budget_create_request_body' +require 'mx-platform-ruby/models/budget_response' +require 'mx-platform-ruby/models/budget_response_body' +require 'mx-platform-ruby/models/budget_update_request' +require 'mx-platform-ruby/models/budget_update_request_body' require 'mx-platform-ruby/models/categories_response_body' require 'mx-platform-ruby/models/category_create_request' require 'mx-platform-ruby/models/category_create_request_body' @@ -54,6 +60,12 @@ require 'mx-platform-ruby/models/enhance_transactions_request' require 'mx-platform-ruby/models/enhance_transactions_request_body' require 'mx-platform-ruby/models/enhance_transactions_response_body' +require 'mx-platform-ruby/models/goal_request' +require 'mx-platform-ruby/models/goal_request_body' +require 'mx-platform-ruby/models/goal_response' +require 'mx-platform-ruby/models/goal_response_body' +require 'mx-platform-ruby/models/goals_response' +require 'mx-platform-ruby/models/goals_response_body' require 'mx-platform-ruby/models/holding_response' require 'mx-platform-ruby/models/holding_response_body' require 'mx-platform-ruby/models/holdings_response_body' @@ -93,6 +105,10 @@ require 'mx-platform-ruby/models/merchant_response' require 'mx-platform-ruby/models/merchant_response_body' require 'mx-platform-ruby/models/merchants_response_body' +require 'mx-platform-ruby/models/monthly_cash_flow_profile_request' +require 'mx-platform-ruby/models/monthly_cash_flow_profile_request_body' +require 'mx-platform-ruby/models/monthly_cash_flow_response' +require 'mx-platform-ruby/models/monthly_cash_flow_response_body' require 'mx-platform-ruby/models/o_auth_window_response' require 'mx-platform-ruby/models/o_auth_window_response_body' require 'mx-platform-ruby/models/option_response' @@ -101,6 +117,9 @@ require 'mx-platform-ruby/models/payment_processor_authorization_code_request_body' require 'mx-platform-ruby/models/payment_processor_authorization_code_response' require 'mx-platform-ruby/models/payment_processor_authorization_code_response_body' +require 'mx-platform-ruby/models/reposition_request' +require 'mx-platform-ruby/models/reposition_request_body' +require 'mx-platform-ruby/models/reposition_response_body' require 'mx-platform-ruby/models/reward_response' require 'mx-platform-ruby/models/reward_response_body' require 'mx-platform-ruby/models/rewards_response' @@ -116,6 +135,9 @@ require 'mx-platform-ruby/models/spending_plan_iterations_response' require 'mx-platform-ruby/models/spending_plan_response' require 'mx-platform-ruby/models/spending_plans_response_body' +require 'mx-platform-ruby/models/split_transaction_request' +require 'mx-platform-ruby/models/split_transaction_request_body' +require 'mx-platform-ruby/models/split_transactions_response_body' require 'mx-platform-ruby/models/statement_response' require 'mx-platform-ruby/models/statement_response_body' require 'mx-platform-ruby/models/statements_response_body' @@ -148,6 +170,8 @@ require 'mx-platform-ruby/models/transaction_update_request' require 'mx-platform-ruby/models/transaction_update_request_body' require 'mx-platform-ruby/models/transactions_response_body' +require 'mx-platform-ruby/models/update_goal_request' +require 'mx-platform-ruby/models/update_goal_request_body' require 'mx-platform-ruby/models/user_create_request' require 'mx-platform-ruby/models/user_create_request_body' require 'mx-platform-ruby/models/user_response' @@ -161,6 +185,8 @@ require 'mx-platform-ruby/models/widget_response_body' # APIs +require 'mx-platform-ruby/api/budgets_api' +require 'mx-platform-ruby/api/goals_api' require 'mx-platform-ruby/api/insights_api' require 'mx-platform-ruby/api/mx_platform_api' require 'mx-platform-ruby/api/spending_plan_api' diff --git a/lib/mx-platform-ruby/api/budgets_api.rb b/lib/mx-platform-ruby/api/budgets_api.rb new file mode 100644 index 0000000..a72691b --- /dev/null +++ b/lib/mx-platform-ruby/api/budgets_api.rb @@ -0,0 +1,434 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'cgi' + +module MxPlatformRuby + class BudgetsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Delete a budget + # Delete a budget. + # @param user_guid [String] The unique identifier for the budget. Defined by MX. + # @param budget_guid [String] The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [nil] + def users_user_guid_budgets_budget_guid_delete(user_guid, budget_guid, opts = {}) + users_user_guid_budgets_budget_guid_delete_with_http_info(user_guid, budget_guid, opts) + nil + end + + # Delete a budget + # Delete a budget. + # @param user_guid [String] The unique identifier for the budget. Defined by MX. + # @param budget_guid [String] The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def users_user_guid_budgets_budget_guid_delete_with_http_info(user_guid, budget_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BudgetsApi.users_user_guid_budgets_budget_guid_delete ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling BudgetsApi.users_user_guid_budgets_budget_guid_delete" + end + # verify the required parameter 'budget_guid' is set + if @api_client.config.client_side_validation && budget_guid.nil? + fail ArgumentError, "Missing the required parameter 'budget_guid' when calling BudgetsApi.users_user_guid_budgets_budget_guid_delete" + end + # resource path + local_var_path = '/users/{user_guid}/budgets/{budget_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'budget_guid' + '}', CGI.escape(budget_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"BudgetsApi.users_user_guid_budgets_budget_guid_delete", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BudgetsApi#users_user_guid_budgets_budget_guid_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read a specific budget + # Read a specific budget. + # @param budget_guid [String] The unique identifier for the budget. Defined by MX. + # @param user_guid [String] The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + def users_user_guid_budgets_budget_guid_get(budget_guid, user_guid, opts = {}) + data, _status_code, _headers = users_user_guid_budgets_budget_guid_get_with_http_info(budget_guid, user_guid, opts) + data + end + + # Read a specific budget + # Read a specific budget. + # @param budget_guid [String] The unique identifier for the budget. Defined by MX. + # @param user_guid [String] The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(BudgetResponseBody, Integer, Hash)>] BudgetResponseBody data, response status code and response headers + def users_user_guid_budgets_budget_guid_get_with_http_info(budget_guid, user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BudgetsApi.users_user_guid_budgets_budget_guid_get ...' + end + # verify the required parameter 'budget_guid' is set + if @api_client.config.client_side_validation && budget_guid.nil? + fail ArgumentError, "Missing the required parameter 'budget_guid' when calling BudgetsApi.users_user_guid_budgets_budget_guid_get" + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling BudgetsApi.users_user_guid_budgets_budget_guid_get" + end + # resource path + local_var_path = '/users/{user_guid}/budgets/{budget_guid}'.sub('{' + 'budget_guid' + '}', CGI.escape(budget_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'BudgetResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"BudgetsApi.users_user_guid_budgets_budget_guid_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BudgetsApi#users_user_guid_budgets_budget_guid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a specific budget + # Update a specific budget. + # @param user_guid [String] The unique identifier for the budget. Defined by MX. + # @param budget_guid [String] The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @option opts [BudgetUpdateRequestBody] :budget_update_request_body + # @return [BudgetResponseBody] + def users_user_guid_budgets_budget_guid_put(user_guid, budget_guid, opts = {}) + data, _status_code, _headers = users_user_guid_budgets_budget_guid_put_with_http_info(user_guid, budget_guid, opts) + data + end + + # Update a specific budget + # Update a specific budget. + # @param user_guid [String] The unique identifier for the budget. Defined by MX. + # @param budget_guid [String] The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @option opts [BudgetUpdateRequestBody] :budget_update_request_body + # @return [Array<(BudgetResponseBody, Integer, Hash)>] BudgetResponseBody data, response status code and response headers + def users_user_guid_budgets_budget_guid_put_with_http_info(user_guid, budget_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BudgetsApi.users_user_guid_budgets_budget_guid_put ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling BudgetsApi.users_user_guid_budgets_budget_guid_put" + end + # verify the required parameter 'budget_guid' is set + if @api_client.config.client_side_validation && budget_guid.nil? + fail ArgumentError, "Missing the required parameter 'budget_guid' when calling BudgetsApi.users_user_guid_budgets_budget_guid_put" + end + # resource path + local_var_path = '/users/{user_guid}/budgets/{budget_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'budget_guid' + '}', CGI.escape(budget_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'budget_update_request_body']) + + # return_type + return_type = opts[:debug_return_type] || 'BudgetResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"BudgetsApi.users_user_guid_budgets_budget_guid_put", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BudgetsApi#users_user_guid_budgets_budget_guid_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Auto-generate budgets + # 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`. + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + def users_user_guid_budgets_generate_post(user_guid, opts = {}) + data, _status_code, _headers = users_user_guid_budgets_generate_post_with_http_info(user_guid, opts) + data + end + + # Auto-generate budgets + # 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`. + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(BudgetResponseBody, Integer, Hash)>] BudgetResponseBody data, response status code and response headers + def users_user_guid_budgets_generate_post_with_http_info(user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BudgetsApi.users_user_guid_budgets_generate_post ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling BudgetsApi.users_user_guid_budgets_generate_post" + end + # resource path + local_var_path = '/users/{user_guid}/budgets/generate'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'BudgetResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"BudgetsApi.users_user_guid_budgets_generate_post", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BudgetsApi#users_user_guid_budgets_generate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List all budgets + # List all budgets + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + def users_user_guid_budgets_get(user_guid, opts = {}) + data, _status_code, _headers = users_user_guid_budgets_get_with_http_info(user_guid, opts) + data + end + + # List all budgets + # List all budgets + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(BudgetResponseBody, Integer, Hash)>] BudgetResponseBody data, response status code and response headers + def users_user_guid_budgets_get_with_http_info(user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BudgetsApi.users_user_guid_budgets_get ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling BudgetsApi.users_user_guid_budgets_get" + end + # resource path + local_var_path = '/users/{user_guid}/budgets'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'BudgetResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"BudgetsApi.users_user_guid_budgets_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BudgetsApi#users_user_guid_budgets_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create a budget + # 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. + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param budget_create_request_body [BudgetCreateRequestBody] + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + def users_user_guid_budgets_post(user_guid, budget_create_request_body, opts = {}) + data, _status_code, _headers = users_user_guid_budgets_post_with_http_info(user_guid, budget_create_request_body, opts) + data + end + + # Create a budget + # 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. + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param budget_create_request_body [BudgetCreateRequestBody] + # @param [Hash] opts the optional parameters + # @return [Array<(BudgetResponseBody, Integer, Hash)>] BudgetResponseBody data, response status code and response headers + def users_user_guid_budgets_post_with_http_info(user_guid, budget_create_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BudgetsApi.users_user_guid_budgets_post ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling BudgetsApi.users_user_guid_budgets_post" + end + # verify the required parameter 'budget_create_request_body' is set + if @api_client.config.client_side_validation && budget_create_request_body.nil? + fail ArgumentError, "Missing the required parameter 'budget_create_request_body' when calling BudgetsApi.users_user_guid_budgets_post" + end + # resource path + local_var_path = '/users/{user_guid}/budgets'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(budget_create_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'BudgetResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"BudgetsApi.users_user_guid_budgets_post", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BudgetsApi#users_user_guid_budgets_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/mx-platform-ruby/api/goals_api.rb b/lib/mx-platform-ruby/api/goals_api.rb new file mode 100644 index 0000000..44cc8f7 --- /dev/null +++ b/lib/mx-platform-ruby/api/goals_api.rb @@ -0,0 +1,455 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'cgi' + +module MxPlatformRuby + class GoalsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # List goals + # List all goals a user can set. + # @param user_guid [String] The unique identifier for the user. + # @param [Hash] opts the optional parameters + # @option opts [String] :page Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. + # @option opts [String] :records_per_age The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + # @return [GoalsResponseBody] + def users_user_guid_goals_get(user_guid, opts = {}) + data, _status_code, _headers = users_user_guid_goals_get_with_http_info(user_guid, opts) + data + end + + # List goals + # List all goals a user can set. + # @param user_guid [String] The unique identifier for the user. + # @param [Hash] opts the optional parameters + # @option opts [String] :page Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. + # @option opts [String] :records_per_age The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + # @return [Array<(GoalsResponseBody, Integer, Hash)>] GoalsResponseBody data, response status code and response headers + def users_user_guid_goals_get_with_http_info(user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_get ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_get" + end + # resource path + local_var_path = '/users/{user_guid}/goals'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'records_per_age'] = opts[:'records_per_age'] if !opts[:'records_per_age'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GoalsResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"GoalsApi.users_user_guid_goals_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a goal + # Delete a goal. + # @param goal_guid [String] The unique identifier for a goal. Defined by MX. + # @param user_guid [String] The unique identifier for a user. + # @param [Hash] opts the optional parameters + # @return [nil] + def users_user_guid_goals_goal_guid_delete(goal_guid, user_guid, opts = {}) + users_user_guid_goals_goal_guid_delete_with_http_info(goal_guid, user_guid, opts) + nil + end + + # Delete a goal + # Delete a goal. + # @param goal_guid [String] The unique identifier for a goal. Defined by MX. + # @param user_guid [String] The unique identifier for a user. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def users_user_guid_goals_goal_guid_delete_with_http_info(goal_guid, user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_goal_guid_delete ...' + end + # verify the required parameter 'goal_guid' is set + if @api_client.config.client_side_validation && goal_guid.nil? + fail ArgumentError, "Missing the required parameter 'goal_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_delete" + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_delete" + end + # resource path + local_var_path = '/users/{user_guid}/goals/{goal_guid}'.sub('{' + 'goal_guid' + '}', CGI.escape(goal_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"GoalsApi.users_user_guid_goals_goal_guid_delete", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_goal_guid_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read a goal + # Read a specific goal. + # @param goal_guid [String] The unique identifier for a goal. Defined by MX. + # @param user_guid [String] The unique identifier for a user. + # @param [Hash] opts the optional parameters + # @return [GoalResponseBody] + def users_user_guid_goals_goal_guid_get(goal_guid, user_guid, opts = {}) + data, _status_code, _headers = users_user_guid_goals_goal_guid_get_with_http_info(goal_guid, user_guid, opts) + data + end + + # Read a goal + # Read a specific goal. + # @param goal_guid [String] The unique identifier for a goal. Defined by MX. + # @param user_guid [String] The unique identifier for a user. + # @param [Hash] opts the optional parameters + # @return [Array<(GoalResponseBody, Integer, Hash)>] GoalResponseBody data, response status code and response headers + def users_user_guid_goals_goal_guid_get_with_http_info(goal_guid, user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_goal_guid_get ...' + end + # verify the required parameter 'goal_guid' is set + if @api_client.config.client_side_validation && goal_guid.nil? + fail ArgumentError, "Missing the required parameter 'goal_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_get" + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_get" + end + # resource path + local_var_path = '/users/{user_guid}/goals/{goal_guid}'.sub('{' + 'goal_guid' + '}', CGI.escape(goal_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GoalResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"GoalsApi.users_user_guid_goals_goal_guid_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_goal_guid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a goal + # This endpoint updates a specific goal. + # @param goal_guid [String] The unique identifier for a goal. Defined by MX. + # @param user_guid [String] The unique identifier for a user. + # @param update_goal_request_body [UpdateGoalRequestBody] + # @param [Hash] opts the optional parameters + # @return [GoalResponseBody] + def users_user_guid_goals_goal_guid_put(goal_guid, user_guid, update_goal_request_body, opts = {}) + data, _status_code, _headers = users_user_guid_goals_goal_guid_put_with_http_info(goal_guid, user_guid, update_goal_request_body, opts) + data + end + + # Update a goal + # This endpoint updates a specific goal. + # @param goal_guid [String] The unique identifier for a goal. Defined by MX. + # @param user_guid [String] The unique identifier for a user. + # @param update_goal_request_body [UpdateGoalRequestBody] + # @param [Hash] opts the optional parameters + # @return [Array<(GoalResponseBody, Integer, Hash)>] GoalResponseBody data, response status code and response headers + def users_user_guid_goals_goal_guid_put_with_http_info(goal_guid, user_guid, update_goal_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_goal_guid_put ...' + end + # verify the required parameter 'goal_guid' is set + if @api_client.config.client_side_validation && goal_guid.nil? + fail ArgumentError, "Missing the required parameter 'goal_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_put" + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_put" + end + # verify the required parameter 'update_goal_request_body' is set + if @api_client.config.client_side_validation && update_goal_request_body.nil? + fail ArgumentError, "Missing the required parameter 'update_goal_request_body' when calling GoalsApi.users_user_guid_goals_goal_guid_put" + end + # resource path + local_var_path = '/users/{user_guid}/goals/{goal_guid}'.sub('{' + 'goal_guid' + '}', CGI.escape(goal_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_goal_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'GoalResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"GoalsApi.users_user_guid_goals_goal_guid_put", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_goal_guid_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create a goal + # Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + # @param user_guid [String] The unique identifier for the user. + # @param goal_request_body [GoalRequestBody] + # @param [Hash] opts the optional parameters + # @return [GoalResponseBody] + def users_user_guid_goals_post(user_guid, goal_request_body, opts = {}) + data, _status_code, _headers = users_user_guid_goals_post_with_http_info(user_guid, goal_request_body, opts) + data + end + + # Create a goal + # Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + # @param user_guid [String] The unique identifier for the user. + # @param goal_request_body [GoalRequestBody] + # @param [Hash] opts the optional parameters + # @return [Array<(GoalResponseBody, Integer, Hash)>] GoalResponseBody data, response status code and response headers + def users_user_guid_goals_post_with_http_info(user_guid, goal_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_post ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_post" + end + # verify the required parameter 'goal_request_body' is set + if @api_client.config.client_side_validation && goal_request_body.nil? + fail ArgumentError, "Missing the required parameter 'goal_request_body' when calling GoalsApi.users_user_guid_goals_post" + end + # resource path + local_var_path = '/users/{user_guid}/goals'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(goal_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'GoalResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"GoalsApi.users_user_guid_goals_post", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Reposition goals + # This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + # @param user_guid [String] The unique identifier for the user. + # @param reposition_request_body [RepositionRequestBody] + # @param [Hash] opts the optional parameters + # @return [RepositionResponseBody] + def users_user_guid_goals_reposition_put(user_guid, reposition_request_body, opts = {}) + data, _status_code, _headers = users_user_guid_goals_reposition_put_with_http_info(user_guid, reposition_request_body, opts) + data + end + + # Reposition goals + # This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + # @param user_guid [String] The unique identifier for the user. + # @param reposition_request_body [RepositionRequestBody] + # @param [Hash] opts the optional parameters + # @return [Array<(RepositionResponseBody, Integer, Hash)>] RepositionResponseBody data, response status code and response headers + def users_user_guid_goals_reposition_put_with_http_info(user_guid, reposition_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_reposition_put ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_reposition_put" + end + # verify the required parameter 'reposition_request_body' is set + if @api_client.config.client_side_validation && reposition_request_body.nil? + fail ArgumentError, "Missing the required parameter 'reposition_request_body' when calling GoalsApi.users_user_guid_goals_reposition_put" + end + # resource path + local_var_path = '/users/{user_guid}/goals/reposition'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(reposition_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'RepositionResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"GoalsApi.users_user_guid_goals_reposition_put", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_reposition_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/mx-platform-ruby/api/mx_platform_api.rb b/lib/mx-platform-ruby/api/mx_platform_api.rb index 13fd1eb..46d9643 100644 --- a/lib/mx-platform-ruby/api/mx_platform_api.rb +++ b/lib/mx-platform-ruby/api/mx_platform_api.rb @@ -7439,6 +7439,284 @@ def update_user_with_http_info(user_guid, user_update_request_body, opts = {}) return data, status_code, headers end + # Read monthly cash flow profile + # @param user_guid [String] The unique identifier for the user. + # @param [Hash] opts the optional parameters + # @return [MonthlyCashFlowResponseBody] + def users_user_guid_monthly_cash_flow_profile_get(user_guid, opts = {}) + data, _status_code, _headers = users_user_guid_monthly_cash_flow_profile_get_with_http_info(user_guid, opts) + data + end + + # Read monthly cash flow profile + # @param user_guid [String] The unique identifier for the user. + # @param [Hash] opts the optional parameters + # @return [Array<(MonthlyCashFlowResponseBody, Integer, Hash)>] MonthlyCashFlowResponseBody data, response status code and response headers + def users_user_guid_monthly_cash_flow_profile_get_with_http_info(user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_monthly_cash_flow_profile_get ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_monthly_cash_flow_profile_get" + end + # resource path + local_var_path = '/users/{user_guid}/monthly_cash_flow_profile'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'MonthlyCashFlowResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.users_user_guid_monthly_cash_flow_profile_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_monthly_cash_flow_profile_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update monthly cash flow profile + # Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + # @param user_guid [String] The unique identifier for the user. + # @param monthly_cash_flow_profile_request_body [MonthlyCashFlowProfileRequestBody] + # @param [Hash] opts the optional parameters + # @return [MonthlyCashFlowResponseBody] + def users_user_guid_monthly_cash_flow_profile_put(user_guid, monthly_cash_flow_profile_request_body, opts = {}) + data, _status_code, _headers = users_user_guid_monthly_cash_flow_profile_put_with_http_info(user_guid, monthly_cash_flow_profile_request_body, opts) + data + end + + # Update monthly cash flow profile + # Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + # @param user_guid [String] The unique identifier for the user. + # @param monthly_cash_flow_profile_request_body [MonthlyCashFlowProfileRequestBody] + # @param [Hash] opts the optional parameters + # @return [Array<(MonthlyCashFlowResponseBody, Integer, Hash)>] MonthlyCashFlowResponseBody data, response status code and response headers + def users_user_guid_monthly_cash_flow_profile_put_with_http_info(user_guid, monthly_cash_flow_profile_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put" + end + # verify the required parameter 'monthly_cash_flow_profile_request_body' is set + if @api_client.config.client_side_validation && monthly_cash_flow_profile_request_body.nil? + fail ArgumentError, "Missing the required parameter 'monthly_cash_flow_profile_request_body' when calling MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put" + end + # resource path + local_var_path = '/users/{user_guid}/monthly_cash_flow_profile'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(monthly_cash_flow_profile_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'MonthlyCashFlowResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_monthly_cash_flow_profile_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete split transactions + # 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. + # @param transaction_guid [String] The unique id for a `transaction`. + # @param user_guid [String] The unique id for a `user`. + # @param [Hash] opts the optional parameters + # @return [nil] + def users_user_guid_transactions_transaction_guid_split_delete(transaction_guid, user_guid, opts = {}) + users_user_guid_transactions_transaction_guid_split_delete_with_http_info(transaction_guid, user_guid, opts) + nil + end + + # Delete split transactions + # 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. + # @param transaction_guid [String] The unique id for a `transaction`. + # @param user_guid [String] The unique id for a `user`. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def users_user_guid_transactions_transaction_guid_split_delete_with_http_info(transaction_guid, user_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete ...' + end + # verify the required parameter 'transaction_guid' is set + if @api_client.config.client_side_validation && transaction_guid.nil? + fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete" + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete" + end + # resource path + local_var_path = '/users/{user_guid}/transactions/{transaction_guid}/split'.sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_transactions_transaction_guid_split_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create split transactions + # 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. + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param transaction_guid [String] The unique identifier for the transaction. Defined by MX. + # @param [Hash] opts the optional parameters + # @option opts [SplitTransactionRequestBody] :split_transaction_request_body + # @return [SplitTransactionsResponseBody] + def users_user_guid_transactions_transaction_guid_split_post(user_guid, transaction_guid, opts = {}) + data, _status_code, _headers = users_user_guid_transactions_transaction_guid_split_post_with_http_info(user_guid, transaction_guid, opts) + data + end + + # Create split transactions + # 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. + # @param user_guid [String] The unique identifier for the user. Defined by MX. + # @param transaction_guid [String] The unique identifier for the transaction. Defined by MX. + # @param [Hash] opts the optional parameters + # @option opts [SplitTransactionRequestBody] :split_transaction_request_body + # @return [Array<(SplitTransactionsResponseBody, Integer, Hash)>] SplitTransactionsResponseBody data, response status code and response headers + def users_user_guid_transactions_transaction_guid_split_post_with_http_info(user_guid, transaction_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post" + end + # verify the required parameter 'transaction_guid' is set + if @api_client.config.client_side_validation && transaction_guid.nil? + fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post" + end + # resource path + local_var_path = '/users/{user_guid}/transactions/{transaction_guid}/split'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'split_transaction_request_body']) + + # return_type + return_type = opts[:debug_return_type] || 'SplitTransactionsResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_transactions_transaction_guid_split_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Verify member # The verify endpoint begins a verification process for a member. # @param member_guid [String] The unique id for a `member`. diff --git a/lib/mx-platform-ruby/models/budget_create_request.rb b/lib/mx-platform-ruby/models/budget_create_request.rb new file mode 100644 index 0000000..1b5990f --- /dev/null +++ b/lib/mx-platform-ruby/models/budget_create_request.rb @@ -0,0 +1,269 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class BudgetCreateRequest + # Unique identifier of the category. + attr_accessor :category_guid + + # Unique identifier of the parent budget. This is only required when creating a budget on a sub-category. + attr_accessor :parent_guid + + # Amount of the budget. + attr_accessor :amount + + # Additional information a partner can store on the budget. + attr_accessor :metadata + + # When set to true, this parameter will prevent a webhook from being triggered by the request. + attr_accessor :skip_webhook + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'category_guid' => :'category_guid', + :'parent_guid' => :'parent_guid', + :'amount' => :'amount', + :'metadata' => :'metadata', + :'skip_webhook' => :'skip_webhook' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'category_guid' => :'String', + :'parent_guid' => :'String', + :'amount' => :'Integer', + :'metadata' => :'String', + :'skip_webhook' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetCreateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'category_guid') + self.category_guid = attributes[:'category_guid'] + else + self.category_guid = nil + end + + if attributes.key?(:'parent_guid') + self.parent_guid = attributes[:'parent_guid'] + else + self.parent_guid = nil + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'skip_webhook') + self.skip_webhook = attributes[:'skip_webhook'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @category_guid.nil? + invalid_properties.push('invalid value for "category_guid", category_guid cannot be nil.') + end + + if @parent_guid.nil? + invalid_properties.push('invalid value for "parent_guid", parent_guid cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @category_guid.nil? + return false if @parent_guid.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + category_guid == o.category_guid && + parent_guid == o.parent_guid && + amount == o.amount && + metadata == o.metadata && + skip_webhook == o.skip_webhook + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [category_guid, parent_guid, amount, metadata, skip_webhook].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/budget_create_request_body.rb b/lib/mx-platform-ruby/models/budget_create_request_body.rb new file mode 100644 index 0000000..0c35caa --- /dev/null +++ b/lib/mx-platform-ruby/models/budget_create_request_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class BudgetCreateRequestBody + attr_accessor :budget + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'budget' => :'budget' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'budget' => :'BudgetCreateRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetCreateRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetCreateRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'budget') + self.budget = attributes[:'budget'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + budget == o.budget + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [budget].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/budget_response.rb b/lib/mx-platform-ruby/models/budget_response.rb new file mode 100644 index 0000000..b1f53cd --- /dev/null +++ b/lib/mx-platform-ruby/models/budget_response.rb @@ -0,0 +1,373 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class BudgetResponse + # A goal amount set by the user for a category's transaction total during a month. + attr_accessor :amount + + # Unique identifier for the budget category. Defined by MX. + attr_accessor :category_guid + + # Date and time the budget was created, represented in ISO 8601 format with timestamp. + attr_accessor :created_at + + # Unique identifier for the budget. Defined by MX. + attr_accessor :guid + + # If the budget has been exceeded, this field will be true. Otherwise, this field will be false. + attr_accessor :is_exceeded + + # If the budget is off track, this field will be true. Otherwise, this field will be false. + attr_accessor :is_off_track + + # Additional information a partner can store on the budget. + attr_accessor :metadata + + # The name of the budget that is visible to the user (ie \"Food\", \"Bills\", \"Entertainment\", etc). + attr_accessor :name + + # The percentage amount of off track spending. (Deprecated). + attr_accessor :off_track_percentage + + # Unique identifier for the parent budget. Defined by MX. + attr_accessor :parent_guid + + # 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. + attr_accessor :percent_spent + + # The projected amount of spending for the budget. + attr_accessor :projected_spending + + # The revision number of this budget record. + attr_accessor :revision + + # The cumulative amount of all transactions under the budget. + attr_accessor :transaction_total + + # Date and time the budget was updated, represented in ISO 8601 format with timestamp. + attr_accessor :updated_at + + # Unique identifier for the user. Defined by MX. + attr_accessor :user_guid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount' => :'amount', + :'category_guid' => :'category_guid', + :'created_at' => :'created_at', + :'guid' => :'guid', + :'is_exceeded' => :'is_exceeded', + :'is_off_track' => :'is_off_track', + :'metadata' => :'metadata', + :'name' => :'name', + :'off_track_percentage' => :'off_track_percentage', + :'parent_guid' => :'parent_guid', + :'percent_spent' => :'percent_spent', + :'projected_spending' => :'projected_spending', + :'revision' => :'revision', + :'transaction_total' => :'transaction_total', + :'updated_at' => :'updated_at', + :'user_guid' => :'user_guid' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'amount' => :'Float', + :'category_guid' => :'String', + :'created_at' => :'String', + :'guid' => :'String', + :'is_exceeded' => :'Boolean', + :'is_off_track' => :'Boolean', + :'metadata' => :'String', + :'name' => :'String', + :'off_track_percentage' => :'Float', + :'parent_guid' => :'String', + :'percent_spent' => :'Float', + :'projected_spending' => :'Float', + :'revision' => :'Integer', + :'transaction_total' => :'Object', + :'updated_at' => :'Object', + :'user_guid' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'metadata', + :'name', + :'off_track_percentage', + :'parent_guid', + :'percent_spent', + :'transaction_total', + :'updated_at', + :'user_guid' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'category_guid') + self.category_guid = attributes[:'category_guid'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'is_exceeded') + self.is_exceeded = attributes[:'is_exceeded'] + end + + if attributes.key?(:'is_off_track') + self.is_off_track = attributes[:'is_off_track'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'off_track_percentage') + self.off_track_percentage = attributes[:'off_track_percentage'] + end + + if attributes.key?(:'parent_guid') + self.parent_guid = attributes[:'parent_guid'] + end + + if attributes.key?(:'percent_spent') + self.percent_spent = attributes[:'percent_spent'] + end + + if attributes.key?(:'projected_spending') + self.projected_spending = attributes[:'projected_spending'] + end + + if attributes.key?(:'revision') + self.revision = attributes[:'revision'] + end + + if attributes.key?(:'transaction_total') + self.transaction_total = attributes[:'transaction_total'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'user_guid') + self.user_guid = attributes[:'user_guid'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + amount == o.amount && + category_guid == o.category_guid && + created_at == o.created_at && + guid == o.guid && + is_exceeded == o.is_exceeded && + is_off_track == o.is_off_track && + metadata == o.metadata && + name == o.name && + off_track_percentage == o.off_track_percentage && + parent_guid == o.parent_guid && + percent_spent == o.percent_spent && + projected_spending == o.projected_spending && + revision == o.revision && + transaction_total == o.transaction_total && + updated_at == o.updated_at && + user_guid == o.user_guid + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [amount, category_guid, created_at, guid, is_exceeded, is_off_track, metadata, name, off_track_percentage, parent_guid, percent_spent, projected_spending, revision, transaction_total, updated_at, user_guid].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/budget_response_body.rb b/lib/mx-platform-ruby/models/budget_response_body.rb new file mode 100644 index 0000000..30e75e2 --- /dev/null +++ b/lib/mx-platform-ruby/models/budget_response_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class BudgetResponseBody + attr_accessor :budget + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'budget' => :'budget' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'budget' => :'BudgetResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'budget') + self.budget = attributes[:'budget'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + budget == o.budget + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [budget].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/budget_update_request.rb b/lib/mx-platform-ruby/models/budget_update_request.rb new file mode 100644 index 0000000..8ded738 --- /dev/null +++ b/lib/mx-platform-ruby/models/budget_update_request.rb @@ -0,0 +1,235 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class BudgetUpdateRequest + # Amount of the budget. + attr_accessor :amount + + # Additional information a partner can store on the budget. + attr_accessor :metadata + + # When set to true, this parameter will prevent a webhook from being triggered by the request. + attr_accessor :skip_webhook + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount' => :'amount', + :'metadata' => :'metadata', + :'skip_webhook' => :'skip_webhook' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'amount' => :'Integer', + :'metadata' => :'String', + :'skip_webhook' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetUpdateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'skip_webhook') + self.skip_webhook = attributes[:'skip_webhook'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + amount == o.amount && + metadata == o.metadata && + skip_webhook == o.skip_webhook + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [amount, metadata, skip_webhook].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/budget_update_request_body.rb b/lib/mx-platform-ruby/models/budget_update_request_body.rb new file mode 100644 index 0000000..3baddc5 --- /dev/null +++ b/lib/mx-platform-ruby/models/budget_update_request_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class BudgetUpdateRequestBody + attr_accessor :budget + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'budget' => :'budget' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'budget' => :'BudgetUpdateRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetUpdateRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetUpdateRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'budget') + self.budget = attributes[:'budget'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + budget == o.budget + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [budget].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/credit_card_product.rb b/lib/mx-platform-ruby/models/credit_card_product.rb index 9d49bf4..51ac501 100644 --- a/lib/mx-platform-ruby/models/credit_card_product.rb +++ b/lib/mx-platform-ruby/models/credit_card_product.rb @@ -35,9 +35,9 @@ class CreditCardProduct attr_accessor :has_zero_percent_introductory_rate_on_balance_transfer - attr_accessor :financial_institution + attr_accessor :is_accepting_applicants - attr_accessor :is_accepting_applications + attr_accessor :is_active_credit_card_product attr_accessor :is_small_business_card @@ -56,8 +56,8 @@ def self.attribute_map :'has_zero_introductory_annual_fee' => :'has_zero_introductory_annual_fee', :'has_zero_percent_introductory_rate' => :'has_zero_percent_introductory_rate', :'has_zero_percent_introductory_rate_on_balance_transfer' => :'has_zero_percent_introductory_rate_on_balance_transfer', - :'financial_institution' => :'financial_institution', - :'is_accepting_applications' => :'is_accepting_applications', + :'is_accepting_applicants' => :'is_accepting_applicants', + :'is_active_credit_card_product' => :'is_active_credit_card_product', :'is_small_business_card' => :'is_small_business_card', :'name' => :'name' } @@ -71,18 +71,18 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'annual_fee' => :'Object', - :'duration_of_introductory_rate_on_balance_transfer' => :'Object', - :'duration_of_introductory_rate_on_purchases' => :'Object', - :'guid' => :'Object', + :'annual_fee' => :'Float', + :'duration_of_introductory_rate_on_balance_transfer' => :'Integer', + :'duration_of_introductory_rate_on_purchases' => :'Integer', + :'guid' => :'String', :'has_cashback_rewards' => :'Boolean', :'has_other_rewards' => :'Boolean', :'has_travel_rewards' => :'Boolean', :'has_zero_introductory_annual_fee' => :'Boolean', :'has_zero_percent_introductory_rate' => :'Boolean', :'has_zero_percent_introductory_rate_on_balance_transfer' => :'Boolean', - :'financial_institution' => :'Boolean', - :'is_accepting_applications' => :'Boolean', + :'is_accepting_applicants' => :'Boolean', + :'is_active_credit_card_product' => :'Boolean', :'is_small_business_card' => :'Boolean', :'name' => :'String' } @@ -91,10 +91,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'annual_fee', - :'duration_of_introductory_rate_on_balance_transfer', - :'duration_of_introductory_rate_on_purchases', - :'guid', ]) end @@ -153,12 +149,12 @@ def initialize(attributes = {}) self.has_zero_percent_introductory_rate_on_balance_transfer = attributes[:'has_zero_percent_introductory_rate_on_balance_transfer'] end - if attributes.key?(:'financial_institution') - self.financial_institution = attributes[:'financial_institution'] + if attributes.key?(:'is_accepting_applicants') + self.is_accepting_applicants = attributes[:'is_accepting_applicants'] end - if attributes.key?(:'is_accepting_applications') - self.is_accepting_applications = attributes[:'is_accepting_applications'] + if attributes.key?(:'is_active_credit_card_product') + self.is_active_credit_card_product = attributes[:'is_active_credit_card_product'] end if attributes.key?(:'is_small_business_card') @@ -200,8 +196,8 @@ def ==(o) has_zero_introductory_annual_fee == o.has_zero_introductory_annual_fee && has_zero_percent_introductory_rate == o.has_zero_percent_introductory_rate && has_zero_percent_introductory_rate_on_balance_transfer == o.has_zero_percent_introductory_rate_on_balance_transfer && - financial_institution == o.financial_institution && - is_accepting_applications == o.is_accepting_applications && + is_accepting_applicants == o.is_accepting_applicants && + is_active_credit_card_product == o.is_active_credit_card_product && is_small_business_card == o.is_small_business_card && name == o.name end @@ -215,7 +211,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [annual_fee, duration_of_introductory_rate_on_balance_transfer, duration_of_introductory_rate_on_purchases, guid, has_cashback_rewards, has_other_rewards, has_travel_rewards, has_zero_introductory_annual_fee, has_zero_percent_introductory_rate, has_zero_percent_introductory_rate_on_balance_transfer, financial_institution, is_accepting_applications, is_small_business_card, name].hash + [annual_fee, duration_of_introductory_rate_on_balance_transfer, duration_of_introductory_rate_on_purchases, guid, has_cashback_rewards, has_other_rewards, has_travel_rewards, has_zero_introductory_annual_fee, has_zero_percent_introductory_rate, has_zero_percent_introductory_rate_on_balance_transfer, is_accepting_applicants, is_active_credit_card_product, is_small_business_card, name].hash end # Builds the object from hash diff --git a/lib/mx-platform-ruby/models/credit_card_product_response.rb b/lib/mx-platform-ruby/models/credit_card_product_response.rb index 97e3e41..b4f2401 100644 --- a/lib/mx-platform-ruby/models/credit_card_product_response.rb +++ b/lib/mx-platform-ruby/models/credit_card_product_response.rb @@ -15,12 +15,12 @@ module MxPlatformRuby class CreditCardProductResponse - attr_accessor :reward + attr_accessor :credit_card_product # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'reward' => :'reward' + :'credit_card_product' => :'credit_card_product' } end @@ -32,7 +32,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'reward' => :'CreditCardProduct' + :'credit_card_product' => :'CreditCardProduct' } end @@ -57,8 +57,8 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'reward') - self.reward = attributes[:'reward'] + if attributes.key?(:'credit_card_product') + self.credit_card_product = attributes[:'credit_card_product'] end end @@ -82,7 +82,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - reward == o.reward + credit_card_product == o.credit_card_product end # @see the `==` method @@ -94,7 +94,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [reward].hash + [credit_card_product].hash end # Builds the object from hash diff --git a/lib/mx-platform-ruby/models/goal_request.rb b/lib/mx-platform-ruby/models/goal_request.rb new file mode 100644 index 0000000..ae47610 --- /dev/null +++ b/lib/mx-platform-ruby/models/goal_request.rb @@ -0,0 +1,350 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class GoalRequest + # Unique identifier of the account for the goal. + attr_accessor :account_guid + + # Amount of the goal. + attr_accessor :amount + + # The goal type. + attr_accessor :goal_type_name + + # The category of the goal. + attr_accessor :meta_type_name + + # The name of the goal. + attr_accessor :name + + # Date and time the goal was completed. + attr_accessor :completed_at + + # Determines if the goal has been spent. + attr_accessor :has_been_spent + + # Determines if the goal is complete. + attr_accessor :is_complete + + # Additional information a partner can store on the goal. + attr_accessor :metadata + + # The priority of the goal in relation to multiple goals. + attr_accessor :position + + # Date and time the goal is to complete. Intended for users to set their own goal completion dates. + attr_accessor :targeted_to_complete_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'amount' => :'amount', + :'goal_type_name' => :'goal_type_name', + :'meta_type_name' => :'meta_type_name', + :'name' => :'name', + :'completed_at' => :'completed_at', + :'has_been_spent' => :'has_been_spent', + :'is_complete' => :'is_complete', + :'metadata' => :'metadata', + :'position' => :'position', + :'targeted_to_complete_at' => :'targeted_to_complete_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_guid' => :'String', + :'amount' => :'Float', + :'goal_type_name' => :'String', + :'meta_type_name' => :'String', + :'name' => :'String', + :'completed_at' => :'String', + :'has_been_spent' => :'Boolean', + :'is_complete' => :'Boolean', + :'metadata' => :'String', + :'position' => :'Integer', + :'targeted_to_complete_at' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::GoalRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::GoalRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_guid') + self.account_guid = attributes[:'account_guid'] + else + self.account_guid = nil + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + else + self.amount = nil + end + + if attributes.key?(:'goal_type_name') + self.goal_type_name = attributes[:'goal_type_name'] + else + self.goal_type_name = nil + end + + if attributes.key?(:'meta_type_name') + self.meta_type_name = attributes[:'meta_type_name'] + else + self.meta_type_name = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'has_been_spent') + self.has_been_spent = attributes[:'has_been_spent'] + end + + if attributes.key?(:'is_complete') + self.is_complete = attributes[:'is_complete'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'targeted_to_complete_at') + self.targeted_to_complete_at = attributes[:'targeted_to_complete_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @account_guid.nil? + invalid_properties.push('invalid value for "account_guid", account_guid cannot be nil.') + end + + if @amount.nil? + invalid_properties.push('invalid value for "amount", amount cannot be nil.') + end + + if @goal_type_name.nil? + invalid_properties.push('invalid value for "goal_type_name", goal_type_name cannot be nil.') + end + + if @meta_type_name.nil? + invalid_properties.push('invalid value for "meta_type_name", meta_type_name cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @account_guid.nil? + return false if @amount.nil? + return false if @goal_type_name.nil? + return false if @meta_type_name.nil? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_guid == o.account_guid && + amount == o.amount && + goal_type_name == o.goal_type_name && + meta_type_name == o.meta_type_name && + name == o.name && + completed_at == o.completed_at && + has_been_spent == o.has_been_spent && + is_complete == o.is_complete && + metadata == o.metadata && + position == o.position && + targeted_to_complete_at == o.targeted_to_complete_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_guid, amount, goal_type_name, meta_type_name, name, completed_at, has_been_spent, is_complete, metadata, position, targeted_to_complete_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/goal_request_body.rb b/lib/mx-platform-ruby/models/goal_request_body.rb new file mode 100644 index 0000000..69296f2 --- /dev/null +++ b/lib/mx-platform-ruby/models/goal_request_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class GoalRequestBody + attr_accessor :goal + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goal' => :'goal' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goal' => :'GoalRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::GoalRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::GoalRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goal') + self.goal = attributes[:'goal'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goal == o.goal + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goal].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/goal_response.rb b/lib/mx-platform-ruby/models/goal_response.rb new file mode 100644 index 0000000..eecb832 --- /dev/null +++ b/lib/mx-platform-ruby/models/goal_response.rb @@ -0,0 +1,364 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class GoalResponse + # Unique identifier of the account for the goal. + attr_accessor :account_guid + + # Amount of the goal. + attr_accessor :amount + + # Date and time the goal was completed. + attr_accessor :completed_at + + # The current amount of the goal. + attr_accessor :current_amount + + # The goal type. + attr_accessor :goal_type_name + + # Unique identifier for the goal. Defined by MX. + attr_accessor :guid + + # Determines if the goal has been spent. + attr_accessor :has_been_spent + + # Determines if the goal is complete. + attr_accessor :is_complete + + # Additional information a partner can store on the goal. + attr_accessor :metadata + + # The category of the goal. + attr_accessor :meta_type_name + + # The name of the goal. + attr_accessor :name + + # The priority of the goal in relation to multiple goals. + attr_accessor :position + + # Date and time the goal is projected to be completed. + attr_accessor :projected_to_complete_at + + # Date and time the goal is to complete. Intended for users to set their own goal completion dates. + attr_accessor :targeted_to_complete_at + + attr_accessor :track_type_name + + # The unique identifier for the the user. Defined by MX. + attr_accessor :user_guid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'amount' => :'amount', + :'completed_at' => :'completed_at', + :'current_amount' => :'current_amount', + :'goal_type_name' => :'goal_type_name', + :'guid' => :'guid', + :'has_been_spent' => :'has_been_spent', + :'is_complete' => :'is_complete', + :'metadata' => :'metadata', + :'meta_type_name' => :'meta_type_name', + :'name' => :'name', + :'position' => :'position', + :'projected_to_complete_at' => :'projected_to_complete_at', + :'targeted_to_complete_at' => :'targeted_to_complete_at', + :'track_type_name' => :'track_type_name', + :'user_guid' => :'user_guid' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_guid' => :'String', + :'amount' => :'Float', + :'completed_at' => :'String', + :'current_amount' => :'Float', + :'goal_type_name' => :'String', + :'guid' => :'String', + :'has_been_spent' => :'Boolean', + :'is_complete' => :'Boolean', + :'metadata' => :'String', + :'meta_type_name' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'projected_to_complete_at' => :'String', + :'targeted_to_complete_at' => :'String', + :'track_type_name' => :'String', + :'user_guid' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::GoalResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::GoalResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_guid') + self.account_guid = attributes[:'account_guid'] + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'current_amount') + self.current_amount = attributes[:'current_amount'] + end + + if attributes.key?(:'goal_type_name') + self.goal_type_name = attributes[:'goal_type_name'] + end + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'has_been_spent') + self.has_been_spent = attributes[:'has_been_spent'] + end + + if attributes.key?(:'is_complete') + self.is_complete = attributes[:'is_complete'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'meta_type_name') + self.meta_type_name = attributes[:'meta_type_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'projected_to_complete_at') + self.projected_to_complete_at = attributes[:'projected_to_complete_at'] + end + + if attributes.key?(:'targeted_to_complete_at') + self.targeted_to_complete_at = attributes[:'targeted_to_complete_at'] + end + + if attributes.key?(:'track_type_name') + self.track_type_name = attributes[:'track_type_name'] + end + + if attributes.key?(:'user_guid') + self.user_guid = attributes[:'user_guid'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_guid == o.account_guid && + amount == o.amount && + completed_at == o.completed_at && + current_amount == o.current_amount && + goal_type_name == o.goal_type_name && + guid == o.guid && + has_been_spent == o.has_been_spent && + is_complete == o.is_complete && + metadata == o.metadata && + meta_type_name == o.meta_type_name && + name == o.name && + position == o.position && + projected_to_complete_at == o.projected_to_complete_at && + targeted_to_complete_at == o.targeted_to_complete_at && + track_type_name == o.track_type_name && + user_guid == o.user_guid + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_guid, amount, completed_at, current_amount, goal_type_name, guid, has_been_spent, is_complete, metadata, meta_type_name, name, position, projected_to_complete_at, targeted_to_complete_at, track_type_name, user_guid].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/goal_response_body.rb b/lib/mx-platform-ruby/models/goal_response_body.rb new file mode 100644 index 0000000..91f0ef9 --- /dev/null +++ b/lib/mx-platform-ruby/models/goal_response_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class GoalResponseBody + attr_accessor :goal + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goal' => :'goal' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goal' => :'GoalResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::GoalResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::GoalResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goal') + self.goal = attributes[:'goal'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goal == o.goal + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goal].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/goals_response.rb b/lib/mx-platform-ruby/models/goals_response.rb new file mode 100644 index 0000000..84791a4 --- /dev/null +++ b/lib/mx-platform-ruby/models/goals_response.rb @@ -0,0 +1,363 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class GoalsResponse + # Unique identifier of the account for the goal. + attr_accessor :account_guid + + # Amount of the goal. + attr_accessor :amount + + # The current amount of the goal. + attr_accessor :current_amount + + # The unique identifier for the goal. Defined by MX. + attr_accessor :guid + + # The goal type. + attr_accessor :goal_type_name + + # The category of the goal. + attr_accessor :meta_type_name + + # The name of the goal. + attr_accessor :name + + # Date and time the goal was completed. + attr_accessor :completed_at + + # Determines if the goal has been spent. + attr_accessor :has_been_spent + + # Determines if the goal is complete. + attr_accessor :is_complete + + # Additional information a partner can store on the goal. + attr_accessor :metadata + + # The priority of the goal in relation to multiple goals. + attr_accessor :position + + # The date on which the project was completed. + attr_accessor :projected_to_complete_at + + attr_accessor :targeted_to_complete_at + + attr_accessor :track_type_name + + # The unique identifier for the the user. Defined by MX. + attr_accessor :user_guid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'amount' => :'amount', + :'current_amount' => :'current_amount', + :'guid' => :'guid', + :'goal_type_name' => :'goal_type_name', + :'meta_type_name' => :'meta_type_name', + :'name' => :'name', + :'completed_at' => :'completed_at', + :'has_been_spent' => :'has_been_spent', + :'is_complete' => :'is_complete', + :'metadata' => :'metadata', + :'position' => :'position', + :'projected_to_complete_at' => :'projected_to_complete_at', + :'targeted_to_complete_at' => :'targeted_to_complete_at', + :'track_type_name' => :'track_type_name', + :'user_guid' => :'user_guid' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_guid' => :'String', + :'amount' => :'Float', + :'current_amount' => :'Float', + :'guid' => :'String', + :'goal_type_name' => :'String', + :'meta_type_name' => :'String', + :'name' => :'String', + :'completed_at' => :'String', + :'has_been_spent' => :'Boolean', + :'is_complete' => :'Boolean', + :'metadata' => :'String', + :'position' => :'Integer', + :'projected_to_complete_at' => :'String', + :'targeted_to_complete_at' => :'String', + :'track_type_name' => :'String', + :'user_guid' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::GoalsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::GoalsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_guid') + self.account_guid = attributes[:'account_guid'] + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'current_amount') + self.current_amount = attributes[:'current_amount'] + end + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'goal_type_name') + self.goal_type_name = attributes[:'goal_type_name'] + end + + if attributes.key?(:'meta_type_name') + self.meta_type_name = attributes[:'meta_type_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'has_been_spent') + self.has_been_spent = attributes[:'has_been_spent'] + end + + if attributes.key?(:'is_complete') + self.is_complete = attributes[:'is_complete'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'projected_to_complete_at') + self.projected_to_complete_at = attributes[:'projected_to_complete_at'] + end + + if attributes.key?(:'targeted_to_complete_at') + self.targeted_to_complete_at = attributes[:'targeted_to_complete_at'] + end + + if attributes.key?(:'track_type_name') + self.track_type_name = attributes[:'track_type_name'] + end + + if attributes.key?(:'user_guid') + self.user_guid = attributes[:'user_guid'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_guid == o.account_guid && + amount == o.amount && + current_amount == o.current_amount && + guid == o.guid && + goal_type_name == o.goal_type_name && + meta_type_name == o.meta_type_name && + name == o.name && + completed_at == o.completed_at && + has_been_spent == o.has_been_spent && + is_complete == o.is_complete && + metadata == o.metadata && + position == o.position && + projected_to_complete_at == o.projected_to_complete_at && + targeted_to_complete_at == o.targeted_to_complete_at && + track_type_name == o.track_type_name && + user_guid == o.user_guid + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_guid, amount, current_amount, guid, goal_type_name, meta_type_name, name, completed_at, has_been_spent, is_complete, metadata, position, projected_to_complete_at, targeted_to_complete_at, track_type_name, user_guid].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/goals_response_body.rb b/lib/mx-platform-ruby/models/goals_response_body.rb new file mode 100644 index 0000000..5631d35 --- /dev/null +++ b/lib/mx-platform-ruby/models/goals_response_body.rb @@ -0,0 +1,225 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class GoalsResponseBody + attr_accessor :goals + + attr_accessor :pagination + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goals' => :'goals', + :'pagination' => :'pagination' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goals' => :'Array', + :'pagination' => :'PaginationResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::GoalsResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::GoalsResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goals') + if (value = attributes[:'goals']).is_a?(Array) + self.goals = value + end + end + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goals == o.goals && + pagination == o.pagination + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goals, pagination].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request.rb b/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request.rb new file mode 100644 index 0000000..c55d8b0 --- /dev/null +++ b/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request.rb @@ -0,0 +1,225 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class MonthlyCashFlowProfileRequest + # The monthly dollar amount allocated for goals. + attr_accessor :goals_contribution + + # Determines if the user uses estimated goals contribution. + attr_accessor :uses_estimated_goals_contribution + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goals_contribution' => :'goals_contribution', + :'uses_estimated_goals_contribution' => :'uses_estimated_goals_contribution' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goals_contribution' => :'Float', + :'uses_estimated_goals_contribution' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::MonthlyCashFlowProfileRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::MonthlyCashFlowProfileRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goals_contribution') + self.goals_contribution = attributes[:'goals_contribution'] + end + + if attributes.key?(:'uses_estimated_goals_contribution') + self.uses_estimated_goals_contribution = attributes[:'uses_estimated_goals_contribution'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goals_contribution == o.goals_contribution && + uses_estimated_goals_contribution == o.uses_estimated_goals_contribution + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goals_contribution, uses_estimated_goals_contribution].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request_body.rb b/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request_body.rb new file mode 100644 index 0000000..c4b948d --- /dev/null +++ b/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class MonthlyCashFlowProfileRequestBody + attr_accessor :institution + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'institution' => :'institution' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'institution' => :'MonthlyCashFlowProfileRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::MonthlyCashFlowProfileRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::MonthlyCashFlowProfileRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'institution') + self.institution = attributes[:'institution'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + institution == o.institution + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [institution].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/monthly_cash_flow_response.rb b/lib/mx-platform-ruby/models/monthly_cash_flow_response.rb new file mode 100644 index 0000000..98dc8fd --- /dev/null +++ b/lib/mx-platform-ruby/models/monthly_cash_flow_response.rb @@ -0,0 +1,274 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class MonthlyCashFlowResponse + # Unique identifier for the monthly cash flow profile. Defined by MX. + attr_accessor :guid + + # Unique identifier for the user the monthly cash flow profile is attached to. Defined by MX. + attr_accessor :user_guid + + # The amount of the budgeted income for the user. + attr_accessor :budgeted_income + + # The amount of the budgeted expenses for the user. + attr_accessor :budgeted_expenses + + # The monthly dollar amount allocated for goals. + attr_accessor :goals_contribution + + # The estimated monthly dollar amount allocated for goals calculated from income and budgets. + attr_accessor :estimated_goals_contribution + + attr_accessor :uses_estimated_goals_contribution + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'guid' => :'guid', + :'user_guid' => :'user_guid', + :'budgeted_income' => :'budgeted_income', + :'budgeted_expenses' => :'budgeted_expenses', + :'goals_contribution' => :'goals_contribution', + :'estimated_goals_contribution' => :'estimated_goals_contribution', + :'uses_estimated_goals_contribution' => :'uses_estimated_goals_contribution' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'guid' => :'String', + :'user_guid' => :'String', + :'budgeted_income' => :'Float', + :'budgeted_expenses' => :'Float', + :'goals_contribution' => :'Float', + :'estimated_goals_contribution' => :'Integer', + :'uses_estimated_goals_contribution' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::MonthlyCashFlowResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::MonthlyCashFlowResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'user_guid') + self.user_guid = attributes[:'user_guid'] + end + + if attributes.key?(:'budgeted_income') + self.budgeted_income = attributes[:'budgeted_income'] + end + + if attributes.key?(:'budgeted_expenses') + self.budgeted_expenses = attributes[:'budgeted_expenses'] + end + + if attributes.key?(:'goals_contribution') + self.goals_contribution = attributes[:'goals_contribution'] + end + + if attributes.key?(:'estimated_goals_contribution') + self.estimated_goals_contribution = attributes[:'estimated_goals_contribution'] + end + + if attributes.key?(:'uses_estimated_goals_contribution') + self.uses_estimated_goals_contribution = attributes[:'uses_estimated_goals_contribution'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + guid == o.guid && + user_guid == o.user_guid && + budgeted_income == o.budgeted_income && + budgeted_expenses == o.budgeted_expenses && + goals_contribution == o.goals_contribution && + estimated_goals_contribution == o.estimated_goals_contribution && + uses_estimated_goals_contribution == o.uses_estimated_goals_contribution + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [guid, user_guid, budgeted_income, budgeted_expenses, goals_contribution, estimated_goals_contribution, uses_estimated_goals_contribution].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/monthly_cash_flow_response_body.rb b/lib/mx-platform-ruby/models/monthly_cash_flow_response_body.rb new file mode 100644 index 0000000..d646406 --- /dev/null +++ b/lib/mx-platform-ruby/models/monthly_cash_flow_response_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class MonthlyCashFlowResponseBody + attr_accessor :monthly_cash_flow_profile + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'monthly_cash_flow_profile' => :'monthly_cash_flow_profile' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'monthly_cash_flow_profile' => :'MonthlyCashFlowResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::MonthlyCashFlowResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::MonthlyCashFlowResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'monthly_cash_flow_profile') + self.monthly_cash_flow_profile = attributes[:'monthly_cash_flow_profile'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + monthly_cash_flow_profile == o.monthly_cash_flow_profile + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [monthly_cash_flow_profile].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/reposition_request.rb b/lib/mx-platform-ruby/models/reposition_request.rb new file mode 100644 index 0000000..2884f8f --- /dev/null +++ b/lib/mx-platform-ruby/models/reposition_request.rb @@ -0,0 +1,239 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RepositionRequest + # The unique identifier for the goal. Defined by MX. + attr_accessor :guid + + # The priority of the goal in relation to multiple goals. + attr_accessor :position + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'guid' => :'guid', + :'position' => :'position' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'guid' => :'String', + :'position' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::RepositionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::RepositionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + else + self.guid = nil + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + else + self.position = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @guid.nil? + invalid_properties.push('invalid value for "guid", guid cannot be nil.') + end + + if @position.nil? + invalid_properties.push('invalid value for "position", position cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @guid.nil? + return false if @position.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + guid == o.guid && + position == o.position + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [guid, position].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/reposition_request_body.rb b/lib/mx-platform-ruby/models/reposition_request_body.rb new file mode 100644 index 0000000..883c313 --- /dev/null +++ b/lib/mx-platform-ruby/models/reposition_request_body.rb @@ -0,0 +1,216 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RepositionRequestBody + attr_accessor :goals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goals' => :'goals' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goals' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::RepositionRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::RepositionRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goals') + if (value = attributes[:'goals']).is_a?(Array) + self.goals = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goals == o.goals + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goals].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/reposition_response_body.rb b/lib/mx-platform-ruby/models/reposition_response_body.rb new file mode 100644 index 0000000..009d984 --- /dev/null +++ b/lib/mx-platform-ruby/models/reposition_response_body.rb @@ -0,0 +1,216 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RepositionResponseBody + attr_accessor :goals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goals' => :'goals' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goals' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::RepositionResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::RepositionResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goals') + if (value = attributes[:'goals']).is_a?(Array) + self.goals = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goals == o.goals + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goals].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/reward_response.rb b/lib/mx-platform-ruby/models/reward_response.rb index 82597f5..bc77052 100644 --- a/lib/mx-platform-ruby/models/reward_response.rb +++ b/lib/mx-platform-ruby/models/reward_response.rb @@ -33,6 +33,8 @@ class RewardResponse attr_accessor :unit_type + attr_accessor :updated_at + attr_accessor :user_guid # Attribute mapping from ruby-style variable name to JSON key. @@ -47,6 +49,7 @@ def self.attribute_map :'guid' => :'guid', :'member_guid' => :'member_guid', :'unit_type' => :'unit_type', + :'updated_at' => :'updated_at', :'user_guid' => :'user_guid' } end @@ -68,6 +71,7 @@ def self.openapi_types :'guid' => :'String', :'member_guid' => :'String', :'unit_type' => :'String', + :'updated_at' => :'String', :'user_guid' => :'String' } end @@ -129,6 +133,10 @@ def initialize(attributes = {}) self.unit_type = attributes[:'unit_type'] end + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + if attributes.key?(:'user_guid') self.user_guid = attributes[:'user_guid'] end @@ -163,6 +171,7 @@ def ==(o) guid == o.guid && member_guid == o.member_guid && unit_type == o.unit_type && + updated_at == o.updated_at && user_guid == o.user_guid end @@ -175,7 +184,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_guid, balance_type, balance, created_at, description, expires_on, guid, member_guid, unit_type, user_guid].hash + [account_guid, balance_type, balance, created_at, description, expires_on, guid, member_guid, unit_type, updated_at, user_guid].hash end # Builds the object from hash diff --git a/lib/mx-platform-ruby/models/rewards_response.rb b/lib/mx-platform-ruby/models/rewards_response.rb index c8571da..9948185 100644 --- a/lib/mx-platform-ruby/models/rewards_response.rb +++ b/lib/mx-platform-ruby/models/rewards_response.rb @@ -33,6 +33,8 @@ class RewardsResponse attr_accessor :unit_type + attr_accessor :updated_at + attr_accessor :user_guid # Attribute mapping from ruby-style variable name to JSON key. @@ -47,6 +49,7 @@ def self.attribute_map :'guid' => :'guid', :'member_guid' => :'member_guid', :'unit_type' => :'unit_type', + :'updated_at' => :'updated_at', :'user_guid' => :'user_guid' } end @@ -68,6 +71,7 @@ def self.openapi_types :'guid' => :'String', :'member_guid' => :'String', :'unit_type' => :'String', + :'updated_at' => :'String', :'user_guid' => :'String' } end @@ -129,6 +133,10 @@ def initialize(attributes = {}) self.unit_type = attributes[:'unit_type'] end + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + if attributes.key?(:'user_guid') self.user_guid = attributes[:'user_guid'] end @@ -163,6 +171,7 @@ def ==(o) guid == o.guid && member_guid == o.member_guid && unit_type == o.unit_type && + updated_at == o.updated_at && user_guid == o.user_guid end @@ -175,7 +184,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_guid, balance_type, balance, created_at, description, expires_on, guid, member_guid, unit_type, user_guid].hash + [account_guid, balance_type, balance, created_at, description, expires_on, guid, member_guid, unit_type, updated_at, user_guid].hash end # Builds the object from hash diff --git a/lib/mx-platform-ruby/models/split_transaction_request.rb b/lib/mx-platform-ruby/models/split_transaction_request.rb new file mode 100644 index 0000000..274f11d --- /dev/null +++ b/lib/mx-platform-ruby/models/split_transaction_request.rb @@ -0,0 +1,252 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class SplitTransactionRequest + # Amount of money you want to re-categorize. + attr_accessor :amount + + # Description for the split transaction. + attr_accessor :description + + # Unique identifier of the category. + attr_accessor :category_guid + + # Memo for the split transaction + attr_accessor :memo + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount' => :'amount', + :'description' => :'description', + :'category_guid' => :'category_guid', + :'memo' => :'memo' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'amount' => :'Float', + :'description' => :'String', + :'category_guid' => :'String', + :'memo' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::SplitTransactionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::SplitTransactionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + else + self.amount = nil + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'category_guid') + self.category_guid = attributes[:'category_guid'] + end + + if attributes.key?(:'memo') + self.memo = attributes[:'memo'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @amount.nil? + invalid_properties.push('invalid value for "amount", amount cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @amount.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + amount == o.amount && + description == o.description && + category_guid == o.category_guid && + memo == o.memo + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [amount, description, category_guid, memo].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/split_transaction_request_body.rb b/lib/mx-platform-ruby/models/split_transaction_request_body.rb new file mode 100644 index 0000000..2b7c5f7 --- /dev/null +++ b/lib/mx-platform-ruby/models/split_transaction_request_body.rb @@ -0,0 +1,221 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class SplitTransactionRequestBody + attr_accessor :transactions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transactions' => :'transactions' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'transactions' => :'SplitTransactionRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::SplitTransactionRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::SplitTransactionRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'transactions') + self.transactions = attributes[:'transactions'] + else + self.transactions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @transactions.nil? + invalid_properties.push('invalid value for "transactions", transactions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @transactions.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transactions == o.transactions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [transactions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/split_transactions_response_body.rb b/lib/mx-platform-ruby/models/split_transactions_response_body.rb new file mode 100644 index 0000000..04c8fe6 --- /dev/null +++ b/lib/mx-platform-ruby/models/split_transactions_response_body.rb @@ -0,0 +1,216 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class SplitTransactionsResponseBody + attr_accessor :transactions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transactions' => :'transactions' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'transactions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::SplitTransactionsResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::SplitTransactionsResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'transactions') + if (value = attributes[:'transactions']).is_a?(Array) + self.transactions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transactions == o.transactions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [transactions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/update_goal_request.rb b/lib/mx-platform-ruby/models/update_goal_request.rb new file mode 100644 index 0000000..5899683 --- /dev/null +++ b/lib/mx-platform-ruby/models/update_goal_request.rb @@ -0,0 +1,315 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class UpdateGoalRequest + # Unique identifier of the account for the goal. + attr_accessor :account_guid + + # Amount of the goal. + attr_accessor :amount + + # The goal type. + attr_accessor :goal_type_name + + # The category of the goal. + attr_accessor :meta_type_name + + # The name of the goal. + attr_accessor :name + + # Date and time the goal was completed. + attr_accessor :completed_at + + # Determines if the goal has been spent. + attr_accessor :has_been_spent + + # Determines if the goal is complete. + attr_accessor :is_complete + + # Additional information a partner can store on the goal. + attr_accessor :metadata + + # The priority of the goal in relation to multiple goals. + attr_accessor :position + + # Date and time the goal is to complete. Intended for users to set their own goal completion dates. + attr_accessor :targeted_to_complete_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'amount' => :'amount', + :'goal_type_name' => :'goal_type_name', + :'meta_type_name' => :'meta_type_name', + :'name' => :'name', + :'completed_at' => :'completed_at', + :'has_been_spent' => :'has_been_spent', + :'is_complete' => :'is_complete', + :'metadata' => :'metadata', + :'position' => :'position', + :'targeted_to_complete_at' => :'targeted_to_complete_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_guid' => :'String', + :'amount' => :'Float', + :'goal_type_name' => :'String', + :'meta_type_name' => :'String', + :'name' => :'String', + :'completed_at' => :'String', + :'has_been_spent' => :'Boolean', + :'is_complete' => :'Boolean', + :'metadata' => :'String', + :'position' => :'Integer', + :'targeted_to_complete_at' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::UpdateGoalRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::UpdateGoalRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_guid') + self.account_guid = attributes[:'account_guid'] + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'goal_type_name') + self.goal_type_name = attributes[:'goal_type_name'] + end + + if attributes.key?(:'meta_type_name') + self.meta_type_name = attributes[:'meta_type_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'has_been_spent') + self.has_been_spent = attributes[:'has_been_spent'] + end + + if attributes.key?(:'is_complete') + self.is_complete = attributes[:'is_complete'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'targeted_to_complete_at') + self.targeted_to_complete_at = attributes[:'targeted_to_complete_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_guid == o.account_guid && + amount == o.amount && + goal_type_name == o.goal_type_name && + meta_type_name == o.meta_type_name && + name == o.name && + completed_at == o.completed_at && + has_been_spent == o.has_been_spent && + is_complete == o.is_complete && + metadata == o.metadata && + position == o.position && + targeted_to_complete_at == o.targeted_to_complete_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_guid, amount, goal_type_name, meta_type_name, name, completed_at, has_been_spent, is_complete, metadata, position, targeted_to_complete_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/update_goal_request_body.rb b/lib/mx-platform-ruby/models/update_goal_request_body.rb new file mode 100644 index 0000000..4140167 --- /dev/null +++ b/lib/mx-platform-ruby/models/update_goal_request_body.rb @@ -0,0 +1,214 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class UpdateGoalRequestBody + attr_accessor :goal + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'goal' => :'goal' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'goal' => :'UpdateGoalRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::UpdateGoalRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::UpdateGoalRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'goal') + self.goal = attributes[:'goal'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + goal == o.goal + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [goal].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/version.rb b/lib/mx-platform-ruby/version.rb index d9efc16..59d7815 100644 --- a/lib/mx-platform-ruby/version.rb +++ b/lib/mx-platform-ruby/version.rb @@ -11,5 +11,5 @@ =end module MxPlatformRuby - VERSION = '0.39.0' + VERSION = '0.40.0' end diff --git a/openapi/config.yml b/openapi/config.yml index d8e1f1d..3e35a69 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -6,6 +6,6 @@ gemHomepage: https://github.com/mxenabled/mx-platform-ruby gemLicense: MIT gemName: mx-platform-ruby gemRequiredRubyVersion: ">= 2.6" -gemVersion: 0.39.0 +gemVersion: 0.40.0 library: faraday moduleName: MxPlatformRuby diff --git a/spec/api/budgets_api_spec.rb b/spec/api/budgets_api_spec.rb new file mode 100644 index 0000000..dc69c44 --- /dev/null +++ b/spec/api/budgets_api_spec.rb @@ -0,0 +1,112 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for MxPlatformRuby::BudgetsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'BudgetsApi' do + before do + # run before each test + @api_instance = MxPlatformRuby::BudgetsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of BudgetsApi' do + it 'should create an instance of BudgetsApi' do + expect(@api_instance).to be_instance_of(MxPlatformRuby::BudgetsApi) + end + end + + # unit tests for users_user_guid_budgets_budget_guid_delete + # Delete a budget + # Delete a budget. + # @param user_guid The unique identifier for the budget. Defined by MX. + # @param budget_guid The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'users_user_guid_budgets_budget_guid_delete test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_budgets_budget_guid_get + # Read a specific budget + # Read a specific budget. + # @param budget_guid The unique identifier for the budget. Defined by MX. + # @param user_guid The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + describe 'users_user_guid_budgets_budget_guid_get test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_budgets_budget_guid_put + # Update a specific budget + # Update a specific budget. + # @param user_guid The unique identifier for the budget. Defined by MX. + # @param budget_guid The unique identifier for the budget. Defined by MX. + # @param [Hash] opts the optional parameters + # @option opts [BudgetUpdateRequestBody] :budget_update_request_body + # @return [BudgetResponseBody] + describe 'users_user_guid_budgets_budget_guid_put test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_budgets_generate_post + # Auto-generate budgets + # 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`. + # @param user_guid The unique identifier for the user. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + describe 'users_user_guid_budgets_generate_post test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_budgets_get + # List all budgets + # List all budgets + # @param user_guid The unique identifier for the user. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + describe 'users_user_guid_budgets_get test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_budgets_post + # Create a budget + # 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. + # @param user_guid The unique identifier for the user. Defined by MX. + # @param budget_create_request_body + # @param [Hash] opts the optional parameters + # @return [BudgetResponseBody] + describe 'users_user_guid_budgets_post test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/goals_api_spec.rb b/spec/api/goals_api_spec.rb new file mode 100644 index 0000000..c9546d8 --- /dev/null +++ b/spec/api/goals_api_spec.rb @@ -0,0 +1,115 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for MxPlatformRuby::GoalsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GoalsApi' do + before do + # run before each test + @api_instance = MxPlatformRuby::GoalsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of GoalsApi' do + it 'should create an instance of GoalsApi' do + expect(@api_instance).to be_instance_of(MxPlatformRuby::GoalsApi) + end + end + + # unit tests for users_user_guid_goals_get + # List goals + # List all goals a user can set. + # @param user_guid The unique identifier for the user. + # @param [Hash] opts the optional parameters + # @option opts [String] :page Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified. + # @option opts [String] :records_per_age The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used. + # @return [GoalsResponseBody] + describe 'users_user_guid_goals_get test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_goals_goal_guid_delete + # Delete a goal + # Delete a goal. + # @param goal_guid The unique identifier for a goal. Defined by MX. + # @param user_guid The unique identifier for a user. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'users_user_guid_goals_goal_guid_delete test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_goals_goal_guid_get + # Read a goal + # Read a specific goal. + # @param goal_guid The unique identifier for a goal. Defined by MX. + # @param user_guid The unique identifier for a user. + # @param [Hash] opts the optional parameters + # @return [GoalResponseBody] + describe 'users_user_guid_goals_goal_guid_get test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_goals_goal_guid_put + # Update a goal + # This endpoint updates a specific goal. + # @param goal_guid The unique identifier for a goal. Defined by MX. + # @param user_guid The unique identifier for a user. + # @param update_goal_request_body + # @param [Hash] opts the optional parameters + # @return [GoalResponseBody] + describe 'users_user_guid_goals_goal_guid_put test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_goals_post + # Create a goal + # Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. + # @param user_guid The unique identifier for the user. + # @param goal_request_body + # @param [Hash] opts the optional parameters + # @return [GoalResponseBody] + describe 'users_user_guid_goals_post test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_goals_reposition_put + # Reposition goals + # This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly. + # @param user_guid The unique identifier for the user. + # @param reposition_request_body + # @param [Hash] opts the optional parameters + # @return [RepositionResponseBody] + describe 'users_user_guid_goals_reposition_put test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/mx_platform_api_spec.rb b/spec/api/mx_platform_api_spec.rb index f16f395..bd39e75 100644 --- a/spec/api/mx_platform_api_spec.rb +++ b/spec/api/mx_platform_api_spec.rb @@ -1450,6 +1450,57 @@ end end + # unit tests for users_user_guid_monthly_cash_flow_profile_get + # Read monthly cash flow profile + # @param user_guid The unique identifier for the user. + # @param [Hash] opts the optional parameters + # @return [MonthlyCashFlowResponseBody] + describe 'users_user_guid_monthly_cash_flow_profile_get test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_monthly_cash_flow_profile_put + # Update monthly cash flow profile + # Use this endpoint to update the attributes of a `monthly_cash_flow_profile`. + # @param user_guid The unique identifier for the user. + # @param monthly_cash_flow_profile_request_body + # @param [Hash] opts the optional parameters + # @return [MonthlyCashFlowResponseBody] + describe 'users_user_guid_monthly_cash_flow_profile_put test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_transactions_transaction_guid_split_delete + # Delete split transactions + # 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. + # @param transaction_guid The unique id for a `transaction`. + # @param user_guid The unique id for a `user`. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'users_user_guid_transactions_transaction_guid_split_delete test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for users_user_guid_transactions_transaction_guid_split_post + # Create split transactions + # 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. + # @param user_guid The unique identifier for the user. Defined by MX. + # @param transaction_guid The unique identifier for the transaction. Defined by MX. + # @param [Hash] opts the optional parameters + # @option opts [SplitTransactionRequestBody] :split_transaction_request_body + # @return [SplitTransactionsResponseBody] + describe 'users_user_guid_transactions_transaction_guid_split_post test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for verify_member # Verify member # The verify endpoint begins a verification process for a member. diff --git a/spec/models/budget_create_request_body_spec.rb b/spec/models/budget_create_request_body_spec.rb new file mode 100644 index 0000000..43826e4 --- /dev/null +++ b/spec/models/budget_create_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::BudgetCreateRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::BudgetCreateRequestBody do + let(:instance) { MxPlatformRuby::BudgetCreateRequestBody.new } + + describe 'test an instance of BudgetCreateRequestBody' do + it 'should create an instance of BudgetCreateRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::BudgetCreateRequestBody) + end + end + describe 'test attribute "budget"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/budget_create_request_spec.rb b/spec/models/budget_create_request_spec.rb new file mode 100644 index 0000000..2fdc78a --- /dev/null +++ b/spec/models/budget_create_request_spec.rb @@ -0,0 +1,58 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::BudgetCreateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::BudgetCreateRequest do + let(:instance) { MxPlatformRuby::BudgetCreateRequest.new } + + describe 'test an instance of BudgetCreateRequest' do + it 'should create an instance of BudgetCreateRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::BudgetCreateRequest) + end + end + describe 'test attribute "category_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "parent_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "skip_webhook"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/budget_response_body_spec.rb b/spec/models/budget_response_body_spec.rb new file mode 100644 index 0000000..4325e7d --- /dev/null +++ b/spec/models/budget_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::BudgetResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::BudgetResponseBody do + let(:instance) { MxPlatformRuby::BudgetResponseBody.new } + + describe 'test an instance of BudgetResponseBody' do + it 'should create an instance of BudgetResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::BudgetResponseBody) + end + end + describe 'test attribute "budget"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/budget_response_spec.rb b/spec/models/budget_response_spec.rb new file mode 100644 index 0000000..a20daa2 --- /dev/null +++ b/spec/models/budget_response_spec.rb @@ -0,0 +1,124 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::BudgetResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::BudgetResponse do + let(:instance) { MxPlatformRuby::BudgetResponse.new } + + describe 'test an instance of BudgetResponse' do + it 'should create an instance of BudgetResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::BudgetResponse) + end + end + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "category_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_exceeded"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_off_track"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "off_track_percentage"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "parent_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "percent_spent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "projected_spending"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "revision"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "transaction_total"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/budget_update_request_body_spec.rb b/spec/models/budget_update_request_body_spec.rb new file mode 100644 index 0000000..f449756 --- /dev/null +++ b/spec/models/budget_update_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::BudgetUpdateRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::BudgetUpdateRequestBody do + let(:instance) { MxPlatformRuby::BudgetUpdateRequestBody.new } + + describe 'test an instance of BudgetUpdateRequestBody' do + it 'should create an instance of BudgetUpdateRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::BudgetUpdateRequestBody) + end + end + describe 'test attribute "budget"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/budget_update_request_spec.rb b/spec/models/budget_update_request_spec.rb new file mode 100644 index 0000000..d719694 --- /dev/null +++ b/spec/models/budget_update_request_spec.rb @@ -0,0 +1,46 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::BudgetUpdateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::BudgetUpdateRequest do + let(:instance) { MxPlatformRuby::BudgetUpdateRequest.new } + + describe 'test an instance of BudgetUpdateRequest' do + it 'should create an instance of BudgetUpdateRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::BudgetUpdateRequest) + end + end + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "skip_webhook"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/credit_card_product_response_spec.rb b/spec/models/credit_card_product_response_spec.rb index 3b7a587..ce93898 100644 --- a/spec/models/credit_card_product_response_spec.rb +++ b/spec/models/credit_card_product_response_spec.rb @@ -25,7 +25,7 @@ expect(instance).to be_instance_of(MxPlatformRuby::CreditCardProductResponse) end end - describe 'test attribute "reward"' do + describe 'test attribute "credit_card_product"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/models/credit_card_product_spec.rb b/spec/models/credit_card_product_spec.rb index fb84847..0302043 100644 --- a/spec/models/credit_card_product_spec.rb +++ b/spec/models/credit_card_product_spec.rb @@ -85,13 +85,13 @@ end end - describe 'test attribute "financial_institution"' do + describe 'test attribute "is_accepting_applicants"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "is_accepting_applications"' do + describe 'test attribute "is_active_credit_card_product"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/models/goal_request_body_spec.rb b/spec/models/goal_request_body_spec.rb new file mode 100644 index 0000000..f802b45 --- /dev/null +++ b/spec/models/goal_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::GoalRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::GoalRequestBody do + let(:instance) { MxPlatformRuby::GoalRequestBody.new } + + describe 'test an instance of GoalRequestBody' do + it 'should create an instance of GoalRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::GoalRequestBody) + end + end + describe 'test attribute "goal"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/goal_request_spec.rb b/spec/models/goal_request_spec.rb new file mode 100644 index 0000000..e33f9dc --- /dev/null +++ b/spec/models/goal_request_spec.rb @@ -0,0 +1,94 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::GoalRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::GoalRequest do + let(:instance) { MxPlatformRuby::GoalRequest.new } + + describe 'test an instance of GoalRequest' do + it 'should create an instance of GoalRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::GoalRequest) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "goal_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_been_spent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_complete"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "targeted_to_complete_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/goal_response_body_spec.rb b/spec/models/goal_response_body_spec.rb new file mode 100644 index 0000000..31089e0 --- /dev/null +++ b/spec/models/goal_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::GoalResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::GoalResponseBody do + let(:instance) { MxPlatformRuby::GoalResponseBody.new } + + describe 'test an instance of GoalResponseBody' do + it 'should create an instance of GoalResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::GoalResponseBody) + end + end + describe 'test attribute "goal"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/goal_response_spec.rb b/spec/models/goal_response_spec.rb new file mode 100644 index 0000000..1600ae5 --- /dev/null +++ b/spec/models/goal_response_spec.rb @@ -0,0 +1,124 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::GoalResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::GoalResponse do + let(:instance) { MxPlatformRuby::GoalResponse.new } + + describe 'test an instance of GoalResponse' do + it 'should create an instance of GoalResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::GoalResponse) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "current_amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "goal_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_been_spent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_complete"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "projected_to_complete_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "targeted_to_complete_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "track_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/goals_response_body_spec.rb b/spec/models/goals_response_body_spec.rb new file mode 100644 index 0000000..80064e8 --- /dev/null +++ b/spec/models/goals_response_body_spec.rb @@ -0,0 +1,40 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::GoalsResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::GoalsResponseBody do + let(:instance) { MxPlatformRuby::GoalsResponseBody.new } + + describe 'test an instance of GoalsResponseBody' do + it 'should create an instance of GoalsResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::GoalsResponseBody) + end + end + describe 'test attribute "goals"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pagination"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/goals_response_spec.rb b/spec/models/goals_response_spec.rb new file mode 100644 index 0000000..bf42286 --- /dev/null +++ b/spec/models/goals_response_spec.rb @@ -0,0 +1,124 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::GoalsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::GoalsResponse do + let(:instance) { MxPlatformRuby::GoalsResponse.new } + + describe 'test an instance of GoalsResponse' do + it 'should create an instance of GoalsResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::GoalsResponse) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "current_amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "goal_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_been_spent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_complete"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "projected_to_complete_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "targeted_to_complete_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "track_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/monthly_cash_flow_profile_request_body_spec.rb b/spec/models/monthly_cash_flow_profile_request_body_spec.rb new file mode 100644 index 0000000..57f978d --- /dev/null +++ b/spec/models/monthly_cash_flow_profile_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::MonthlyCashFlowProfileRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::MonthlyCashFlowProfileRequestBody do + let(:instance) { MxPlatformRuby::MonthlyCashFlowProfileRequestBody.new } + + describe 'test an instance of MonthlyCashFlowProfileRequestBody' do + it 'should create an instance of MonthlyCashFlowProfileRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::MonthlyCashFlowProfileRequestBody) + end + end + describe 'test attribute "institution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/monthly_cash_flow_profile_request_spec.rb b/spec/models/monthly_cash_flow_profile_request_spec.rb new file mode 100644 index 0000000..2c2a12b --- /dev/null +++ b/spec/models/monthly_cash_flow_profile_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::MonthlyCashFlowProfileRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::MonthlyCashFlowProfileRequest do + let(:instance) { MxPlatformRuby::MonthlyCashFlowProfileRequest.new } + + describe 'test an instance of MonthlyCashFlowProfileRequest' do + it 'should create an instance of MonthlyCashFlowProfileRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::MonthlyCashFlowProfileRequest) + end + end + describe 'test attribute "goals_contribution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uses_estimated_goals_contribution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/monthly_cash_flow_response_body_spec.rb b/spec/models/monthly_cash_flow_response_body_spec.rb new file mode 100644 index 0000000..36ab400 --- /dev/null +++ b/spec/models/monthly_cash_flow_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::MonthlyCashFlowResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::MonthlyCashFlowResponseBody do + let(:instance) { MxPlatformRuby::MonthlyCashFlowResponseBody.new } + + describe 'test an instance of MonthlyCashFlowResponseBody' do + it 'should create an instance of MonthlyCashFlowResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::MonthlyCashFlowResponseBody) + end + end + describe 'test attribute "monthly_cash_flow_profile"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/monthly_cash_flow_response_spec.rb b/spec/models/monthly_cash_flow_response_spec.rb new file mode 100644 index 0000000..94a4f7c --- /dev/null +++ b/spec/models/monthly_cash_flow_response_spec.rb @@ -0,0 +1,70 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::MonthlyCashFlowResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::MonthlyCashFlowResponse do + let(:instance) { MxPlatformRuby::MonthlyCashFlowResponse.new } + + describe 'test an instance of MonthlyCashFlowResponse' do + it 'should create an instance of MonthlyCashFlowResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::MonthlyCashFlowResponse) + end + end + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "budgeted_income"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "budgeted_expenses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "goals_contribution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "estimated_goals_contribution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uses_estimated_goals_contribution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/reposition_request_body_spec.rb b/spec/models/reposition_request_body_spec.rb new file mode 100644 index 0000000..29206b0 --- /dev/null +++ b/spec/models/reposition_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RepositionRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RepositionRequestBody do + let(:instance) { MxPlatformRuby::RepositionRequestBody.new } + + describe 'test an instance of RepositionRequestBody' do + it 'should create an instance of RepositionRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::RepositionRequestBody) + end + end + describe 'test attribute "goals"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/reposition_request_spec.rb b/spec/models/reposition_request_spec.rb new file mode 100644 index 0000000..976e7e7 --- /dev/null +++ b/spec/models/reposition_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RepositionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RepositionRequest do + let(:instance) { MxPlatformRuby::RepositionRequest.new } + + describe 'test an instance of RepositionRequest' do + it 'should create an instance of RepositionRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::RepositionRequest) + end + end + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/reposition_response_body_spec.rb b/spec/models/reposition_response_body_spec.rb new file mode 100644 index 0000000..c8fb08e --- /dev/null +++ b/spec/models/reposition_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RepositionResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RepositionResponseBody do + let(:instance) { MxPlatformRuby::RepositionResponseBody.new } + + describe 'test an instance of RepositionResponseBody' do + it 'should create an instance of RepositionResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::RepositionResponseBody) + end + end + describe 'test attribute "goals"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/reward_response_spec.rb b/spec/models/reward_response_spec.rb index 6baca29..77d736b 100644 --- a/spec/models/reward_response_spec.rb +++ b/spec/models/reward_response_spec.rb @@ -79,6 +79,12 @@ end end + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "user_guid"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/rewards_response_spec.rb b/spec/models/rewards_response_spec.rb index 625f646..f8d3164 100644 --- a/spec/models/rewards_response_spec.rb +++ b/spec/models/rewards_response_spec.rb @@ -79,6 +79,12 @@ end end + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "user_guid"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/split_transaction_request_body_spec.rb b/spec/models/split_transaction_request_body_spec.rb new file mode 100644 index 0000000..8e04120 --- /dev/null +++ b/spec/models/split_transaction_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::SplitTransactionRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::SplitTransactionRequestBody do + let(:instance) { MxPlatformRuby::SplitTransactionRequestBody.new } + + describe 'test an instance of SplitTransactionRequestBody' do + it 'should create an instance of SplitTransactionRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::SplitTransactionRequestBody) + end + end + describe 'test attribute "transactions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/split_transaction_request_spec.rb b/spec/models/split_transaction_request_spec.rb new file mode 100644 index 0000000..4c50c30 --- /dev/null +++ b/spec/models/split_transaction_request_spec.rb @@ -0,0 +1,52 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::SplitTransactionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::SplitTransactionRequest do + let(:instance) { MxPlatformRuby::SplitTransactionRequest.new } + + describe 'test an instance of SplitTransactionRequest' do + it 'should create an instance of SplitTransactionRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::SplitTransactionRequest) + end + end + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "category_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "memo"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/split_transactions_response_body_spec.rb b/spec/models/split_transactions_response_body_spec.rb new file mode 100644 index 0000000..2f3bac8 --- /dev/null +++ b/spec/models/split_transactions_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::SplitTransactionsResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::SplitTransactionsResponseBody do + let(:instance) { MxPlatformRuby::SplitTransactionsResponseBody.new } + + describe 'test an instance of SplitTransactionsResponseBody' do + it 'should create an instance of SplitTransactionsResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::SplitTransactionsResponseBody) + end + end + describe 'test attribute "transactions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/update_goal_request_body_spec.rb b/spec/models/update_goal_request_body_spec.rb new file mode 100644 index 0000000..c6db0e9 --- /dev/null +++ b/spec/models/update_goal_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::UpdateGoalRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::UpdateGoalRequestBody do + let(:instance) { MxPlatformRuby::UpdateGoalRequestBody.new } + + describe 'test an instance of UpdateGoalRequestBody' do + it 'should create an instance of UpdateGoalRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::UpdateGoalRequestBody) + end + end + describe 'test attribute "goal"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/update_goal_request_spec.rb b/spec/models/update_goal_request_spec.rb new file mode 100644 index 0000000..7102ca3 --- /dev/null +++ b/spec/models/update_goal_request_spec.rb @@ -0,0 +1,94 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::UpdateGoalRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::UpdateGoalRequest do + let(:instance) { MxPlatformRuby::UpdateGoalRequest.new } + + describe 'test an instance of UpdateGoalRequest' do + it 'should create an instance of UpdateGoalRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::UpdateGoalRequest) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "goal_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_been_spent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_complete"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "targeted_to_complete_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end