proton_api 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -205
  3. data/lib/proton_api.rb +10 -2
  4. data/lib/proton_api/api/annuities_api.rb +2 -2
  5. data/lib/proton_api/api/business_financial_management_api.rb +2 -2
  6. data/lib/proton_api/api/cards_api.rb +56 -2
  7. data/lib/proton_api/api/financial_health_api.rb +2 -2
  8. data/lib/proton_api/api/financial_planning_api.rb +2 -2
  9. data/lib/proton_api/api/goals_api.rb +2 -2
  10. data/lib/proton_api/api/life_insurance_api.rb +2 -2
  11. data/lib/proton_api/api/personal_financial_management_api.rb +56 -2
  12. data/lib/proton_api/api/portfolio_construction_api.rb +2 -2
  13. data/lib/proton_api/api/portfolio_management_api.rb +2 -2
  14. data/lib/proton_api/api/risk_scoring_api.rb +2 -2
  15. data/lib/proton_api/api/simulations_api.rb +2 -2
  16. data/lib/proton_api/api/util_api.rb +185 -0
  17. data/lib/proton_api/api_client.rb +6 -6
  18. data/lib/proton_api/api_error.rb +2 -2
  19. data/lib/proton_api/configuration.rb +3 -3
  20. data/lib/proton_api/models/accumulation_goal_deposit_config.rb +25 -25
  21. data/lib/proton_api/models/annuity_calculator_accumulation_horizon_request.rb +138 -141
  22. data/lib/proton_api/models/annuity_calculator_annuity_amount_request.rb +129 -132
  23. data/lib/proton_api/models/annuity_calculator_decumulation_horizon_request.rb +138 -141
  24. data/lib/proton_api/models/annuity_calculator_deposit_amount_request.rb +138 -141
  25. data/lib/proton_api/models/annuity_calculator_initial_balance_request.rb +138 -141
  26. data/lib/proton_api/models/annuity_deposit_schedule.rb +33 -36
  27. data/lib/proton_api/models/answer.rb +186 -0
  28. data/lib/proton_api/models/backtest_request.rb +56 -59
  29. data/lib/proton_api/models/beneficiary_bequest_config.rb +32 -35
  30. data/lib/proton_api/models/budget_aggregation_account.rb +7 -10
  31. data/lib/proton_api/models/budget_calculator_request.rb +85 -66
  32. data/lib/proton_api/models/budget_component.rb +25 -28
  33. data/lib/proton_api/models/budget_details.rb +75 -78
  34. data/lib/proton_api/models/business_financial_health_check_request.rb +172 -166
  35. data/lib/proton_api/models/business_invoice_analysis_request.rb +79 -73
  36. data/lib/proton_api/models/calculator_deposit_schedule.rb +22 -25
  37. data/lib/proton_api/models/calculator_deposit_schedule1.rb +33 -36
  38. data/lib/proton_api/models/card_analysis_request.rb +372 -0
  39. data/lib/proton_api/models/card_limit_check_request.rb +42 -14
  40. data/lib/proton_api/models/card_transaction_authorization_request.rb +143 -80
  41. data/lib/proton_api/models/cash_analysis_request.rb +82 -63
  42. data/lib/proton_api/models/cash_flow_analysis_request.rb +104 -76
  43. data/lib/proton_api/models/children_education_config.rb +7 -10
  44. data/lib/proton_api/models/customer_analysis_request.rb +60 -54
  45. data/lib/proton_api/models/decision_tree_result_request.rb +236 -0
  46. data/lib/proton_api/models/decumulation_goal_deposit_config.rb +28 -31
  47. data/lib/proton_api/models/dimensional_risk_score_request.rb +52 -55
  48. data/lib/proton_api/models/diversification_score_request.rb +59 -62
  49. data/lib/proton_api/models/education_calculator_annual_cost_request.rb +143 -146
  50. data/lib/proton_api/models/education_calculator_deposit_amount_request.rb +170 -173
  51. data/lib/proton_api/models/education_calculator_percent_covered_request.rb +136 -139
  52. data/lib/proton_api/models/education_config.rb +44 -47
  53. data/lib/proton_api/models/emergency_fund_calculator_request.rb +182 -185
  54. data/lib/proton_api/models/event_study_request.rb +64 -67
  55. data/lib/proton_api/models/fee_analysis_request.rb +42 -34
  56. data/lib/proton_api/models/financial_health_check_request.rb +109 -112
  57. data/lib/proton_api/models/financial_picture_request.rb +53 -52
  58. data/lib/proton_api/models/financial_statement_analysis_request.rb +140 -134
  59. data/lib/proton_api/models/goal_accumulation_allocation_request.rb +271 -274
  60. data/lib/proton_api/models/goal_accumulation_recommendation_request.rb +218 -221
  61. data/lib/proton_api/models/goal_accumulation_status_request.rb +218 -221
  62. data/lib/proton_api/models/goal_config.rb +35 -38
  63. data/lib/proton_api/models/goal_decumulation_allocation_request.rb +293 -296
  64. data/lib/proton_api/models/goal_decumulation_recommendation_request.rb +242 -245
  65. data/lib/proton_api/models/goal_decumulation_status_request.rb +242 -245
  66. data/lib/proton_api/models/goal_withdrawal_config.rb +82 -85
  67. data/lib/proton_api/models/guaranteed_rate_benefit.rb +51 -54
  68. data/lib/proton_api/models/income_config.rb +37 -40
  69. data/lib/proton_api/models/life_insurance_needs_calculator_request.rb +152 -155
  70. data/lib/proton_api/models/location.rb +183 -0
  71. data/lib/proton_api/models/monte_carlo_request.rb +157 -160
  72. data/lib/proton_api/models/mortgage_calculator_down_payment_request.rb +46 -49
  73. data/lib/proton_api/models/mortgage_calculator_home_price_request.rb +46 -49
  74. data/lib/proton_api/models/mortgage_calculator_periodic_payment_request.rb +71 -74
  75. data/lib/proton_api/models/mvo_request.rb +88 -91
  76. data/lib/proton_api/models/opt_config.rb +54 -57
  77. data/lib/proton_api/models/opt_config1.rb +29 -32
  78. data/lib/proton_api/models/order_rebalance_request.rb +398 -0
  79. data/lib/proton_api/models/performance_calculator_request.rb +687 -0
  80. data/lib/proton_api/models/periods.rb +7 -10
  81. data/lib/proton_api/models/portfolio_optimization_score_request.rb +68 -71
  82. data/lib/proton_api/models/portfolio_what_if_request.rb +71 -74
  83. data/lib/proton_api/models/purchase_calculator_amount_request.rb +112 -115
  84. data/lib/proton_api/models/purchase_calculator_deposit_amount_request.rb +136 -139
  85. data/lib/proton_api/models/purchase_calculator_horizon_request.rb +100 -103
  86. data/lib/proton_api/models/ratio_targets.rb +79 -82
  87. data/lib/proton_api/models/ratio_targets1.rb +38 -41
  88. data/lib/proton_api/models/rebalancing_signal_request.rb +26 -29
  89. data/lib/proton_api/models/recommendation_config.rb +104 -107
  90. data/lib/proton_api/models/recommendation_config1.rb +100 -103
  91. data/lib/proton_api/models/recurring_transaction_analysis_request.rb +106 -76
  92. data/lib/proton_api/models/retirement_calculator_deposit_amount_request.rb +148 -151
  93. data/lib/proton_api/models/retirement_calculator_expenses_request.rb +119 -122
  94. data/lib/proton_api/models/retirement_calculator_percent_covered_request.rb +132 -135
  95. data/lib/proton_api/models/risk_allocation_request.rb +53 -56
  96. data/lib/proton_api/models/risk_score_request.rb +37 -40
  97. data/lib/proton_api/models/savings_calculator_request.rb +100 -103
  98. data/lib/proton_api/models/savings_deposit_schedule.rb +22 -25
  99. data/lib/proton_api/models/scenario_analysis_request.rb +81 -84
  100. data/lib/proton_api/models/sensitivity_analysis_request.rb +77 -80
  101. data/lib/proton_api/models/sensitivity_factor.rb +58 -61
  102. data/lib/proton_api/models/settings.rb +38 -41
  103. data/lib/proton_api/models/spending_analysis_request.rb +505 -0
  104. data/lib/proton_api/models/variable_annuity_request.rb +284 -287
  105. data/lib/proton_api/models/w_config.rb +77 -80
  106. data/lib/proton_api/models/w_config1.rb +66 -69
  107. data/lib/proton_api/version.rb +3 -3
  108. data/proton_api.gemspec +2 -2
  109. data/spec/api/annuities_api_spec.rb +2 -2
  110. data/spec/api/business_financial_management_api_spec.rb +2 -2
  111. data/spec/api/cards_api_spec.rb +14 -2
  112. data/spec/api/financial_health_api_spec.rb +2 -2
  113. data/spec/api/financial_planning_api_spec.rb +2 -2
  114. data/spec/api/goals_api_spec.rb +2 -2
  115. data/spec/api/life_insurance_api_spec.rb +2 -2
  116. data/spec/api/personal_financial_management_api_spec.rb +14 -2
  117. data/spec/api/portfolio_construction_api_spec.rb +2 -2
  118. data/spec/api/portfolio_management_api_spec.rb +2 -2
  119. data/spec/api/risk_scoring_api_spec.rb +2 -2
  120. data/spec/api/simulations_api_spec.rb +2 -2
  121. data/spec/api/util_api_spec.rb +71 -0
  122. data/spec/api_client_spec.rb +2 -2
  123. data/spec/configuration_spec.rb +5 -5
  124. data/spec/models/accumulation_goal_deposit_config_spec.rb +10 -10
  125. data/spec/models/annuity_calculator_accumulation_horizon_request_spec.rb +17 -17
  126. data/spec/models/annuity_calculator_annuity_amount_request_spec.rb +17 -17
  127. data/spec/models/annuity_calculator_decumulation_horizon_request_spec.rb +17 -17
  128. data/spec/models/annuity_calculator_deposit_amount_request_spec.rb +17 -17
  129. data/spec/models/annuity_calculator_initial_balance_request_spec.rb +17 -17
  130. data/spec/models/annuity_deposit_schedule_spec.rb +4 -4
  131. data/spec/models/answer_spec.rb +41 -0
  132. data/spec/models/backtest_request_spec.rb +10 -10
  133. data/spec/models/beneficiary_bequest_config_spec.rb +4 -4
  134. data/spec/models/budget_aggregation_account_spec.rb +2 -2
  135. data/spec/models/budget_calculator_request_spec.rb +25 -13
  136. data/spec/models/budget_component_spec.rb +4 -4
  137. data/spec/models/budget_details_spec.rb +15 -15
  138. data/spec/models/business_financial_health_check_request_spec.rb +34 -28
  139. data/spec/models/business_invoice_analysis_request_spec.rb +18 -12
  140. data/spec/models/calculator_deposit_schedule1_spec.rb +4 -4
  141. data/spec/models/calculator_deposit_schedule_spec.rb +8 -8
  142. data/spec/models/card_analysis_request_spec.rb +129 -0
  143. data/spec/models/card_limit_check_request_spec.rb +20 -2
  144. data/spec/models/card_transaction_authorization_request_spec.rb +57 -15
  145. data/spec/models/cash_analysis_request_spec.rb +25 -13
  146. data/spec/models/cash_flow_analysis_request_spec.rb +34 -16
  147. data/spec/models/children_education_config_spec.rb +2 -2
  148. data/spec/models/customer_analysis_request_spec.rb +15 -9
  149. data/spec/models/decision_tree_result_request_spec.rb +51 -0
  150. data/spec/models/decumulation_goal_deposit_config_spec.rb +10 -10
  151. data/spec/models/dimensional_risk_score_request_spec.rb +8 -8
  152. data/spec/models/diversification_score_request_spec.rb +14 -14
  153. data/spec/models/education_calculator_annual_cost_request_spec.rb +13 -13
  154. data/spec/models/education_calculator_deposit_amount_request_spec.rb +13 -13
  155. data/spec/models/education_calculator_percent_covered_request_spec.rb +12 -12
  156. data/spec/models/education_config_spec.rb +5 -5
  157. data/spec/models/emergency_fund_calculator_request_spec.rb +23 -23
  158. data/spec/models/event_study_request_spec.rb +17 -17
  159. data/spec/models/fee_analysis_request_spec.rb +12 -6
  160. data/spec/models/financial_health_check_request_spec.rb +12 -12
  161. data/spec/models/financial_picture_request_spec.rb +15 -9
  162. data/spec/models/financial_statement_analysis_request_spec.rb +39 -33
  163. data/spec/models/goal_accumulation_allocation_request_spec.rb +48 -48
  164. data/spec/models/goal_accumulation_recommendation_request_spec.rb +34 -34
  165. data/spec/models/goal_accumulation_status_request_spec.rb +34 -34
  166. data/spec/models/goal_config_spec.rb +4 -4
  167. data/spec/models/goal_decumulation_allocation_request_spec.rb +51 -51
  168. data/spec/models/goal_decumulation_recommendation_request_spec.rb +35 -35
  169. data/spec/models/goal_decumulation_status_request_spec.rb +35 -35
  170. data/spec/models/goal_withdrawal_config_spec.rb +20 -20
  171. data/spec/models/guaranteed_rate_benefit_spec.rb +5 -5
  172. data/spec/models/income_config_spec.rb +4 -4
  173. data/spec/models/life_insurance_needs_calculator_request_spec.rb +16 -16
  174. data/spec/models/location_spec.rb +41 -0
  175. data/spec/models/monte_carlo_request_spec.rb +31 -31
  176. data/spec/models/mortgage_calculator_down_payment_request_spec.rb +6 -6
  177. data/spec/models/mortgage_calculator_home_price_request_spec.rb +6 -6
  178. data/spec/models/mortgage_calculator_periodic_payment_request_spec.rb +6 -6
  179. data/spec/models/mvo_request_spec.rb +23 -23
  180. data/spec/models/opt_config1_spec.rb +10 -10
  181. data/spec/models/opt_config_spec.rb +13 -13
  182. data/spec/models/order_rebalance_request_spec.rb +123 -0
  183. data/spec/models/performance_calculator_request_spec.rb +233 -0
  184. data/spec/models/periods_spec.rb +2 -2
  185. data/spec/models/portfolio_optimization_score_request_spec.rb +16 -16
  186. data/spec/models/portfolio_what_if_request_spec.rb +16 -16
  187. data/spec/models/purchase_calculator_amount_request_spec.rb +14 -14
  188. data/spec/models/purchase_calculator_deposit_amount_request_spec.rb +16 -16
  189. data/spec/models/purchase_calculator_horizon_request_spec.rb +10 -10
  190. data/spec/models/ratio_targets1_spec.rb +4 -4
  191. data/spec/models/ratio_targets_spec.rb +8 -8
  192. data/spec/models/rebalancing_signal_request_spec.rb +6 -6
  193. data/spec/models/recommendation_config1_spec.rb +9 -9
  194. data/spec/models/recommendation_config_spec.rb +9 -9
  195. data/spec/models/recurring_transaction_analysis_request_spec.rb +33 -15
  196. data/spec/models/retirement_calculator_deposit_amount_request_spec.rb +13 -13
  197. data/spec/models/retirement_calculator_expenses_request_spec.rb +12 -12
  198. data/spec/models/retirement_calculator_percent_covered_request_spec.rb +12 -12
  199. data/spec/models/risk_allocation_request_spec.rb +15 -15
  200. data/spec/models/risk_score_request_spec.rb +8 -8
  201. data/spec/models/savings_calculator_request_spec.rb +16 -16
  202. data/spec/models/savings_deposit_schedule_spec.rb +8 -8
  203. data/spec/models/scenario_analysis_request_spec.rb +19 -19
  204. data/spec/models/sensitivity_analysis_request_spec.rb +23 -23
  205. data/spec/models/sensitivity_factor_spec.rb +6 -6
  206. data/spec/models/settings_spec.rb +13 -13
  207. data/spec/models/spending_analysis_request_spec.rb +187 -0
  208. data/spec/models/variable_annuity_request_spec.rb +40 -40
  209. data/spec/models/w_config1_spec.rb +6 -6
  210. data/spec/models/w_config_spec.rb +7 -7
  211. data/spec/spec_helper.rb +2 -2
  212. metadata +26 -94
  213. data/docs/AccumulationGoalDepositConfig.md +0 -14
  214. data/docs/AnnuitiesApi.md +0 -344
  215. data/docs/AnnuityCalculatorAccumulationHorizonRequest.md +0 -19
  216. data/docs/AnnuityCalculatorAnnuityAmountRequest.md +0 -19
  217. data/docs/AnnuityCalculatorDecumulationHorizonRequest.md +0 -19
  218. data/docs/AnnuityCalculatorDepositAmountRequest.md +0 -19
  219. data/docs/AnnuityCalculatorInitialBalanceRequest.md +0 -19
  220. data/docs/AnnuityDepositSchedule.md +0 -10
  221. data/docs/BacktestRequest.md +0 -17
  222. data/docs/BeneficiaryBequestConfig.md +0 -10
  223. data/docs/BudgetAggregationAccount.md +0 -8
  224. data/docs/BudgetCalculatorRequest.md +0 -16
  225. data/docs/BudgetComponent.md +0 -10
  226. data/docs/BudgetDetails.md +0 -17
  227. data/docs/BusinessFinancialHealthCheckRequest.md +0 -22
  228. data/docs/BusinessFinancialManagementApi.md +0 -288
  229. data/docs/BusinessInvoiceAnalysisRequest.md +0 -20
  230. data/docs/CalculatorDepositSchedule.md +0 -9
  231. data/docs/CalculatorDepositSchedule1.md +0 -10
  232. data/docs/CardLimitCheckRequest.md +0 -9
  233. data/docs/CardTransactionAuthorizationRequest.md +0 -19
  234. data/docs/CardsApi.md +0 -120
  235. data/docs/CashAnalysisRequest.md +0 -17
  236. data/docs/CashFlowAnalysisRequest.md +0 -20
  237. data/docs/ChildrenEducationConfig.md +0 -9
  238. data/docs/CustomerAnalysisRequest.md +0 -17
  239. data/docs/DecumulationGoalDepositConfig.md +0 -14
  240. data/docs/DimensionalRiskScoreRequest.md +0 -16
  241. data/docs/DiversificationScoreRequest.md +0 -19
  242. data/docs/EducationCalculatorAnnualCostRequest.md +0 -18
  243. data/docs/EducationCalculatorDepositAmountRequest.md +0 -19
  244. data/docs/EducationCalculatorPercentCoveredRequest.md +0 -18
  245. data/docs/EducationConfig.md +0 -10
  246. data/docs/EmergencyFundCalculatorRequest.md +0 -24
  247. data/docs/EventStudyRequest.md +0 -18
  248. data/docs/FeeAnalysisRequest.md +0 -13
  249. data/docs/FinancialHealthApi.md +0 -232
  250. data/docs/FinancialHealthCheckRequest.md +0 -17
  251. data/docs/FinancialPictureRequest.md +0 -16
  252. data/docs/FinancialPlanningApi.md +0 -680
  253. data/docs/FinancialStatementAnalysisRequest.md +0 -22
  254. data/docs/GoalAccumulationAllocationRequest.md +0 -33
  255. data/docs/GoalAccumulationRecommendationRequest.md +0 -28
  256. data/docs/GoalAccumulationStatusRequest.md +0 -28
  257. data/docs/GoalConfig.md +0 -9
  258. data/docs/GoalDecumulationAllocationRequest.md +0 -34
  259. data/docs/GoalDecumulationRecommendationRequest.md +0 -29
  260. data/docs/GoalDecumulationStatusRequest.md +0 -29
  261. data/docs/GoalWithdrawalConfig.md +0 -14
  262. data/docs/GoalsApi.md +0 -344
  263. data/docs/GuaranteedRateBenefit.md +0 -11
  264. data/docs/IncomeConfig.md +0 -10
  265. data/docs/LifeInsuranceApi.md +0 -64
  266. data/docs/LifeInsuranceNeedsCalculatorRequest.md +0 -22
  267. data/docs/MonteCarloRequest.md +0 -29
  268. data/docs/MortgageCalculatorDownPaymentRequest.md +0 -11
  269. data/docs/MortgageCalculatorHomePriceRequest.md +0 -11
  270. data/docs/MortgageCalculatorPeriodicPaymentRequest.md +0 -11
  271. data/docs/MvoRequest.md +0 -18
  272. data/docs/OptConfig.md +0 -14
  273. data/docs/OptConfig1.md +0 -12
  274. data/docs/Periods.md +0 -9
  275. data/docs/PersonalFinancialManagementApi.md +0 -288
  276. data/docs/PortfolioConstructionApi.md +0 -64
  277. data/docs/PortfolioManagementApi.md +0 -64
  278. data/docs/PortfolioOptimizationScoreRequest.md +0 -21
  279. data/docs/PortfolioWhatIfRequest.md +0 -21
  280. data/docs/PurchaseCalculatorAmountRequest.md +0 -16
  281. data/docs/PurchaseCalculatorDepositAmountRequest.md +0 -17
  282. data/docs/PurchaseCalculatorHorizonRequest.md +0 -15
  283. data/docs/RatioTargets.md +0 -13
  284. data/docs/RatioTargets1.md +0 -13
  285. data/docs/RebalancingSignalRequest.md +0 -13
  286. data/docs/RecommendationConfig.md +0 -15
  287. data/docs/RecommendationConfig1.md +0 -14
  288. data/docs/RecurringTransactionAnalysisRequest.md +0 -19
  289. data/docs/RetirementCalculatorDepositAmountRequest.md +0 -20
  290. data/docs/RetirementCalculatorExpensesRequest.md +0 -19
  291. data/docs/RetirementCalculatorPercentCoveredRequest.md +0 -19
  292. data/docs/RiskAllocationRequest.md +0 -14
  293. data/docs/RiskScoreRequest.md +0 -13
  294. data/docs/RiskScoringApi.md +0 -176
  295. data/docs/SavingsCalculatorRequest.md +0 -17
  296. data/docs/SavingsDepositSchedule.md +0 -11
  297. data/docs/ScenarioAnalysisRequest.md +0 -22
  298. data/docs/SensitivityAnalysisRequest.md +0 -22
  299. data/docs/SensitivityFactor.md +0 -11
  300. data/docs/Settings.md +0 -13
  301. data/docs/SimulationsApi.md +0 -400
  302. data/docs/VariableAnnuityRequest.md +0 -34
  303. data/docs/WConfig.md +0 -12
  304. 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.8.0
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.17
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 :portfolio_id
18
-
19
- attr_accessor :result_type
17
+ attr_accessor :p
20
18
 
