apimatic-mx-apis-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +207 -0
- data/bin/console +15 -0
- data/lib/mx_platform_api/api_helper.rb +10 -0
- data/lib/mx_platform_api/apis/accounts_api.rb +619 -0
- data/lib/mx_platform_api/apis/ach_return_api.rb +115 -0
- data/lib/mx_platform_api/apis/base_api.rb +67 -0
- data/lib/mx_platform_api/apis/budgets_api.rb +212 -0
- data/lib/mx_platform_api/apis/categories_api.rb +377 -0
- data/lib/mx_platform_api/apis/goals_api.rb +223 -0
- data/lib/mx_platform_api/apis/insights_api.rb +415 -0
- data/lib/mx_platform_api/apis/institutions_api.rb +159 -0
- data/lib/mx_platform_api/apis/investment_holdings_api.rb +191 -0
- data/lib/mx_platform_api/apis/jobs_api.rb +48 -0
- data/lib/mx_platform_api/apis/managed_data_deprecated_api.rb +773 -0
- data/lib/mx_platform_api/apis/members_api.rb +639 -0
- data/lib/mx_platform_api/apis/merchants_api.rb +98 -0
- data/lib/mx_platform_api/apis/microdeposits_api.rb +219 -0
- data/lib/mx_platform_api/apis/monthly_cash_flow_profile_api.rb +75 -0
- data/lib/mx_platform_api/apis/notifications_api.rb +115 -0
- data/lib/mx_platform_api/apis/processor_token_api.rb +141 -0
- data/lib/mx_platform_api/apis/rewards_api.rb +149 -0
- data/lib/mx_platform_api/apis/spending_plan_api.rb +621 -0
- data/lib/mx_platform_api/apis/statements_api.rb +165 -0
- data/lib/mx_platform_api/apis/taggings_api.rb +184 -0
- data/lib/mx_platform_api/apis/tags_api.rb +185 -0
- data/lib/mx_platform_api/apis/transaction_rules_api.rb +163 -0
- data/lib/mx_platform_api/apis/transactions_api.rb +1223 -0
- data/lib/mx_platform_api/apis/users_api.rb +188 -0
- data/lib/mx_platform_api/apis/verifiable_credentials_api.rb +114 -0
- data/lib/mx_platform_api/apis/widgets_api.rb +135 -0
- data/lib/mx_platform_api/client.rb +225 -0
- data/lib/mx_platform_api/configuration.rb +182 -0
- data/lib/mx_platform_api/exceptions/api_exception.rb +21 -0
- data/lib/mx_platform_api/http/api_response.rb +19 -0
- data/lib/mx_platform_api/http/auth/basic_auth.rb +62 -0
- data/lib/mx_platform_api/http/auth/bearer_auth.rb +53 -0
- data/lib/mx_platform_api/http/http_call_back.rb +10 -0
- data/lib/mx_platform_api/http/http_method_enum.rb +10 -0
- data/lib/mx_platform_api/http/http_request.rb +10 -0
- data/lib/mx_platform_api/http/http_response.rb +10 -0
- data/lib/mx_platform_api/http/proxy_settings.rb +22 -0
- data/lib/mx_platform_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/mx_platform_api/logging/sdk_logger.rb +17 -0
- data/lib/mx_platform_api/models/account_create_request.rb +309 -0
- data/lib/mx_platform_api/models/account_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/account_number.rb +199 -0
- data/lib/mx_platform_api/models/account_number_response.rb +215 -0
- data/lib/mx_platform_api/models/account_numbers_response_body.rb +95 -0
- data/lib/mx_platform_api/models/account_owner.rb +186 -0
- data/lib/mx_platform_api/models/account_owner_response.rb +219 -0
- data/lib/mx_platform_api/models/account_owners_response_body.rb +95 -0
- data/lib/mx_platform_api/models/account_ownership.rb +45 -0
- data/lib/mx_platform_api/models/account_response.rb +814 -0
- data/lib/mx_platform_api/models/account_response_body.rb +75 -0
- data/lib/mx_platform_api/models/account_type.rb +80 -0
- data/lib/mx_platform_api/models/account_type1.rb +80 -0
- data/lib/mx_platform_api/models/account_update_request.rb +301 -0
- data/lib/mx_platform_api/models/account_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/accounts_merge_request.rb +75 -0
- data/lib/mx_platform_api/models/accounts_merge_request_body.rb +75 -0
- data/lib/mx_platform_api/models/accounts_response_body.rb +94 -0
- data/lib/mx_platform_api/models/ach_response.rb +424 -0
- data/lib/mx_platform_api/models/ach_return_create_request.rb +256 -0
- data/lib/mx_platform_api/models/ach_return_create_request_body.rb +76 -0
- data/lib/mx_platform_api/models/ach_return_response_body.rb +76 -0
- data/lib/mx_platform_api/models/ach_returns_response_body.rb +95 -0
- data/lib/mx_platform_api/models/authorization_code_request.rb +77 -0
- data/lib/mx_platform_api/models/authorization_code_request_body.rb +77 -0
- data/lib/mx_platform_api/models/authorization_code_response.rb +76 -0
- data/lib/mx_platform_api/models/authorization_code_response_body.rb +77 -0
- data/lib/mx_platform_api/models/base_model.rb +110 -0
- data/lib/mx_platform_api/models/budget_create_request.rb +115 -0
- data/lib/mx_platform_api/models/budget_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/budget_response.rb +246 -0
- data/lib/mx_platform_api/models/budget_response_body.rb +75 -0
- data/lib/mx_platform_api/models/budget_update_request.rb +96 -0
- data/lib/mx_platform_api/models/budget_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/categories_response_body.rb +95 -0
- data/lib/mx_platform_api/models/category_create_request.rb +93 -0
- data/lib/mx_platform_api/models/category_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/category_response.rb +160 -0
- data/lib/mx_platform_api/models/category_response_body.rb +75 -0
- data/lib/mx_platform_api/models/category_update_request.rb +85 -0
- data/lib/mx_platform_api/models/category_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/challenge_response.rb +159 -0
- data/lib/mx_platform_api/models/challenges_response_body.rb +95 -0
- data/lib/mx_platform_api/models/channel.rb +47 -0
- data/lib/mx_platform_api/models/classification.rb +85 -0
- data/lib/mx_platform_api/models/color_scheme.rb +43 -0
- data/lib/mx_platform_api/models/connection_status.rb +118 -0
- data/lib/mx_platform_api/models/credential_request.rb +85 -0
- data/lib/mx_platform_api/models/credential_response.rb +133 -0
- data/lib/mx_platform_api/models/credentials_response_body.rb +95 -0
- data/lib/mx_platform_api/models/credit_card_product.rb +276 -0
- data/lib/mx_platform_api/models/credit_card_product_response.rb +77 -0
- data/lib/mx_platform_api/models/data_request.rb +76 -0
- data/lib/mx_platform_api/models/date_range.rb +87 -0
- data/lib/mx_platform_api/models/date_range_category_totals_response.rb +115 -0
- data/lib/mx_platform_api/models/date_range_category_totals_response_body.rb +88 -0
- data/lib/mx_platform_api/models/deep_link_params.rb +131 -0
- data/lib/mx_platform_api/models/enhance_transaction_response.rb +371 -0
- data/lib/mx_platform_api/models/enhance_transactions_request.rb +143 -0
- data/lib/mx_platform_api/models/enhance_transactions_request_body.rb +85 -0
- data/lib/mx_platform_api/models/enhance_transactions_response_body.rb +85 -0
- data/lib/mx_platform_api/models/error.rb +106 -0
- data/lib/mx_platform_api/models/federal_insurance_status.rb +42 -0
- data/lib/mx_platform_api/models/geolocation.rb +108 -0
- data/lib/mx_platform_api/models/goal_request.rb +179 -0
- data/lib/mx_platform_api/models/goal_request_body.rb +74 -0
- data/lib/mx_platform_api/models/goal_response.rb +241 -0
- data/lib/mx_platform_api/models/goal_response_body.rb +74 -0
- data/lib/mx_platform_api/models/goal_type_name.rb +36 -0
- data/lib/mx_platform_api/models/goals_response.rb +241 -0
- data/lib/mx_platform_api/models/goals_response_body.rb +94 -0
- data/lib/mx_platform_api/models/image_option_response.rb +110 -0
- data/lib/mx_platform_api/models/insight_response.rb +338 -0
- data/lib/mx_platform_api/models/insight_response_body.rb +75 -0
- data/lib/mx_platform_api/models/insight_update_request.rb +87 -0
- data/lib/mx_platform_api/models/insight_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/insights_response_body.rb +94 -0
- data/lib/mx_platform_api/models/institution_response.rb +290 -0
- data/lib/mx_platform_api/models/institution_response_body.rb +76 -0
- data/lib/mx_platform_api/models/institutions_response_body.rb +95 -0
- data/lib/mx_platform_api/models/investment_holding_response.rb +513 -0
- data/lib/mx_platform_api/models/investment_holding_response_body.rb +77 -0
- data/lib/mx_platform_api/models/investment_holdings_deactivation.rb +85 -0
- data/lib/mx_platform_api/models/investment_holdings_response_body.rb +95 -0
- data/lib/mx_platform_api/models/iso_country_code.rb +36 -0
- data/lib/mx_platform_api/models/item_type.rb +52 -0
- data/lib/mx_platform_api/models/job_response.rb +203 -0
- data/lib/mx_platform_api/models/job_response_body.rb +74 -0
- data/lib/mx_platform_api/models/managed_account_create_request.rb +422 -0
- data/lib/mx_platform_api/models/managed_account_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_account_update_request.rb +428 -0
- data/lib/mx_platform_api/models/managed_account_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_member_create_request.rb +105 -0
- data/lib/mx_platform_api/models/managed_member_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_member_update_request.rb +95 -0
- data/lib/mx_platform_api/models/managed_member_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_transaction_create_request.rb +282 -0
- data/lib/mx_platform_api/models/managed_transaction_create_request_body.rb +77 -0
- data/lib/mx_platform_api/models/managed_transaction_update_request.rb +289 -0
- data/lib/mx_platform_api/models/managed_transaction_update_request_body.rb +77 -0
- data/lib/mx_platform_api/models/member_create_request.rb +154 -0
- data/lib/mx_platform_api/models/member_create_request_body.rb +152 -0
- data/lib/mx_platform_api/models/member_elements.rb +96 -0
- data/lib/mx_platform_api/models/member_response.rb +406 -0
- data/lib/mx_platform_api/models/member_response_body.rb +75 -0
- data/lib/mx_platform_api/models/member_response_with_job_error.rb +406 -0
- data/lib/mx_platform_api/models/member_response_with_job_error_body.rb +75 -0
- data/lib/mx_platform_api/models/member_resume_request.rb +85 -0
- data/lib/mx_platform_api/models/member_resume_request_body.rb +75 -0
- data/lib/mx_platform_api/models/member_status_response.rb +236 -0
- data/lib/mx_platform_api/models/member_status_response_body.rb +75 -0
- data/lib/mx_platform_api/models/member_update_request.rb +133 -0
- data/lib/mx_platform_api/models/member_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/members_response_body.rb +94 -0
- data/lib/mx_platform_api/models/merchant.rb +105 -0
- data/lib/mx_platform_api/models/merchant_location_response.rb +208 -0
- data/lib/mx_platform_api/models/merchant_location_response_body.rb +77 -0
- data/lib/mx_platform_api/models/merchant_response.rb +136 -0
- data/lib/mx_platform_api/models/merchant_response_body.rb +75 -0
- data/lib/mx_platform_api/models/merchants_response_body.rb +95 -0
- data/lib/mx_platform_api/models/micro_deposit.rb +223 -0
- data/lib/mx_platform_api/models/microdeposit_elements.rb +141 -0
- data/lib/mx_platform_api/models/microdeposit_request_body.rb +77 -0
- data/lib/mx_platform_api/models/microdeposit_response.rb +149 -0
- data/lib/mx_platform_api/models/microdeposit_response_body.rb +85 -0
- data/lib/mx_platform_api/models/microdeposit_verify_request.rb +88 -0
- data/lib/mx_platform_api/models/microdeposit_verify_request_body.rb +77 -0
- data/lib/mx_platform_api/models/microdeposits_response_body.rb +95 -0
- data/lib/mx_platform_api/models/monthly_account_balance.rb +123 -0
- data/lib/mx_platform_api/models/monthly_account_balances_response_body.rb +85 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_profile_request.rb +95 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_profile_request_body.rb +81 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_response.rb +157 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_response_body.rb +81 -0
- data/lib/mx_platform_api/models/notification_request.rb +83 -0
- data/lib/mx_platform_api/models/notification_request_body.rb +76 -0
- data/lib/mx_platform_api/models/notification_response.rb +204 -0
- data/lib/mx_platform_api/models/notification_response_body.rb +76 -0
- data/lib/mx_platform_api/models/notifications_response_body.rb +85 -0
- data/lib/mx_platform_api/models/oauth_window_response.rb +91 -0
- data/lib/mx_platform_api/models/oauth_window_response_body.rb +75 -0
- data/lib/mx_platform_api/models/option_response.rb +99 -0
- data/lib/mx_platform_api/models/pagination_response.rb +106 -0
- data/lib/mx_platform_api/models/parent_class.rb +84 -0
- data/lib/mx_platform_api/models/payment_account.rb +183 -0
- data/lib/mx_platform_api/models/payment_account1.rb +213 -0
- data/lib/mx_platform_api/models/payment_account_body.rb +77 -0
- data/lib/mx_platform_api/models/processor_account_number.rb +168 -0
- data/lib/mx_platform_api/models/processor_account_number_body.rb +85 -0
- data/lib/mx_platform_api/models/processor_owner.rb +155 -0
- data/lib/mx_platform_api/models/processor_owner_body.rb +95 -0
- data/lib/mx_platform_api/models/property_type.rb +69 -0
- data/lib/mx_platform_api/models/recurrence_type.rb +26 -0
- data/lib/mx_platform_api/models/repeating_transaction.rb +102 -0
- data/lib/mx_platform_api/models/repeating_transaction_response.rb +203 -0
- data/lib/mx_platform_api/models/repeating_transaction_type.rb +44 -0
- data/lib/mx_platform_api/models/repeating_transactions_response_body.rb +85 -0
- data/lib/mx_platform_api/models/reposition_request.rb +82 -0
- data/lib/mx_platform_api/models/reposition_request_body.rb +84 -0
- data/lib/mx_platform_api/models/reposition_response_body.rb +84 -0
- data/lib/mx_platform_api/models/reward.rb +187 -0
- data/lib/mx_platform_api/models/reward_elements.rb +156 -0
- data/lib/mx_platform_api/models/reward_response_body.rb +75 -0
- data/lib/mx_platform_api/models/rewards_response_body.rb +94 -0
- data/lib/mx_platform_api/models/scheduled_payment_response.rb +208 -0
- data/lib/mx_platform_api/models/scheduled_payments_response_body.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_account_response.rb +142 -0
- data/lib/mx_platform_api/models/spending_plan_accounts_response.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_item_create_request_body.rb +124 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_item_response.rb +224 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_items_response_body.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_response.rb +162 -0
- data/lib/mx_platform_api/models/spending_plan_iterations_response.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_response.rb +129 -0
- data/lib/mx_platform_api/models/spending_plans_response_body.rb +95 -0
- data/lib/mx_platform_api/models/split_transaction_request.rb +106 -0
- data/lib/mx_platform_api/models/split_transaction_request_body.rb +75 -0
- data/lib/mx_platform_api/models/split_transactions_response_body.rb +85 -0
- data/lib/mx_platform_api/models/statement_response.rb +157 -0
- data/lib/mx_platform_api/models/statement_response_body.rb +76 -0
- data/lib/mx_platform_api/models/statements_response_body.rb +95 -0
- data/lib/mx_platform_api/models/status.rb +36 -0
- data/lib/mx_platform_api/models/style.rb +74 -0
- data/lib/mx_platform_api/models/supported_product.rb +56 -0
- data/lib/mx_platform_api/models/supported_product1.rb +52 -0
- data/lib/mx_platform_api/models/tag_create_request.rb +72 -0
- data/lib/mx_platform_api/models/tag_create_request_body.rb +74 -0
- data/lib/mx_platform_api/models/tag_response.rb +99 -0
- data/lib/mx_platform_api/models/tag_response_body.rb +74 -0
- data/lib/mx_platform_api/models/tag_update_request.rb +72 -0
- data/lib/mx_platform_api/models/tag_update_request_body.rb +74 -0
- data/lib/mx_platform_api/models/tagging_create_request.rb +83 -0
- data/lib/mx_platform_api/models/tagging_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/tagging_response.rb +130 -0
- data/lib/mx_platform_api/models/tagging_response_body.rb +75 -0
- data/lib/mx_platform_api/models/tagging_update_request.rb +73 -0
- data/lib/mx_platform_api/models/tagging_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/taggings_response_body.rb +94 -0
- data/lib/mx_platform_api/models/tags_response_body.rb +94 -0
- data/lib/mx_platform_api/models/token_request_body.rb +75 -0
- data/lib/mx_platform_api/models/token_response.rb +114 -0
- data/lib/mx_platform_api/models/token_response_body.rb +84 -0
- data/lib/mx_platform_api/models/track_type_name.rb +44 -0
- data/lib/mx_platform_api/models/transaction_create_request.rb +192 -0
- data/lib/mx_platform_api/models/transaction_create_request_body.rb +76 -0
- data/lib/mx_platform_api/models/transaction_create_response_body.rb +595 -0
- data/lib/mx_platform_api/models/transaction_includes_response.rb +643 -0
- data/lib/mx_platform_api/models/transaction_response.rb +597 -0
- data/lib/mx_platform_api/models/transaction_response_body.rb +76 -0
- data/lib/mx_platform_api/models/transaction_rule_create_request.rb +98 -0
- data/lib/mx_platform_api/models/transaction_rule_create_request_body.rb +77 -0
- data/lib/mx_platform_api/models/transaction_rule_response.rb +152 -0
- data/lib/mx_platform_api/models/transaction_rule_response_body.rb +77 -0
- data/lib/mx_platform_api/models/transaction_rule_update_request.rb +103 -0
- data/lib/mx_platform_api/models/transaction_rule_update_request_body.rb +77 -0
- data/lib/mx_platform_api/models/transaction_rules_response_body.rb +95 -0
- data/lib/mx_platform_api/models/transaction_type.rb +36 -0
- data/lib/mx_platform_api/models/transaction_update_request.rb +74 -0
- data/lib/mx_platform_api/models/transaction_update_request_body.rb +76 -0
- data/lib/mx_platform_api/models/transactions_response_body.rb +95 -0
- data/lib/mx_platform_api/models/transactions_response_body_includes.rb +95 -0
- data/lib/mx_platform_api/models/type.rb +36 -0
- data/lib/mx_platform_api/models/update_goal_request.rb +185 -0
- data/lib/mx_platform_api/models/update_goal_request_body.rb +74 -0
- data/lib/mx_platform_api/models/use_case.rb +36 -0
- data/lib/mx_platform_api/models/user_create_request.rb +105 -0
- data/lib/mx_platform_api/models/user_create_request_body.rb +74 -0
- data/lib/mx_platform_api/models/user_response.rb +119 -0
- data/lib/mx_platform_api/models/user_response_body.rb +74 -0
- data/lib/mx_platform_api/models/user_update_request.rb +105 -0
- data/lib/mx_platform_api/models/user_update_request_body.rb +74 -0
- data/lib/mx_platform_api/models/users_response_body.rb +94 -0
- data/lib/mx_platform_api/models/users_widget_urls_request.rb +76 -0
- data/lib/mx_platform_api/models/vc_response.rb +77 -0
- data/lib/mx_platform_api/models/widget_request.rb +466 -0
- data/lib/mx_platform_api/models/widget_response.rb +100 -0
- data/lib/mx_platform_api/models/widget_response_body.rb +76 -0
- data/lib/mx_platform_api/models/widget_type.rb +149 -0
- data/lib/mx_platform_api/utilities/date_time_helper.rb +11 -0
- data/lib/mx_platform_api/utilities/file_wrapper.rb +28 -0
- data/lib/mx_platform_api.rb +313 -0
- metadata +370 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# AuthorizationCodeResponse Model.
|
|
8
|
+
class AuthorizationCodeResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :code
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['code'] = 'code'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
code
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
%w[
|
|
33
|
+
code
|
|
34
|
+
]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def initialize(code: SKIP, additional_properties: nil)
|
|
38
|
+
# Add additional model properties to the instance
|
|
39
|
+
additional_properties = {} if additional_properties.nil?
|
|
40
|
+
|
|
41
|
+
@code = code unless code == SKIP
|
|
42
|
+
@additional_properties = additional_properties
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Creates an instance of the object from a hash.
|
|
46
|
+
def self.from_hash(hash)
|
|
47
|
+
return nil unless hash
|
|
48
|
+
|
|
49
|
+
# Extract variables from the hash.
|
|
50
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
51
|
+
|
|
52
|
+
# Create a new hash for additional properties, removing known properties.
|
|
53
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
54
|
+
|
|
55
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
56
|
+
new_hash, proc { |value| value }
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Create object from extracted values.
|
|
60
|
+
AuthorizationCodeResponse.new(code: code,
|
|
61
|
+
additional_properties: additional_properties)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a human-readable string representation of the object.
|
|
65
|
+
def to_s
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} code: #{@code}, additional_properties: #{@additional_properties}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
71
|
+
def inspect
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} code: #{@code.inspect}, additional_properties: #{@additional_properties}>"
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# AuthorizationCodeResponseBody Model.
|
|
8
|
+
class AuthorizationCodeResponseBody < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [AuthorizationCodeResponse]
|
|
14
|
+
attr_accessor :authorization_code
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['authorization_code'] = 'authorization_code'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
authorization_code
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(authorization_code: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@authorization_code = authorization_code unless authorization_code == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
authorization_code = AuthorizationCodeResponse.from_hash(hash['authorization_code']) if
|
|
49
|
+
hash['authorization_code']
|
|
50
|
+
|
|
51
|
+
# Create a new hash for additional properties, removing known properties.
|
|
52
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
53
|
+
|
|
54
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
55
|
+
new_hash, proc { |value| value }
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
AuthorizationCodeResponseBody.new(authorization_code: authorization_code,
|
|
60
|
+
additional_properties: additional_properties)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Provides a human-readable string representation of the object.
|
|
64
|
+
def to_s
|
|
65
|
+
class_name = self.class.name.split('::').last
|
|
66
|
+
"<#{class_name} authorization_code: #{@authorization_code}, additional_properties:"\
|
|
67
|
+
" #{@additional_properties}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
71
|
+
def inspect
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} authorization_code: #{@authorization_code.inspect}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# Base model.
|
|
8
|
+
# rubocop:disable all
|
|
9
|
+
class BaseModel < CoreLibrary::BaseModel
|
|
10
|
+
# Returns a Hash representation of the current object.
|
|
11
|
+
def to_hash
|
|
12
|
+
# validating the model being serialized
|
|
13
|
+
self.class.validate(self) if self.class.respond_to?(:validate)
|
|
14
|
+
|
|
15
|
+
hash = {}
|
|
16
|
+
instance_variables.each do |name|
|
|
17
|
+
value = instance_variable_get(name)
|
|
18
|
+
name = name[1..]
|
|
19
|
+
if name == 'additional_properties'
|
|
20
|
+
additional_properties = process_additional_properties(value, self.class.names)
|
|
21
|
+
hash.merge!(additional_properties)
|
|
22
|
+
else
|
|
23
|
+
key = self.class.names.key?(name) ? self.class.names[name] : name
|
|
24
|
+
optional_fields = self.class.optionals
|
|
25
|
+
nullable_fields = self.class.nullables
|
|
26
|
+
if value.nil?
|
|
27
|
+
next unless nullable_fields.include?(name)
|
|
28
|
+
|
|
29
|
+
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
|
30
|
+
raise ArgumentError,
|
|
31
|
+
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
hash[key] = nil
|
|
36
|
+
unless value.nil?
|
|
37
|
+
if respond_to?("to_custom_#{name}")
|
|
38
|
+
if (value.instance_of? Array) || (value.instance_of? Hash)
|
|
39
|
+
params = [hash, key]
|
|
40
|
+
hash[key] = send("to_custom_#{name}", *params)
|
|
41
|
+
else
|
|
42
|
+
hash[key] = send("to_custom_#{name}")
|
|
43
|
+
end
|
|
44
|
+
elsif respond_to?("to_union_type_#{name}")
|
|
45
|
+
hash[key] = send("to_union_type_#{name}")
|
|
46
|
+
elsif value.instance_of? Array
|
|
47
|
+
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
|
48
|
+
elsif value.instance_of? Hash
|
|
49
|
+
hash[key] = {}
|
|
50
|
+
value.each do |k, v|
|
|
51
|
+
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
|
52
|
+
end
|
|
53
|
+
else
|
|
54
|
+
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Processes additional properties, ensuring no conflicts with existing properties.
|
|
63
|
+
def process_additional_properties(additional_properties, existing_prop_names)
|
|
64
|
+
hash = {}
|
|
65
|
+
additional_properties.each do |name, value|
|
|
66
|
+
check_for_conflict(name, existing_prop_names)
|
|
67
|
+
|
|
68
|
+
hash[name] = if value.is_a?(Array)
|
|
69
|
+
process_array(value)
|
|
70
|
+
elsif value.is_a?(Hash)
|
|
71
|
+
process_hash(value)
|
|
72
|
+
else
|
|
73
|
+
process_basic_value(value)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Checks if an additional property conflicts with a model's existing property.
|
|
80
|
+
def check_for_conflict(name, existing_prop_names)
|
|
81
|
+
return unless existing_prop_names.key?(name)
|
|
82
|
+
|
|
83
|
+
raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Processes an array of values, recursively calling `to_hash` on BaseModel objects.
|
|
87
|
+
def process_array(value)
|
|
88
|
+
value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
|
|
92
|
+
def process_hash(value)
|
|
93
|
+
value.transform_values do |v|
|
|
94
|
+
v.is_a?(BaseModel) ? v.to_hash : v
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Processes a basic value (non-array, non-hash).
|
|
99
|
+
def process_basic_value(value)
|
|
100
|
+
value.is_a?(BaseModel) ? value.to_hash : value
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns a JSON representation of the curent object.
|
|
104
|
+
def to_json(options = {})
|
|
105
|
+
hash = to_hash
|
|
106
|
+
hash.to_json(options)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
# rubocop:enable all
|
|
110
|
+
end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# BudgetCreateRequest Model.
|
|
8
|
+
class BudgetCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The unique identifier for the category.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :category_guid
|
|
15
|
+
|
|
16
|
+
# Unique identifier of the parent budget. This is only required when
|
|
17
|
+
# creating a budget on a sub-category.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :parent_guid
|
|
20
|
+
|
|
21
|
+
# Amount of the budget.
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :amount
|
|
24
|
+
|
|
25
|
+
# Additional information you can store on the `budget`.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :metadata
|
|
28
|
+
|
|
29
|
+
# When set to true, this parameter will prevent a webhook from being
|
|
30
|
+
# triggered by the request.
|
|
31
|
+
# @return [TrueClass | FalseClass]
|
|
32
|
+
attr_accessor :skip_webhook
|
|
33
|
+
|
|
34
|
+
# A mapping from model property names to API property names.
|
|
35
|
+
def self.names
|
|
36
|
+
@_hash = {} if @_hash.nil?
|
|
37
|
+
@_hash['category_guid'] = 'category_guid'
|
|
38
|
+
@_hash['parent_guid'] = 'parent_guid'
|
|
39
|
+
@_hash['amount'] = 'amount'
|
|
40
|
+
@_hash['metadata'] = 'metadata'
|
|
41
|
+
@_hash['skip_webhook'] = 'skip_webhook'
|
|
42
|
+
@_hash
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# An array for optional fields
|
|
46
|
+
def self.optionals
|
|
47
|
+
%w[
|
|
48
|
+
amount
|
|
49
|
+
metadata
|
|
50
|
+
skip_webhook
|
|
51
|
+
]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for nullable fields
|
|
55
|
+
def self.nullables
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def initialize(category_guid:, parent_guid:, amount: SKIP, metadata: SKIP,
|
|
60
|
+
skip_webhook: SKIP, additional_properties: nil)
|
|
61
|
+
# Add additional model properties to the instance
|
|
62
|
+
additional_properties = {} if additional_properties.nil?
|
|
63
|
+
|
|
64
|
+
@category_guid = category_guid
|
|
65
|
+
@parent_guid = parent_guid
|
|
66
|
+
@amount = amount unless amount == SKIP
|
|
67
|
+
@metadata = metadata unless metadata == SKIP
|
|
68
|
+
@skip_webhook = skip_webhook unless skip_webhook == SKIP
|
|
69
|
+
@additional_properties = additional_properties
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Creates an instance of the object from a hash.
|
|
73
|
+
def self.from_hash(hash)
|
|
74
|
+
return nil unless hash
|
|
75
|
+
|
|
76
|
+
# Extract variables from the hash.
|
|
77
|
+
category_guid = hash.key?('category_guid') ? hash['category_guid'] : nil
|
|
78
|
+
parent_guid = hash.key?('parent_guid') ? hash['parent_guid'] : nil
|
|
79
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
80
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
81
|
+
skip_webhook = hash.key?('skip_webhook') ? hash['skip_webhook'] : SKIP
|
|
82
|
+
|
|
83
|
+
# Create a new hash for additional properties, removing known properties.
|
|
84
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
85
|
+
|
|
86
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
87
|
+
new_hash, proc { |value| value }
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# Create object from extracted values.
|
|
91
|
+
BudgetCreateRequest.new(category_guid: category_guid,
|
|
92
|
+
parent_guid: parent_guid,
|
|
93
|
+
amount: amount,
|
|
94
|
+
metadata: metadata,
|
|
95
|
+
skip_webhook: skip_webhook,
|
|
96
|
+
additional_properties: additional_properties)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a human-readable string representation of the object.
|
|
100
|
+
def to_s
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} category_guid: #{@category_guid}, parent_guid: #{@parent_guid}, amount:"\
|
|
103
|
+
" #{@amount}, metadata: #{@metadata}, skip_webhook: #{@skip_webhook}, additional_properties:"\
|
|
104
|
+
" #{@additional_properties}>"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
108
|
+
def inspect
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} category_guid: #{@category_guid.inspect}, parent_guid:"\
|
|
111
|
+
" #{@parent_guid.inspect}, amount: #{@amount.inspect}, metadata: #{@metadata.inspect},"\
|
|
112
|
+
" skip_webhook: #{@skip_webhook.inspect}, additional_properties: #{@additional_properties}>"
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# BudgetCreateRequestBody Model.
|
|
8
|
+
class BudgetCreateRequestBody < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [BudgetCreateRequest]
|
|
14
|
+
attr_accessor :budget
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['budget'] = 'budget'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
budget
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(budget: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@budget = budget unless budget == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
budget = BudgetCreateRequest.from_hash(hash['budget']) if hash['budget']
|
|
49
|
+
|
|
50
|
+
# Create a new hash for additional properties, removing known properties.
|
|
51
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
52
|
+
|
|
53
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
54
|
+
new_hash, proc { |value| value }
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Create object from extracted values.
|
|
58
|
+
BudgetCreateRequestBody.new(budget: budget,
|
|
59
|
+
additional_properties: additional_properties)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Provides a human-readable string representation of the object.
|
|
63
|
+
def to_s
|
|
64
|
+
class_name = self.class.name.split('::').last
|
|
65
|
+
"<#{class_name} budget: #{@budget}, additional_properties: #{@additional_properties}>"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
69
|
+
def inspect
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} budget: #{@budget.inspect}, additional_properties:"\
|
|
72
|
+
" #{@additional_properties}>"
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# BudgetResponse Model.
|
|
8
|
+
class BudgetResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A goal amount set by the user for a category's transaction total during a
|
|
13
|
+
# month.
|
|
14
|
+
# @return [Float]
|
|
15
|
+
attr_accessor :amount
|
|
16
|
+
|
|
17
|
+
# The unique identifier for the category. Defined by MX.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :category_guid
|
|
20
|
+
|
|
21
|
+
# The date and time the budget was created, represented in ISO 8601 format
|
|
22
|
+
# with a timestamp.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
# Unique identifier for the `budget`. Defined by MX.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :guid
|
|
29
|
+
|
|
30
|
+
# If the budget has been exceeded, this field will be true. Otherwise, this
|
|
31
|
+
# field will be false.
|
|
32
|
+
# @return [TrueClass | FalseClass]
|
|
33
|
+
attr_accessor :is_exceeded
|
|
34
|
+
|
|
35
|
+
# If the budget is off track, this field will be true. Otherwise, this field
|
|
36
|
+
# will be false.
|
|
37
|
+
# @return [TrueClass | FalseClass]
|
|
38
|
+
attr_accessor :is_off_track
|
|
39
|
+
|
|
40
|
+
# Additional information you stored about the `budget`.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :metadata
|
|
43
|
+
|
|
44
|
+
# The name of the budget that is visible to the user (ie "Food", "Bills",
|
|
45
|
+
# "Entertainment", etc).
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :name
|
|
48
|
+
|
|
49
|
+
# The percentage amount of off track spending. (Deprecated).
|
|
50
|
+
# @return [Float]
|
|
51
|
+
attr_accessor :off_track_percentage
|
|
52
|
+
|
|
53
|
+
# Unique identifier for the parent budget. Defined by MX.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :parent_guid
|
|
56
|
+
|
|
57
|
+
# The percentage of a budget that has been spent during the current calendar
|
|
58
|
+
# month Calculated as the transaction total divided by the amount and then
|
|
59
|
+
# multiplied by 100.A value of zero will be returned when `amount` is zero.
|
|
60
|
+
# @return [Float]
|
|
61
|
+
attr_accessor :percent_spent
|
|
62
|
+
|
|
63
|
+
# The projected amount of spending for the budget.
|
|
64
|
+
# @return [Float]
|
|
65
|
+
attr_accessor :projected_spending
|
|
66
|
+
|
|
67
|
+
# The revision number of this budget record.
|
|
68
|
+
# @return [Integer]
|
|
69
|
+
attr_accessor :revision
|
|
70
|
+
|
|
71
|
+
# The cumulative amount of all transactions under the budget.
|
|
72
|
+
# @return [Object]
|
|
73
|
+
attr_accessor :transaction_total
|
|
74
|
+
|
|
75
|
+
# Date and time the budget was updated, represented in ISO 8601 format with
|
|
76
|
+
# timestamp.
|
|
77
|
+
# @return [Object]
|
|
78
|
+
attr_accessor :updated_at
|
|
79
|
+
|
|
80
|
+
# Unique identifier for the user. Defined by MX.
|
|
81
|
+
# @return [Object]
|
|
82
|
+
attr_accessor :user_guid
|
|
83
|
+
|
|
84
|
+
# A mapping from model property names to API property names.
|
|
85
|
+
def self.names
|
|
86
|
+
@_hash = {} if @_hash.nil?
|
|
87
|
+
@_hash['amount'] = 'amount'
|
|
88
|
+
@_hash['category_guid'] = 'category_guid'
|
|
89
|
+
@_hash['created_at'] = 'created_at'
|
|
90
|
+
@_hash['guid'] = 'guid'
|
|
91
|
+
@_hash['is_exceeded'] = 'is_exceeded'
|
|
92
|
+
@_hash['is_off_track'] = 'is_off_track'
|
|
93
|
+
@_hash['metadata'] = 'metadata'
|
|
94
|
+
@_hash['name'] = 'name'
|
|
95
|
+
@_hash['off_track_percentage'] = 'off_track_percentage'
|
|
96
|
+
@_hash['parent_guid'] = 'parent_guid'
|
|
97
|
+
@_hash['percent_spent'] = 'percent_spent'
|
|
98
|
+
@_hash['projected_spending'] = 'projected_spending'
|
|
99
|
+
@_hash['revision'] = 'revision'
|
|
100
|
+
@_hash['transaction_total'] = 'transaction_total'
|
|
101
|
+
@_hash['updated_at'] = 'updated_at'
|
|
102
|
+
@_hash['user_guid'] = 'user_guid'
|
|
103
|
+
@_hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# An array for optional fields
|
|
107
|
+
def self.optionals
|
|
108
|
+
%w[
|
|
109
|
+
amount
|
|
110
|
+
category_guid
|
|
111
|
+
created_at
|
|
112
|
+
guid
|
|
113
|
+
is_exceeded
|
|
114
|
+
is_off_track
|
|
115
|
+
metadata
|
|
116
|
+
name
|
|
117
|
+
off_track_percentage
|
|
118
|
+
parent_guid
|
|
119
|
+
percent_spent
|
|
120
|
+
projected_spending
|
|
121
|
+
revision
|
|
122
|
+
transaction_total
|
|
123
|
+
updated_at
|
|
124
|
+
user_guid
|
|
125
|
+
]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# An array for nullable fields
|
|
129
|
+
def self.nullables
|
|
130
|
+
%w[
|
|
131
|
+
metadata
|
|
132
|
+
name
|
|
133
|
+
off_track_percentage
|
|
134
|
+
parent_guid
|
|
135
|
+
percent_spent
|
|
136
|
+
]
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def initialize(amount: SKIP, category_guid: SKIP, created_at: SKIP,
|
|
140
|
+
guid: SKIP, is_exceeded: SKIP, is_off_track: SKIP,
|
|
141
|
+
metadata: SKIP, name: SKIP, off_track_percentage: SKIP,
|
|
142
|
+
parent_guid: SKIP, percent_spent: SKIP,
|
|
143
|
+
projected_spending: SKIP, revision: SKIP,
|
|
144
|
+
transaction_total: SKIP, updated_at: SKIP, user_guid: SKIP,
|
|
145
|
+
additional_properties: nil)
|
|
146
|
+
# Add additional model properties to the instance
|
|
147
|
+
additional_properties = {} if additional_properties.nil?
|
|
148
|
+
|
|
149
|
+
@amount = amount unless amount == SKIP
|
|
150
|
+
@category_guid = category_guid unless category_guid == SKIP
|
|
151
|
+
@created_at = created_at unless created_at == SKIP
|
|
152
|
+
@guid = guid unless guid == SKIP
|
|
153
|
+
@is_exceeded = is_exceeded unless is_exceeded == SKIP
|
|
154
|
+
@is_off_track = is_off_track unless is_off_track == SKIP
|
|
155
|
+
@metadata = metadata unless metadata == SKIP
|
|
156
|
+
@name = name unless name == SKIP
|
|
157
|
+
@off_track_percentage = off_track_percentage unless off_track_percentage == SKIP
|
|
158
|
+
@parent_guid = parent_guid unless parent_guid == SKIP
|
|
159
|
+
@percent_spent = percent_spent unless percent_spent == SKIP
|
|
160
|
+
@projected_spending = projected_spending unless projected_spending == SKIP
|
|
161
|
+
@revision = revision unless revision == SKIP
|
|
162
|
+
@transaction_total = transaction_total unless transaction_total == SKIP
|
|
163
|
+
@updated_at = updated_at unless updated_at == SKIP
|
|
164
|
+
@user_guid = user_guid unless user_guid == SKIP
|
|
165
|
+
@additional_properties = additional_properties
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Creates an instance of the object from a hash.
|
|
169
|
+
def self.from_hash(hash)
|
|
170
|
+
return nil unless hash
|
|
171
|
+
|
|
172
|
+
# Extract variables from the hash.
|
|
173
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
174
|
+
category_guid = hash.key?('category_guid') ? hash['category_guid'] : SKIP
|
|
175
|
+
created_at = hash.key?('created_at') ? hash['created_at'] : SKIP
|
|
176
|
+
guid = hash.key?('guid') ? hash['guid'] : SKIP
|
|
177
|
+
is_exceeded = hash.key?('is_exceeded') ? hash['is_exceeded'] : SKIP
|
|
178
|
+
is_off_track = hash.key?('is_off_track') ? hash['is_off_track'] : SKIP
|
|
179
|
+
metadata = hash.key?('metadata') ? hash['metadata'] : SKIP
|
|
180
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
|
181
|
+
off_track_percentage =
|
|
182
|
+
hash.key?('off_track_percentage') ? hash['off_track_percentage'] : SKIP
|
|
183
|
+
parent_guid = hash.key?('parent_guid') ? hash['parent_guid'] : SKIP
|
|
184
|
+
percent_spent = hash.key?('percent_spent') ? hash['percent_spent'] : SKIP
|
|
185
|
+
projected_spending =
|
|
186
|
+
hash.key?('projected_spending') ? hash['projected_spending'] : SKIP
|
|
187
|
+
revision = hash.key?('revision') ? hash['revision'] : SKIP
|
|
188
|
+
transaction_total =
|
|
189
|
+
hash.key?('transaction_total') ? hash['transaction_total'] : SKIP
|
|
190
|
+
updated_at = hash.key?('updated_at') ? hash['updated_at'] : SKIP
|
|
191
|
+
user_guid = hash.key?('user_guid') ? hash['user_guid'] : SKIP
|
|
192
|
+
|
|
193
|
+
# Create a new hash for additional properties, removing known properties.
|
|
194
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
195
|
+
|
|
196
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
197
|
+
new_hash, proc { |value| value }
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
# Create object from extracted values.
|
|
201
|
+
BudgetResponse.new(amount: amount,
|
|
202
|
+
category_guid: category_guid,
|
|
203
|
+
created_at: created_at,
|
|
204
|
+
guid: guid,
|
|
205
|
+
is_exceeded: is_exceeded,
|
|
206
|
+
is_off_track: is_off_track,
|
|
207
|
+
metadata: metadata,
|
|
208
|
+
name: name,
|
|
209
|
+
off_track_percentage: off_track_percentage,
|
|
210
|
+
parent_guid: parent_guid,
|
|
211
|
+
percent_spent: percent_spent,
|
|
212
|
+
projected_spending: projected_spending,
|
|
213
|
+
revision: revision,
|
|
214
|
+
transaction_total: transaction_total,
|
|
215
|
+
updated_at: updated_at,
|
|
216
|
+
user_guid: user_guid,
|
|
217
|
+
additional_properties: additional_properties)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Provides a human-readable string representation of the object.
|
|
221
|
+
def to_s
|
|
222
|
+
class_name = self.class.name.split('::').last
|
|
223
|
+
"<#{class_name} amount: #{@amount}, category_guid: #{@category_guid}, created_at:"\
|
|
224
|
+
" #{@created_at}, guid: #{@guid}, is_exceeded: #{@is_exceeded}, is_off_track:"\
|
|
225
|
+
" #{@is_off_track}, metadata: #{@metadata}, name: #{@name}, off_track_percentage:"\
|
|
226
|
+
" #{@off_track_percentage}, parent_guid: #{@parent_guid}, percent_spent: #{@percent_spent},"\
|
|
227
|
+
" projected_spending: #{@projected_spending}, revision: #{@revision}, transaction_total:"\
|
|
228
|
+
" #{@transaction_total}, updated_at: #{@updated_at}, user_guid: #{@user_guid},"\
|
|
229
|
+
" additional_properties: #{@additional_properties}>"
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
233
|
+
def inspect
|
|
234
|
+
class_name = self.class.name.split('::').last
|
|
235
|
+
"<#{class_name} amount: #{@amount.inspect}, category_guid: #{@category_guid.inspect},"\
|
|
236
|
+
" created_at: #{@created_at.inspect}, guid: #{@guid.inspect}, is_exceeded:"\
|
|
237
|
+
" #{@is_exceeded.inspect}, is_off_track: #{@is_off_track.inspect}, metadata:"\
|
|
238
|
+
" #{@metadata.inspect}, name: #{@name.inspect}, off_track_percentage:"\
|
|
239
|
+
" #{@off_track_percentage.inspect}, parent_guid: #{@parent_guid.inspect}, percent_spent:"\
|
|
240
|
+
" #{@percent_spent.inspect}, projected_spending: #{@projected_spending.inspect}, revision:"\
|
|
241
|
+
" #{@revision.inspect}, transaction_total: #{@transaction_total.inspect}, updated_at:"\
|
|
242
|
+
" #{@updated_at.inspect}, user_guid: #{@user_guid.inspect}, additional_properties:"\
|
|
243
|
+
" #{@additional_properties}>"
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|