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,19 +14,19 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ProtonApi
|
16
16
|
class RiskAllocationRequest
|
17
|
-
attr_accessor :market_data_source
|
18
|
-
|
19
|
-
attr_accessor :allocations
|
20
|
-
|
21
17
|
attr_accessor :client_id
|
22
18
|
|
19
|
+
attr_accessor :allocation_method
|
20
|
+
|
23
21
|
attr_accessor :opt_config
|
24
22
|
|
23
|
+
attr_accessor :market_data_source
|
24
|
+
|
25
25
|
attr_accessor :risk_score
|
26
26
|
|
27
27
|
attr_accessor :use_proxy_data
|
28
28
|
|
29
|
-
attr_accessor :
|
29
|
+
attr_accessor :allocations
|
30
30
|
|
31
31
|
class EnumAttributeValidator
|
32
32
|
attr_reader :datatype
|
@@ -53,26 +53,26 @@ module ProtonApi
|
|
53
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
54
|
def self.attribute_map
|
55
55
|
{
|
56
|
-
:'market_data_source' => :'market_data_source',
|
57
|
-
:'allocations' => :'allocations',
|
58
56
|
:'client_id' => :'client_id',
|
57
|
+
:'allocation_method' => :'allocation_method',
|
59
58
|
:'opt_config' => :'opt_config',
|
59
|
+
:'market_data_source' => :'market_data_source',
|
60
60
|
:'risk_score' => :'risk_score',
|
61
61
|
:'use_proxy_data' => :'use_proxy_data',
|
62
|
-
:'
|
62
|
+
:'allocations' => :'allocations'
|
63
63
|
}
|
64
64
|
end
|
65
65
|
|
66
66
|
# Attribute type mapping.
|
67
67
|
def self.swagger_types
|
68
68
|
{
|
69
|
-
:'market_data_source' => :'String',
|
70
|
-
:'allocations' => :'Array<String>',
|
71
69
|
:'client_id' => :'String',
|
70
|
+
:'allocation_method' => :'String',
|
72
71
|
:'opt_config' => :'OptConfig',
|
72
|
+
:'market_data_source' => :'String',
|
73
73
|
:'risk_score' => :'Float',
|
74
74
|
:'use_proxy_data' => :'BOOLEAN',
|
75
|
-
:'
|
75
|
+
:'allocations' => :'Array<String>'
|
76
76
|
}
|
77
77
|
end
|
78
78
|
|
@@ -84,26 +84,24 @@ module ProtonApi
|
|
84
84
|
# convert string to symbol for hash key
|
85
85
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
86
86
|
|
87
|
-
if attributes.has_key?(:'market_data_source')
|
88
|
-
self.market_data_source = attributes[:'market_data_source']
|
89
|
-
else
|
90
|
-
self.market_data_source = 'nucleus'
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.has_key?(:'allocations')
|
94
|
-
if (value = attributes[:'allocations']).is_a?(Array)
|
95
|
-
self.allocations = value
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
87
|
if attributes.has_key?(:'client_id')
|
100
88
|
self.client_id = attributes[:'client_id']
|
101
89
|
end
|
102
90
|
|
91
|
+
if attributes.has_key?(:'allocation_method')
|
92
|
+
self.allocation_method = attributes[:'allocation_method']
|
93
|
+
end
|
94
|
+
|
103
95
|
if attributes.has_key?(:'opt_config')
|
104
96
|
self.opt_config = attributes[:'opt_config']
|
105
97
|
end
|
106
98
|
|
99
|
+
if attributes.has_key?(:'market_data_source')
|
100
|
+
self.market_data_source = attributes[:'market_data_source']
|
101
|
+
else
|
102
|
+
self.market_data_source = 'nucleus'
|
103
|
+
end
|
104
|
+
|
107
105
|
if attributes.has_key?(:'risk_score')
|
108
106
|
self.risk_score = attributes[:'risk_score']
|
109
107
|
end
|
@@ -114,8 +112,10 @@ module ProtonApi
|
|
114
112
|
self.use_proxy_data = false
|
115
113
|
end
|
116
114
|
|
117
|
-
if attributes.has_key?(:'
|
118
|
-
|
115
|
+
if attributes.has_key?(:'allocations')
|
116
|
+
if (value = attributes[:'allocations']).is_a?(Array)
|
117
|
+
self.allocations = value
|
118
|
+
end
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
@@ -123,6 +123,10 @@ module ProtonApi
|
|
123
123
|
# @return Array for valid properties with the reasons
|
124
124
|
def list_invalid_properties
|
125
125
|
invalid_properties = Array.new
|
126
|
+
if @allocation_method.nil?
|
127
|
+
invalid_properties.push('invalid value for "allocation_method", allocation_method cannot be nil.')
|
128
|
+
end
|
129
|
+
|
126
130
|
if !@risk_score.nil? && @risk_score > 100
|
127
131
|
invalid_properties.push('invalid value for "risk_score", must be smaller than or equal to 100.')
|
128
132
|
end
|
@@ -131,26 +135,32 @@ module ProtonApi
|
|
131
135
|
invalid_properties.push('invalid value for "risk_score", must be greater than or equal to 0.')
|
132
136
|
end
|
133
137
|
|
134
|
-
if @allocation_method.nil?
|
135
|
-
invalid_properties.push('invalid value for "allocation_method", allocation_method cannot be nil.')
|
136
|
-
end
|
137
|
-
|
138
138
|
invalid_properties
|
139
139
|
end
|
140
140
|
|
141
141
|
# Check to see if the all the properties in the model are valid
|
142
142
|
# @return true if the model is valid
|
143
143
|
def valid?
|
144
|
+
return false if @allocation_method.nil?
|
145
|
+
allocation_method_validator = EnumAttributeValidator.new('String', ['select', 'create'])
|
146
|
+
return false unless allocation_method_validator.valid?(@allocation_method)
|
144
147
|
market_data_source_validator = EnumAttributeValidator.new('String', ['nucleus', 'integration'])
|
145
148
|
return false unless market_data_source_validator.valid?(@market_data_source)
|
146
149
|
return false if !@risk_score.nil? && @risk_score > 100
|
147
150
|
return false if !@risk_score.nil? && @risk_score < 0
|
148
|
-
return false if @allocation_method.nil?
|
149
|
-
allocation_method_validator = EnumAttributeValidator.new('String', ['select', 'create'])
|
150
|
-
return false unless allocation_method_validator.valid?(@allocation_method)
|
151
151
|
true
|
152
152
|
end
|
153
153
|
|
154
|
+
# Custom attribute writer method checking allowed values (enum).
|
155
|
+
# @param [Object] allocation_method Object to be assigned
|
156
|
+
def allocation_method=(allocation_method)
|
157
|
+
validator = EnumAttributeValidator.new('String', ['select', 'create'])
|
158
|
+
unless validator.valid?(allocation_method)
|
159
|
+
fail ArgumentError, 'invalid value for "allocation_method", must be one of #{validator.allowable_values}.'
|
160
|
+
end
|
161
|
+
@allocation_method = allocation_method
|
162
|
+
end
|
163
|
+
|
154
164
|
# Custom attribute writer method checking allowed values (enum).
|
155
165
|
# @param [Object] market_data_source Object to be assigned
|
156
166
|
def market_data_source=(market_data_source)
|
@@ -175,28 +185,18 @@ module ProtonApi
|
|
175
185
|
@risk_score = risk_score
|
176
186
|
end
|
177
187
|
|
178
|
-
# Custom attribute writer method checking allowed values (enum).
|
179
|
-
# @param [Object] allocation_method Object to be assigned
|
180
|
-
def allocation_method=(allocation_method)
|
181
|
-
validator = EnumAttributeValidator.new('String', ['select', 'create'])
|
182
|
-
unless validator.valid?(allocation_method)
|
183
|
-
fail ArgumentError, 'invalid value for "allocation_method", must be one of #{validator.allowable_values}.'
|
184
|
-
end
|
185
|
-
@allocation_method = allocation_method
|
186
|
-
end
|
187
|
-
|
188
188
|
# Checks equality by comparing each attribute.
|
189
189
|
# @param [Object] Object to be compared
|
190
190
|
def ==(o)
|
191
191
|
return true if self.equal?(o)
|
192
192
|
self.class == o.class &&
|
193
|
-
market_data_source == o.market_data_source &&
|
194
|
-
allocations == o.allocations &&
|
195
193
|
client_id == o.client_id &&
|
194
|
+
allocation_method == o.allocation_method &&
|
196
195
|
opt_config == o.opt_config &&
|
196
|
+
market_data_source == o.market_data_source &&
|
197
197
|
risk_score == o.risk_score &&
|
198
198
|
use_proxy_data == o.use_proxy_data &&
|
199
|
-
|
199
|
+
allocations == o.allocations
|
200
200
|
end
|
201
201
|
|
202
202
|
# @see the `==` method
|
@@ -208,7 +208,7 @@ module ProtonApi
|
|
208
208
|
# Calculates hash code according to all attributes.
|
209
209
|
# @return [Fixnum] Hash code
|
210
210
|
def hash
|
211
|
-
[
|
211
|
+
[client_id, allocation_method, opt_config, market_data_source, risk_score, use_proxy_data, allocations].hash
|
212
212
|
end
|
213
213
|
|
214
214
|
# Builds the object from hash
|
@@ -230,17 +230,16 @@ module ProtonApi
|
|
230
230
|
|
231
231
|
self
|
232
232
|
end
|
233
|
-
|
234
|
-
# Deserializes the data based on type
|
233
|
+
# Deserializes the data based on type
|
235
234
|
# @param string type Data type
|
236
235
|
# @param string value Value to be deserialized
|
237
236
|
# @return [Object] Deserialized data
|
238
237
|
def _deserialize(type, value)
|
239
238
|
case type.to_sym
|
240
239
|
when :DateTime
|
241
|
-
|
240
|
+
value
|
242
241
|
when :Date
|
243
|
-
|
242
|
+
value
|
244
243
|
when :String
|
245
244
|
value.to_s
|
246
245
|
when :Integer
|
@@ -272,8 +271,7 @@ module ProtonApi
|
|
272
271
|
temp_model.build_from_hash(value)
|
273
272
|
end
|
274
273
|
end
|
275
|
-
|
276
|
-
# Returns the string representation of the object
|
274
|
+
# Returns the string representation of the object
|
277
275
|
# @return [String] String presentation of the object
|
278
276
|
def to_s
|
279
277
|
to_hash.to_s
|
@@ -296,8 +294,7 @@ module ProtonApi
|
|
296
294
|
end
|
297
295
|
hash
|
298
296
|
end
|
299
|
-
|
300
|
-
# Outputs non-array value in the form of hash
|
297
|
+
# Outputs non-array value in the form of hash
|
301
298
|
# For object, use to_hash. Otherwise, just return the value
|
302
299
|
# @param [Object] value Any valid value
|
303
300
|
# @return [Hash] Returns the value in the form of hash
|
@@ -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,39 +14,39 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ProtonApi
|
16
16
|
class RiskScoreRequest
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :questionnaire_id
|
18
18
|
|
19
|
-
attr_accessor :
|
19
|
+
attr_accessor :client_id
|
20
|
+
|
21
|
+
attr_accessor :post_score
|
20
22
|
|
21
23
|
attr_accessor :max_answers
|
22
24
|
|
23
|
-
attr_accessor :
|
25
|
+
attr_accessor :weights
|
24
26
|
|
25
27
|
attr_accessor :answers
|
26
28
|
|
27
|
-
attr_accessor :questionnaire_id
|
28
|
-
|
29
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
30
|
def self.attribute_map
|
31
31
|
{
|
32
|
+
:'questionnaire_id' => :'questionnaire_id',
|
33
|
+
:'client_id' => :'client_id',
|
32
34
|
:'post_score' => :'post_score',
|
33
|
-
:'weights' => :'weights',
|
34
35
|
:'max_answers' => :'max_answers',
|
35
|
-
:'
|
36
|
-
:'answers' => :'answers'
|
37
|
-
:'questionnaire_id' => :'questionnaire_id'
|
36
|
+
:'weights' => :'weights',
|
37
|
+
:'answers' => :'answers'
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
41
41
|
# Attribute type mapping.
|
42
42
|
def self.swagger_types
|
43
43
|
{
|
44
|
+
:'questionnaire_id' => :'String',
|
45
|
+
:'client_id' => :'String',
|
44
46
|
:'post_score' => :'BOOLEAN',
|
45
|
-
:'weights' => :'Array<Float>',
|
46
47
|
:'max_answers' => :'Array<Float>',
|
47
|
-
:'
|
48
|
-
:'answers' => :'Array<Float>'
|
49
|
-
:'questionnaire_id' => :'String'
|
48
|
+
:'weights' => :'Array<Float>',
|
49
|
+
:'answers' => :'Array<Float>'
|
50
50
|
}
|
51
51
|
end
|
52
52
|
|
@@ -58,26 +58,30 @@ module ProtonApi
|
|
58
58
|
# convert string to symbol for hash key
|
59
59
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
60
60
|
|
61
|
+
if attributes.has_key?(:'questionnaire_id')
|
62
|
+
self.questionnaire_id = attributes[:'questionnaire_id']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'client_id')
|
66
|
+
self.client_id = attributes[:'client_id']
|
67
|
+
end
|
68
|
+
|
61
69
|
if attributes.has_key?(:'post_score')
|
62
70
|
self.post_score = attributes[:'post_score']
|
63
71
|
else
|
64
72
|
self.post_score = false
|
65
73
|
end
|
66
74
|
|
67
|
-
if attributes.has_key?(:'weights')
|
68
|
-
if (value = attributes[:'weights']).is_a?(Array)
|
69
|
-
self.weights = value
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
75
|
if attributes.has_key?(:'max_answers')
|
74
76
|
if (value = attributes[:'max_answers']).is_a?(Array)
|
75
77
|
self.max_answers = value
|
76
78
|
end
|
77
79
|
end
|
78
80
|
|
79
|
-
if attributes.has_key?(:'
|
80
|
-
|
81
|
+
if attributes.has_key?(:'weights')
|
82
|
+
if (value = attributes[:'weights']).is_a?(Array)
|
83
|
+
self.weights = value
|
84
|
+
end
|
81
85
|
end
|
82
86
|
|
83
87
|
if attributes.has_key?(:'answers')
|
@@ -85,10 +89,6 @@ module ProtonApi
|
|
85
89
|
self.answers = value
|
86
90
|
end
|
87
91
|
end
|
88
|
-
|
89
|
-
if attributes.has_key?(:'questionnaire_id')
|
90
|
-
self.questionnaire_id = attributes[:'questionnaire_id']
|
91
|
-
end
|
92
92
|
end
|
93
93
|
|
94
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -114,12 +114,12 @@ module ProtonApi
|
|
114
114
|
def ==(o)
|
115
115
|
return true if self.equal?(o)
|
116
116
|
self.class == o.class &&
|
117
|
+
questionnaire_id == o.questionnaire_id &&
|
118
|
+
client_id == o.client_id &&
|
117
119
|
post_score == o.post_score &&
|
118
|
-
weights == o.weights &&
|
119
120
|
max_answers == o.max_answers &&
|
120
|
-
|
121
|
-
answers == o.answers
|
122
|
-
questionnaire_id == o.questionnaire_id
|
121
|
+
weights == o.weights &&
|
122
|
+
answers == o.answers
|
123
123
|
end
|
124
124
|
|
125
125
|
# @see the `==` method
|
@@ -131,7 +131,7 @@ module ProtonApi
|
|
131
131
|
# Calculates hash code according to all attributes.
|
132
132
|
# @return [Fixnum] Hash code
|
133
133
|
def hash
|
134
|
-
[
|
134
|
+
[questionnaire_id, client_id, post_score, max_answers, weights, answers].hash
|
135
135
|
end
|
136
136
|
|
137
137
|
# Builds the object from hash
|
@@ -153,17 +153,16 @@ module ProtonApi
|
|
153
153
|
|
154
154
|
self
|
155
155
|
end
|
156
|
-
|
157
|
-
# Deserializes the data based on type
|
156
|
+
# Deserializes the data based on type
|
158
157
|
# @param string type Data type
|
159
158
|
# @param string value Value to be deserialized
|
160
159
|
# @return [Object] Deserialized data
|
161
160
|
def _deserialize(type, value)
|
162
161
|
case type.to_sym
|
163
162
|
when :DateTime
|
164
|
-
|
163
|
+
value
|
165
164
|
when :Date
|
166
|
-
|
165
|
+
value
|
167
166
|
when :String
|
168
167
|
value.to_s
|
169
168
|
when :Integer
|
@@ -195,8 +194,7 @@ module ProtonApi
|
|
195
194
|
temp_model.build_from_hash(value)
|
196
195
|
end
|
197
196
|
end
|
198
|
-
|
199
|
-
# Returns the string representation of the object
|
197
|
+
# Returns the string representation of the object
|
200
198
|
# @return [String] String presentation of the object
|
201
199
|
def to_s
|
202
200
|
to_hash.to_s
|
@@ -219,8 +217,7 @@ module ProtonApi
|
|
219
217
|
end
|
220
218
|
hash
|
221
219
|
end
|
222
|
-
|
223
|
-
# Outputs non-array value in the form of hash
|
220
|
+
# Outputs non-array value in the form of hash
|
224
221
|
# For object, use to_hash. Otherwise, just return the value
|
225
222
|
# @param [Object] value Any valid value
|
226
223
|
# @return [Hash] Returns the value in the form of hash
|
@@ -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,25 +14,25 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ProtonApi
|
16
16
|
class SavingsCalculatorRequest
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
attr_accessor :tax_rate
|
17
|
+
attr_accessor :inflation_rate
|
20
18
|
|
21
19
|
attr_accessor :account_ids
|
22
20
|
|
23
|
-
attr_accessor :
|
21
|
+
attr_accessor :tax_rate
|
24
22
|
|
25
|
-
attr_accessor :
|
23
|
+
attr_accessor :horizon_frequency_interval
|
26
24
|
|
27
|
-
attr_accessor :
|
25
|
+
attr_accessor :deposit_schedule
|
28
26
|
|
29
27
|
attr_accessor :horizon
|
30
28
|
|
31
|
-
attr_accessor :
|
29
|
+
attr_accessor :return_schedule
|
32
30
|
|
33
|
-
attr_accessor :
|
31
|
+
attr_accessor :create_log
|
34
32
|
|
35
|
-
attr_accessor :
|
33
|
+
attr_accessor :initial_balance
|
34
|
+
|
35
|
+
attr_accessor :aggregation_account_ids
|
36
36
|
|
37
37
|
class EnumAttributeValidator
|
38
38
|
attr_reader :datatype
|
@@ -59,32 +59,32 @@ module ProtonApi
|
|
59
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
60
|
def self.attribute_map
|
61
61
|
{
|
62
|
-
:'aggregation_account_ids' => :'aggregation_account_ids',
|
63
|
-
:'tax_rate' => :'tax_rate',
|
64
|
-
:'account_ids' => :'account_ids',
|
65
|
-
:'initial_balance' => :'initial_balance',
|
66
|
-
:'create_log' => :'create_log',
|
67
62
|
:'inflation_rate' => :'inflation_rate',
|
68
|
-
:'
|
63
|
+
:'account_ids' => :'account_ids',
|
64
|
+
:'tax_rate' => :'tax_rate',
|
69
65
|
:'horizon_frequency_interval' => :'horizon_frequency_interval',
|
70
66
|
:'deposit_schedule' => :'deposit_schedule',
|
71
|
-
:'
|
67
|
+
:'horizon' => :'horizon',
|
68
|
+
:'return_schedule' => :'return_schedule',
|
69
|
+
:'create_log' => :'create_log',
|
70
|
+
:'initial_balance' => :'initial_balance',
|
71
|
+
:'aggregation_account_ids' => :'aggregation_account_ids'
|
72
72
|
}
|
73
73
|
end
|
74
74
|
|
75
75
|
# Attribute type mapping.
|
76
76
|
def self.swagger_types
|
77
77
|
{
|
78
|
-
:'aggregation_account_ids' => :'Array<String>',
|
79
|
-
:'tax_rate' => :'Float',
|
80
|
-
:'account_ids' => :'Array<String>',
|
81
|
-
:'initial_balance' => :'Float',
|
82
|
-
:'create_log' => :'BOOLEAN',
|
83
78
|
:'inflation_rate' => :'Float',
|
84
|
-
:'
|
79
|
+
:'account_ids' => :'Array<String>',
|
80
|
+
:'tax_rate' => :'Float',
|
85
81
|
:'horizon_frequency_interval' => :'String',
|
86
82
|
:'deposit_schedule' => :'Array<SavingsDepositSchedule>',
|
87
|
-
:'
|
83
|
+
:'horizon' => :'Integer',
|
84
|
+
:'return_schedule' => :'Array<Float>',
|
85
|
+
:'create_log' => :'BOOLEAN',
|
86
|
+
:'initial_balance' => :'Float',
|
87
|
+
:'aggregation_account_ids' => :'Array<String>'
|
88
88
|
}
|
89
89
|
end
|
90
90
|
|
@@ -96,16 +96,10 @@ module ProtonApi
|
|
96
96
|
# convert string to symbol for hash key
|
97
97
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
98
98
|
|
99
|
-
if attributes.has_key?(:'
|
100
|
-
|
101
|
-
self.aggregation_account_ids = value
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
if attributes.has_key?(:'tax_rate')
|
106
|
-
self.tax_rate = attributes[:'tax_rate']
|
99
|
+
if attributes.has_key?(:'inflation_rate')
|
100
|
+
self.inflation_rate = attributes[:'inflation_rate']
|
107
101
|
else
|
108
|
-
self.
|
102
|
+
self.inflation_rate = 0.0
|
109
103
|
end
|
110
104
|
|
111
105
|
if attributes.has_key?(:'account_ids')
|
@@ -114,24 +108,10 @@ module ProtonApi
|
|
114
108
|
end
|
115
109
|
end
|
116
110
|
|
117
|
-
if attributes.has_key?(:'
|
118
|
-
self.
|
119
|
-
end
|
120
|
-
|
121
|
-
if attributes.has_key?(:'create_log')
|
122
|
-
self.create_log = attributes[:'create_log']
|
123
|
-
else
|
124
|
-
self.create_log = false
|
125
|
-
end
|
126
|
-
|
127
|
-
if attributes.has_key?(:'inflation_rate')
|
128
|
-
self.inflation_rate = attributes[:'inflation_rate']
|
111
|
+
if attributes.has_key?(:'tax_rate')
|
112
|
+
self.tax_rate = attributes[:'tax_rate']
|
129
113
|
else
|
130
|
-
self.
|
131
|
-
end
|
132
|
-
|
133
|
-
if attributes.has_key?(:'horizon')
|
134
|
-
self.horizon = attributes[:'horizon']
|
114
|
+
self.tax_rate = 0.0
|
135
115
|
end
|
136
116
|
|
137
117
|
if attributes.has_key?(:'horizon_frequency_interval')
|
@@ -146,17 +126,41 @@ module ProtonApi
|
|
146
126
|
end
|
147
127
|
end
|
148
128
|
|
129
|
+
if attributes.has_key?(:'horizon')
|
130
|
+
self.horizon = attributes[:'horizon']
|
131
|
+
end
|
132
|
+
|
149
133
|
if attributes.has_key?(:'return_schedule')
|
150
134
|
if (value = attributes[:'return_schedule']).is_a?(Array)
|
151
135
|
self.return_schedule = value
|
152
136
|
end
|
153
137
|
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'create_log')
|
140
|
+
self.create_log = attributes[:'create_log']
|
141
|
+
else
|
142
|
+
self.create_log = false
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'initial_balance')
|
146
|
+
self.initial_balance = attributes[:'initial_balance']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'aggregation_account_ids')
|
150
|
+
if (value = attributes[:'aggregation_account_ids']).is_a?(Array)
|
151
|
+
self.aggregation_account_ids = value
|
152
|
+
end
|
153
|
+
end
|
154
154
|
end
|
155
155
|
|
156
156
|
# Show invalid properties with the reasons. Usually used together with valid?
|
157
157
|
# @return Array for valid properties with the reasons
|
158
158
|
def list_invalid_properties
|
159
159
|
invalid_properties = Array.new
|
160
|
+
if !@inflation_rate.nil? && @inflation_rate < -1
|
161
|
+
invalid_properties.push('invalid value for "inflation_rate", must be greater than or equal to -1.')
|
162
|
+
end
|
163
|
+
|
160
164
|
if !@tax_rate.nil? && @tax_rate > 1
|
161
165
|
invalid_properties.push('invalid value for "tax_rate", must be smaller than or equal to 1.')
|
162
166
|
end
|
@@ -165,14 +169,6 @@ module ProtonApi
|
|
165
169
|
invalid_properties.push('invalid value for "tax_rate", must be greater than or equal to 0.')
|
166
170
|
end
|
167
171
|
|
168
|
-
if !@initial_balance.nil? && @initial_balance < 0
|
169
|
-
invalid_properties.push('invalid value for "initial_balance", must be greater than or equal to 0.')
|
170
|
-
end
|
171
|
-
|
172
|
-
if !@inflation_rate.nil? && @inflation_rate < -1
|
173
|
-
invalid_properties.push('invalid value for "inflation_rate", must be greater than or equal to -1.')
|
174
|
-
end
|
175
|
-
|
176
172
|
if @horizon.nil?
|
177
173
|
invalid_properties.push('invalid value for "horizon", horizon cannot be nil.')
|
178
174
|
end
|
@@ -185,24 +181,38 @@ module ProtonApi
|
|
185
181
|
invalid_properties.push('invalid value for "return_schedule", return_schedule cannot be nil.')
|
186
182
|
end
|
187
183
|
|
184
|
+
if !@initial_balance.nil? && @initial_balance < 0
|
185
|
+
invalid_properties.push('invalid value for "initial_balance", must be greater than or equal to 0.')
|
186
|
+
end
|
187
|
+
|
188
188
|
invalid_properties
|
189
189
|
end
|
190
190
|
|
191
191
|
# Check to see if the all the properties in the model are valid
|
192
192
|
# @return true if the model is valid
|
193
193
|
def valid?
|
194
|
+
return false if !@inflation_rate.nil? && @inflation_rate < -1
|
194
195
|
return false if !@tax_rate.nil? && @tax_rate > 1
|
195
196
|
return false if !@tax_rate.nil? && @tax_rate < 0
|
196
|
-
return false if !@initial_balance.nil? && @initial_balance < 0
|
197
|
-
return false if !@inflation_rate.nil? && @inflation_rate < -1
|
198
|
-
return false if @horizon.nil?
|
199
|
-
return false if @horizon < 0
|
200
197
|
horizon_frequency_interval_validator = EnumAttributeValidator.new('String', ['year', 'quarter', 'month', 'week', 'day'])
|
201
198
|
return false unless horizon_frequency_interval_validator.valid?(@horizon_frequency_interval)
|
199
|
+
return false if @horizon.nil?
|
200
|
+
return false if @horizon < 0
|
202
201
|
return false if @return_schedule.nil?
|
202
|
+
return false if !@initial_balance.nil? && @initial_balance < 0
|
203
203
|
true
|
204
204
|
end
|
205
205
|
|
206
|
+
# Custom attribute writer method with validation
|
207
|
+
# @param [Object] inflation_rate Value to be assigned
|
208
|
+
def inflation_rate=(inflation_rate)
|
209
|
+
if !inflation_rate.nil? && inflation_rate < -1
|
210
|
+
fail ArgumentError, 'invalid value for "inflation_rate", must be greater than or equal to -1.'
|
211
|
+
end
|
212
|
+
|
213
|
+
@inflation_rate = inflation_rate
|
214
|
+
end
|
215
|
+
|
206
216
|
# Custom attribute writer method with validation
|
207
217
|
# @param [Object] tax_rate Value to be assigned
|
208
218
|
def tax_rate=(tax_rate)
|
@@ -217,24 +227,14 @@ module ProtonApi
|
|
217
227
|
@tax_rate = tax_rate
|
218
228
|
end
|
219
229
|
|
220
|
-
# Custom attribute writer method
|
221
|
-
# @param [Object]
|
222
|
-
def
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
@initial_balance = initial_balance
|
228
|
-
end
|
229
|
-
|
230
|
-
# Custom attribute writer method with validation
|
231
|
-
# @param [Object] inflation_rate Value to be assigned
|
232
|
-
def inflation_rate=(inflation_rate)
|
233
|
-
if !inflation_rate.nil? && inflation_rate < -1
|
234
|
-
fail ArgumentError, 'invalid value for "inflation_rate", must be greater than or equal to -1.'
|
230
|
+
# Custom attribute writer method checking allowed values (enum).
|
231
|
+
# @param [Object] horizon_frequency_interval Object to be assigned
|
232
|
+
def horizon_frequency_interval=(horizon_frequency_interval)
|
233
|
+
validator = EnumAttributeValidator.new('String', ['year', 'quarter', 'month', 'week', 'day'])
|
234
|
+
unless validator.valid?(horizon_frequency_interval)
|
235
|
+
fail ArgumentError, 'invalid value for "horizon_frequency_interval", must be one of #{validator.allowable_values}.'
|
235
236
|
end
|
236
|
-
|
237
|
-
@inflation_rate = inflation_rate
|
237
|
+
@horizon_frequency_interval = horizon_frequency_interval
|
238
238
|
end
|
239
239
|
|
240
240
|
# Custom attribute writer method with validation
|
@@ -251,14 +251,14 @@ module ProtonApi
|
|
251
251
|
@horizon = horizon
|
252
252
|
end
|
253
253
|
|
254
|
-
# Custom attribute writer method
|
255
|
-
# @param [Object]
|
256
|
-
def
|
257
|
-
|
258
|
-
|
259
|
-
fail ArgumentError, 'invalid value for "horizon_frequency_interval", must be one of #{validator.allowable_values}.'
|
254
|
+
# Custom attribute writer method with validation
|
255
|
+
# @param [Object] initial_balance Value to be assigned
|
256
|
+
def initial_balance=(initial_balance)
|
257
|
+
if !initial_balance.nil? && initial_balance < 0
|
258
|
+
fail ArgumentError, 'invalid value for "initial_balance", must be greater than or equal to 0.'
|
260
259
|
end
|
261
|
-
|
260
|
+
|
261
|
+
@initial_balance = initial_balance
|
262
262
|
end
|
263
263
|
|
264
264
|
# Checks equality by comparing each attribute.
|
@@ -266,16 +266,16 @@ module ProtonApi
|
|
266
266
|
def ==(o)
|
267
267
|
return true if self.equal?(o)
|
268
268
|
self.class == o.class &&
|
269
|
-
aggregation_account_ids == o.aggregation_account_ids &&
|
270
|
-
tax_rate == o.tax_rate &&
|
271
|
-
account_ids == o.account_ids &&
|
272
|
-
initial_balance == o.initial_balance &&
|
273
|
-
create_log == o.create_log &&
|
274
269
|
inflation_rate == o.inflation_rate &&
|
275
|
-
|
270
|
+
account_ids == o.account_ids &&
|
271
|
+
tax_rate == o.tax_rate &&
|
276
272
|
horizon_frequency_interval == o.horizon_frequency_interval &&
|
277
273
|
deposit_schedule == o.deposit_schedule &&
|
278
|
-
|
274
|
+
horizon == o.horizon &&
|
275
|
+
return_schedule == o.return_schedule &&
|
276
|
+
create_log == o.create_log &&
|
277
|
+
initial_balance == o.initial_balance &&
|
278
|
+
aggregation_account_ids == o.aggregation_account_ids
|
279
279
|
end
|
280
280
|
|
281
281
|
# @see the `==` method
|
@@ -287,7 +287,7 @@ module ProtonApi
|
|
287
287
|
# Calculates hash code according to all attributes.
|
288
288
|
# @return [Fixnum] Hash code
|
289
289
|
def hash
|
290
|
-
[
|
290
|
+
[inflation_rate, account_ids, tax_rate, horizon_frequency_interval, deposit_schedule, horizon, return_schedule, create_log, initial_balance, aggregation_account_ids].hash
|
291
291
|
end
|
292
292
|
|
293
293
|
# Builds the object from hash
|
@@ -309,17 +309,16 @@ module ProtonApi
|
|
309
309
|
|
310
310
|
self
|
311
311
|
end
|
312
|
-
|
313
|
-
# Deserializes the data based on type
|
312
|
+
# Deserializes the data based on type
|
314
313
|
# @param string type Data type
|
315
314
|
# @param string value Value to be deserialized
|
316
315
|
# @return [Object] Deserialized data
|
317
316
|
def _deserialize(type, value)
|
318
317
|
case type.to_sym
|
319
318
|
when :DateTime
|
320
|
-
|
319
|
+
value
|
321
320
|
when :Date
|
322
|
-
|
321
|
+
value
|
323
322
|
when :String
|
324
323
|
value.to_s
|
325
324
|
when :Integer
|
@@ -351,8 +350,7 @@ module ProtonApi
|
|
351
350
|
temp_model.build_from_hash(value)
|
352
351
|
end
|
353
352
|
end
|
354
|
-
|
355
|
-
# Returns the string representation of the object
|
353
|
+
# Returns the string representation of the object
|
356
354
|
# @return [String] String presentation of the object
|
357
355
|
def to_s
|
358
356
|
to_hash.to_s
|
@@ -375,8 +373,7 @@ module ProtonApi
|
|
375
373
|
end
|
376
374
|
hash
|
377
375
|
end
|
378
|
-
|
379
|
-
# Outputs non-array value in the form of hash
|
376
|
+
# Outputs non-array value in the form of hash
|
380
377
|
# For object, use to_hash. Otherwise, just return the value
|
381
378
|
# @param [Object] value Any valid value
|
382
379
|
# @return [Hash] Returns the value in the form of hash
|