21
- attr_accessor :inflation_rate
19
+ attr_accessor :allocation_id
22
20
 
23
- attr_accessor :remove_outliers
21
+ attr_accessor :decumulation_horizon
24
22
 
25
- attr_accessor :deposit_schedule
23
+ attr_accessor :accumulation_horizon
26
24
 
27
25
  attr_accessor :annuitization_rate
28
26
 
29
- attr_accessor :end_date
30
-
31
- attr_accessor :market_data_source
32
-
33
- attr_accessor :tax_rate
27
+ attr_accessor :guaranteed_rate_benefit
34
28
 
35
- attr_accessor :p
29
+ attr_accessor :model_id
36
30
 
37
- attr_accessor :allocation_id
31
+ attr_accessor :portfolio_tickers
38
32
 
39
- attr_accessor :use_proxy_data
33
+ attr_accessor :create_log
40
34
 
41
- attr_accessor :start_date
35
+ attr_accessor :inflation_rate
42
36
 
43
37
  attr_accessor :aggregation_account_id
44
38
 
45
- attr_accessor :initial_balance
39
+ attr_accessor :n
46
40
 
47
- attr_accessor :create_log
41
+ attr_accessor :guaranteed_accumulation_benefit
48
42
 
49
- attr_accessor :decumulation_horizon
43
+ attr_accessor :end_date
50
44
 
