proton_api 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -205
- data/lib/proton_api.rb +10 -2
- data/lib/proton_api/api/annuities_api.rb +2 -2
- data/lib/proton_api/api/business_financial_management_api.rb +2 -2
- data/lib/proton_api/api/cards_api.rb +56 -2
- data/lib/proton_api/api/financial_health_api.rb +2 -2
- data/lib/proton_api/api/financial_planning_api.rb +2 -2
- data/lib/proton_api/api/goals_api.rb +2 -2
- data/lib/proton_api/api/life_insurance_api.rb +2 -2
- data/lib/proton_api/api/personal_financial_management_api.rb +56 -2
- data/lib/proton_api/api/portfolio_construction_api.rb +2 -2
- data/lib/proton_api/api/portfolio_management_api.rb +2 -2
- data/lib/proton_api/api/risk_scoring_api.rb +2 -2
- data/lib/proton_api/api/simulations_api.rb +2 -2
- data/lib/proton_api/api/util_api.rb +185 -0
- data/lib/proton_api/api_client.rb +6 -6
- data/lib/proton_api/api_error.rb +2 -2
- data/lib/proton_api/configuration.rb +3 -3
- data/lib/proton_api/models/accumulation_goal_deposit_config.rb +25 -25
- data/lib/proton_api/models/annuity_calculator_accumulation_horizon_request.rb +138 -141
- data/lib/proton_api/models/annuity_calculator_annuity_amount_request.rb +129 -132
- data/lib/proton_api/models/annuity_calculator_decumulation_horizon_request.rb +138 -141
- data/lib/proton_api/models/annuity_calculator_deposit_amount_request.rb +138 -141
- data/lib/proton_api/models/annuity_calculator_initial_balance_request.rb +138 -141
- data/lib/proton_api/models/annuity_deposit_schedule.rb +33 -36
- data/lib/proton_api/models/answer.rb +186 -0
- data/lib/proton_api/models/backtest_request.rb +56 -59
- data/lib/proton_api/models/beneficiary_bequest_config.rb +32 -35
- data/lib/proton_api/models/budget_aggregation_account.rb +7 -10
- data/lib/proton_api/models/budget_calculator_request.rb +85 -66
- data/lib/proton_api/models/budget_component.rb +25 -28
- data/lib/proton_api/models/budget_details.rb +75 -78
- data/lib/proton_api/models/business_financial_health_check_request.rb +172 -166
- data/lib/proton_api/models/business_invoice_analysis_request.rb +79 -73
- data/lib/proton_api/models/calculator_deposit_schedule.rb +22 -25
- data/lib/proton_api/models/calculator_deposit_schedule1.rb +33 -36
- data/lib/proton_api/models/card_analysis_request.rb +372 -0
- data/lib/proton_api/models/card_limit_check_request.rb +42 -14
- data/lib/proton_api/models/card_transaction_authorization_request.rb +143 -80
- data/lib/proton_api/models/cash_analysis_request.rb +82 -63
- data/lib/proton_api/models/cash_flow_analysis_request.rb +104 -76
- data/lib/proton_api/models/children_education_config.rb +7 -10
- data/lib/proton_api/models/customer_analysis_request.rb +60 -54
- data/lib/proton_api/models/decision_tree_result_request.rb +236 -0
- data/lib/proton_api/models/decumulation_goal_deposit_config.rb +28 -31
- data/lib/proton_api/models/dimensional_risk_score_request.rb +52 -55
- data/lib/proton_api/models/diversification_score_request.rb +59 -62
- data/lib/proton_api/models/education_calculator_annual_cost_request.rb +143 -146
- data/lib/proton_api/models/education_calculator_deposit_amount_request.rb +170 -173
- data/lib/proton_api/models/education_calculator_percent_covered_request.rb +136 -139
- data/lib/proton_api/models/education_config.rb +44 -47
- data/lib/proton_api/models/emergency_fund_calculator_request.rb +182 -185
- data/lib/proton_api/models/event_study_request.rb +64 -67
- data/lib/proton_api/models/fee_analysis_request.rb +42 -34
- data/lib/proton_api/models/financial_health_check_request.rb +109 -112
- data/lib/proton_api/models/financial_picture_request.rb +53 -52
- data/lib/proton_api/models/financial_statement_analysis_request.rb +140 -134
- data/lib/proton_api/models/goal_accumulation_allocation_request.rb +271 -274
- data/lib/proton_api/models/goal_accumulation_recommendation_request.rb +218 -221
- data/lib/proton_api/models/goal_accumulation_status_request.rb +218 -221
- data/lib/proton_api/models/goal_config.rb +35 -38
- data/lib/proton_api/models/goal_decumulation_allocation_request.rb +293 -296
- data/lib/proton_api/models/goal_decumulation_recommendation_request.rb +242 -245
- data/lib/proton_api/models/goal_decumulation_status_request.rb +242 -245
- data/lib/proton_api/models/goal_withdrawal_config.rb +82 -85
- data/lib/proton_api/models/guaranteed_rate_benefit.rb +51 -54
- data/lib/proton_api/models/income_config.rb +37 -40
- data/lib/proton_api/models/life_insurance_needs_calculator_request.rb +152 -155
- data/lib/proton_api/models/location.rb +183 -0
- data/lib/proton_api/models/monte_carlo_request.rb +157 -160
- data/lib/proton_api/models/mortgage_calculator_down_payment_request.rb +46 -49
- data/lib/proton_api/models/mortgage_calculator_home_price_request.rb +46 -49
- data/lib/proton_api/models/mortgage_calculator_periodic_payment_request.rb +71 -74
- data/lib/proton_api/models/mvo_request.rb +88 -91
- data/lib/proton_api/models/opt_config.rb +54 -57
- data/lib/proton_api/models/opt_config1.rb +29 -32
- data/lib/proton_api/models/order_rebalance_request.rb +398 -0
- data/lib/proton_api/models/performance_calculator_request.rb +687 -0
- data/lib/proton_api/models/periods.rb +7 -10
- data/lib/proton_api/models/portfolio_optimization_score_request.rb +68 -71
- data/lib/proton_api/models/portfolio_what_if_request.rb +71 -74
- data/lib/proton_api/models/purchase_calculator_amount_request.rb +112 -115
- data/lib/proton_api/models/purchase_calculator_deposit_amount_request.rb +136 -139
- data/lib/proton_api/models/purchase_calculator_horizon_request.rb +100 -103
- data/lib/proton_api/models/ratio_targets.rb +79 -82
- data/lib/proton_api/models/ratio_targets1.rb +38 -41
- data/lib/proton_api/models/rebalancing_signal_request.rb +26 -29
- data/lib/proton_api/models/recommendation_config.rb +104 -107
- data/lib/proton_api/models/recommendation_config1.rb +100 -103
- data/lib/proton_api/models/recurring_transaction_analysis_request.rb +106 -76
- data/lib/proton_api/models/retirement_calculator_deposit_amount_request.rb +148 -151
- data/lib/proton_api/models/retirement_calculator_expenses_request.rb +119 -122
- data/lib/proton_api/models/retirement_calculator_percent_covered_request.rb +132 -135
- data/lib/proton_api/models/risk_allocation_request.rb +53 -56
- data/lib/proton_api/models/risk_score_request.rb +37 -40
- data/lib/proton_api/models/savings_calculator_request.rb +100 -103
- data/lib/proton_api/models/savings_deposit_schedule.rb +22 -25
- data/lib/proton_api/models/scenario_analysis_request.rb +81 -84
- data/lib/proton_api/models/sensitivity_analysis_request.rb +77 -80
- data/lib/proton_api/models/sensitivity_factor.rb +58 -61
- data/lib/proton_api/models/settings.rb +38 -41
- data/lib/proton_api/models/spending_analysis_request.rb +505 -0
- data/lib/proton_api/models/variable_annuity_request.rb +284 -287
- data/lib/proton_api/models/w_config.rb +77 -80
- data/lib/proton_api/models/w_config1.rb +66 -69
- data/lib/proton_api/version.rb +3 -3
- data/proton_api.gemspec +2 -2
- data/spec/api/annuities_api_spec.rb +2 -2
- data/spec/api/business_financial_management_api_spec.rb +2 -2
- data/spec/api/cards_api_spec.rb +14 -2
- data/spec/api/financial_health_api_spec.rb +2 -2
- data/spec/api/financial_planning_api_spec.rb +2 -2
- data/spec/api/goals_api_spec.rb +2 -2
- data/spec/api/life_insurance_api_spec.rb +2 -2
- data/spec/api/personal_financial_management_api_spec.rb +14 -2
- data/spec/api/portfolio_construction_api_spec.rb +2 -2
- data/spec/api/portfolio_management_api_spec.rb +2 -2
- data/spec/api/risk_scoring_api_spec.rb +2 -2
- data/spec/api/simulations_api_spec.rb +2 -2
- data/spec/api/util_api_spec.rb +71 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/accumulation_goal_deposit_config_spec.rb +10 -10
- data/spec/models/annuity_calculator_accumulation_horizon_request_spec.rb +17 -17
- data/spec/models/annuity_calculator_annuity_amount_request_spec.rb +17 -17
- data/spec/models/annuity_calculator_decumulation_horizon_request_spec.rb +17 -17
- data/spec/models/annuity_calculator_deposit_amount_request_spec.rb +17 -17
- data/spec/models/annuity_calculator_initial_balance_request_spec.rb +17 -17
- data/spec/models/annuity_deposit_schedule_spec.rb +4 -4
- data/spec/models/answer_spec.rb +41 -0
- data/spec/models/backtest_request_spec.rb +10 -10
- data/spec/models/beneficiary_bequest_config_spec.rb +4 -4
- data/spec/models/budget_aggregation_account_spec.rb +2 -2
- data/spec/models/budget_calculator_request_spec.rb +25 -13
- data/spec/models/budget_component_spec.rb +4 -4
- data/spec/models/budget_details_spec.rb +15 -15
- data/spec/models/business_financial_health_check_request_spec.rb +34 -28
- data/spec/models/business_invoice_analysis_request_spec.rb +18 -12
- data/spec/models/calculator_deposit_schedule1_spec.rb +4 -4
- data/spec/models/calculator_deposit_schedule_spec.rb +8 -8
- data/spec/models/card_analysis_request_spec.rb +129 -0
- data/spec/models/card_limit_check_request_spec.rb +20 -2
- data/spec/models/card_transaction_authorization_request_spec.rb +57 -15
- data/spec/models/cash_analysis_request_spec.rb +25 -13
- data/spec/models/cash_flow_analysis_request_spec.rb +34 -16
- data/spec/models/children_education_config_spec.rb +2 -2
- data/spec/models/customer_analysis_request_spec.rb +15 -9
- data/spec/models/decision_tree_result_request_spec.rb +51 -0
- data/spec/models/decumulation_goal_deposit_config_spec.rb +10 -10
- data/spec/models/dimensional_risk_score_request_spec.rb +8 -8
- data/spec/models/diversification_score_request_spec.rb +14 -14
- data/spec/models/education_calculator_annual_cost_request_spec.rb +13 -13
- data/spec/models/education_calculator_deposit_amount_request_spec.rb +13 -13
- data/spec/models/education_calculator_percent_covered_request_spec.rb +12 -12
- data/spec/models/education_config_spec.rb +5 -5
- data/spec/models/emergency_fund_calculator_request_spec.rb +23 -23
- data/spec/models/event_study_request_spec.rb +17 -17
- data/spec/models/fee_analysis_request_spec.rb +12 -6
- data/spec/models/financial_health_check_request_spec.rb +12 -12
- data/spec/models/financial_picture_request_spec.rb +15 -9
- data/spec/models/financial_statement_analysis_request_spec.rb +39 -33
- data/spec/models/goal_accumulation_allocation_request_spec.rb +48 -48
- data/spec/models/goal_accumulation_recommendation_request_spec.rb +34 -34
- data/spec/models/goal_accumulation_status_request_spec.rb +34 -34
- data/spec/models/goal_config_spec.rb +4 -4
- data/spec/models/goal_decumulation_allocation_request_spec.rb +51 -51
- data/spec/models/goal_decumulation_recommendation_request_spec.rb +35 -35
- data/spec/models/goal_decumulation_status_request_spec.rb +35 -35
- data/spec/models/goal_withdrawal_config_spec.rb +20 -20
- data/spec/models/guaranteed_rate_benefit_spec.rb +5 -5
- data/spec/models/income_config_spec.rb +4 -4
- data/spec/models/life_insurance_needs_calculator_request_spec.rb +16 -16
- data/spec/models/location_spec.rb +41 -0
- data/spec/models/monte_carlo_request_spec.rb +31 -31
- data/spec/models/mortgage_calculator_down_payment_request_spec.rb +6 -6
- data/spec/models/mortgage_calculator_home_price_request_spec.rb +6 -6
- data/spec/models/mortgage_calculator_periodic_payment_request_spec.rb +6 -6
- data/spec/models/mvo_request_spec.rb +23 -23
- data/spec/models/opt_config1_spec.rb +10 -10
- data/spec/models/opt_config_spec.rb +13 -13
- data/spec/models/order_rebalance_request_spec.rb +123 -0
- data/spec/models/performance_calculator_request_spec.rb +233 -0
- data/spec/models/periods_spec.rb +2 -2
- data/spec/models/portfolio_optimization_score_request_spec.rb +16 -16
- data/spec/models/portfolio_what_if_request_spec.rb +16 -16
- data/spec/models/purchase_calculator_amount_request_spec.rb +14 -14
- data/spec/models/purchase_calculator_deposit_amount_request_spec.rb +16 -16
- data/spec/models/purchase_calculator_horizon_request_spec.rb +10 -10
- data/spec/models/ratio_targets1_spec.rb +4 -4
- data/spec/models/ratio_targets_spec.rb +8 -8
- data/spec/models/rebalancing_signal_request_spec.rb +6 -6
- data/spec/models/recommendation_config1_spec.rb +9 -9
- data/spec/models/recommendation_config_spec.rb +9 -9
- data/spec/models/recurring_transaction_analysis_request_spec.rb +33 -15
- data/spec/models/retirement_calculator_deposit_amount_request_spec.rb +13 -13
- data/spec/models/retirement_calculator_expenses_request_spec.rb +12 -12
- data/spec/models/retirement_calculator_percent_covered_request_spec.rb +12 -12
- data/spec/models/risk_allocation_request_spec.rb +15 -15
- data/spec/models/risk_score_request_spec.rb +8 -8
- data/spec/models/savings_calculator_request_spec.rb +16 -16
- data/spec/models/savings_deposit_schedule_spec.rb +8 -8
- data/spec/models/scenario_analysis_request_spec.rb +19 -19
- data/spec/models/sensitivity_analysis_request_spec.rb +23 -23
- data/spec/models/sensitivity_factor_spec.rb +6 -6
- data/spec/models/settings_spec.rb +13 -13
- data/spec/models/spending_analysis_request_spec.rb +187 -0
- data/spec/models/variable_annuity_request_spec.rb +40 -40
- data/spec/models/w_config1_spec.rb +6 -6
- data/spec/models/w_config_spec.rb +7 -7
- data/spec/spec_helper.rb +2 -2
- metadata +26 -94
- data/docs/AccumulationGoalDepositConfig.md +0 -14
- data/docs/AnnuitiesApi.md +0 -344
- data/docs/AnnuityCalculatorAccumulationHorizonRequest.md +0 -19
- data/docs/AnnuityCalculatorAnnuityAmountRequest.md +0 -19
- data/docs/AnnuityCalculatorDecumulationHorizonRequest.md +0 -19
- data/docs/AnnuityCalculatorDepositAmountRequest.md +0 -19
- data/docs/AnnuityCalculatorInitialBalanceRequest.md +0 -19
- data/docs/AnnuityDepositSchedule.md +0 -10
- data/docs/BacktestRequest.md +0 -17
- data/docs/BeneficiaryBequestConfig.md +0 -10
- data/docs/BudgetAggregationAccount.md +0 -8
- data/docs/BudgetCalculatorRequest.md +0 -16
- data/docs/BudgetComponent.md +0 -10
- data/docs/BudgetDetails.md +0 -17
- data/docs/BusinessFinancialHealthCheckRequest.md +0 -22
- data/docs/BusinessFinancialManagementApi.md +0 -288
- data/docs/BusinessInvoiceAnalysisRequest.md +0 -20
- data/docs/CalculatorDepositSchedule.md +0 -9
- data/docs/CalculatorDepositSchedule1.md +0 -10
- data/docs/CardLimitCheckRequest.md +0 -9
- data/docs/CardTransactionAuthorizationRequest.md +0 -19
- data/docs/CardsApi.md +0 -120
- data/docs/CashAnalysisRequest.md +0 -17
- data/docs/CashFlowAnalysisRequest.md +0 -20
- data/docs/ChildrenEducationConfig.md +0 -9
- data/docs/CustomerAnalysisRequest.md +0 -17
- data/docs/DecumulationGoalDepositConfig.md +0 -14
- data/docs/DimensionalRiskScoreRequest.md +0 -16
- data/docs/DiversificationScoreRequest.md +0 -19
- data/docs/EducationCalculatorAnnualCostRequest.md +0 -18
- data/docs/EducationCalculatorDepositAmountRequest.md +0 -19
- data/docs/EducationCalculatorPercentCoveredRequest.md +0 -18
- data/docs/EducationConfig.md +0 -10
- data/docs/EmergencyFundCalculatorRequest.md +0 -24
- data/docs/EventStudyRequest.md +0 -18
- data/docs/FeeAnalysisRequest.md +0 -13
- data/docs/FinancialHealthApi.md +0 -232
- data/docs/FinancialHealthCheckRequest.md +0 -17
- data/docs/FinancialPictureRequest.md +0 -16
- data/docs/FinancialPlanningApi.md +0 -680
- data/docs/FinancialStatementAnalysisRequest.md +0 -22
- data/docs/GoalAccumulationAllocationRequest.md +0 -33
- data/docs/GoalAccumulationRecommendationRequest.md +0 -28
- data/docs/GoalAccumulationStatusRequest.md +0 -28
- data/docs/GoalConfig.md +0 -9
- data/docs/GoalDecumulationAllocationRequest.md +0 -34
- data/docs/GoalDecumulationRecommendationRequest.md +0 -29
- data/docs/GoalDecumulationStatusRequest.md +0 -29
- data/docs/GoalWithdrawalConfig.md +0 -14
- data/docs/GoalsApi.md +0 -344
- data/docs/GuaranteedRateBenefit.md +0 -11
- data/docs/IncomeConfig.md +0 -10
- data/docs/LifeInsuranceApi.md +0 -64
- data/docs/LifeInsuranceNeedsCalculatorRequest.md +0 -22
- data/docs/MonteCarloRequest.md +0 -29
- data/docs/MortgageCalculatorDownPaymentRequest.md +0 -11
- data/docs/MortgageCalculatorHomePriceRequest.md +0 -11
- data/docs/MortgageCalculatorPeriodicPaymentRequest.md +0 -11
- data/docs/MvoRequest.md +0 -18
- data/docs/OptConfig.md +0 -14
- data/docs/OptConfig1.md +0 -12
- data/docs/Periods.md +0 -9
- data/docs/PersonalFinancialManagementApi.md +0 -288
- data/docs/PortfolioConstructionApi.md +0 -64
- data/docs/PortfolioManagementApi.md +0 -64
- data/docs/PortfolioOptimizationScoreRequest.md +0 -21
- data/docs/PortfolioWhatIfRequest.md +0 -21
- data/docs/PurchaseCalculatorAmountRequest.md +0 -16
- data/docs/PurchaseCalculatorDepositAmountRequest.md +0 -17
- data/docs/PurchaseCalculatorHorizonRequest.md +0 -15
- data/docs/RatioTargets.md +0 -13
- data/docs/RatioTargets1.md +0 -13
- data/docs/RebalancingSignalRequest.md +0 -13
- data/docs/RecommendationConfig.md +0 -15
- data/docs/RecommendationConfig1.md +0 -14
- data/docs/RecurringTransactionAnalysisRequest.md +0 -19
- data/docs/RetirementCalculatorDepositAmountRequest.md +0 -20
- data/docs/RetirementCalculatorExpensesRequest.md +0 -19
- data/docs/RetirementCalculatorPercentCoveredRequest.md +0 -19
- data/docs/RiskAllocationRequest.md +0 -14
- data/docs/RiskScoreRequest.md +0 -13
- data/docs/RiskScoringApi.md +0 -176
- data/docs/SavingsCalculatorRequest.md +0 -17
- data/docs/SavingsDepositSchedule.md +0 -11
- data/docs/ScenarioAnalysisRequest.md +0 -22
- data/docs/SensitivityAnalysisRequest.md +0 -22
- data/docs/SensitivityFactor.md +0 -11
- data/docs/Settings.md +0 -13
- data/docs/SimulationsApi.md +0 -400
- data/docs/VariableAnnuityRequest.md +0 -34
- data/docs/WConfig.md +0 -12
- data/docs/WConfig1.md +0 -12
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Financial engineering module of Hydrogen Atom
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.
|
6
|
+
OpenAPI spec version: 1.9.0
|
7
7
|
Contact: info@hydrogenplatform.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,60 +14,60 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ProtonApi
|
16
16
|
class VariableAnnuityRequest
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
attr_accessor :result_type
|
17
|
+
attr_accessor :p
|
20
18
|
|
21
|
-
attr_accessor :
|
19
|
+
attr_accessor :allocation_id
|
22
20
|
|
23
|
-
attr_accessor :
|
21
|
+
attr_accessor :decumulation_horizon
|
24
22
|
|
25
|
-
attr_accessor :
|
23
|
+
attr_accessor :accumulation_horizon
|
26
24
|
|
27
25
|
attr_accessor :annuitization_rate
|
28
26
|
|
29
|
-
attr_accessor :
|
30
|
-
|
31
|
-
attr_accessor :market_data_source
|
32
|
-
|
33
|
-
attr_accessor :tax_rate
|
27
|
+
attr_accessor :guaranteed_rate_benefit
|
34
28
|
|
35
|
-
attr_accessor :
|
29
|
+
attr_accessor :model_id
|
36
30
|
|
37
|
-
attr_accessor :
|
31
|
+
attr_accessor :portfolio_tickers
|
38
32
|
|
39
|
-
attr_accessor :
|
33
|
+
attr_accessor :create_log
|
40
34
|
|
41
|
-
attr_accessor :
|
35
|
+
attr_accessor :inflation_rate
|
42
36
|
|
43
37
|
attr_accessor :aggregation_account_id
|
44
38
|
|
45
|
-
attr_accessor :
|
39
|
+
attr_accessor :n
|
46
40
|
|
47
|
-
attr_accessor :
|
41
|
+
attr_accessor :guaranteed_accumulation_benefit
|
48
42
|
|
49
|
-
attr_accessor :
|
43
|
+
attr_accessor :end_date
|
50
44
|
|
51
|
-
attr_accessor :
|
45
|
+
attr_accessor :tax_rate
|
52
46
|
|
53
|
-
attr_accessor :
|
47
|
+
attr_accessor :start_date
|
54
48
|
|
55
|
-
attr_accessor :
|
49
|
+
attr_accessor :remove_outliers
|
56
50
|
|
57
51
|
attr_accessor :portfolio_weights
|
58
52
|
|
59
|
-
attr_accessor :
|
53
|
+
attr_accessor :portfolio_id
|
60
54
|
|
61
|
-
attr_accessor :
|
55
|
+
attr_accessor :result_type
|
62
56
|
|
63
|
-
attr_accessor :
|
57
|
+
attr_accessor :account_id
|
64
58
|
|
65
|
-
attr_accessor :
|
59
|
+
attr_accessor :trading_days_per_year
|
66
60
|
|
67
|
-
attr_accessor :
|
61
|
+
attr_accessor :use_proxy_data
|
62
|
+
|
63
|
+
attr_accessor :initial_balance
|
64
|
+
|
65
|
+
attr_accessor :market_data_source
|
68
66
|
|
69
67
|
attr_accessor :frequency_interval
|
70
68
|
|
69
|
+
attr_accessor :deposit_schedule
|
70
|
+
|
71
71
|
class EnumAttributeValidator
|
72
72
|
attr_reader :datatype
|
73
73
|
attr_reader :allowable_values
|
@@ -93,66 +93,66 @@ module ProtonApi
|
|
93
93
|
# Attribute mapping from ruby-style variable name to JSON key.
|
94
94
|
def self.attribute_map
|
95
95
|
{
|
96
|
-
:'portfolio_id' => :'portfolio_id',
|
97
|
-
:'result_type' => :'result_type',
|
98
|
-
:'inflation_rate' => :'inflation_rate',
|
99
|
-
:'remove_outliers' => :'remove_outliers',
|
100
|
-
:'deposit_schedule' => :'deposit_schedule',
|
101
|
-
:'annuitization_rate' => :'annuitization_rate',
|
102
|
-
:'end_date' => :'end_date',
|
103
|
-
:'market_data_source' => :'market_data_source',
|
104
|
-
:'tax_rate' => :'tax_rate',
|
105
96
|
:'p' => :'p',
|
106
97
|
:'allocation_id' => :'allocation_id',
|
107
|
-
:'use_proxy_data' => :'use_proxy_data',
|
108
|
-
:'start_date' => :'start_date',
|
109
|
-
:'aggregation_account_id' => :'aggregation_account_id',
|
110
|
-
:'initial_balance' => :'initial_balance',
|
111
|
-
:'create_log' => :'create_log',
|
112
98
|
:'decumulation_horizon' => :'decumulation_horizon',
|
113
|
-
:'account_id' => :'account_id',
|
114
99
|
:'accumulation_horizon' => :'accumulation_horizon',
|
115
|
-
:'
|
116
|
-
:'portfolio_weights' => :'portfolio_weights',
|
117
|
-
:'guaranteed_accumulation_benefit' => :'guaranteed_accumulation_benefit',
|
118
|
-
:'portfolio_tickers' => :'portfolio_tickers',
|
100
|
+
:'annuitization_rate' => :'annuitization_rate',
|
119
101
|
:'guaranteed_rate_benefit' => :'guaranteed_rate_benefit',
|
120
102
|
:'model_id' => :'model_id',
|
103
|
+
:'portfolio_tickers' => :'portfolio_tickers',
|
104
|
+
:'create_log' => :'create_log',
|
105
|
+
:'inflation_rate' => :'inflation_rate',
|
106
|
+
:'aggregation_account_id' => :'aggregation_account_id',
|
121
107
|
:'n' => :'n',
|
122
|
-
:'
|
108
|
+
:'guaranteed_accumulation_benefit' => :'guaranteed_accumulation_benefit',
|
109
|
+
:'end_date' => :'end_date',
|
110
|
+
:'tax_rate' => :'tax_rate',
|
111
|
+
:'start_date' => :'start_date',
|
112
|
+
:'remove_outliers' => :'remove_outliers',
|
113
|
+
:'portfolio_weights' => :'portfolio_weights',
|
114
|
+
:'portfolio_id' => :'portfolio_id',
|
115
|
+
:'result_type' => :'result_type',
|
116
|
+
:'account_id' => :'account_id',
|
117
|
+
:'trading_days_per_year' => :'trading_days_per_year',
|
118
|
+
:'use_proxy_data' => :'use_proxy_data',
|
119
|
+
:'initial_balance' => :'initial_balance',
|
120
|
+
:'market_data_source' => :'market_data_source',
|
121
|
+
:'frequency_interval' => :'frequency_interval',
|
122
|
+
:'deposit_schedule' => :'deposit_schedule'
|
123
123
|
}
|
124
124
|
end
|
125
125
|
|
126
126
|
# Attribute type mapping.
|
127
127
|
def self.swagger_types
|
128
128
|
{
|
129
|
-
:'portfolio_id' => :'String',
|
130
|
-
:'result_type' => :'String',
|
131
|
-
:'inflation_rate' => :'Float',
|
132
|
-
:'remove_outliers' => :'BOOLEAN',
|
133
|
-
:'deposit_schedule' => :'AnnuityDepositSchedule',
|
134
|
-
:'annuitization_rate' => :'Float',
|
135
|
-
:'end_date' => :'String',
|
136
|
-
:'market_data_source' => :'String',
|
137
|
-
:'tax_rate' => :'Float',
|
138
129
|
:'p' => :'Float',
|
139
130
|
:'allocation_id' => :'String',
|
140
|
-
:'use_proxy_data' => :'BOOLEAN',
|
141
|
-
:'start_date' => :'String',
|
142
|
-
:'aggregation_account_id' => :'String',
|
143
|
-
:'initial_balance' => :'Float',
|
144
|
-
:'create_log' => :'BOOLEAN',
|
145
131
|
:'decumulation_horizon' => :'Integer',
|
146
|
-
:'account_id' => :'String',
|
147
132
|
:'accumulation_horizon' => :'Integer',
|
148
|
-
:'
|
149
|
-
:'portfolio_weights' => :'Array<Float>',
|
150
|
-
:'guaranteed_accumulation_benefit' => :'Float',
|
151
|
-
:'portfolio_tickers' => :'Array<String>',
|
133
|
+
:'annuitization_rate' => :'Float',
|
152
134
|
:'guaranteed_rate_benefit' => :'Array<GuaranteedRateBenefit>',
|
153
135
|
:'model_id' => :'String',
|
136
|
+
:'portfolio_tickers' => :'Array<String>',
|
137
|
+
:'create_log' => :'BOOLEAN',
|
138
|
+
:'inflation_rate' => :'Float',
|
139
|
+
:'aggregation_account_id' => :'String',
|
154
140
|
:'n' => :'Integer',
|
155
|
-
:'
|
141
|
+
:'guaranteed_accumulation_benefit' => :'Float',
|
142
|
+
:'end_date' => :'String',
|
143
|
+
:'tax_rate' => :'Float',
|
144
|
+
:'start_date' => :'String',
|
145
|
+
:'remove_outliers' => :'BOOLEAN',
|
146
|
+
:'portfolio_weights' => :'Array<Float>',
|
147
|
+
:'portfolio_id' => :'String',
|
148
|
+
:'result_type' => :'String',
|
149
|
+
:'account_id' => :'String',
|
150
|
+
:'trading_days_per_year' => :'Integer',
|
151
|
+
:'use_proxy_data' => :'BOOLEAN',
|
152
|
+
:'initial_balance' => :'Float',
|
153
|
+
:'market_data_source' => :'String',
|
154
|
+
:'frequency_interval' => :'String',
|
155
|
+
:'deposit_schedule' => :'AnnuityDepositSchedule'
|
156
156
|
}
|
157
157
|
end
|
158
158
|
|
@@ -164,30 +164,20 @@ module ProtonApi
|
|
164
164
|
# convert string to symbol for hash key
|
165
165
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
166
166
|
|
167
|
-
if attributes.has_key?(:'
|
168
|
-
self.
|
169
|
-
end
|
170
|
-
|
171
|
-
if attributes.has_key?(:'result_type')
|
172
|
-
self.result_type = attributes[:'result_type']
|
173
|
-
else
|
174
|
-
self.result_type = 'median'
|
167
|
+
if attributes.has_key?(:'p')
|
168
|
+
self.p = attributes[:'p']
|
175
169
|
end
|
176
170
|
|
177
|
-
if attributes.has_key?(:'
|
178
|
-
self.
|
179
|
-
else
|
180
|
-
self.inflation_rate = 0.0
|
171
|
+
if attributes.has_key?(:'allocation_id')
|
172
|
+
self.allocation_id = attributes[:'allocation_id']
|
181
173
|
end
|
182
174
|
|
183
|
-
if attributes.has_key?(:'
|
184
|
-
self.
|
185
|
-
else
|
186
|
-
self.remove_outliers = false
|
175
|
+
if attributes.has_key?(:'decumulation_horizon')
|
176
|
+
self.decumulation_horizon = attributes[:'decumulation_horizon']
|
187
177
|
end
|
188
178
|
|
189
|
-
if attributes.has_key?(:'
|
190
|
-
self.
|
179
|
+
if attributes.has_key?(:'accumulation_horizon')
|
180
|
+
self.accumulation_horizon = attributes[:'accumulation_horizon']
|
191
181
|
end
|
192
182
|
|
193
183
|
if attributes.has_key?(:'annuitization_rate')
|
@@ -196,72 +186,68 @@ module ProtonApi
|
|
196
186
|
self.annuitization_rate = 0.0
|
197
187
|
end
|
198
188
|
|
199
|
-
if attributes.has_key?(:'
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
if attributes.has_key?(:'market_data_source')
|
204
|
-
self.market_data_source = attributes[:'market_data_source']
|
205
|
-
else
|
206
|
-
self.market_data_source = 'nucleus'
|
207
|
-
end
|
208
|
-
|
209
|
-
if attributes.has_key?(:'tax_rate')
|
210
|
-
self.tax_rate = attributes[:'tax_rate']
|
211
|
-
else
|
212
|
-
self.tax_rate = 0.0
|
189
|
+
if attributes.has_key?(:'guaranteed_rate_benefit')
|
190
|
+
if (value = attributes[:'guaranteed_rate_benefit']).is_a?(Array)
|
191
|
+
self.guaranteed_rate_benefit = value
|
192
|
+
end
|
213
193
|
end
|
214
194
|
|
215
|
-
if attributes.has_key?(:'
|
216
|
-
self.
|
195
|
+
if attributes.has_key?(:'model_id')
|
196
|
+
self.model_id = attributes[:'model_id']
|
217
197
|
end
|
218
198
|
|
219
|
-
if attributes.has_key?(:'
|
220
|
-
|
199
|
+
if attributes.has_key?(:'portfolio_tickers')
|
200
|
+
if (value = attributes[:'portfolio_tickers']).is_a?(Array)
|
201
|
+
self.portfolio_tickers = value
|
202
|
+
end
|
221
203
|
end
|
222
204
|
|
223
|
-
if attributes.has_key?(:'
|
224
|
-
self.
|
205
|
+
if attributes.has_key?(:'create_log')
|
206
|
+
self.create_log = attributes[:'create_log']
|
225
207
|
else
|
226
|
-
self.
|
208
|
+
self.create_log = false
|
227
209
|
end
|
228
210
|
|
229
|
-
if attributes.has_key?(:'
|
230
|
-
self.
|
211
|
+
if attributes.has_key?(:'inflation_rate')
|
212
|
+
self.inflation_rate = attributes[:'inflation_rate']
|
213
|
+
else
|
214
|
+
self.inflation_rate = 0.0
|
231
215
|
end
|
232
216
|
|
233
217
|
if attributes.has_key?(:'aggregation_account_id')
|
234
218
|
self.aggregation_account_id = attributes[:'aggregation_account_id']
|
235
219
|
end
|
236
220
|
|
237
|
-
if attributes.has_key?(:'
|
238
|
-
self.
|
221
|
+
if attributes.has_key?(:'n')
|
222
|
+
self.n = attributes[:'n']
|
239
223
|
else
|
240
|
-
self.
|
224
|
+
self.n = 1000
|
241
225
|
end
|
242
226
|
|
243
|
-
if attributes.has_key?(:'
|
244
|
-
self.
|
227
|
+
if attributes.has_key?(:'guaranteed_accumulation_benefit')
|
228
|
+
self.guaranteed_accumulation_benefit = attributes[:'guaranteed_accumulation_benefit']
|
245
229
|
else
|
246
|
-
self.
|
230
|
+
self.guaranteed_accumulation_benefit = 0.0
|
247
231
|
end
|
248
232
|
|
249
|
-
if attributes.has_key?(:'
|
250
|
-
self.
|
233
|
+
if attributes.has_key?(:'end_date')
|
234
|
+
self.end_date = attributes[:'end_date']
|
251
235
|
end
|
252
236
|
|
253
|
-
if attributes.has_key?(:'
|
254
|
-
self.
|
237
|
+
if attributes.has_key?(:'tax_rate')
|
238
|
+
self.tax_rate = attributes[:'tax_rate']
|
239
|
+
else
|
240
|
+
self.tax_rate = 0.0
|
255
241
|
end
|
256
242
|
|
257
|
-
if attributes.has_key?(:'
|
258
|
-
self.
|
243
|
+
if attributes.has_key?(:'start_date')
|
244
|
+
self.start_date = attributes[:'start_date']
|
259
245
|
end
|
260
246
|
|
261
|
-
if attributes.has_key?(:'
|
262
|
-
self.
|
247
|
+
if attributes.has_key?(:'remove_outliers')
|
248
|
+
self.remove_outliers = attributes[:'remove_outliers']
|
263
249
|
else
|
264
|
-
self.
|
250
|
+
self.remove_outliers = false
|
265
251
|
end
|
266
252
|
|
267
253
|
if attributes.has_key?(:'portfolio_weights')
|
@@ -270,65 +256,59 @@ module ProtonApi
|
|
270
256
|
end
|
271
257
|
end
|
272
258
|
|
273
|
-
if attributes.has_key?(:'
|
274
|
-
self.
|
275
|
-
else
|
276
|
-
self.guaranteed_accumulation_benefit = 0.0
|
277
|
-
end
|
278
|
-
|
279
|
-
if attributes.has_key?(:'portfolio_tickers')
|
280
|
-
if (value = attributes[:'portfolio_tickers']).is_a?(Array)
|
281
|
-
self.portfolio_tickers = value
|
282
|
-
end
|
259
|
+
if attributes.has_key?(:'portfolio_id')
|
260
|
+
self.portfolio_id = attributes[:'portfolio_id']
|
283
261
|
end
|
284
262
|
|
285
|
-
if attributes.has_key?(:'
|
286
|
-
|
287
|
-
|
288
|
-
|
263
|
+
if attributes.has_key?(:'result_type')
|
264
|
+
self.result_type = attributes[:'result_type']
|
265
|
+
else
|
266
|
+
self.result_type = 'median'
|
289
267
|
end
|
290
268
|
|
291
|
-
if attributes.has_key?(:'
|
292
|
-
self.
|
269
|
+
if attributes.has_key?(:'account_id')
|
270
|
+
self.account_id = attributes[:'account_id']
|
293
271
|
end
|
294
272
|
|
295
|
-
if attributes.has_key?(:'
|
296
|
-
self.
|
273
|
+
if attributes.has_key?(:'trading_days_per_year')
|
274
|
+
self.trading_days_per_year = attributes[:'trading_days_per_year']
|
297
275
|
else
|
298
|
-
self.
|
276
|
+
self.trading_days_per_year = 252
|
299
277
|
end
|
300
278
|
|
301
|
-
if attributes.has_key?(:'
|
302
|
-
self.
|
279
|
+
if attributes.has_key?(:'use_proxy_data')
|
280
|
+
self.use_proxy_data = attributes[:'use_proxy_data']
|
303
281
|
else
|
304
|
-
self.
|
305
|
-
end
|
306
|
-
end
|
307
|
-
|
308
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
309
|
-
# @return Array for valid properties with the reasons
|
310
|
-
def list_invalid_properties
|
311
|
-
invalid_properties = Array.new
|
312
|
-
if !@inflation_rate.nil? && @inflation_rate > 20
|
313
|
-
invalid_properties.push('invalid value for "inflation_rate", must be smaller than or equal to 20.')
|
282
|
+
self.use_proxy_data = false
|
314
283
|
end
|
315
284
|
|
316
|
-
if
|
317
|
-
|
285
|
+
if attributes.has_key?(:'initial_balance')
|
286
|
+
self.initial_balance = attributes[:'initial_balance']
|
287
|
+
else
|
288
|
+
self.initial_balance = 0.0
|
318
289
|
end
|
319
290
|
|
320
|
-
if
|
321
|
-
|
291
|
+
if attributes.has_key?(:'market_data_source')
|
292
|
+
self.market_data_source = attributes[:'market_data_source']
|
293
|
+
else
|
294
|
+
self.market_data_source = 'nucleus'
|
322
295
|
end
|
323
296
|
|
324
|
-
if
|
325
|
-
|
297
|
+
if attributes.has_key?(:'frequency_interval')
|
298
|
+
self.frequency_interval = attributes[:'frequency_interval']
|
299
|
+
else
|
300
|
+
self.frequency_interval = 'year'
|
326
301
|
end
|
327
302
|
|
328
|
-
if
|
329
|
-
|
303
|
+
if attributes.has_key?(:'deposit_schedule')
|
304
|
+
self.deposit_schedule = attributes[:'deposit_schedule']
|
330
305
|
end
|
306
|
+
end
|
331
307
|
|
308
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
309
|
+
# @return Array for valid properties with the reasons
|
310
|
+
def list_invalid_properties
|
311
|
+
invalid_properties = Array.new
|
332
312
|
if !@p.nil? && @p > 100
|
333
313
|
invalid_properties.push('invalid value for "p", must be smaller than or equal to 100.')
|
334
314
|
end
|
@@ -337,10 +317,6 @@ module ProtonApi
|
|
337
317
|
invalid_properties.push('invalid value for "p", must be greater than or equal to 0.')
|
338
318
|
end
|
339
319
|
|
340
|
-
if !@initial_balance.nil? && @initial_balance < 0
|
341
|
-
invalid_properties.push('invalid value for "initial_balance", must be greater than or equal to 0.')
|
342
|
-
end
|
343
|
-
|
344
320
|
if @decumulation_horizon.nil?
|
345
321
|
invalid_properties.push('invalid value for "decumulation_horizon", decumulation_horizon cannot be nil.')
|
346
322
|
end
|
@@ -357,70 +333,112 @@ module ProtonApi
|
|
357
333
|
invalid_properties.push('invalid value for "accumulation_horizon", must be greater than or equal to 0.')
|
358
334
|
end
|
359
335
|
|
360
|
-
if !@
|
361
|
-
invalid_properties.push('invalid value for "
|
336
|
+
if !@annuitization_rate.nil? && @annuitization_rate < -1
|
337
|
+
invalid_properties.push('invalid value for "annuitization_rate", must be greater than or equal to -1.')
|
362
338
|
end
|
363
339
|
|
364
|
-
if !@
|
365
|
-
invalid_properties.push('invalid value for "
|
340
|
+
if !@inflation_rate.nil? && @inflation_rate > 20
|
341
|
+
invalid_properties.push('invalid value for "inflation_rate", must be smaller than or equal to 20.')
|
342
|
+
end
|
343
|
+
|
344
|
+
if !@inflation_rate.nil? && @inflation_rate < -1
|
345
|
+
invalid_properties.push('invalid value for "inflation_rate", must be greater than or equal to -1.')
|
366
346
|
end
|
367
347
|
|
368
348
|
if !@n.nil? && @n < 1
|
369
349
|
invalid_properties.push('invalid value for "n", must be greater than or equal to 1.')
|
370
350
|
end
|
371
351
|
|
352
|
+
if !@guaranteed_accumulation_benefit.nil? && @guaranteed_accumulation_benefit < 0
|
353
|
+
invalid_properties.push('invalid value for "guaranteed_accumulation_benefit", must be greater than or equal to 0.')
|
354
|
+
end
|
355
|
+
|
356
|
+
if !@tax_rate.nil? && @tax_rate > 1
|
357
|
+
invalid_properties.push('invalid value for "tax_rate", must be smaller than or equal to 1.')
|
358
|
+
end
|
359
|
+
|
360
|
+
if !@tax_rate.nil? && @tax_rate < 0
|
361
|
+
invalid_properties.push('invalid value for "tax_rate", must be greater than or equal to 0.')
|
362
|
+
end
|
363
|
+
|
364
|
+
if !@trading_days_per_year.nil? && @trading_days_per_year < 1
|
365
|
+
invalid_properties.push('invalid value for "trading_days_per_year", must be greater than or equal to 1.')
|
366
|
+
end
|
367
|
+
|
368
|
+
if !@initial_balance.nil? && @initial_balance < 0
|
369
|
+
invalid_properties.push('invalid value for "initial_balance", must be greater than or equal to 0.')
|
370
|
+
end
|
371
|
+
|
372
372
|
invalid_properties
|
373
373
|
end
|
374
374
|
|
375
375
|
# Check to see if the all the properties in the model are valid
|
376
376
|
# @return true if the model is valid
|
377
377
|
def valid?
|
378
|
-
result_type_validator = EnumAttributeValidator.new('String', ['mean', 'median', 'custom'])
|
379
|
-
return false unless result_type_validator.valid?(@result_type)
|
380
|
-
return false if !@inflation_rate.nil? && @inflation_rate > 20
|
381
|
-
return false if !@inflation_rate.nil? && @inflation_rate < -1
|
382
|
-
return false if !@annuitization_rate.nil? && @annuitization_rate < -1
|
383
|
-
market_data_source_validator = EnumAttributeValidator.new('String', ['nucleus', 'integration'])
|
384
|
-
return false unless market_data_source_validator.valid?(@market_data_source)
|
385
|
-
return false if !@tax_rate.nil? && @tax_rate > 1
|
386
|
-
return false if !@tax_rate.nil? && @tax_rate < 0
|
387
378
|
return false if !@p.nil? && @p > 100
|
388
379
|
return false if !@p.nil? && @p < 0
|
389
|
-
return false if !@initial_balance.nil? && @initial_balance < 0
|
390
380
|
return false if @decumulation_horizon.nil?
|
391
381
|
return false if @decumulation_horizon < 1
|
392
382
|
return false if @accumulation_horizon.nil?
|
393
383
|
return false if @accumulation_horizon < 0
|
394
|
-
return false if !@
|
395
|
-
return false if !@
|
384
|
+
return false if !@annuitization_rate.nil? && @annuitization_rate < -1
|
385
|
+
return false if !@inflation_rate.nil? && @inflation_rate > 20
|
386
|
+
return false if !@inflation_rate.nil? && @inflation_rate < -1
|
396
387
|
return false if !@n.nil? && @n < 1
|
388
|
+
return false if !@guaranteed_accumulation_benefit.nil? && @guaranteed_accumulation_benefit < 0
|
389
|
+
return false if !@tax_rate.nil? && @tax_rate > 1
|
390
|
+
return false if !@tax_rate.nil? && @tax_rate < 0
|
391
|
+
result_type_validator = EnumAttributeValidator.new('String', ['mean', 'median', 'custom'])
|
392
|
+
return false unless result_type_validator.valid?(@result_type)
|
393
|
+
return false if !@trading_days_per_year.nil? && @trading_days_per_year < 1
|
394
|
+
return false if !@initial_balance.nil? && @initial_balance < 0
|
395
|
+
market_data_source_validator = EnumAttributeValidator.new('String', ['nucleus', 'integration'])
|
396
|
+
return false unless market_data_source_validator.valid?(@market_data_source)
|
397
397
|
frequency_interval_validator = EnumAttributeValidator.new('String', ['year', 'quarter', 'month', 'week', 'day'])
|
398
398
|
return false unless frequency_interval_validator.valid?(@frequency_interval)
|
399
399
|
true
|
400
400
|
end
|
401
401
|
|
402
|
-
# Custom attribute writer method
|
403
|
-
# @param [Object]
|
404
|
-
def
|
405
|
-
|
406
|
-
|
407
|
-
fail ArgumentError, 'invalid value for "result_type", must be one of #{validator.allowable_values}.'
|
402
|
+
# Custom attribute writer method with validation
|
403
|
+
# @param [Object] p Value to be assigned
|
404
|
+
def p=(p)
|
405
|
+
if !p.nil? && p > 100
|
406
|
+
fail ArgumentError, 'invalid value for "p", must be smaller than or equal to 100.'
|
408
407
|
end
|
409
|
-
|
408
|
+
|
409
|
+
if !p.nil? && p < 0
|
410
|
+
fail ArgumentError, 'invalid value for "p", must be greater than or equal to 0.'
|
411
|
+
end
|
412
|
+
|
413
|
+
@p = p
|
410
414
|
end
|
411
415
|
|
412
416
|
# Custom attribute writer method with validation
|
413
|
-
# @param [Object]
|
414
|
-
def
|
415
|
-
if
|
416
|
-
fail ArgumentError, '
|
417
|
+
# @param [Object] decumulation_horizon Value to be assigned
|
418
|
+
def decumulation_horizon=(decumulation_horizon)
|
419
|
+
if decumulation_horizon.nil?
|
420
|
+
fail ArgumentError, 'decumulation_horizon cannot be nil'
|
417
421
|
end
|
418
422
|
|
419
|
-
if
|
420
|
-
fail ArgumentError, 'invalid value for "
|
423
|
+
if decumulation_horizon < 1
|
424
|
+
fail ArgumentError, 'invalid value for "decumulation_horizon", must be greater than or equal to 1.'
|
421
425
|
end
|
422
426
|
|
423
|
-
@
|
427
|
+
@decumulation_horizon = decumulation_horizon
|
428
|
+
end
|
429
|
+
|
430
|
+
# Custom attribute writer method with validation
|
431
|
+
# @param [Object] accumulation_horizon Value to be assigned
|
432
|
+
def accumulation_horizon=(accumulation_horizon)
|
433
|
+
if accumulation_horizon.nil?
|
434
|
+
fail ArgumentError, 'accumulation_horizon cannot be nil'
|
435
|
+
end
|
436
|
+
|
437
|
+
if accumulation_horizon < 0
|
438
|
+
fail ArgumentError, 'invalid value for "accumulation_horizon", must be greater than or equal to 0.'
|
439
|
+
end
|
440
|
+
|
441
|
+
@accumulation_horizon = accumulation_horizon
|
424
442
|
end
|
425
443
|
|
426
444
|
# Custom attribute writer method with validation
|
@@ -433,80 +451,62 @@ module ProtonApi
|
|
433
451
|
@annuitization_rate = annuitization_rate
|
434
452
|
end
|
435
453
|
|
436
|
-
# Custom attribute writer method checking allowed values (enum).
|
437
|
-
# @param [Object] market_data_source Object to be assigned
|
438
|
-
def market_data_source=(market_data_source)
|
439
|
-
validator = EnumAttributeValidator.new('String', ['nucleus', 'integration'])
|
440
|
-
unless validator.valid?(market_data_source)
|
441
|
-
fail ArgumentError, 'invalid value for "market_data_source", must be one of #{validator.allowable_values}.'
|
442
|
-
end
|
443
|
-
@market_data_source = market_data_source
|
444
|
-
end
|
445
|
-
|
446
454
|
# Custom attribute writer method with validation
|
447
|
-
# @param [Object]
|
448
|
-
def
|
449
|
-
if !
|
450
|
-
fail ArgumentError, 'invalid value for "
|
455
|
+
# @param [Object] inflation_rate Value to be assigned
|
456
|
+
def inflation_rate=(inflation_rate)
|
457
|
+
if !inflation_rate.nil? && inflation_rate > 20
|
458
|
+
fail ArgumentError, 'invalid value for "inflation_rate", must be smaller than or equal to 20.'
|
451
459
|
end
|
452
460
|
|
453
|
-
if !
|
454
|
-
fail ArgumentError, 'invalid value for "
|
461
|
+
if !inflation_rate.nil? && inflation_rate < -1
|
462
|
+
fail ArgumentError, 'invalid value for "inflation_rate", must be greater than or equal to -1.'
|
455
463
|
end
|
456
464
|
|
457
|
-
@
|
465
|
+
@inflation_rate = inflation_rate
|
458
466
|
end
|
459
467
|
|
460
468
|
# Custom attribute writer method with validation
|
461
|
-
# @param [Object]
|
462
|
-
def
|
463
|
-
if !
|
464
|
-
fail ArgumentError, 'invalid value for "
|
465
|
-
end
|
466
|
-
|
467
|
-
if !p.nil? && p < 0
|
468
|
-
fail ArgumentError, 'invalid value for "p", must be greater than or equal to 0.'
|
469
|
+
# @param [Object] n Value to be assigned
|
470
|
+
def n=(n)
|
471
|
+
if !n.nil? && n < 1
|
472
|
+
fail ArgumentError, 'invalid value for "n", must be greater than or equal to 1.'
|
469
473
|
end
|
470
474
|
|
471
|
-
@
|
475
|
+
@n = n
|
472
476
|
end
|
473
477
|
|
474
478
|
# Custom attribute writer method with validation
|
475
|
-
# @param [Object]
|
476
|
-
def
|
477
|
-
if !
|
478
|
-
fail ArgumentError, 'invalid value for "
|
479
|
+
# @param [Object] guaranteed_accumulation_benefit Value to be assigned
|
480
|
+
def guaranteed_accumulation_benefit=(guaranteed_accumulation_benefit)
|
481
|
+
if !guaranteed_accumulation_benefit.nil? && guaranteed_accumulation_benefit < 0
|
482
|
+
fail ArgumentError, 'invalid value for "guaranteed_accumulation_benefit", must be greater than or equal to 0.'
|
479
483
|
end
|
480
484
|
|
481
|
-
@
|
485
|
+
@guaranteed_accumulation_benefit = guaranteed_accumulation_benefit
|
482
486
|
end
|
483
487
|
|
484
488
|
# Custom attribute writer method with validation
|
485
|
-
# @param [Object]
|
486
|
-
def
|
487
|
-
if
|
488
|
-
fail ArgumentError, '
|
489
|
+
# @param [Object] tax_rate Value to be assigned
|
490
|
+
def tax_rate=(tax_rate)
|
491
|
+
if !tax_rate.nil? && tax_rate > 1
|
492
|
+
fail ArgumentError, 'invalid value for "tax_rate", must be smaller than or equal to 1.'
|
489
493
|
end
|
490
494
|
|
491
|
-
if
|
492
|
-
fail ArgumentError, 'invalid value for "
|
495
|
+
if !tax_rate.nil? && tax_rate < 0
|
496
|
+
fail ArgumentError, 'invalid value for "tax_rate", must be greater than or equal to 0.'
|
493
497
|
end
|
494
498
|
|
495
|
-
@
|
499
|
+
@tax_rate = tax_rate
|
496
500
|
end
|
497
501
|
|
498
|
-
# Custom attribute writer method
|
499
|
-
# @param [Object]
|
500
|
-
def
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
if accumulation_horizon < 0
|
506
|
-
fail ArgumentError, 'invalid value for "accumulation_horizon", must be greater than or equal to 0.'
|
502
|
+
# Custom attribute writer method checking allowed values (enum).
|
503
|
+
# @param [Object] result_type Object to be assigned
|
504
|
+
def result_type=(result_type)
|
505
|
+
validator = EnumAttributeValidator.new('String', ['mean', 'median', 'custom'])
|
506
|
+
unless validator.valid?(result_type)
|
507
|
+
fail ArgumentError, 'invalid value for "result_type", must be one of #{validator.allowable_values}.'
|
507
508
|
end
|
508
|
-
|
509
|
-
@accumulation_horizon = accumulation_horizon
|
509
|
+
@result_type = result_type
|
510
510
|
end
|
511
511
|
|
512
512
|
# Custom attribute writer method with validation
|
@@ -520,23 +520,23 @@ module ProtonApi
|
|
520
520
|
end
|
521
521
|
|
522
522
|
# Custom attribute writer method with validation
|
523
|
-
# @param [Object]
|
524
|
-
def
|
525
|
-
if !
|
526
|
-
fail ArgumentError, 'invalid value for "
|
523
|
+
# @param [Object] initial_balance Value to be assigned
|
524
|
+
def initial_balance=(initial_balance)
|
525
|
+
if !initial_balance.nil? && initial_balance < 0
|
526
|
+
fail ArgumentError, 'invalid value for "initial_balance", must be greater than or equal to 0.'
|
527
527
|
end
|
528
528
|
|
529
|
-
@
|
529
|
+
@initial_balance = initial_balance
|
530
530
|
end
|
531
531
|
|
532
|
-
# Custom attribute writer method
|
533
|
-
# @param [Object]
|
534
|
-
def
|
535
|
-
|
536
|
-
|
532
|
+
# Custom attribute writer method checking allowed values (enum).
|
533
|
+
# @param [Object] market_data_source Object to be assigned
|
534
|
+
def market_data_source=(market_data_source)
|
535
|
+
validator = EnumAttributeValidator.new('String', ['nucleus', 'integration'])
|
536
|
+
unless validator.valid?(market_data_source)
|
537
|
+
fail ArgumentError, 'invalid value for "market_data_source", must be one of #{validator.allowable_values}.'
|
537
538
|
end
|
538
|
-
|
539
|
-
@n = n
|
539
|
+
@market_data_source = market_data_source
|
540
540
|
end
|
541
541
|
|
542
542
|
# Custom attribute writer method checking allowed values (enum).
|
@@ -554,33 +554,33 @@ module ProtonApi
|
|
554
554
|
def ==(o)
|
555
555
|
return true if self.equal?(o)
|
556
556
|
self.class == o.class &&
|
557
|
-
portfolio_id == o.portfolio_id &&
|
558
|
-
result_type == o.result_type &&
|
559
|
-
inflation_rate == o.inflation_rate &&
|
560
|
-
remove_outliers == o.remove_outliers &&
|
561
|
-
deposit_schedule == o.deposit_schedule &&
|
562
|
-
annuitization_rate == o.annuitization_rate &&
|
563
|
-
end_date == o.end_date &&
|
564
|
-
market_data_source == o.market_data_source &&
|
565
|
-
tax_rate == o.tax_rate &&
|
566
557
|
p == o.p &&
|
567
558
|
allocation_id == o.allocation_id &&
|
568
|
-
use_proxy_data == o.use_proxy_data &&
|
569
|
-
start_date == o.start_date &&
|
570
|
-
aggregation_account_id == o.aggregation_account_id &&
|
571
|
-
initial_balance == o.initial_balance &&
|
572
|
-
create_log == o.create_log &&
|
573
559
|
decumulation_horizon == o.decumulation_horizon &&
|
574
|
-
account_id == o.account_id &&
|
575
560
|
accumulation_horizon == o.accumulation_horizon &&
|
576
|
-
|
577
|
-
portfolio_weights == o.portfolio_weights &&
|
578
|
-
guaranteed_accumulation_benefit == o.guaranteed_accumulation_benefit &&
|
579
|
-
portfolio_tickers == o.portfolio_tickers &&
|
561
|
+
annuitization_rate == o.annuitization_rate &&
|
580
562
|
guaranteed_rate_benefit == o.guaranteed_rate_benefit &&
|
581
563
|
model_id == o.model_id &&
|
564
|
+
portfolio_tickers == o.portfolio_tickers &&
|
565
|
+
create_log == o.create_log &&
|
566
|
+
inflation_rate == o.inflation_rate &&
|
567
|
+
aggregation_account_id == o.aggregation_account_id &&
|
582
568
|
n == o.n &&
|
583
|
-
|
569
|
+
guaranteed_accumulation_benefit == o.guaranteed_accumulation_benefit &&
|
570
|
+
end_date == o.end_date &&
|
571
|
+
tax_rate == o.tax_rate &&
|
572
|
+
start_date == o.start_date &&
|
573
|
+
remove_outliers == o.remove_outliers &&
|
574
|
+
portfolio_weights == o.portfolio_weights &&
|
575
|
+
portfolio_id == o.portfolio_id &&
|
576
|
+
result_type == o.result_type &&
|
577
|
+
account_id == o.account_id &&
|
578
|
+
trading_days_per_year == o.trading_days_per_year &&
|
579
|
+
use_proxy_data == o.use_proxy_data &&
|
580
|
+
initial_balance == o.initial_balance &&
|
581
|
+
market_data_source == o.market_data_source &&
|
582
|
+
frequency_interval == o.frequency_interval &&
|
583
|
+
deposit_schedule == o.deposit_schedule
|
584
584
|
end
|
585
585
|
|
586
586
|
# @see the `==` method
|
@@ -592,7 +592,7 @@ module ProtonApi
|
|
592
592
|
# Calculates hash code according to all attributes.
|
593
593
|
# @return [Fixnum] Hash code
|
594
594
|
def hash
|
595
|
-
[
|
595
|
+
[p, allocation_id, decumulation_horizon, accumulation_horizon, annuitization_rate, guaranteed_rate_benefit, model_id, portfolio_tickers, create_log, inflation_rate, aggregation_account_id, n, guaranteed_accumulation_benefit, end_date, tax_rate, start_date, remove_outliers, portfolio_weights, portfolio_id, result_type, account_id, trading_days_per_year, use_proxy_data, initial_balance, market_data_source, frequency_interval, deposit_schedule].hash
|
596
596
|
end
|
597
597
|
|
598
598
|
# Builds the object from hash
|
@@ -614,17 +614,16 @@ module ProtonApi
|
|
614
614
|
|
615
615
|
self
|
616
616
|
end
|
617
|
-
|
618
|
-
# Deserializes the data based on type
|
617
|
+
# Deserializes the data based on type
|
619
618
|
# @param string type Data type
|
620
619
|
# @param string value Value to be deserialized
|
621
620
|
# @return [Object] Deserialized data
|
622
621
|
def _deserialize(type, value)
|
623
622
|
case type.to_sym
|
624
623
|
when :DateTime
|
625
|
-
|
624
|
+
value
|
626
625
|
when :Date
|
627
|
-
|
626
|
+
value
|
628
627
|
when :String
|
629
628
|
value.to_s
|
630
629
|
when :Integer
|
@@ -656,8 +655,7 @@ module ProtonApi
|
|
656
655
|
temp_model.build_from_hash(value)
|
657
656
|
end
|
658
657
|
end
|
659
|
-
|
660
|
-
# Returns the string representation of the object
|
658
|
+
# Returns the string representation of the object
|
661
659
|
# @return [String] String presentation of the object
|
662
660
|
def to_s
|
663
661
|
to_hash.to_s
|
@@ -680,8 +678,7 @@ module ProtonApi
|
|
680
678
|
end
|
681
679
|
hash
|
682
680
|
end
|
683
|
-
|
684
|
-
# Outputs non-array value in the form of hash
|
681
|
+
# Outputs non-array value in the form of hash
|
685
682
|
# For object, use to_hash. Otherwise, just return the value
|
686
683
|
# @param [Object] value Any valid value
|
687
684
|
# @return [Hash] Returns the value in the form of hash
|