hydrogen-proton-api 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +82 -0
  4. data/Rakefile +8 -0
  5. data/git_push.sh +55 -0
  6. data/lib/proton_api.rb +141 -0
  7. data/lib/proton_api/api/annuities_api.rb +347 -0
  8. data/lib/proton_api/api/business_financial_management_api.rb +293 -0
  9. data/lib/proton_api/api/cards_api.rb +185 -0
  10. data/lib/proton_api/api/financial_health_api.rb +239 -0
  11. data/lib/proton_api/api/financial_planning_api.rb +671 -0
  12. data/lib/proton_api/api/goals_api.rb +347 -0
  13. data/lib/proton_api/api/life_insurance_api.rb +77 -0
  14. data/lib/proton_api/api/personal_financial_management_api.rb +347 -0
  15. data/lib/proton_api/api/portfolio_construction_api.rb +77 -0
  16. data/lib/proton_api/api/portfolio_management_api.rb +77 -0
  17. data/lib/proton_api/api/risk_scoring_api.rb +185 -0
  18. data/lib/proton_api/api/simulations_api.rb +401 -0
  19. data/lib/proton_api/api/util_api.rb +185 -0
  20. data/lib/proton_api/api_client.rb +391 -0
  21. data/lib/proton_api/api_error.rb +38 -0
  22. data/lib/proton_api/auth_configuration.rb +181 -0
  23. data/lib/proton_api/configuration.rb +209 -0
  24. data/lib/proton_api/environment.rb +36 -0
  25. data/lib/proton_api/models/accumulation_goal_deposit_config.rb +338 -0
  26. data/lib/proton_api/models/annuity_calculator_accumulation_horizon_request.rb +459 -0
  27. data/lib/proton_api/models/annuity_calculator_annuity_amount_request.rb +461 -0
  28. data/lib/proton_api/models/annuity_calculator_decumulation_horizon_request.rb +459 -0
  29. data/lib/proton_api/models/annuity_calculator_deposit_amount_request.rb +468 -0
  30. data/lib/proton_api/models/annuity_calculator_initial_balance_request.rb +468 -0
  31. data/lib/proton_api/models/annuity_deposit_schedule.rb +254 -0
  32. data/lib/proton_api/models/answer.rb +186 -0
  33. data/lib/proton_api/models/backtest_request.rb +295 -0
  34. data/lib/proton_api/models/beneficiary_bequest_config.rb +257 -0
  35. data/lib/proton_api/models/budget_aggregation_account.rb +186 -0
  36. data/lib/proton_api/models/budget_calculator_request.rb +334 -0
  37. data/lib/proton_api/models/budget_component.rb +228 -0
  38. data/lib/proton_api/models/budget_details.rb +337 -0
  39. data/lib/proton_api/models/business_financial_health_check_request.rb +484 -0
  40. data/lib/proton_api/models/business_invoice_analysis_request.rb +361 -0
  41. data/lib/proton_api/models/calculator_deposit_schedule.rb +228 -0
  42. data/lib/proton_api/models/calculator_deposit_schedule1.rb +254 -0
  43. data/lib/proton_api/models/card_analysis_request.rb +372 -0
  44. data/lib/proton_api/models/card_limit_check_request.rb +231 -0
  45. data/lib/proton_api/models/card_transaction_authorization_request.rb +422 -0
  46. data/lib/proton_api/models/cash_analysis_request.rb +340 -0
  47. data/lib/proton_api/models/cash_flow_analysis_request.rb +366 -0
  48. data/lib/proton_api/models/children_education_config.rb +221 -0
  49. data/lib/proton_api/models/customer_analysis_request.rb +292 -0
  50. data/lib/proton_api/models/decision_tree_result_request.rb +236 -0
  51. data/lib/proton_api/models/decumulation_goal_deposit_config.rb +335 -0
  52. data/lib/proton_api/models/dimensional_risk_score_request.rb +282 -0
  53. data/lib/proton_api/models/diversification_score_request.rb +324 -0
  54. data/lib/proton_api/models/education_calculator_annual_cost_request.rb +450 -0
  55. data/lib/proton_api/models/education_calculator_deposit_amount_request.rb +483 -0
  56. data/lib/proton_api/models/education_calculator_percent_covered_request.rb +448 -0
  57. data/lib/proton_api/models/education_config.rb +271 -0
  58. data/lib/proton_api/models/emergency_fund_calculator_request.rb +561 -0
  59. data/lib/proton_api/models/event_study_request.rb +317 -0
  60. data/lib/proton_api/models/fee_analysis_request.rb +239 -0
  61. data/lib/proton_api/models/financial_health_check_request.rb +384 -0
  62. data/lib/proton_api/models/financial_picture_request.rb +270 -0
  63. data/lib/proton_api/models/financial_statement_analysis_request.rb +461 -0
  64. data/lib/proton_api/models/goal_accumulation_allocation_request.rb +729 -0
  65. data/lib/proton_api/models/goal_accumulation_recommendation_request.rb +622 -0
  66. data/lib/proton_api/models/goal_accumulation_status_request.rb +622 -0
  67. data/lib/proton_api/models/goal_config.rb +222 -0
  68. data/lib/proton_api/models/goal_decumulation_allocation_request.rb +764 -0
  69. data/lib/proton_api/models/goal_decumulation_recommendation_request.rb +657 -0
  70. data/lib/proton_api/models/goal_decumulation_status_request.rb +657 -0
  71. data/lib/proton_api/models/goal_withdrawal_config.rb +335 -0
  72. data/lib/proton_api/models/guaranteed_rate_benefit.rb +272 -0
  73. data/lib/proton_api/models/income_config.rb +266 -0
  74. data/lib/proton_api/models/life_insurance_needs_calculator_request.rb +515 -0
  75. data/lib/proton_api/models/location.rb +183 -0
  76. data/lib/proton_api/models/monte_carlo_request.rb +504 -0
  77. data/lib/proton_api/models/mortgage_calculator_down_payment_request.rb +299 -0
  78. data/lib/proton_api/models/mortgage_calculator_home_price_request.rb +299 -0
  79. data/lib/proton_api/models/mortgage_calculator_periodic_payment_request.rb +299 -0
  80. data/lib/proton_api/models/mvo_request.rb +366 -0
  81. data/lib/proton_api/models/opt_config.rb +300 -0
  82. data/lib/proton_api/models/opt_config1.rb +260 -0
  83. data/lib/proton_api/models/order_rebalance_request.rb +398 -0
  84. data/lib/proton_api/models/performance_calculator_request.rb +687 -0
  85. data/lib/proton_api/models/periods.rb +220 -0
  86. data/lib/proton_api/models/portfolio_optimization_score_request.rb +356 -0
  87. data/lib/proton_api/models/portfolio_what_if_request.rb +351 -0
  88. data/lib/proton_api/models/purchase_calculator_amount_request.rb +401 -0
  89. data/lib/proton_api/models/purchase_calculator_deposit_amount_request.rb +434 -0
  90. data/lib/proton_api/models/purchase_calculator_horizon_request.rb +356 -0
  91. data/lib/proton_api/models/ratio_targets.rb +328 -0
  92. data/lib/proton_api/models/ratio_targets1.rb +328 -0
  93. data/lib/proton_api/models/rebalancing_signal_request.rb +238 -0
  94. data/lib/proton_api/models/recommendation_config.rb +357 -0
  95. data/lib/proton_api/models/recommendation_config1.rb +346 -0
  96. data/lib/proton_api/models/recurring_transaction_analysis_request.rb +400 -0
  97. data/lib/proton_api/models/retirement_calculator_deposit_amount_request.rb +509 -0
  98. data/lib/proton_api/models/retirement_calculator_expenses_request.rb +476 -0
  99. data/lib/proton_api/models/retirement_calculator_percent_covered_request.rb +474 -0
  100. data/lib/proton_api/models/risk_allocation_request.rb +316 -0
  101. data/lib/proton_api/models/risk_score_request.rb +239 -0
  102. data/lib/proton_api/models/savings_calculator_request.rb +395 -0
  103. data/lib/proton_api/models/savings_deposit_schedule.rb +276 -0
  104. data/lib/proton_api/models/scenario_analysis_request.rb +401 -0
  105. data/lib/proton_api/models/sensitivity_analysis_request.rb +399 -0
  106. data/lib/proton_api/models/sensitivity_factor.rb +278 -0
  107. data/lib/proton_api/models/settings.rb +287 -0
  108. data/lib/proton_api/models/spending_analysis_request.rb +505 -0
  109. data/lib/proton_api/models/variable_annuity_request.rb +700 -0
  110. data/lib/proton_api/models/w_config.rb +382 -0
  111. data/lib/proton_api/models/w_config1.rb +347 -0
  112. data/lib/proton_api/version.rb +15 -0
  113. data/proton_api.gemspec +46 -0
  114. data/spec/api/annuities_api_spec.rb +107 -0
  115. data/spec/api/business_financial_management_api_spec.rb +95 -0
  116. data/spec/api/cards_api_spec.rb +71 -0
  117. data/spec/api/financial_health_api_spec.rb +83 -0
  118. data/spec/api/financial_planning_api_spec.rb +179 -0
  119. data/spec/api/goals_api_spec.rb +107 -0
  120. data/spec/api/life_insurance_api_spec.rb +47 -0
  121. data/spec/api/personal_financial_management_api_spec.rb +107 -0
  122. data/spec/api/portfolio_construction_api_spec.rb +47 -0
  123. data/spec/api/portfolio_management_api_spec.rb +47 -0
  124. data/spec/api/risk_scoring_api_spec.rb +71 -0
  125. data/spec/api/simulations_api_spec.rb +119 -0
  126. data/spec/api/util_api_spec.rb +71 -0
  127. data/spec/api_client_spec.rb +243 -0
  128. data/spec/configuration_spec.rb +42 -0
  129. data/spec/models/accumulation_goal_deposit_config_spec.rb +89 -0
  130. data/spec/models/annuity_calculator_accumulation_horizon_request_spec.rb +111 -0
  131. data/spec/models/annuity_calculator_annuity_amount_request_spec.rb +111 -0
  132. data/spec/models/annuity_calculator_decumulation_horizon_request_spec.rb +111 -0
  133. data/spec/models/annuity_calculator_deposit_amount_request_spec.rb +111 -0
  134. data/spec/models/annuity_calculator_initial_balance_request_spec.rb +111 -0
  135. data/spec/models/annuity_deposit_schedule_spec.rb +57 -0
  136. data/spec/models/answer_spec.rb +41 -0
  137. data/spec/models/backtest_request_spec.rb +95 -0
  138. data/spec/models/beneficiary_bequest_config_spec.rb +53 -0
  139. data/spec/models/budget_aggregation_account_spec.rb +41 -0
  140. data/spec/models/budget_calculator_request_spec.rb +105 -0
  141. data/spec/models/budget_component_spec.rb +53 -0
  142. data/spec/models/budget_details_spec.rb +99 -0
  143. data/spec/models/business_financial_health_check_request_spec.rb +143 -0
  144. data/spec/models/business_invoice_analysis_request_spec.rb +123 -0
  145. data/spec/models/calculator_deposit_schedule1_spec.rb +57 -0
  146. data/spec/models/calculator_deposit_schedule_spec.rb +51 -0
  147. data/spec/models/card_analysis_request_spec.rb +129 -0
  148. data/spec/models/card_limit_check_request_spec.rb +65 -0
  149. data/spec/models/card_transaction_authorization_request_spec.rb +157 -0
  150. data/spec/models/cash_analysis_request_spec.rb +115 -0
  151. data/spec/models/cash_flow_analysis_request_spec.rb +135 -0
  152. data/spec/models/children_education_config_spec.rb +47 -0
  153. data/spec/models/customer_analysis_request_spec.rb +101 -0
  154. data/spec/models/decision_tree_result_request_spec.rb +51 -0
  155. data/spec/models/decumulation_goal_deposit_config_spec.rb +89 -0
  156. data/spec/models/dimensional_risk_score_request_spec.rb +89 -0
  157. data/spec/models/diversification_score_request_spec.rb +111 -0
  158. data/spec/models/education_calculator_annual_cost_request_spec.rb +101 -0
  159. data/spec/models/education_calculator_deposit_amount_request_spec.rb +107 -0
  160. data/spec/models/education_calculator_percent_covered_request_spec.rb +101 -0
  161. data/spec/models/education_config_spec.rb +53 -0
  162. data/spec/models/emergency_fund_calculator_request_spec.rb +141 -0
  163. data/spec/models/event_study_request_spec.rb +109 -0
  164. data/spec/models/fee_analysis_request_spec.rb +77 -0
  165. data/spec/models/financial_health_check_request_spec.rb +95 -0
  166. data/spec/models/financial_picture_request_spec.rb +95 -0
  167. data/spec/models/financial_statement_analysis_request_spec.rb +155 -0
  168. data/spec/models/goal_accumulation_allocation_request_spec.rb +215 -0
  169. data/spec/models/goal_accumulation_recommendation_request_spec.rb +173 -0
  170. data/spec/models/goal_accumulation_status_request_spec.rb +173 -0
  171. data/spec/models/goal_config_spec.rb +47 -0
  172. data/spec/models/goal_decumulation_allocation_request_spec.rb +221 -0
  173. data/spec/models/goal_decumulation_recommendation_request_spec.rb +179 -0
  174. data/spec/models/goal_decumulation_status_request_spec.rb +179 -0
  175. data/spec/models/goal_withdrawal_config_spec.rb +89 -0
  176. data/spec/models/guaranteed_rate_benefit_spec.rb +59 -0
  177. data/spec/models/income_config_spec.rb +53 -0
  178. data/spec/models/life_insurance_needs_calculator_request_spec.rb +125 -0
  179. data/spec/models/location_spec.rb +41 -0
  180. data/spec/models/monte_carlo_request_spec.rb +179 -0
  181. data/spec/models/mortgage_calculator_down_payment_request_spec.rb +59 -0
  182. data/spec/models/mortgage_calculator_home_price_request_spec.rb +59 -0
  183. data/spec/models/mortgage_calculator_periodic_payment_request_spec.rb +59 -0
  184. data/spec/models/mvo_request_spec.rb +113 -0
  185. data/spec/models/opt_config1_spec.rb +69 -0
  186. data/spec/models/opt_config_spec.rb +81 -0
  187. data/spec/models/order_rebalance_request_spec.rb +123 -0
  188. data/spec/models/performance_calculator_request_spec.rb +233 -0
  189. data/spec/models/periods_spec.rb +47 -0
  190. data/spec/models/portfolio_optimization_score_request_spec.rb +127 -0
  191. data/spec/models/portfolio_what_if_request_spec.rb +123 -0
  192. data/spec/models/purchase_calculator_amount_request_spec.rb +93 -0
  193. data/spec/models/purchase_calculator_deposit_amount_request_spec.rb +99 -0
  194. data/spec/models/purchase_calculator_horizon_request_spec.rb +83 -0
  195. data/spec/models/ratio_targets1_spec.rb +71 -0
  196. data/spec/models/ratio_targets_spec.rb +71 -0
  197. data/spec/models/rebalancing_signal_request_spec.rb +71 -0
  198. data/spec/models/recommendation_config1_spec.rb +77 -0
  199. data/spec/models/recommendation_config_spec.rb +83 -0
  200. data/spec/models/recurring_transaction_analysis_request_spec.rb +129 -0
  201. data/spec/models/retirement_calculator_deposit_amount_request_spec.rb +113 -0
  202. data/spec/models/retirement_calculator_expenses_request_spec.rb +107 -0
  203. data/spec/models/retirement_calculator_percent_covered_request_spec.rb +107 -0
  204. data/spec/models/risk_allocation_request_spec.rb +85 -0
  205. data/spec/models/risk_score_request_spec.rb +71 -0
  206. data/spec/models/savings_calculator_request_spec.rb +99 -0
  207. data/spec/models/savings_deposit_schedule_spec.rb +63 -0
  208. data/spec/models/scenario_analysis_request_spec.rb +133 -0
  209. data/spec/models/sensitivity_analysis_request_spec.rb +133 -0
  210. data/spec/models/sensitivity_factor_spec.rb +59 -0
  211. data/spec/models/settings_spec.rb +79 -0
  212. data/spec/models/spending_analysis_request_spec.rb +187 -0
  213. data/spec/models/variable_annuity_request_spec.rb +209 -0
  214. data/spec/models/w_config1_spec.rb +65 -0
  215. data/spec/models/w_config_spec.rb +65 -0
  216. data/spec/spec_helper.rb +111 -0
  217. metadata +561 -0