51
- attr_accessor :account_id
45
+ attr_accessor :tax_rate
52
46
 
53
- attr_accessor :accumulation_horizon
47
+ attr_accessor :start_date
54
48
 
55
- attr_accessor :trading_days_per_year
49
+ attr_accessor :remove_outliers
56
50
 
57
51
  attr_accessor :portfolio_weights
58
52
 
59
- attr_accessor :guaranteed_accumulation_benefit
53
+ attr_accessor :portfolio_id
60
54
 
61
- attr_accessor :portfolio_tickers
55
+ attr_accessor :result_type
62
56
 
63
- attr_accessor :guaranteed_rate_benefit
57
+ attr_accessor :account_id
64
58
 
65
- attr_accessor :model_id
59
+ attr_accessor :trading_days_per_year
66
60
 
67
- attr_accessor :n
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
- :'trading_days_per_year' => :'trading_days_per_year',
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
- :'frequency_interval' => :'frequency_interval'
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
- :'trading_days_per_year' => :'Integer',
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
- :'frequency_interval' => :'String'
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?(:'portfolio_id')
168
- self.portfolio_id = attributes[:'portfolio_id']
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?(:'inflation_rate')
178
- self.inflation_rate = attributes[:'inflation_rate']
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?(:'remove_outliers')
184
- self.remove_outliers = attributes[:'remove_outliers']
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?(:'deposit_schedule')
190
- self.deposit_schedule = attributes[:'deposit_schedule']
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?(:'end_date')
200
- self.end_date = attributes[:'end_date']
201
- end
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?(:'p')
216
- self.p = attributes[:'p']
195
+ if attributes.has_key?(:'model_id')
196
+ self.model_id = attributes[:'model_id']
217
197
  end
