proton_api 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +246 -0
- data/Rakefile +8 -0
- data/docs/AccumulationGoalDepositConfig.md +14 -0
- data/docs/AnnuitiesApi.md +344 -0
- data/docs/AnnuityCalculatorAccumulationHorizonRequest.md +19 -0
- data/docs/AnnuityCalculatorAnnuityAmountRequest.md +19 -0
- data/docs/AnnuityCalculatorDecumulationHorizonRequest.md +19 -0
- data/docs/AnnuityCalculatorDepositAmountRequest.md +19 -0
- data/docs/AnnuityCalculatorInitialBalanceRequest.md +19 -0
- data/docs/AnnuityDepositSchedule.md +10 -0
- data/docs/BacktestRequest.md +17 -0
- data/docs/BeneficiaryBequestConfig.md +10 -0
- data/docs/BudgetAggregationAccount.md +8 -0
- data/docs/BudgetCalculatorRequest.md +16 -0
- data/docs/BudgetComponent.md +10 -0
- data/docs/BudgetDetails.md +17 -0
- data/docs/BusinessFinancialHealthCheckRequest.md +22 -0
- data/docs/BusinessFinancialManagementApi.md +288 -0
- data/docs/BusinessInvoiceAnalysisRequest.md +20 -0
- data/docs/CalculatorDepositSchedule.md +9 -0
- data/docs/CalculatorDepositSchedule1.md +10 -0
- data/docs/CardLimitCheckRequest.md +9 -0
- data/docs/CardTransactionAuthorizationRequest.md +19 -0
- data/docs/CardsApi.md +120 -0
- data/docs/CashAnalysisRequest.md +17 -0
- data/docs/CashFlowAnalysisRequest.md +20 -0
- data/docs/ChildrenEducationConfig.md +9 -0
- data/docs/CustomerAnalysisRequest.md +17 -0
- data/docs/DecumulationGoalDepositConfig.md +14 -0
- data/docs/DimensionalRiskScoreRequest.md +16 -0
- data/docs/DiversificationScoreRequest.md +19 -0
- data/docs/EducationCalculatorAnnualCostRequest.md +18 -0
- data/docs/EducationCalculatorDepositAmountRequest.md +19 -0
- data/docs/EducationCalculatorPercentCoveredRequest.md +18 -0
- data/docs/EducationConfig.md +10 -0
- data/docs/EmergencyFundCalculatorRequest.md +24 -0
- data/docs/EventStudyRequest.md +18 -0
- data/docs/FeeAnalysisRequest.md +13 -0
- data/docs/FinancialHealthApi.md +232 -0
- data/docs/FinancialHealthCheckRequest.md +17 -0
- data/docs/FinancialPictureRequest.md +16 -0
- data/docs/FinancialPlanningApi.md +680 -0
- data/docs/FinancialStatementAnalysisRequest.md +22 -0
- data/docs/GoalAccumulationAllocationRequest.md +33 -0
- data/docs/GoalAccumulationRecommendationRequest.md +28 -0
- data/docs/GoalAccumulationStatusRequest.md +28 -0
- data/docs/GoalConfig.md +9 -0
- data/docs/GoalDecumulationAllocationRequest.md +34 -0
- data/docs/GoalDecumulationRecommendationRequest.md +29 -0
- data/docs/GoalDecumulationStatusRequest.md +29 -0
- data/docs/GoalWithdrawalConfig.md +14 -0
- data/docs/GoalsApi.md +344 -0
- data/docs/GuaranteedRateBenefit.md +11 -0
- data/docs/IncomeConfig.md +10 -0
- data/docs/LifeInsuranceApi.md +64 -0
- data/docs/LifeInsuranceNeedsCalculatorRequest.md +22 -0
- data/docs/MonteCarloRequest.md +29 -0
- data/docs/MortgageCalculatorDownPaymentRequest.md +11 -0
- data/docs/MortgageCalculatorHomePriceRequest.md +11 -0
- data/docs/MortgageCalculatorPeriodicPaymentRequest.md +11 -0
- data/docs/MvoRequest.md +18 -0
- data/docs/OptConfig.md +14 -0
- data/docs/OptConfig1.md +12 -0
- data/docs/Periods.md +9 -0
- data/docs/PersonalFinancialManagementApi.md +288 -0
- data/docs/PortfolioConstructionApi.md +64 -0
- data/docs/PortfolioManagementApi.md +64 -0
- data/docs/PortfolioOptimizationScoreRequest.md +21 -0
- data/docs/PortfolioWhatIfRequest.md +21 -0
- data/docs/PurchaseCalculatorAmountRequest.md +16 -0
- data/docs/PurchaseCalculatorDepositAmountRequest.md +17 -0
- data/docs/PurchaseCalculatorHorizonRequest.md +15 -0
- data/docs/RatioTargets.md +13 -0
- data/docs/RatioTargets1.md +13 -0
- data/docs/RebalancingSignalRequest.md +13 -0
- data/docs/RecommendationConfig.md +15 -0
- data/docs/RecommendationConfig1.md +14 -0
- data/docs/RecurringTransactionAnalysisRequest.md +19 -0
- data/docs/RetirementCalculatorDepositAmountRequest.md +20 -0
- data/docs/RetirementCalculatorExpensesRequest.md +19 -0
- data/docs/RetirementCalculatorPercentCoveredRequest.md +19 -0
- data/docs/RiskAllocationRequest.md +14 -0
- data/docs/RiskScoreRequest.md +13 -0
- data/docs/RiskScoringApi.md +176 -0
- data/docs/SavingsCalculatorRequest.md +17 -0
- data/docs/SavingsDepositSchedule.md +11 -0
- data/docs/ScenarioAnalysisRequest.md +22 -0
- data/docs/SensitivityAnalysisRequest.md +22 -0
- data/docs/SensitivityFactor.md +11 -0
- data/docs/Settings.md +13 -0
- data/docs/SimulationsApi.md +400 -0
- data/docs/VariableAnnuityRequest.md +34 -0
- data/docs/WConfig.md +12 -0
- data/docs/WConfig1.md +12 -0
- data/git_push.sh +55 -0
- data/lib/proton_api.rb +132 -0
- data/lib/proton_api/api/annuities_api.rb +347 -0
- data/lib/proton_api/api/business_financial_management_api.rb +293 -0
- data/lib/proton_api/api/cards_api.rb +131 -0
- data/lib/proton_api/api/financial_health_api.rb +239 -0
- data/lib/proton_api/api/financial_planning_api.rb +671 -0
- data/lib/proton_api/api/goals_api.rb +347 -0
- data/lib/proton_api/api/life_insurance_api.rb +77 -0
- data/lib/proton_api/api/personal_financial_management_api.rb +293 -0
- data/lib/proton_api/api/portfolio_construction_api.rb +77 -0
- data/lib/proton_api/api/portfolio_management_api.rb +77 -0
- data/lib/proton_api/api/risk_scoring_api.rb +185 -0
- data/lib/proton_api/api/simulations_api.rb +401 -0
- data/lib/proton_api/api_client.rb +391 -0
- data/lib/proton_api/api_error.rb +38 -0
- data/lib/proton_api/auth_configuration.rb +177 -0
- data/lib/proton_api/configuration.rb +209 -0
- data/lib/proton_api/models/accumulation_goal_deposit_config.rb +338 -0
- data/lib/proton_api/models/annuity_calculator_accumulation_horizon_request.rb +462 -0
- data/lib/proton_api/models/annuity_calculator_annuity_amount_request.rb +464 -0
- data/lib/proton_api/models/annuity_calculator_decumulation_horizon_request.rb +462 -0
- data/lib/proton_api/models/annuity_calculator_deposit_amount_request.rb +471 -0
- data/lib/proton_api/models/annuity_calculator_initial_balance_request.rb +471 -0
- data/lib/proton_api/models/annuity_deposit_schedule.rb +257 -0
- data/lib/proton_api/models/backtest_request.rb +298 -0
- data/lib/proton_api/models/beneficiary_bequest_config.rb +260 -0
- data/lib/proton_api/models/budget_aggregation_account.rb +189 -0
- data/lib/proton_api/models/budget_calculator_request.rb +315 -0
- data/lib/proton_api/models/budget_component.rb +231 -0
- data/lib/proton_api/models/budget_details.rb +340 -0
- data/lib/proton_api/models/business_financial_health_check_request.rb +478 -0
- data/lib/proton_api/models/business_invoice_analysis_request.rb +355 -0
- data/lib/proton_api/models/calculator_deposit_schedule.rb +231 -0
- data/lib/proton_api/models/calculator_deposit_schedule1.rb +257 -0
- data/lib/proton_api/models/card_limit_check_request.rb +203 -0
- data/lib/proton_api/models/card_transaction_authorization_request.rb +359 -0
- data/lib/proton_api/models/cash_analysis_request.rb +321 -0
- data/lib/proton_api/models/cash_flow_analysis_request.rb +338 -0
- data/lib/proton_api/models/children_education_config.rb +224 -0
- data/lib/proton_api/models/customer_analysis_request.rb +286 -0
- data/lib/proton_api/models/decumulation_goal_deposit_config.rb +338 -0
- data/lib/proton_api/models/dimensional_risk_score_request.rb +285 -0
- data/lib/proton_api/models/diversification_score_request.rb +327 -0
- data/lib/proton_api/models/education_calculator_annual_cost_request.rb +453 -0
- data/lib/proton_api/models/education_calculator_deposit_amount_request.rb +486 -0
- data/lib/proton_api/models/education_calculator_percent_covered_request.rb +451 -0
- data/lib/proton_api/models/education_config.rb +274 -0
- data/lib/proton_api/models/emergency_fund_calculator_request.rb +564 -0
- data/lib/proton_api/models/event_study_request.rb +320 -0
- data/lib/proton_api/models/fee_analysis_request.rb +231 -0
- data/lib/proton_api/models/financial_health_check_request.rb +387 -0
- data/lib/proton_api/models/financial_picture_request.rb +269 -0
- data/lib/proton_api/models/financial_statement_analysis_request.rb +455 -0
- data/lib/proton_api/models/goal_accumulation_allocation_request.rb +732 -0
- data/lib/proton_api/models/goal_accumulation_recommendation_request.rb +625 -0
- data/lib/proton_api/models/goal_accumulation_status_request.rb +625 -0
- data/lib/proton_api/models/goal_config.rb +225 -0
- data/lib/proton_api/models/goal_decumulation_allocation_request.rb +767 -0
- data/lib/proton_api/models/goal_decumulation_recommendation_request.rb +660 -0
- data/lib/proton_api/models/goal_decumulation_status_request.rb +660 -0
- data/lib/proton_api/models/goal_withdrawal_config.rb +338 -0
- data/lib/proton_api/models/guaranteed_rate_benefit.rb +275 -0
- data/lib/proton_api/models/income_config.rb +269 -0
- data/lib/proton_api/models/life_insurance_needs_calculator_request.rb +518 -0
- data/lib/proton_api/models/monte_carlo_request.rb +507 -0
- data/lib/proton_api/models/mortgage_calculator_down_payment_request.rb +302 -0
- data/lib/proton_api/models/mortgage_calculator_home_price_request.rb +302 -0
- data/lib/proton_api/models/mortgage_calculator_periodic_payment_request.rb +302 -0
- data/lib/proton_api/models/mvo_request.rb +369 -0
- data/lib/proton_api/models/opt_config.rb +303 -0
- data/lib/proton_api/models/opt_config1.rb +263 -0
- data/lib/proton_api/models/periods.rb +223 -0
- data/lib/proton_api/models/portfolio_optimization_score_request.rb +359 -0
- data/lib/proton_api/models/portfolio_what_if_request.rb +354 -0
- data/lib/proton_api/models/purchase_calculator_amount_request.rb +404 -0
- data/lib/proton_api/models/purchase_calculator_deposit_amount_request.rb +437 -0
- data/lib/proton_api/models/purchase_calculator_horizon_request.rb +359 -0
- data/lib/proton_api/models/ratio_targets.rb +331 -0
- data/lib/proton_api/models/ratio_targets1.rb +331 -0
- data/lib/proton_api/models/rebalancing_signal_request.rb +241 -0
- data/lib/proton_api/models/recommendation_config.rb +360 -0
- data/lib/proton_api/models/recommendation_config1.rb +349 -0
- data/lib/proton_api/models/recurring_transaction_analysis_request.rb +370 -0
- data/lib/proton_api/models/retirement_calculator_deposit_amount_request.rb +512 -0
- data/lib/proton_api/models/retirement_calculator_expenses_request.rb +479 -0
- data/lib/proton_api/models/retirement_calculator_percent_covered_request.rb +477 -0
- data/lib/proton_api/models/risk_allocation_request.rb +319 -0
- data/lib/proton_api/models/risk_score_request.rb +242 -0
- data/lib/proton_api/models/savings_calculator_request.rb +398 -0
- data/lib/proton_api/models/savings_deposit_schedule.rb +279 -0
- data/lib/proton_api/models/scenario_analysis_request.rb +404 -0
- data/lib/proton_api/models/sensitivity_analysis_request.rb +402 -0
- data/lib/proton_api/models/sensitivity_factor.rb +281 -0
- data/lib/proton_api/models/settings.rb +290 -0
- data/lib/proton_api/models/variable_annuity_request.rb +703 -0
- data/lib/proton_api/models/w_config.rb +385 -0
- data/lib/proton_api/models/w_config1.rb +350 -0
- data/lib/proton_api/version.rb +15 -0
- data/proton_api.gemspec +46 -0
- data/spec/api/annuities_api_spec.rb +107 -0
- data/spec/api/business_financial_management_api_spec.rb +95 -0
- data/spec/api/cards_api_spec.rb +59 -0
- data/spec/api/financial_health_api_spec.rb +83 -0
- data/spec/api/financial_planning_api_spec.rb +179 -0
- data/spec/api/goals_api_spec.rb +107 -0
- data/spec/api/life_insurance_api_spec.rb +47 -0
- data/spec/api/personal_financial_management_api_spec.rb +95 -0
- data/spec/api/portfolio_construction_api_spec.rb +47 -0
- data/spec/api/portfolio_management_api_spec.rb +47 -0
- data/spec/api/risk_scoring_api_spec.rb +71 -0
- data/spec/api/simulations_api_spec.rb +119 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/accumulation_goal_deposit_config_spec.rb +89 -0
- data/spec/models/annuity_calculator_accumulation_horizon_request_spec.rb +111 -0
- data/spec/models/annuity_calculator_annuity_amount_request_spec.rb +111 -0
- data/spec/models/annuity_calculator_decumulation_horizon_request_spec.rb +111 -0
- data/spec/models/annuity_calculator_deposit_amount_request_spec.rb +111 -0
- data/spec/models/annuity_calculator_initial_balance_request_spec.rb +111 -0
- data/spec/models/annuity_deposit_schedule_spec.rb +57 -0
- data/spec/models/backtest_request_spec.rb +95 -0
- data/spec/models/beneficiary_bequest_config_spec.rb +53 -0
- data/spec/models/budget_aggregation_account_spec.rb +41 -0
- data/spec/models/budget_calculator_request_spec.rb +93 -0
- data/spec/models/budget_component_spec.rb +53 -0
- data/spec/models/budget_details_spec.rb +99 -0
- data/spec/models/business_financial_health_check_request_spec.rb +137 -0
- data/spec/models/business_invoice_analysis_request_spec.rb +117 -0
- data/spec/models/calculator_deposit_schedule1_spec.rb +57 -0
- data/spec/models/calculator_deposit_schedule_spec.rb +51 -0
- data/spec/models/card_limit_check_request_spec.rb +47 -0
- data/spec/models/card_transaction_authorization_request_spec.rb +115 -0
- data/spec/models/cash_analysis_request_spec.rb +103 -0
- data/spec/models/cash_flow_analysis_request_spec.rb +117 -0
- data/spec/models/children_education_config_spec.rb +47 -0
- data/spec/models/customer_analysis_request_spec.rb +95 -0
- data/spec/models/decumulation_goal_deposit_config_spec.rb +89 -0
- data/spec/models/dimensional_risk_score_request_spec.rb +89 -0
- data/spec/models/diversification_score_request_spec.rb +111 -0
- data/spec/models/education_calculator_annual_cost_request_spec.rb +101 -0
- data/spec/models/education_calculator_deposit_amount_request_spec.rb +107 -0
- data/spec/models/education_calculator_percent_covered_request_spec.rb +101 -0
- data/spec/models/education_config_spec.rb +53 -0
- data/spec/models/emergency_fund_calculator_request_spec.rb +141 -0
- data/spec/models/event_study_request_spec.rb +109 -0
- data/spec/models/fee_analysis_request_spec.rb +71 -0
- data/spec/models/financial_health_check_request_spec.rb +95 -0
- data/spec/models/financial_picture_request_spec.rb +89 -0
- data/spec/models/financial_statement_analysis_request_spec.rb +149 -0
- data/spec/models/goal_accumulation_allocation_request_spec.rb +215 -0
- data/spec/models/goal_accumulation_recommendation_request_spec.rb +173 -0
- data/spec/models/goal_accumulation_status_request_spec.rb +173 -0
- data/spec/models/goal_config_spec.rb +47 -0
- data/spec/models/goal_decumulation_allocation_request_spec.rb +221 -0
- data/spec/models/goal_decumulation_recommendation_request_spec.rb +179 -0
- data/spec/models/goal_decumulation_status_request_spec.rb +179 -0
- data/spec/models/goal_withdrawal_config_spec.rb +89 -0
- data/spec/models/guaranteed_rate_benefit_spec.rb +59 -0
- data/spec/models/income_config_spec.rb +53 -0
- data/spec/models/life_insurance_needs_calculator_request_spec.rb +125 -0
- data/spec/models/monte_carlo_request_spec.rb +179 -0
- data/spec/models/mortgage_calculator_down_payment_request_spec.rb +59 -0
- data/spec/models/mortgage_calculator_home_price_request_spec.rb +59 -0
- data/spec/models/mortgage_calculator_periodic_payment_request_spec.rb +59 -0
- data/spec/models/mvo_request_spec.rb +113 -0
- data/spec/models/opt_config1_spec.rb +69 -0
- data/spec/models/opt_config_spec.rb +81 -0
- data/spec/models/periods_spec.rb +47 -0
- data/spec/models/portfolio_optimization_score_request_spec.rb +127 -0
- data/spec/models/portfolio_what_if_request_spec.rb +123 -0
- data/spec/models/purchase_calculator_amount_request_spec.rb +93 -0
- data/spec/models/purchase_calculator_deposit_amount_request_spec.rb +99 -0
- data/spec/models/purchase_calculator_horizon_request_spec.rb +83 -0
- data/spec/models/ratio_targets1_spec.rb +71 -0
- data/spec/models/ratio_targets_spec.rb +71 -0
- data/spec/models/rebalancing_signal_request_spec.rb +71 -0
- data/spec/models/recommendation_config1_spec.rb +77 -0
- data/spec/models/recommendation_config_spec.rb +83 -0
- data/spec/models/recurring_transaction_analysis_request_spec.rb +111 -0
- data/spec/models/retirement_calculator_deposit_amount_request_spec.rb +113 -0
- data/spec/models/retirement_calculator_expenses_request_spec.rb +107 -0
- data/spec/models/retirement_calculator_percent_covered_request_spec.rb +107 -0
- data/spec/models/risk_allocation_request_spec.rb +85 -0
- data/spec/models/risk_score_request_spec.rb +71 -0
- data/spec/models/savings_calculator_request_spec.rb +99 -0
- data/spec/models/savings_deposit_schedule_spec.rb +63 -0
- data/spec/models/scenario_analysis_request_spec.rb +133 -0
- data/spec/models/sensitivity_analysis_request_spec.rb +133 -0
- data/spec/models/sensitivity_factor_spec.rb +59 -0
- data/spec/models/settings_spec.rb +79 -0
- data/spec/models/variable_annuity_request_spec.rb +209 -0
- data/spec/models/w_config1_spec.rb +65 -0
- data/spec/models/w_config_spec.rb +65 -0
- data/spec/spec_helper.rb +111 -0
- metadata +628 -0
@@ -0,0 +1,512 @@
|
|
1
|
+
=begin
|
2
|
+
#Hydrogen Proton API
|
3
|
+
|
4
|
+
#Financial engineering module of Hydrogen Atom
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.8.0
|
7
|
+
Contact: info@hydrogenplatform.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.17
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module ProtonApi
|
16
|
+
class RetirementCalculatorDepositAmountRequest
|
17
|
+
attr_accessor :retirement_savings
|
18
|
+
|
19
|
+
attr_accessor :aggregation_account_ids
|
20
|
+
|
21
|
+
attr_accessor :retirement_age
|
22
|
+
|
23
|
+
attr_accessor :retirement_income
|
24
|
+
|
25
|
+
attr_accessor :retirement_expenses
|
26
|
+
|
27
|
+
attr_accessor :current_age
|
28
|
+
|
29
|
+
attr_accessor :account_ids
|
30
|
+
|
31
|
+
attr_accessor :retirement_tax
|
32
|
+
|
33
|
+
attr_accessor :inflation_rate
|
34
|
+
|
35
|
+
attr_accessor :death_age
|
36
|
+
|
37
|
+
attr_accessor :portfolio_return
|
38
|
+
|
39
|
+
attr_accessor :deposit_schedule
|
40
|
+
|
41
|
+
attr_accessor :percent_of_expenses_covered
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
:'retirement_savings' => :'retirement_savings',
|
47
|
+
:'aggregation_account_ids' => :'aggregation_account_ids',
|
48
|
+
:'retirement_age' => :'retirement_age',
|
49
|
+
:'retirement_income' => :'retirement_income',
|
50
|
+
:'retirement_expenses' => :'retirement_expenses',
|
51
|
+
:'current_age' => :'current_age',
|
52
|
+
:'account_ids' => :'account_ids',
|
53
|
+
:'retirement_tax' => :'retirement_tax',
|
54
|
+
:'inflation_rate' => :'inflation_rate',
|
55
|
+
:'death_age' => :'death_age',
|
56
|
+
:'portfolio_return' => :'portfolio_return',
|
57
|
+
:'deposit_schedule' => :'deposit_schedule',
|
58
|
+
:'percent_of_expenses_covered' => :'percent_of_expenses_covered'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.swagger_types
|
64
|
+
{
|
65
|
+
:'retirement_savings' => :'Float',
|
66
|
+
:'aggregation_account_ids' => :'Array<String>',
|
67
|
+
:'retirement_age' => :'Integer',
|
68
|
+
:'retirement_income' => :'Float',
|
69
|
+
:'retirement_expenses' => :'Float',
|
70
|
+
:'current_age' => :'Integer',
|
71
|
+
:'account_ids' => :'Array<String>',
|
72
|
+
:'retirement_tax' => :'Float',
|
73
|
+
:'inflation_rate' => :'Float',
|
74
|
+
:'death_age' => :'Integer',
|
75
|
+
:'portfolio_return' => :'Float',
|
76
|
+
:'deposit_schedule' => :'CalculatorDepositSchedule',
|
77
|
+
:'percent_of_expenses_covered' => :'Float'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
+
|
89
|
+
if attributes.has_key?(:'retirement_savings')
|
90
|
+
self.retirement_savings = attributes[:'retirement_savings']
|
91
|
+
else
|
92
|
+
self.retirement_savings = 0.0
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'aggregation_account_ids')
|
96
|
+
if (value = attributes[:'aggregation_account_ids']).is_a?(Array)
|
97
|
+
self.aggregation_account_ids = value
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'retirement_age')
|
102
|
+
self.retirement_age = attributes[:'retirement_age']
|
103
|
+
else
|
104
|
+
self.retirement_age = 65
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.has_key?(:'retirement_income')
|
108
|
+
self.retirement_income = attributes[:'retirement_income']
|
109
|
+
else
|
110
|
+
self.retirement_income = 0.0
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'retirement_expenses')
|
114
|
+
self.retirement_expenses = attributes[:'retirement_expenses']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'current_age')
|
118
|
+
self.current_age = attributes[:'current_age']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'account_ids')
|
122
|
+
if (value = attributes[:'account_ids']).is_a?(Array)
|
123
|
+
self.account_ids = value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'retirement_tax')
|
128
|
+
self.retirement_tax = attributes[:'retirement_tax']
|
129
|
+
else
|
130
|
+
self.retirement_tax = 0.0
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'inflation_rate')
|
134
|
+
self.inflation_rate = attributes[:'inflation_rate']
|
135
|
+
else
|
136
|
+
self.inflation_rate = 0.0
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'death_age')
|
140
|
+
self.death_age = attributes[:'death_age']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'portfolio_return')
|
144
|
+
self.portfolio_return = attributes[:'portfolio_return']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'deposit_schedule')
|
148
|
+
self.deposit_schedule = attributes[:'deposit_schedule']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'percent_of_expenses_covered')
|
152
|
+
self.percent_of_expenses_covered = attributes[:'percent_of_expenses_covered']
|
153
|
+
else
|
154
|
+
self.percent_of_expenses_covered = 1.0
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
159
|
+
# @return Array for valid properties with the reasons
|
160
|
+
def list_invalid_properties
|
161
|
+
invalid_properties = Array.new
|
162
|
+
if !@retirement_savings.nil? && @retirement_savings < 0
|
163
|
+
invalid_properties.push('invalid value for "retirement_savings", must be greater than or equal to 0.')
|
164
|
+
end
|
165
|
+
|
166
|
+
if !@retirement_age.nil? && @retirement_age < 0
|
167
|
+
invalid_properties.push('invalid value for "retirement_age", must be greater than or equal to 0.')
|
168
|
+
end
|
169
|
+
|
170
|
+
if !@retirement_income.nil? && @retirement_income < 0
|
171
|
+
invalid_properties.push('invalid value for "retirement_income", must be greater than or equal to 0.')
|
172
|
+
end
|
173
|
+
|
174
|
+
if @retirement_expenses.nil?
|
175
|
+
invalid_properties.push('invalid value for "retirement_expenses", retirement_expenses cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @retirement_expenses < 0
|
179
|
+
invalid_properties.push('invalid value for "retirement_expenses", must be greater than or equal to 0.')
|
180
|
+
end
|
181
|
+
|
182
|
+
if @current_age.nil?
|
183
|
+
invalid_properties.push('invalid value for "current_age", current_age cannot be nil.')
|
184
|
+
end
|
185
|
+
|
186
|
+
if @current_age < 0
|
187
|
+
invalid_properties.push('invalid value for "current_age", must be greater than or equal to 0.')
|
188
|
+
end
|
189
|
+
|
190
|
+
if !@retirement_tax.nil? && @retirement_tax > 1
|
191
|
+
invalid_properties.push('invalid value for "retirement_tax", must be smaller than or equal to 1.')
|
192
|
+
end
|
193
|
+
|
194
|
+
if !@retirement_tax.nil? && @retirement_tax < 0
|
195
|
+
invalid_properties.push('invalid value for "retirement_tax", must be greater than or equal to 0.')
|
196
|
+
end
|
197
|
+
|
198
|
+
if !@inflation_rate.nil? && @inflation_rate < -1
|
199
|
+
invalid_properties.push('invalid value for "inflation_rate", must be greater than or equal to -1.')
|
200
|
+
end
|
201
|
+
|
202
|
+
if @death_age.nil?
|
203
|
+
invalid_properties.push('invalid value for "death_age", death_age cannot be nil.')
|
204
|
+
end
|
205
|
+
|
206
|
+
if @death_age < 0
|
207
|
+
invalid_properties.push('invalid value for "death_age", must be greater than or equal to 0.')
|
208
|
+
end
|
209
|
+
|
210
|
+
if @portfolio_return.nil?
|
211
|
+
invalid_properties.push('invalid value for "portfolio_return", portfolio_return cannot be nil.')
|
212
|
+
end
|
213
|
+
|
214
|
+
if @portfolio_return < -1
|
215
|
+
invalid_properties.push('invalid value for "portfolio_return", must be greater than or equal to -1.')
|
216
|
+
end
|
217
|
+
|
218
|
+
if !@percent_of_expenses_covered.nil? && @percent_of_expenses_covered > 1
|
219
|
+
invalid_properties.push('invalid value for "percent_of_expenses_covered", must be smaller than or equal to 1.')
|
220
|
+
end
|
221
|
+
|
222
|
+
if !@percent_of_expenses_covered.nil? && @percent_of_expenses_covered < 0
|
223
|
+
invalid_properties.push('invalid value for "percent_of_expenses_covered", must be greater than or equal to 0.')
|
224
|
+
end
|
225
|
+
|
226
|
+
invalid_properties
|
227
|
+
end
|
228
|
+
|
229
|
+
# Check to see if the all the properties in the model are valid
|
230
|
+
# @return true if the model is valid
|
231
|
+
def valid?
|
232
|
+
return false if !@retirement_savings.nil? && @retirement_savings < 0
|
233
|
+
return false if !@retirement_age.nil? && @retirement_age < 0
|
234
|
+
return false if !@retirement_income.nil? && @retirement_income < 0
|
235
|
+
return false if @retirement_expenses.nil?
|
236
|
+
return false if @retirement_expenses < 0
|
237
|
+
return false if @current_age.nil?
|
238
|
+
return false if @current_age < 0
|
239
|
+
return false if !@retirement_tax.nil? && @retirement_tax > 1
|
240
|
+
return false if !@retirement_tax.nil? && @retirement_tax < 0
|
241
|
+
return false if !@inflation_rate.nil? && @inflation_rate < -1
|
242
|
+
return false if @death_age.nil?
|
243
|
+
return false if @death_age < 0
|
244
|
+
return false if @portfolio_return.nil?
|
245
|
+
return false if @portfolio_return < -1
|
246
|
+
return false if !@percent_of_expenses_covered.nil? && @percent_of_expenses_covered > 1
|
247
|
+
return false if !@percent_of_expenses_covered.nil? && @percent_of_expenses_covered < 0
|
248
|
+
true
|
249
|
+
end
|
250
|
+
|
251
|
+
# Custom attribute writer method with validation
|
252
|
+
# @param [Object] retirement_savings Value to be assigned
|
253
|
+
def retirement_savings=(retirement_savings)
|
254
|
+
if !retirement_savings.nil? && retirement_savings < 0
|
255
|
+
fail ArgumentError, 'invalid value for "retirement_savings", must be greater than or equal to 0.'
|
256
|
+
end
|
257
|
+
|
258
|
+
@retirement_savings = retirement_savings
|
259
|
+
end
|
260
|
+
|
261
|
+
# Custom attribute writer method with validation
|
262
|
+
# @param [Object] retirement_age Value to be assigned
|
263
|
+
def retirement_age=(retirement_age)
|
264
|
+
if !retirement_age.nil? && retirement_age < 0
|
265
|
+
fail ArgumentError, 'invalid value for "retirement_age", must be greater than or equal to 0.'
|
266
|
+
end
|
267
|
+
|
268
|
+
@retirement_age = retirement_age
|
269
|
+
end
|
270
|
+
|
271
|
+
# Custom attribute writer method with validation
|
272
|
+
# @param [Object] retirement_income Value to be assigned
|
273
|
+
def retirement_income=(retirement_income)
|
274
|
+
if !retirement_income.nil? && retirement_income < 0
|
275
|
+
fail ArgumentError, 'invalid value for "retirement_income", must be greater than or equal to 0.'
|
276
|
+
end
|
277
|
+
|
278
|
+
@retirement_income = retirement_income
|
279
|
+
end
|
280
|
+
|
281
|
+
# Custom attribute writer method with validation
|
282
|
+
# @param [Object] retirement_expenses Value to be assigned
|
283
|
+
def retirement_expenses=(retirement_expenses)
|
284
|
+
if retirement_expenses.nil?
|
285
|
+
fail ArgumentError, 'retirement_expenses cannot be nil'
|
286
|
+
end
|
287
|
+
|
288
|
+
if retirement_expenses < 0
|
289
|
+
fail ArgumentError, 'invalid value for "retirement_expenses", must be greater than or equal to 0.'
|
290
|
+
end
|
291
|
+
|
292
|
+
@retirement_expenses = retirement_expenses
|
293
|
+
end
|
294
|
+
|
295
|
+
# Custom attribute writer method with validation
|
296
|
+
# @param [Object] current_age Value to be assigned
|
297
|
+
def current_age=(current_age)
|
298
|
+
if current_age.nil?
|
299
|
+
fail ArgumentError, 'current_age cannot be nil'
|
300
|
+
end
|
301
|
+
|
302
|
+
if current_age < 0
|
303
|
+
fail ArgumentError, 'invalid value for "current_age", must be greater than or equal to 0.'
|
304
|
+
end
|
305
|
+
|
306
|
+
@current_age = current_age
|
307
|
+
end
|
308
|
+
|
309
|
+
# Custom attribute writer method with validation
|
310
|
+
# @param [Object] retirement_tax Value to be assigned
|
311
|
+
def retirement_tax=(retirement_tax)
|
312
|
+
if !retirement_tax.nil? && retirement_tax > 1
|
313
|
+
fail ArgumentError, 'invalid value for "retirement_tax", must be smaller than or equal to 1.'
|
314
|
+
end
|
315
|
+
|
316
|
+
if !retirement_tax.nil? && retirement_tax < 0
|
317
|
+
fail ArgumentError, 'invalid value for "retirement_tax", must be greater than or equal to 0.'
|
318
|
+
end
|
319
|
+
|
320
|
+
@retirement_tax = retirement_tax
|
321
|
+
end
|
322
|
+
|
323
|
+
# Custom attribute writer method with validation
|
324
|
+
# @param [Object] inflation_rate Value to be assigned
|
325
|
+
def inflation_rate=(inflation_rate)
|
326
|
+
if !inflation_rate.nil? && inflation_rate < -1
|
327
|
+
fail ArgumentError, 'invalid value for "inflation_rate", must be greater than or equal to -1.'
|
328
|
+
end
|
329
|
+
|
330
|
+
@inflation_rate = inflation_rate
|
331
|
+
end
|
332
|
+
|
333
|
+
# Custom attribute writer method with validation
|
334
|
+
# @param [Object] death_age Value to be assigned
|
335
|
+
def death_age=(death_age)
|
336
|
+
if death_age.nil?
|
337
|
+
fail ArgumentError, 'death_age cannot be nil'
|
338
|
+
end
|
339
|
+
|
340
|
+
if death_age < 0
|
341
|
+
fail ArgumentError, 'invalid value for "death_age", must be greater than or equal to 0.'
|
342
|
+
end
|
343
|
+
|
344
|
+
@death_age = death_age
|
345
|
+
end
|
346
|
+
|
347
|
+
# Custom attribute writer method with validation
|
348
|
+
# @param [Object] portfolio_return Value to be assigned
|
349
|
+
def portfolio_return=(portfolio_return)
|
350
|
+
if portfolio_return.nil?
|
351
|
+
fail ArgumentError, 'portfolio_return cannot be nil'
|
352
|
+
end
|
353
|
+
|
354
|
+
if portfolio_return < -1
|
355
|
+
fail ArgumentError, 'invalid value for "portfolio_return", must be greater than or equal to -1.'
|
356
|
+
end
|
357
|
+
|
358
|
+
@portfolio_return = portfolio_return
|
359
|
+
end
|
360
|
+
|
361
|
+
# Custom attribute writer method with validation
|
362
|
+
# @param [Object] percent_of_expenses_covered Value to be assigned
|
363
|
+
def percent_of_expenses_covered=(percent_of_expenses_covered)
|
364
|
+
if !percent_of_expenses_covered.nil? && percent_of_expenses_covered > 1
|
365
|
+
fail ArgumentError, 'invalid value for "percent_of_expenses_covered", must be smaller than or equal to 1.'
|
366
|
+
end
|
367
|
+
|
368
|
+
if !percent_of_expenses_covered.nil? && percent_of_expenses_covered < 0
|
369
|
+
fail ArgumentError, 'invalid value for "percent_of_expenses_covered", must be greater than or equal to 0.'
|
370
|
+
end
|
371
|
+
|
372
|
+
@percent_of_expenses_covered = percent_of_expenses_covered
|
373
|
+
end
|
374
|
+
|
375
|
+
# Checks equality by comparing each attribute.
|
376
|
+
# @param [Object] Object to be compared
|
377
|
+
def ==(o)
|
378
|
+
return true if self.equal?(o)
|
379
|
+
self.class == o.class &&
|
380
|
+
retirement_savings == o.retirement_savings &&
|
381
|
+
aggregation_account_ids == o.aggregation_account_ids &&
|
382
|
+
retirement_age == o.retirement_age &&
|
383
|
+
retirement_income == o.retirement_income &&
|
384
|
+
retirement_expenses == o.retirement_expenses &&
|
385
|
+
current_age == o.current_age &&
|
386
|
+
account_ids == o.account_ids &&
|
387
|
+
retirement_tax == o.retirement_tax &&
|
388
|
+
inflation_rate == o.inflation_rate &&
|
389
|
+
death_age == o.death_age &&
|
390
|
+
portfolio_return == o.portfolio_return &&
|
391
|
+
deposit_schedule == o.deposit_schedule &&
|
392
|
+
percent_of_expenses_covered == o.percent_of_expenses_covered
|
393
|
+
end
|
394
|
+
|
395
|
+
# @see the `==` method
|
396
|
+
# @param [Object] Object to be compared
|
397
|
+
def eql?(o)
|
398
|
+
self == o
|
399
|
+
end
|
400
|
+
|
401
|
+
# Calculates hash code according to all attributes.
|
402
|
+
# @return [Fixnum] Hash code
|
403
|
+
def hash
|
404
|
+
[retirement_savings, aggregation_account_ids, retirement_age, retirement_income, retirement_expenses, current_age, account_ids, retirement_tax, inflation_rate, death_age, portfolio_return, deposit_schedule, percent_of_expenses_covered].hash
|
405
|
+
end
|
406
|
+
|
407
|
+
# Builds the object from hash
|
408
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
409
|
+
# @return [Object] Returns the model itself
|
410
|
+
def build_from_hash(attributes)
|
411
|
+
return nil unless attributes.is_a?(Hash)
|
412
|
+
self.class.swagger_types.each_pair do |key, type|
|
413
|
+
if type =~ /\AArray<(.*)>/i
|
414
|
+
# check to ensure the input is an array given that the attribute
|
415
|
+
# is documented as an array but the input is not
|
416
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
417
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
418
|
+
end
|
419
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
420
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
421
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
422
|
+
end
|
423
|
+
|
424
|
+
self
|
425
|
+
end
|
426
|
+
|
427
|
+
# Deserializes the data based on type
|
428
|
+
# @param string type Data type
|
429
|
+
# @param string value Value to be deserialized
|
430
|
+
# @return [Object] Deserialized data
|
431
|
+
def _deserialize(type, value)
|
432
|
+
case type.to_sym
|
433
|
+
when :DateTime
|
434
|
+
DateTime.parse(value)
|
435
|
+
when :Date
|
436
|
+
Date.parse(value)
|
437
|
+
when :String
|
438
|
+
value.to_s
|
439
|
+
when :Integer
|
440
|
+
value.to_i
|
441
|
+
when :Float
|
442
|
+
value.to_f
|
443
|
+
when :BOOLEAN
|
444
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
445
|
+
true
|
446
|
+
else
|
447
|
+
false
|
448
|
+
end
|
449
|
+
when :Object
|
450
|
+
# generic object (usually a Hash), return directly
|
451
|
+
value
|
452
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
453
|
+
inner_type = Regexp.last_match[:inner_type]
|
454
|
+
value.map { |v| _deserialize(inner_type, v) }
|
455
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
456
|
+
k_type = Regexp.last_match[:k_type]
|
457
|
+
v_type = Regexp.last_match[:v_type]
|
458
|
+
{}.tap do |hash|
|
459
|
+
value.each do |k, v|
|
460
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
461
|
+
end
|
462
|
+
end
|
463
|
+
else # model
|
464
|
+
temp_model = ProtonApi.const_get(type).new
|
465
|
+
temp_model.build_from_hash(value)
|
466
|
+
end
|
467
|
+
end
|
468
|
+
|
469
|
+
# Returns the string representation of the object
|
470
|
+
# @return [String] String presentation of the object
|
471
|
+
def to_s
|
472
|
+
to_hash.to_s
|
473
|
+
end
|
474
|
+
|
475
|
+
# to_body is an alias to to_hash (backward compatibility)
|
476
|
+
# @return [Hash] Returns the object in the form of hash
|
477
|
+
def to_body
|
478
|
+
to_hash
|
479
|
+
end
|
480
|
+
|
481
|
+
# Returns the object in the form of hash
|
482
|
+
# @return [Hash] Returns the object in the form of hash
|
483
|
+
def to_hash
|
484
|
+
hash = {}
|
485
|
+
self.class.attribute_map.each_pair do |attr, param|
|
486
|
+
value = self.send(attr)
|
487
|
+
next if value.nil?
|
488
|
+
hash[param] = _to_hash(value)
|
489
|
+
end
|
490
|
+
hash
|
491
|
+
end
|
492
|
+
|
493
|
+
# Outputs non-array value in the form of hash
|
494
|
+
# For object, use to_hash. Otherwise, just return the value
|
495
|
+
# @param [Object] value Any valid value
|
496
|
+
# @return [Hash] Returns the value in the form of hash
|
497
|
+
def _to_hash(value)
|
498
|
+
if value.is_a?(Array)
|
499
|
+
value.compact.map { |v| _to_hash(v) }
|
500
|
+
elsif value.is_a?(Hash)
|
501
|
+
{}.tap do |hash|
|
502
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
503
|
+
end
|
504
|
+
elsif value.respond_to? :to_hash
|
505
|
+
value.to_hash
|
506
|
+
else
|
507
|
+
value
|
508
|
+
end
|
509
|
+
end
|
510
|
+
|
511
|
+
end
|
512
|
+
end
|