@@ -0,0 +1,346 @@
1
+ =begin
2
+ #Hydrogen Proton API
3
+
4
+ #Financial engineering module of Hydrogen Atom
5
+
6
+ OpenAPI spec version: 1.9.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.19
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module ProtonApi
16
+ class RecommendationConfig1
17
+ attr_accessor :horizon_max
18
+
19
+ attr_accessor :dep_min
20
+
21
+ attr_accessor :inv_max
22
+
23
+ attr_accessor :inv_min
24
+
25
+ attr_accessor :recommended_inflation
26
+
27
+ attr_accessor :horizon_min
28
+
29
+ attr_accessor :dep_max
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'horizon_max' => :'horizon_max',
35
+ :'dep_min' => :'dep_min',
36
+ :'inv_max' => :'inv_max',
37
+ :'inv_min' => :'inv_min',
38
+ :'recommended_inflation' => :'recommended_inflation',
39
+ :'horizon_min' => :'horizon_min',
40
+ :'dep_max' => :'dep_max'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'horizon_max' => :'Integer',
48
+ :'dep_min' => :'Float',
49
+ :'inv_max' => :'Float',
50
+ :'inv_min' => :'Float',
51
+ :'recommended_inflation' => :'Float',
52
+ :'horizon_min' => :'Integer',
53
+ :'dep_max' => :'Float'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
+
65
+ if attributes.has_key?(:'horizon_max')
66
+ self.horizon_max = attributes[:'horizon_max']
67
+ else
68
+ self.horizon_max = 64
69
+ end
70
+
71
+ if attributes.has_key?(:'dep_min')
72
+ self.dep_min = attributes[:'dep_min']
73
+ end
74
+
75
+ if attributes.has_key?(:'inv_max')
76
+ self.inv_max = attributes[:'inv_max']
77
+ end
78
+
79
+ if attributes.has_key?(:'inv_min')
80
+ self.inv_min = attributes[:'inv_min']
81
+ end
82
+
83
+ if attributes.has_key?(:'recommended_inflation')
84
+ self.recommended_inflation = attributes[:'recommended_inflation']
85
+ else
86
+ self.recommended_inflation = 0.0
87
+ end
88
+
89
+ if attributes.has_key?(:'horizon_min')
90
+ self.horizon_min = attributes[:'horizon_min']
91
+ else
92
+ self.horizon_min = 1
93
+ end
94
+
95
+ if attributes.has_key?(:'dep_max')
96
+ self.dep_max = attributes[:'dep_max']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ invalid_properties = Array.new
104
+ if !@horizon_max.nil? && @horizon_max < 0
105
+ invalid_properties.push('invalid value for "horizon_max", must be greater than or equal to 0.')
106
+ end
107
+
108
+ if !@dep_min.nil? && @dep_min < 0
109
+ invalid_properties.push('invalid value for "dep_min", must be greater than or equal to 0.')
110
+ end
111
+
112
+ if !@inv_max.nil? && @inv_max < 0
113
+ invalid_properties.push('invalid value for "inv_max", must be greater than or equal to 0.')
114
+ end
115
+
116
+ if !@inv_min.nil? && @inv_min < 0
117
+ invalid_properties.push('invalid value for "inv_min", must be greater than or equal to 0.')
118
+ end
119
+
120
+ if !@recommended_inflation.nil? && @recommended_inflation < -1
121
+ invalid_properties.push('invalid value for "recommended_inflation", must be greater than or equal to -1.')
122
+ end
123
+
124
+ if !@horizon_min.nil? && @horizon_min < 0
125
+ invalid_properties.push('invalid value for "horizon_min", must be greater than or equal to 0.')
126
+ end
127
+
128
+ if !@dep_max.nil? && @dep_max < 0
129
+ invalid_properties.push('invalid value for "dep_max", must be greater than or equal to 0.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ return false if !@horizon_max.nil? && @horizon_max < 0
139
+ return false if !@dep_min.nil? && @dep_min < 0
140
+ return false if !@inv_max.nil? && @inv_max < 0
141
+ return false if !@inv_min.nil? && @inv_min < 0
142
+ return false if !@recommended_inflation.nil? && @recommended_inflation < -1
143
+ return false if !@horizon_min.nil? && @horizon_min < 0
144
+ return false if !@dep_max.nil? && @dep_max < 0
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] horizon_max Value to be assigned
150
+ def horizon_max=(horizon_max)
151
+ if !horizon_max.nil? && horizon_max < 0
152
+ fail ArgumentError, 'invalid value for "horizon_max", must be greater than or equal to 0.'
153
+ end
154
+
155
+ @horizon_max = horizon_max
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] dep_min Value to be assigned
160
+ def dep_min=(dep_min)
161
+ if !dep_min.nil? && dep_min < 0
162
+ fail ArgumentError, 'invalid value for "dep_min", must be greater than or equal to 0.'
163
+ end
164
+
165
+ @dep_min = dep_min
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] inv_max Value to be assigned
170
+ def inv_max=(inv_max)
171
+ if !inv_max.nil? && inv_max < 0
172
+ fail ArgumentError, 'invalid value for "inv_max", must be greater than or equal to 0.'
173
+ end
174
+
175
+ @inv_max = inv_max
176
+ end
177
+
178
+ # Custom attribute writer method with validation
179
+ # @param [Object] inv_min Value to be assigned
180
+ def inv_min=(inv_min)
181
+ if !inv_min.nil? && inv_min < 0
182
+ fail ArgumentError, 'invalid value for "inv_min", must be greater than or equal to 0.'
183
+ end
184
+
185
+ @inv_min = inv_min
186
+ end
187
+
188
+ # Custom attribute writer method with validation
189
+ # @param [Object] recommended_inflation Value to be assigned
190
+ def recommended_inflation=(recommended_inflation)
191
+ if !recommended_inflation.nil? && recommended_inflation < -1
192
+ fail ArgumentError, 'invalid value for "recommended_inflation", must be greater than or equal to -1.'
193
+ end
194
+
195
+ @recommended_inflation = recommended_inflation
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] horizon_min Value to be assigned
200
+ def horizon_min=(horizon_min)
201
+ if !horizon_min.nil? && horizon_min < 0
202
+ fail ArgumentError, 'invalid value for "horizon_min", must be greater than or equal to 0.'
203
+ end
204
+
205
+ @horizon_min = horizon_min
206
+ end
207
+
208
+ # Custom attribute writer method with validation
209
+ # @param [Object] dep_max Value to be assigned
210
+ def dep_max=(dep_max)
211
+ if !dep_max.nil? && dep_max < 0
212
+ fail ArgumentError, 'invalid value for "dep_max", must be greater than or equal to 0.'
213
+ end
214
+
215
+ @dep_max = dep_max
216
+ end
217
+
218
+ # Checks equality by comparing each attribute.
219
+ # @param [Object] Object to be compared
220
+ def ==(o)
221
+ return true if self.equal?(o)
222
+ self.class == o.class &&
223
+ horizon_max == o.horizon_max &&
224
+ dep_min == o.dep_min &&
225
+ inv_max == o.inv_max &&
226
+ inv_min == o.inv_min &&
227
+ recommended_inflation == o.recommended_inflation &&
228
+ horizon_min == o.horizon_min &&
229
+ dep_max == o.dep_max
230
+ end
231
+
232
+ # @see the `==` method
233
+ # @param [Object] Object to be compared
234
+ def eql?(o)
235
+ self == o
236
+ end
237
+
238
+ # Calculates hash code according to all attributes.
239
+ # @return [Fixnum] Hash code
240
+ def hash
241
+ [horizon_max, dep_min, inv_max, inv_min, recommended_inflation, horizon_min, dep_max].hash
242
+ end
243
+
244
+ # Builds the object from hash
245
+ # @param [Hash] attributes Model attributes in the form of hash
246
+ # @return [Object] Returns the model itself
247
+ def build_from_hash(attributes)
248
+ return nil unless attributes.is_a?(Hash)
249
+ self.class.swagger_types.each_pair do |key, type|
250
+ if type =~ /\AArray<(.*)>/i
251
+ # check to ensure the input is an array given that the attribute
252
+ # is documented as an array but the input is not
253
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
254
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
255
+ end
256
+ elsif !attributes[self.class.attribute_map[key]].nil?
257
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
258
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
259
+ end
260
+
261
+ self
262
+ end
263
+ # Deserializes the data based on type
264
+ # @param string type Data type
265
+ # @param string value Value to be deserialized
266
+ # @return [Object] Deserialized data
267
+ def _deserialize(type, value)
268
+ case type.to_sym
269
+ when :DateTime
270
+ value
271
+ when :Date
272
+ value
273
+ when :String
274
+ value.to_s
275
+ when :Integer
276
+ value.to_i
277
+ when :Float
278
+ value.to_f
279
+ when :BOOLEAN
280
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
281
+ true
282
+ else
283
+ false
284
+ end
285
+ when :Object
286
+ # generic object (usually a Hash), return directly
287
+ value
288
+ when /\AArray<(?<inner_type>.+)>\z/
289
+ inner_type = Regexp.last_match[:inner_type]
290
+ value.map { |v| _deserialize(inner_type, v) }
291
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
292
+ k_type = Regexp.last_match[:k_type]
293
+ v_type = Regexp.last_match[:v_type]
294
+ {}.tap do |hash|
295
+ value.each do |k, v|
296
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
297
+ end
298
+ end
299
+ else # model
300
+ temp_model = ProtonApi.const_get(type).new
301
+ temp_model.build_from_hash(value)
302
+ end
303
+ end
304
+ # Returns the string representation of the object
305
+ # @return [String] String presentation of the object
306
+ def to_s
307
+ to_hash.to_s
308
+ end
309
+
310
+ # to_body is an alias to to_hash (backward compatibility)
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_body
313
+ to_hash
314
+ end
315
+
316
+ # Returns the object in the form of hash
317
+ # @return [Hash] Returns the object in the form of hash
318
+ def to_hash
319
+ hash = {}
320
+ self.class.attribute_map.each_pair do |attr, param|
321
+ value = self.send(attr)
322
+ next if value.nil?
323
+ hash[param] = _to_hash(value)
324
+ end
325
+ hash
326
+ end
327
+ # Outputs non-array value in the form of hash
328
+ # For object, use to_hash. Otherwise, just return the value
329
+ # @param [Object] value Any valid value
330
+ # @return [Hash] Returns the value in the form of hash
331
+ def _to_hash(value)
332
+ if value.is_a?(Array)
333
+ value.compact.map { |v| _to_hash(v) }
334
+ elsif value.is_a?(Hash)
335
+ {}.tap do |hash|
336
+ value.each { |k, v| hash[k] = _to_hash(v) }
337
+ end
338
+ elsif value.respond_to? :to_hash
339
+ value.to_hash
340
+ else
341
+ value
342
+ end
343
+ end
344
+
345
+ end
346
+ end
@@ -0,0 +1,400 @@
1
+ =begin
2
+ #Hydrogen Proton API
3
+
4
+ #Financial engineering module of Hydrogen Atom
5
+
6
+ OpenAPI spec version: 1.9.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.19
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module ProtonApi
16
+ class RecurringTransactionAnalysisRequest
17
+ attr_accessor :currency_code
18
+
19
+ attr_accessor :client_id
20
+
21
+ attr_accessor :scope
22
+
23
+ attr_accessor :end_date
24
+
25
+ attr_accessor :account_ids
26
+
27
+ attr_accessor :currency_conversion
28
+
29
+ attr_accessor :interval_deviation_threshold
30
+
31
+ attr_accessor :amount_deviation_threshold
32
+
33
+ attr_accessor :analyze_transactions
34
+
35
+ attr_accessor :start_date
36
+
37
+ attr_accessor :flag_transactions
38
+
39
+ attr_accessor :transaction_status_scope
40
+
41
+ attr_accessor :only_cleansed
42
+
43
+ attr_accessor :aggregation_account_ids
44
+
45
+ attr_accessor :show_recurring_details
46
+
47
+ class EnumAttributeValidator
48
+ attr_reader :datatype
49
+ attr_reader :allowable_values
50
+
51
+ def initialize(datatype, allowable_values)
52
+ @allowable_values = allowable_values.map do |value|
53
+ case datatype.to_s
54
+ when /Integer/i
55
+ value.to_i
56
+ when /Float/i
57
+ value.to_f
58
+ else
59
+ value
60
+ end
61
+ end
62
+ end
63
+
64
+ def valid?(value)
65
+ !value || allowable_values.include?(value)
66
+ end
67
+ end
68
+
69
+ # Attribute mapping from ruby-style variable name to JSON key.
70
+ def self.attribute_map
71
+ {
72
+ :'currency_code' => :'currency_code',
73
+ :'client_id' => :'client_id',
74
+ :'scope' => :'scope',
75
+ :'end_date' => :'end_date',
76
+ :'account_ids' => :'account_ids',
77
+ :'currency_conversion' => :'currency_conversion',
78
+ :'interval_deviation_threshold' => :'interval_deviation_threshold',
79
+ :'amount_deviation_threshold' => :'amount_deviation_threshold',
80
+ :'analyze_transactions' => :'analyze_transactions',
81
+ :'start_date' => :'start_date',
82
+ :'flag_transactions' => :'flag_transactions',
83
+ :'transaction_status_scope' => :'transaction_status_scope',
84
+ :'only_cleansed' => :'only_cleansed',
85
+ :'aggregation_account_ids' => :'aggregation_account_ids',
86
+ :'show_recurring_details' => :'show_recurring_details'
87
+ }
88
+ end
89
+
90
+ # Attribute type mapping.
91
+ def self.swagger_types
92
+ {
93
+ :'currency_code' => :'String',
94
+ :'client_id' => :'String',
95
+ :'scope' => :'String',
96
+ :'end_date' => :'Date',
97
+ :'account_ids' => :'Array<String>',
98
+ :'currency_conversion' => :'String',
99
+ :'interval_deviation_threshold' => :'Integer',
100
+ :'amount_deviation_threshold' => :'Float',
101
+ :'analyze_transactions' => :'BOOLEAN',
102
+ :'start_date' => :'Date',
103
+ :'flag_transactions' => :'BOOLEAN',
104
+ :'transaction_status_scope' => :'Array<String>',
105
+ :'only_cleansed' => :'BOOLEAN',
106
+ :'aggregation_account_ids' => :'Array<String>',
107
+ :'show_recurring_details' => :'BOOLEAN'
108
+ }
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ return unless attributes.is_a?(Hash)
115
+
116
+ # convert string to symbol for hash key
117
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
118
+
119
+ if attributes.has_key?(:'currency_code')
120
+ self.currency_code = attributes[:'currency_code']
121
+ end
122
+
123
+ if attributes.has_key?(:'client_id')
124
+ self.client_id = attributes[:'client_id']
125
+ end
126
+
127
+ if attributes.has_key?(:'scope')
128
+ self.scope = attributes[:'scope']
129
+ else
130
+ self.scope = 'all'
131
+ end
132
+
133
+ if attributes.has_key?(:'end_date')
134
+ self.end_date = attributes[:'end_date']
135
+ end
136
+
137
+ if attributes.has_key?(:'account_ids')
138
+ if (value = attributes[:'account_ids']).is_a?(Array)
139
+ self.account_ids = value
140
+ end
141
+ end
142
+
143
+ if attributes.has_key?(:'currency_conversion')
144
+ self.currency_conversion = attributes[:'currency_conversion']
145
+ end
146
+
147
+ if attributes.has_key?(:'interval_deviation_threshold')
148
+ self.interval_deviation_threshold = attributes[:'interval_deviation_threshold']
149
+ else
150
+ self.interval_deviation_threshold = 3
151
+ end
152
+
153
+ if attributes.has_key?(:'amount_deviation_threshold')
154
+ self.amount_deviation_threshold = attributes[:'amount_deviation_threshold']
155
+ else
156
+ self.amount_deviation_threshold = 0.05
157
+ end
158
+
159
+ if attributes.has_key?(:'analyze_transactions')
160
+ self.analyze_transactions = attributes[:'analyze_transactions']
161
+ else
162
+ self.analyze_transactions = true
163
+ end
164
+
165
+ if attributes.has_key?(:'start_date')
166
+ self.start_date = attributes[:'start_date']
167
+ end
168
+
169
+ if attributes.has_key?(:'flag_transactions')
170
+ self.flag_transactions = attributes[:'flag_transactions']
171
+ else
172
+ self.flag_transactions = false
173
+ end
174
+
175
+ if attributes.has_key?(:'transaction_status_scope')
176
+ if (value = attributes[:'transaction_status_scope']).is_a?(Array)
177
+ self.transaction_status_scope = value
178
+ end
179
+ end
180
+
181
+ if attributes.has_key?(:'only_cleansed')
182
+ self.only_cleansed = attributes[:'only_cleansed']
183
+ else
184
+ self.only_cleansed = false
185
+ end
186
+
187
+ if attributes.has_key?(:'aggregation_account_ids')
188
+ if (value = attributes[:'aggregation_account_ids']).is_a?(Array)
189
+ self.aggregation_account_ids = value
190
+ end
191
+ end
192
+
193
+ if attributes.has_key?(:'show_recurring_details')
194
+ self.show_recurring_details = attributes[:'show_recurring_details']
195
+ else
196
+ self.show_recurring_details = false
197
+ end
198
+ end
199
+
200
+ # Show invalid properties with the reasons. Usually used together with valid?
201
+ # @return Array for valid properties with the reasons
202
+ def list_invalid_properties
203
+ invalid_properties = Array.new
204
+ if !@interval_deviation_threshold.nil? && @interval_deviation_threshold < 0
205
+ invalid_properties.push('invalid value for "interval_deviation_threshold", must be greater than or equal to 0.')
206
+ end
207
+
208
+ if !@amount_deviation_threshold.nil? && @amount_deviation_threshold > 1
209
+ invalid_properties.push('invalid value for "amount_deviation_threshold", must be smaller than or equal to 1.')
210
+ end
211
+
212
+ if !@amount_deviation_threshold.nil? && @amount_deviation_threshold < 0
213
+ invalid_properties.push('invalid value for "amount_deviation_threshold", must be greater than or equal to 0.')
214
+ end
215
+
216
+ invalid_properties
217
+ end
218
+
219
+ # Check to see if the all the properties in the model are valid
220
+ # @return true if the model is valid
221
+ def valid?
222
+ scope_validator = EnumAttributeValidator.new('String', ['all', 'external', 'internal'])
223
+ return false unless scope_validator.valid?(@scope)
224
+ return false if !@interval_deviation_threshold.nil? && @interval_deviation_threshold < 0
225
+ return false if !@amount_deviation_threshold.nil? && @amount_deviation_threshold > 1
226
+ return false if !@amount_deviation_threshold.nil? && @amount_deviation_threshold < 0
227
+ true
228
+ end
229
+
230
+ # Custom attribute writer method checking allowed values (enum).
231
+ # @param [Object] scope Object to be assigned
232
+ def scope=(scope)
233
+ validator = EnumAttributeValidator.new('String', ['all', 'external', 'internal'])
234
+ unless validator.valid?(scope)
235
+ fail ArgumentError, 'invalid value for "scope", must be one of #{validator.allowable_values}.'
236
+ end
237
+ @scope = scope
238
+ end
239
+
240
+ # Custom attribute writer method with validation
241
+ # @param [Object] interval_deviation_threshold Value to be assigned
242
+ def interval_deviation_threshold=(interval_deviation_threshold)
243
+ if !interval_deviation_threshold.nil? && interval_deviation_threshold < 0
244
+ fail ArgumentError, 'invalid value for "interval_deviation_threshold", must be greater than or equal to 0.'
245
+ end
246
+
247
+ @interval_deviation_threshold = interval_deviation_threshold
248
+ end
249
+
250
+ # Custom attribute writer method with validation
251
+ # @param [Object] amount_deviation_threshold Value to be assigned
252
+ def amount_deviation_threshold=(amount_deviation_threshold)
253
+ if !amount_deviation_threshold.nil? && amount_deviation_threshold > 1
254
+ fail ArgumentError, 'invalid value for "amount_deviation_threshold", must be smaller than or equal to 1.'
255
+ end
256
+
257
+ if !amount_deviation_threshold.nil? && amount_deviation_threshold < 0
258
+ fail ArgumentError, 'invalid value for "amount_deviation_threshold", must be greater than or equal to 0.'
259
+ end
260
+
261
+ @amount_deviation_threshold = amount_deviation_threshold
262
+ end
263
+
264
+ # Checks equality by comparing each attribute.
265
+ # @param [Object] Object to be compared
266
+ def ==(o)
267
+ return true if self.equal?(o)
268
+ self.class == o.class &&
269
+ currency_code == o.currency_code &&
270
+ client_id == o.client_id &&
271
+ scope == o.scope &&
272
+ end_date == o.end_date &&
273
+ account_ids == o.account_ids &&
274
+ currency_conversion == o.currency_conversion &&
275
+ interval_deviation_threshold == o.interval_deviation_threshold &&
276
+ amount_deviation_threshold == o.amount_deviation_threshold &&
277
+ analyze_transactions == o.analyze_transactions &&
278
+ start_date == o.start_date &&
279
+ flag_transactions == o.flag_transactions &&
280
+ transaction_status_scope == o.transaction_status_scope &&
281
+ only_cleansed == o.only_cleansed &&
282
+ aggregation_account_ids == o.aggregation_account_ids &&
283
+ show_recurring_details == o.show_recurring_details
284
+ end
285
+
286
+ # @see the `==` method
287
+ # @param [Object] Object to be compared
288
+ def eql?(o)
289
+ self == o
290
+ end
291
+
292
+ # Calculates hash code according to all attributes.
293
+ # @return [Fixnum] Hash code
294
+ def hash
295
+ [currency_code, client_id, scope, end_date, account_ids, currency_conversion, interval_deviation_threshold, amount_deviation_threshold, analyze_transactions, start_date, flag_transactions, transaction_status_scope, only_cleansed, aggregation_account_ids, show_recurring_details].hash
296
+ end
297
+
298
+ # Builds the object from hash
299
+ # @param [Hash] attributes Model attributes in the form of hash
300
+ # @return [Object] Returns the model itself
301
+ def build_from_hash(attributes)
302
+ return nil unless attributes.is_a?(Hash)
303
+ self.class.swagger_types.each_pair do |key, type|
304
+ if type =~ /\AArray<(.*)>/i
305
+ # check to ensure the input is an array given that the attribute
306
+ # is documented as an array but the input is not
307
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
308
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
309
+ end
310
+ elsif !attributes[self.class.attribute_map[key]].nil?
311
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
312
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
313
+ end
314
+
315
+ self
316
+ end
317
+ # Deserializes the data based on type
318
+ # @param string type Data type
319
+ # @param string value Value to be deserialized
320
+ # @return [Object] Deserialized data
321
+ def _deserialize(type, value)
322
+ case type.to_sym
323
+ when :DateTime
324
+ value
325
+ when :Date
326
+ value
327
+ when :String
328
+ value.to_s
329
+ when :Integer
330
+ value.to_i
331
+ when :Float
332
+ value.to_f
333
+ when :BOOLEAN
334
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
335
+ true
336
+ else
337
+ false
338
+ end
339
+ when :Object
340
+ # generic object (usually a Hash), return directly
341
+ value
342
+ when /\AArray<(?<inner_type>.+)>\z/
343
+ inner_type = Regexp.last_match[:inner_type]
344
+ value.map { |v| _deserialize(inner_type, v) }
345
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
346
+ k_type = Regexp.last_match[:k_type]
347
+ v_type = Regexp.last_match[:v_type]
348
+ {}.tap do |hash|
349
+ value.each do |k, v|
350
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
351
+ end
352
+ end
353
+ else # model
354
+ temp_model = ProtonApi.const_get(type).new
355
+ temp_model.build_from_hash(value)
356
+ end
357
+ end
358
+ # Returns the string representation of the object
359
+ # @return [String] String presentation of the object
360
+ def to_s
361
+ to_hash.to_s
362
+ end
363
+
364
+ # to_body is an alias to to_hash (backward compatibility)
365
+ # @return [Hash] Returns the object in the form of hash
366
+ def to_body
367
+ to_hash
368
+ end
369
+
370
+ # Returns the object in the form of hash
371
+ # @return [Hash] Returns the object in the form of hash
372
+ def to_hash
373
+ hash = {}
374
+ self.class.attribute_map.each_pair do |attr, param|
375
+ value = self.send(attr)
376
+ next if value.nil?
377
+ hash[param] = _to_hash(value)
378
+ end
379
+ hash
380
+ end
381
+ # Outputs non-array value in the form of hash
382
+ # For object, use to_hash. Otherwise, just return the value
383
+ # @param [Object] value Any valid value
384
+ # @return [Hash] Returns the value in the form of hash
385
+ def _to_hash(value)
386
+ if value.is_a?(Array)
387
+ value.compact.map { |v| _to_hash(v) }
388
+ elsif value.is_a?(Hash)
389
+ {}.tap do |hash|
390
+ value.each { |k, v| hash[k] = _to_hash(v) }
391
+ end
392
+ elsif value.respond_to? :to_hash
393
+ value.to_hash
394
+ else
395
+ value
396
+ end
397
+ end
398
+
399
+ end
400
+ end