218
198
 
219
- if attributes.has_key?(:'allocation_id')
220
- self.allocation_id = attributes[:'allocation_id']
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?(:'use_proxy_data')
224
- self.use_proxy_data = attributes[:'use_proxy_data']
205
+ if attributes.has_key?(:'create_log')
206
+ self.create_log = attributes[:'create_log']
225
207
  else
226
- self.use_proxy_data = false
208
+ self.create_log = false
227
209
  end
228
210
 
229
- if attributes.has_key?(:'start_date')
230
- self.start_date = attributes[:'start_date']
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?(:'initial_balance')
238
- self.initial_balance = attributes[:'initial_balance']
221
+ if attributes.has_key?(:'n')
222
+ self.n = attributes[:'n']
239
223
  else
240
- self.initial_balance = 0.0
224
+ self.n = 1000
241
225
  end
242
226
 
243
- if attributes.has_key?(:'create_log')
244
- self.create_log = attributes[:'create_log']
227
+ if attributes.has_key?(:'guaranteed_accumulation_benefit')
228
+ self.guaranteed_accumulation_benefit = attributes[:'guaranteed_accumulation_benefit']
245
229
  else
246
- self.create_log = false
230
+ self.guaranteed_accumulation_benefit = 0.0
247
231
  end
248
232
 
249
- if attributes.has_key?(:'decumulation_horizon')
250
- self.decumulation_horizon = attributes[:'decumulation_horizon']
233
+ if attributes.has_key?(:'end_date')
234
+ self.end_date = attributes[:'end_date']
251
235
  end
252
236
 
253
- if attributes.has_key?(:'account_id')
254
- self.account_id = attributes[:'account_id']
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?(:'accumulation_horizon')
258
- self.accumulation_horizon = attributes[:'accumulation_horizon']
243
+ if attributes.has_key?(:'start_date')
244
+ self.start_date = attributes[:'start_date']
259
245
  end
260
246
 
261
- if attributes.has_key?(:'trading_days_per_year')
262
- self.trading_days_per_year = attributes[:'trading_days_per_year']
247
+ if attributes.has_key?(:'remove_outliers')
248
+ self.remove_outliers = attributes[:'remove_outliers']
263
249
  else
264
- self.trading_days_per_year = 252
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?(:'guaranteed_accumulation_benefit')
274
- self.guaranteed_accumulation_benefit = attributes[:'guaranteed_accumulation_benefit']
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?(:'guaranteed_rate_benefit')
286
- if (value = attributes[:'guaranteed_rate_benefit']).is_a?(Array)
287
- self.guaranteed_rate_benefit = value
288
- end
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?(:'model_id')
292
- self.model_id = attributes[:'model_id']
269
+ if attributes.has_key?(:'account_id')
270
+ self.account_id = attributes[:'account_id']
293
271
  end
294
272
 
295
- if attributes.has_key?(:'n')
296
- self.n = attributes[:'n']
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.n = 1000
276
+ self.trading_days_per_year = 252
299
277
  end
300
278
 
301
- if attributes.has_key?(:'frequency_interval')
302
- self.frequency_interval = attributes[:'frequency_interval']
279
+ if attributes.has_key?(:'use_proxy_data')
280
+ self.use_proxy_data = attributes[:'use_proxy_data']
303
281
  else
304
- self.frequency_interval = 'year'
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 !@inflation_rate.nil? && @inflation_rate < -1
317
- invalid_properties.push('invalid value for "inflation_rate", must be greater than or equal to -1.')
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 !@annuitization_rate.nil? && @annuitization_rate < -1
321
- invalid_properties.push('invalid value for "annuitization_rate", must be greater than or equal to -1.')
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 !@tax_rate.nil? && @tax_rate > 1
325
- invalid_properties.push('invalid value for "tax_rate", must be smaller than or equal to 1.')
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 !@tax_rate.nil? && @tax_rate < 0
329
- invalid_properties.push('invalid value for "tax_rate", must be greater than or equal to 0.')
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 !@trading_days_per_year.nil? && @trading_days_per_year < 1
361
- invalid_properties.push('invalid value for "trading_days_per_year", must be greater than or equal to 1.')
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 !@guaranteed_accumulation_benefit.nil? && @guaranteed_accumulation_benefit < 0
365
- invalid_properties.push('invalid value for "guaranteed_accumulation_benefit", must be greater than or equal to 0.')
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 !@trading_days_per_year.nil? && @trading_days_per_year < 1
395
- return false if !@guaranteed_accumulation_benefit.nil? && @guaranteed_accumulation_benefit < 0
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 checking allowed values (enum).
403
- # @param [Object] result_type Object to be assigned
404
- def result_type=(result_type)
405
- validator = EnumAttributeValidator.new('String', ['mean', 'median', 'custom'])
406
- unless validator.valid?(result_type)
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
- @result_type = result_type
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] inflation_rate Value to be assigned
414
- def inflation_rate=(inflation_rate)
415
- if !inflation_rate.nil? && inflation_rate > 20
416
- fail ArgumentError, 'invalid value for "inflation_rate", must be smaller than or equal to 20.'
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 !inflation_rate.nil? && inflation_rate < -1
420
- fail ArgumentError, 'invalid value for "inflation_rate", must be greater than or equal to -1.'
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
- @inflation_rate = inflation_rate
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] tax_rate Value to be assigned
448
- def tax_rate=(tax_rate)
449
- if !tax_rate.nil? && tax_rate > 1
450
- fail ArgumentError, 'invalid value for "tax_rate", must be smaller than or equal to 1.'
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 !tax_rate.nil? && tax_rate < 0
454
- fail ArgumentError, 'invalid value for "tax_rate", must be greater than or equal to 0.'
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
- @tax_rate = tax_rate
465
+ @inflation_rate = inflation_rate
458
466
  end
459
467
 
460
468
  # Custom attribute writer method with validation
461
- # @param [Object] p Value to be assigned
462
- def p=(p)
463
- if !p.nil? && p > 100
464
- fail ArgumentError, 'invalid value for "p", must be smaller than or equal to 100.'
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
- @p = p
475
+ @n = n
472
476
  end
473
477
 
474
478
  # Custom attribute writer method with validation
475
- # @param [Object] initial_balance Value to be assigned
476
- def initial_balance=(initial_balance)
477
- if !initial_balance.nil? && initial_balance < 0
478
- fail ArgumentError, 'invalid value for "initial_balance", must be greater than or equal to 0.'
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
- @initial_balance = initial_balance
485
+ @guaranteed_accumulation_benefit = guaranteed_accumulation_benefit
482
486
  end
483
487
 
484
488
  # Custom attribute writer method with validation
485
- # @param [Object] decumulation_horizon Value to be assigned
486
- def decumulation_horizon=(decumulation_horizon)
487
- if decumulation_horizon.nil?
488
- fail ArgumentError, 'decumulation_horizon cannot be nil'
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 decumulation_horizon < 1
492
- fail ArgumentError, 'invalid value for "decumulation_horizon", must be greater than or equal to 1.'
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
- @decumulation_horizon = decumulation_horizon
499
+ @tax_rate = tax_rate
496
500
  end
497
501
 
498
- # Custom attribute writer method with validation
499
- # @param [Object] accumulation_horizon Value to be assigned
500
- def accumulation_horizon=(accumulation_horizon)
501
- if accumulation_horizon.nil?
502
- fail ArgumentError, 'accumulation_horizon cannot be nil'
503
- end
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] guaranteed_accumulation_benefit Value to be assigned
524
- def guaranteed_accumulation_benefit=(guaranteed_accumulation_benefit)
525
- if !guaranteed_accumulation_benefit.nil? && guaranteed_accumulation_benefit < 0
526
- fail ArgumentError, 'invalid value for "guaranteed_accumulation_benefit", must be greater than or equal to 0.'
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
- @guaranteed_accumulation_benefit = guaranteed_accumulation_benefit
529
+ @initial_balance = initial_balance
530
530
  end
531
531
 
532
- # Custom attribute writer method with validation
533
- # @param [Object] n Value to be assigned
534
- def n=(n)
535
- if !n.nil? && n < 1
536
- fail ArgumentError, 'invalid value for "n", must be greater than or equal to 1.'
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
- trading_days_per_year == o.trading_days_per_year &&
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
- frequency_interval == o.frequency_interval
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
- [portfolio_id, result_type, inflation_rate, remove_outliers, deposit_schedule, annuitization_rate, end_date, market_data_source, tax_rate, p, allocation_id, use_proxy_data, start_date, aggregation_account_id, initial_balance, create_log, decumulation_horizon, account_id, accumulation_horizon, trading_days_per_year, portfolio_weights, guaranteed_accumulation_benefit, portfolio_tickers, guaranteed_rate_benefit, model_id, n, frequency_interval].hash
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
- DateTime.parse(value)
624
+ value
626
625
  when :Date
627
- Date.parse(value)
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