mx-platform-ruby 0.4.2 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +4 -6
  4. data/docs/AccountResponse.md +15 -1
  5. data/docs/ManagedAccountCreateRequest.md +78 -0
  6. data/docs/ManagedAccountCreateRequestBody.md +18 -0
  7. data/docs/ManagedAccountUpdateRequest.md +78 -0
  8. data/docs/ManagedAccountUpdateRequestBody.md +18 -0
  9. data/docs/ManagedMemberCreateRequest.md +24 -0
  10. data/docs/ManagedMemberCreateRequestBody.md +18 -0
  11. data/docs/ManagedMemberUpdateRequest.md +22 -0
  12. data/docs/ManagedMemberUpdateRequestBody.md +18 -0
  13. data/docs/ManagedTransactionCreateRequest.md +56 -0
  14. data/docs/ManagedTransactionCreateRequestBody.md +18 -0
  15. data/docs/ManagedTransactionUpdateRequest.md +56 -0
  16. data/docs/ManagedTransactionUpdateRequestBody.md +18 -0
  17. data/docs/MemberResponse.md +5 -1
  18. data/docs/MerchantLocationResponse.md +40 -0
  19. data/docs/MerchantLocationResponseBody.md +18 -0
  20. data/docs/MxPlatformApi.md +1415 -117
  21. data/docs/TransactionResponse.md +11 -1
  22. data/lib/mx-platform-ruby/api/mx_platform_api.rb +1474 -124
  23. data/lib/mx-platform-ruby/api_client.rb +7 -9
  24. data/lib/mx-platform-ruby/api_error.rb +1 -1
  25. data/lib/mx-platform-ruby/configuration.rb +35 -2
  26. data/lib/mx-platform-ruby/models/account_number_response.rb +5 -1
  27. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +1 -1
  28. data/lib/mx-platform-ruby/models/account_owner_response.rb +9 -1
  29. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +1 -1
  30. data/lib/mx-platform-ruby/models/account_response.rb +112 -5
  31. data/lib/mx-platform-ruby/models/account_response_body.rb +1 -1
  32. data/lib/mx-platform-ruby/models/account_update_request.rb +1 -1
  33. data/lib/mx-platform-ruby/models/account_update_request_body.rb +1 -1
  34. data/lib/mx-platform-ruby/models/accounts_response_body.rb +1 -1
  35. data/lib/mx-platform-ruby/models/categories_response_body.rb +1 -1
  36. data/lib/mx-platform-ruby/models/category_create_request.rb +1 -1
  37. data/lib/mx-platform-ruby/models/category_create_request_body.rb +1 -1
  38. data/lib/mx-platform-ruby/models/category_response.rb +7 -1
  39. data/lib/mx-platform-ruby/models/category_response_body.rb +1 -1
  40. data/lib/mx-platform-ruby/models/category_update_request.rb +1 -1
  41. data/lib/mx-platform-ruby/models/category_update_request_body.rb +1 -1
  42. data/lib/mx-platform-ruby/models/challenge_response.rb +5 -1
  43. data/lib/mx-platform-ruby/models/challenges_response_body.rb +1 -1
  44. data/lib/mx-platform-ruby/models/connect_widget_request.rb +1 -1
  45. data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +1 -1
  46. data/lib/mx-platform-ruby/models/connect_widget_response.rb +2 -1
  47. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +1 -1
  48. data/lib/mx-platform-ruby/models/credential_request.rb +2 -1
  49. data/lib/mx-platform-ruby/models/credential_response.rb +4 -1
  50. data/lib/mx-platform-ruby/models/credentials_response_body.rb +1 -1
  51. data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +16 -1
  52. data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +1 -1
  53. data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +1 -1
  54. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +1 -1
  55. data/lib/mx-platform-ruby/models/holding_response.rb +15 -1
  56. data/lib/mx-platform-ruby/models/holding_response_body.rb +1 -1
  57. data/lib/mx-platform-ruby/models/holdings_response_body.rb +1 -1
  58. data/lib/mx-platform-ruby/models/image_option_response.rb +4 -1
  59. data/lib/mx-platform-ruby/models/institution_response.rb +11 -1
  60. data/lib/mx-platform-ruby/models/institution_response_body.rb +1 -1
  61. data/lib/mx-platform-ruby/models/institutions_response_body.rb +1 -1
  62. data/lib/mx-platform-ruby/models/managed_account_create_request.rb +503 -0
  63. data/lib/mx-platform-ruby/models/managed_account_create_request_body.rb +218 -0
  64. data/lib/mx-platform-ruby/models/managed_account_update_request.rb +488 -0
  65. data/lib/mx-platform-ruby/models/managed_account_update_request_body.rb +218 -0
  66. data/lib/mx-platform-ruby/models/managed_member_create_request.rb +250 -0
  67. data/lib/mx-platform-ruby/models/managed_member_create_request_body.rb +218 -0
  68. data/lib/mx-platform-ruby/models/managed_member_update_request.rb +236 -0
  69. data/lib/mx-platform-ruby/models/managed_member_update_request_body.rb +218 -0
  70. data/lib/mx-platform-ruby/models/managed_transaction_create_request.rb +414 -0
  71. data/lib/mx-platform-ruby/models/managed_transaction_create_request_body.rb +218 -0
  72. data/lib/mx-platform-ruby/models/managed_transaction_update_request.rb +389 -0
  73. data/lib/mx-platform-ruby/models/managed_transaction_update_request_body.rb +218 -0
  74. data/lib/mx-platform-ruby/models/member_create_request.rb +1 -1
  75. data/lib/mx-platform-ruby/models/member_create_request_body.rb +1 -1
  76. data/lib/mx-platform-ruby/models/member_response.rb +35 -5
  77. data/lib/mx-platform-ruby/models/member_response_body.rb +1 -1
  78. data/lib/mx-platform-ruby/models/member_resume_request.rb +1 -1
  79. data/lib/mx-platform-ruby/models/member_resume_request_body.rb +1 -1
  80. data/lib/mx-platform-ruby/models/member_status_response.rb +8 -1
  81. data/lib/mx-platform-ruby/models/member_status_response_body.rb +1 -1
  82. data/lib/mx-platform-ruby/models/member_update_request.rb +1 -1
  83. data/lib/mx-platform-ruby/models/member_update_request_body.rb +1 -1
  84. data/lib/mx-platform-ruby/models/members_response_body.rb +1 -1
  85. data/lib/mx-platform-ruby/models/merchant_location_response.rb +327 -0
  86. data/lib/mx-platform-ruby/models/merchant_location_response_body.rb +218 -0
  87. data/lib/mx-platform-ruby/models/merchant_response.rb +6 -1
  88. data/lib/mx-platform-ruby/models/merchant_response_body.rb +1 -1
  89. data/lib/mx-platform-ruby/models/merchants_response_body.rb +1 -1
  90. data/lib/mx-platform-ruby/models/o_auth_window_response.rb +2 -1
  91. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +1 -1
  92. data/lib/mx-platform-ruby/models/option_response.rb +3 -1
  93. data/lib/mx-platform-ruby/models/pagination_response.rb +1 -1
  94. data/lib/mx-platform-ruby/models/statement_response.rb +5 -1
  95. data/lib/mx-platform-ruby/models/statement_response_body.rb +1 -1
  96. data/lib/mx-platform-ruby/models/statements_response_body.rb +1 -1
  97. data/lib/mx-platform-ruby/models/tag_create_request.rb +1 -1
  98. data/lib/mx-platform-ruby/models/tag_create_request_body.rb +1 -1
  99. data/lib/mx-platform-ruby/models/tag_response.rb +2 -1
  100. data/lib/mx-platform-ruby/models/tag_response_body.rb +1 -1
  101. data/lib/mx-platform-ruby/models/tag_update_request.rb +1 -1
  102. data/lib/mx-platform-ruby/models/tag_update_request_body.rb +1 -1
  103. data/lib/mx-platform-ruby/models/tagging_create_request.rb +1 -1
  104. data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +1 -1
  105. data/lib/mx-platform-ruby/models/tagging_response.rb +2 -1
  106. data/lib/mx-platform-ruby/models/tagging_response_body.rb +1 -1
  107. data/lib/mx-platform-ruby/models/tagging_update_request.rb +1 -1
  108. data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +1 -1
  109. data/lib/mx-platform-ruby/models/taggings_response_body.rb +1 -1
  110. data/lib/mx-platform-ruby/models/tags_response_body.rb +1 -1
  111. data/lib/mx-platform-ruby/models/transaction_response.rb +85 -5
  112. data/lib/mx-platform-ruby/models/transaction_response_body.rb +1 -1
  113. data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +1 -1
  114. data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +1 -1
  115. data/lib/mx-platform-ruby/models/transaction_rule_response.rb +5 -1
  116. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +1 -1
  117. data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +3 -1
  118. data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +1 -1
  119. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +1 -1
  120. data/lib/mx-platform-ruby/models/transaction_update_request.rb +1 -1
  121. data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +1 -1
  122. data/lib/mx-platform-ruby/models/transactions_response_body.rb +1 -1
  123. data/lib/mx-platform-ruby/models/user_create_request.rb +1 -1
  124. data/lib/mx-platform-ruby/models/user_create_request_body.rb +1 -1
  125. data/lib/mx-platform-ruby/models/user_response.rb +5 -1
  126. data/lib/mx-platform-ruby/models/user_response_body.rb +1 -1
  127. data/lib/mx-platform-ruby/models/user_update_request.rb +1 -1
  128. data/lib/mx-platform-ruby/models/user_update_request_body.rb +1 -1
  129. data/lib/mx-platform-ruby/models/users_response_body.rb +1 -1
  130. data/lib/mx-platform-ruby/models/widget_request.rb +1 -1
  131. data/lib/mx-platform-ruby/models/widget_request_body.rb +1 -1
  132. data/lib/mx-platform-ruby/models/widget_response.rb +4 -1
  133. data/lib/mx-platform-ruby/models/widget_response_body.rb +1 -1
  134. data/lib/mx-platform-ruby/version.rb +2 -2
  135. data/lib/mx-platform-ruby.rb +15 -1
  136. data/mx-platform-ruby.gemspec +1 -1
  137. data/openapi/config.yml +1 -1
  138. data/openapi/templates/README.mustache +4 -6
  139. data/spec/api/mx_platform_api_spec.rb +246 -1
  140. data/spec/api_client_spec.rb +3 -3
  141. data/spec/configuration_spec.rb +1 -1
  142. data/spec/models/account_number_response_spec.rb +1 -1
  143. data/spec/models/account_numbers_response_body_spec.rb +1 -1
  144. data/spec/models/account_owner_response_spec.rb +1 -1
  145. data/spec/models/account_owners_response_body_spec.rb +1 -1
  146. data/spec/models/account_response_body_spec.rb +1 -1
  147. data/spec/models/account_response_spec.rb +43 -1
  148. data/spec/models/account_update_request_body_spec.rb +1 -1
  149. data/spec/models/account_update_request_spec.rb +1 -1
  150. data/spec/models/accounts_response_body_spec.rb +1 -1
  151. data/spec/models/categories_response_body_spec.rb +1 -1
  152. data/spec/models/category_create_request_body_spec.rb +1 -1
  153. data/spec/models/category_create_request_spec.rb +1 -1
  154. data/spec/models/category_response_body_spec.rb +1 -1
  155. data/spec/models/category_response_spec.rb +1 -1
  156. data/spec/models/category_update_request_body_spec.rb +1 -1
  157. data/spec/models/category_update_request_spec.rb +1 -1
  158. data/spec/models/challenge_response_spec.rb +1 -1
  159. data/spec/models/challenges_response_body_spec.rb +1 -1
  160. data/spec/models/connect_widget_request_body_spec.rb +1 -1
  161. data/spec/models/connect_widget_request_spec.rb +1 -1
  162. data/spec/models/connect_widget_response_body_spec.rb +1 -1
  163. data/spec/models/connect_widget_response_spec.rb +1 -1
  164. data/spec/models/credential_request_spec.rb +1 -1
  165. data/spec/models/credential_response_spec.rb +1 -1
  166. data/spec/models/credentials_response_body_spec.rb +1 -1
  167. data/spec/models/enhance_transaction_response_spec.rb +1 -1
  168. data/spec/models/enhance_transactions_request_body_spec.rb +1 -1
  169. data/spec/models/enhance_transactions_request_spec.rb +1 -1
  170. data/spec/models/enhance_transactions_response_body_spec.rb +1 -1
  171. data/spec/models/holding_response_body_spec.rb +1 -1
  172. data/spec/models/holding_response_spec.rb +1 -1
  173. data/spec/models/holdings_response_body_spec.rb +1 -1
  174. data/spec/models/image_option_response_spec.rb +1 -1
  175. data/spec/models/institution_response_body_spec.rb +1 -1
  176. data/spec/models/institution_response_spec.rb +1 -1
  177. data/spec/models/institutions_response_body_spec.rb +1 -1
  178. data/spec/models/managed_account_create_request_body_spec.rb +34 -0
  179. data/spec/models/managed_account_create_request_spec.rb +214 -0
  180. data/spec/models/managed_account_update_request_body_spec.rb +34 -0
  181. data/spec/models/managed_account_update_request_spec.rb +214 -0
  182. data/spec/models/managed_member_create_request_body_spec.rb +34 -0
  183. data/spec/models/managed_member_create_request_spec.rb +52 -0
  184. data/spec/models/managed_member_update_request_body_spec.rb +34 -0
  185. data/spec/models/managed_member_update_request_spec.rb +46 -0
  186. data/spec/models/managed_transaction_create_request_body_spec.rb +34 -0
  187. data/spec/models/managed_transaction_create_request_spec.rb +148 -0
  188. data/spec/models/managed_transaction_update_request_body_spec.rb +34 -0
  189. data/spec/models/managed_transaction_update_request_spec.rb +148 -0
  190. data/spec/models/member_create_request_body_spec.rb +1 -1
  191. data/spec/models/member_create_request_spec.rb +1 -1
  192. data/spec/models/member_response_body_spec.rb +1 -1
  193. data/spec/models/member_response_spec.rb +13 -1
  194. data/spec/models/member_resume_request_body_spec.rb +1 -1
  195. data/spec/models/member_resume_request_spec.rb +1 -1
  196. data/spec/models/member_status_response_body_spec.rb +1 -1
  197. data/spec/models/member_status_response_spec.rb +1 -1
  198. data/spec/models/member_update_request_body_spec.rb +1 -1
  199. data/spec/models/member_update_request_spec.rb +1 -1
  200. data/spec/models/members_response_body_spec.rb +1 -1
  201. data/spec/models/merchant_location_response_body_spec.rb +34 -0
  202. data/spec/models/merchant_location_response_spec.rb +100 -0
  203. data/spec/models/merchant_response_body_spec.rb +1 -1
  204. data/spec/models/merchant_response_spec.rb +1 -1
  205. data/spec/models/merchants_response_body_spec.rb +1 -1
  206. data/spec/models/o_auth_window_response_body_spec.rb +1 -1
  207. data/spec/models/o_auth_window_response_spec.rb +1 -1
  208. data/spec/models/option_response_spec.rb +1 -1
  209. data/spec/models/pagination_response_spec.rb +1 -1
  210. data/spec/models/statement_response_body_spec.rb +1 -1
  211. data/spec/models/statement_response_spec.rb +1 -1
  212. data/spec/models/statements_response_body_spec.rb +1 -1
  213. data/spec/models/tag_create_request_body_spec.rb +1 -1
  214. data/spec/models/tag_create_request_spec.rb +1 -1
  215. data/spec/models/tag_response_body_spec.rb +1 -1
  216. data/spec/models/tag_response_spec.rb +1 -1
  217. data/spec/models/tag_update_request_body_spec.rb +1 -1
  218. data/spec/models/tag_update_request_spec.rb +1 -1
  219. data/spec/models/tagging_create_request_body_spec.rb +1 -1
  220. data/spec/models/tagging_create_request_spec.rb +1 -1
  221. data/spec/models/tagging_response_body_spec.rb +1 -1
  222. data/spec/models/tagging_response_spec.rb +1 -1
  223. data/spec/models/tagging_update_request_body_spec.rb +1 -1
  224. data/spec/models/tagging_update_request_spec.rb +1 -1
  225. data/spec/models/taggings_response_body_spec.rb +1 -1
  226. data/spec/models/tags_response_body_spec.rb +1 -1
  227. data/spec/models/transaction_response_body_spec.rb +1 -1
  228. data/spec/models/transaction_response_spec.rb +31 -1
  229. data/spec/models/transaction_rule_create_request_body_spec.rb +1 -1
  230. data/spec/models/transaction_rule_create_request_spec.rb +1 -1
  231. data/spec/models/transaction_rule_response_body_spec.rb +1 -1
  232. data/spec/models/transaction_rule_response_spec.rb +1 -1
  233. data/spec/models/transaction_rule_update_request_body_spec.rb +1 -1
  234. data/spec/models/transaction_rule_update_request_spec.rb +1 -1
  235. data/spec/models/transaction_rules_response_body_spec.rb +1 -1
  236. data/spec/models/transaction_update_request_body_spec.rb +1 -1
  237. data/spec/models/transaction_update_request_spec.rb +1 -1
  238. data/spec/models/transactions_response_body_spec.rb +1 -1
  239. data/spec/models/user_create_request_body_spec.rb +1 -1
  240. data/spec/models/user_create_request_spec.rb +1 -1
  241. data/spec/models/user_response_body_spec.rb +1 -1
  242. data/spec/models/user_response_spec.rb +1 -1
  243. data/spec/models/user_update_request_body_spec.rb +1 -1
  244. data/spec/models/user_update_request_spec.rb +1 -1
  245. data/spec/models/users_response_body_spec.rb +1 -1
  246. data/spec/models/widget_request_body_spec.rb +1 -1
  247. data/spec/models/widget_request_spec.rb +1 -1
  248. data/spec/models/widget_response_body_spec.rb +1 -1
  249. data/spec/models/widget_response_spec.rb +1 -1
  250. data/spec/spec_helper.rb +1 -1
  251. metadata +134 -78
@@ -0,0 +1,503 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class ManagedAccountCreateRequest
18
+ attr_accessor :account_number
19
+
20
+ attr_accessor :apr
21
+
22
+ attr_accessor :apy
23
+
24
+ attr_accessor :available_balance
25
+
26
+ attr_accessor :available_credit
27
+
28
+ attr_accessor :balance
29
+
30
+ attr_accessor :cash_surrender_value
31
+
32
+ attr_accessor :credit_limit
33
+
34
+ attr_accessor :currency_code
35
+
36
+ attr_accessor :day_payment_is_due
37
+
38
+ attr_accessor :death_benefit
39
+
40
+ attr_accessor :id
41
+
42
+ attr_accessor :interest_rate
43
+
44
+ attr_accessor :is_closed
45
+
46
+ attr_accessor :is_hidden
47
+
48
+ attr_accessor :last_payment
49
+
50
+ attr_accessor :last_payment_at
51
+
52
+ attr_accessor :loan_amount
53
+
54
+ attr_accessor :matures_on
55
+
56
+ attr_accessor :metadata
57
+
58
+ attr_accessor :minimum_balance
59
+
60
+ attr_accessor :minimum_payment
61
+
62
+ attr_accessor :name
63
+
64
+ attr_accessor :nickname
65
+
66
+ attr_accessor :original_balance
67
+
68
+ attr_accessor :payment_due_at
69
+
70
+ attr_accessor :payoff_balance
71
+
72
+ attr_accessor :routing_number
73
+
74
+ attr_accessor :started_on
75
+
76
+ attr_accessor :subtype
77
+
78
+ attr_accessor :type
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'account_number' => :'account_number',
84
+ :'apr' => :'apr',
85
+ :'apy' => :'apy',
86
+ :'available_balance' => :'available_balance',
87
+ :'available_credit' => :'available_credit',
88
+ :'balance' => :'balance',
89
+ :'cash_surrender_value' => :'cash_surrender_value',
90
+ :'credit_limit' => :'credit_limit',
91
+ :'currency_code' => :'currency_code',
92
+ :'day_payment_is_due' => :'day_payment_is_due',
93
+ :'death_benefit' => :'death_benefit',
94
+ :'id' => :'id',
95
+ :'interest_rate' => :'interest_rate',
96
+ :'is_closed' => :'is_closed',
97
+ :'is_hidden' => :'is_hidden',
98
+ :'last_payment' => :'last_payment',
99
+ :'last_payment_at' => :'last_payment_at',
100
+ :'loan_amount' => :'loan_amount',
101
+ :'matures_on' => :'matures_on',
102
+ :'metadata' => :'metadata',
103
+ :'minimum_balance' => :'minimum_balance',
104
+ :'minimum_payment' => :'minimum_payment',
105
+ :'name' => :'name',
106
+ :'nickname' => :'nickname',
107
+ :'original_balance' => :'original_balance',
108
+ :'payment_due_at' => :'payment_due_at',
109
+ :'payoff_balance' => :'payoff_balance',
110
+ :'routing_number' => :'routing_number',
111
+ :'started_on' => :'started_on',
112
+ :'subtype' => :'subtype',
113
+ :'type' => :'type'
114
+ }
115
+ end
116
+
117
+ # Returns all the JSON keys this model knows about
118
+ def self.acceptable_attributes
119
+ attribute_map.values
120
+ end
121
+
122
+ # Attribute type mapping.
123
+ def self.openapi_types
124
+ {
125
+ :'account_number' => :'String',
126
+ :'apr' => :'Float',
127
+ :'apy' => :'Float',
128
+ :'available_balance' => :'Float',
129
+ :'available_credit' => :'Float',
130
+ :'balance' => :'Float',
131
+ :'cash_surrender_value' => :'Float',
132
+ :'credit_limit' => :'Float',
133
+ :'currency_code' => :'String',
134
+ :'day_payment_is_due' => :'Integer',
135
+ :'death_benefit' => :'Integer',
136
+ :'id' => :'String',
137
+ :'interest_rate' => :'Float',
138
+ :'is_closed' => :'Boolean',
139
+ :'is_hidden' => :'Boolean',
140
+ :'last_payment' => :'Float',
141
+ :'last_payment_at' => :'String',
142
+ :'loan_amount' => :'Float',
143
+ :'matures_on' => :'String',
144
+ :'metadata' => :'String',
145
+ :'minimum_balance' => :'Float',
146
+ :'minimum_payment' => :'Float',
147
+ :'name' => :'String',
148
+ :'nickname' => :'String',
149
+ :'original_balance' => :'Float',
150
+ :'payment_due_at' => :'String',
151
+ :'payoff_balance' => :'Float',
152
+ :'routing_number' => :'String',
153
+ :'started_on' => :'String',
154
+ :'subtype' => :'String',
155
+ :'type' => :'String'
156
+ }
157
+ end
158
+
159
+ # List of attributes with nullable: true
160
+ def self.openapi_nullable
161
+ Set.new([
162
+ ])
163
+ end
164
+
165
+ # Initializes the object
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ def initialize(attributes = {})
168
+ if (!attributes.is_a?(Hash))
169
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::ManagedAccountCreateRequest` initialize method"
170
+ end
171
+
172
+ # check to see if the attribute exists and convert string to symbol for hash key
173
+ attributes = attributes.each_with_object({}) { |(k, v), h|
174
+ if (!self.class.attribute_map.key?(k.to_sym))
175
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::ManagedAccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
176
+ end
177
+ h[k.to_sym] = v
178
+ }
179
+
180
+ if attributes.key?(:'account_number')
181
+ self.account_number = attributes[:'account_number']
182
+ end
183
+
184
+ if attributes.key?(:'apr')
185
+ self.apr = attributes[:'apr']
186
+ end
187
+
188
+ if attributes.key?(:'apy')
189
+ self.apy = attributes[:'apy']
190
+ end
191
+
192
+ if attributes.key?(:'available_balance')
193
+ self.available_balance = attributes[:'available_balance']
194
+ end
195
+
196
+ if attributes.key?(:'available_credit')
197
+ self.available_credit = attributes[:'available_credit']
198
+ end
199
+
200
+ if attributes.key?(:'balance')
201
+ self.balance = attributes[:'balance']
202
+ end
203
+
204
+ if attributes.key?(:'cash_surrender_value')
205
+ self.cash_surrender_value = attributes[:'cash_surrender_value']
206
+ end
207
+
208
+ if attributes.key?(:'credit_limit')
209
+ self.credit_limit = attributes[:'credit_limit']
210
+ end
211
+
212
+ if attributes.key?(:'currency_code')
213
+ self.currency_code = attributes[:'currency_code']
214
+ end
215
+
216
+ if attributes.key?(:'day_payment_is_due')
217
+ self.day_payment_is_due = attributes[:'day_payment_is_due']
218
+ end
219
+
220
+ if attributes.key?(:'death_benefit')
221
+ self.death_benefit = attributes[:'death_benefit']
222
+ end
223
+
224
+ if attributes.key?(:'id')
225
+ self.id = attributes[:'id']
226
+ end
227
+
228
+ if attributes.key?(:'interest_rate')
229
+ self.interest_rate = attributes[:'interest_rate']
230
+ end
231
+
232
+ if attributes.key?(:'is_closed')
233
+ self.is_closed = attributes[:'is_closed']
234
+ end
235
+
236
+ if attributes.key?(:'is_hidden')
237
+ self.is_hidden = attributes[:'is_hidden']
238
+ end
239
+
240
+ if attributes.key?(:'last_payment')
241
+ self.last_payment = attributes[:'last_payment']
242
+ end
243
+
244
+ if attributes.key?(:'last_payment_at')
245
+ self.last_payment_at = attributes[:'last_payment_at']
246
+ end
247
+
248
+ if attributes.key?(:'loan_amount')
249
+ self.loan_amount = attributes[:'loan_amount']
250
+ end
251
+
252
+ if attributes.key?(:'matures_on')
253
+ self.matures_on = attributes[:'matures_on']
254
+ end
255
+
256
+ if attributes.key?(:'metadata')
257
+ self.metadata = attributes[:'metadata']
258
+ end
259
+
260
+ if attributes.key?(:'minimum_balance')
261
+ self.minimum_balance = attributes[:'minimum_balance']
262
+ end
263
+
264
+ if attributes.key?(:'minimum_payment')
265
+ self.minimum_payment = attributes[:'minimum_payment']
266
+ end
267
+
268
+ if attributes.key?(:'name')
269
+ self.name = attributes[:'name']
270
+ end
271
+
272
+ if attributes.key?(:'nickname')
273
+ self.nickname = attributes[:'nickname']
274
+ end
275
+
276
+ if attributes.key?(:'original_balance')
277
+ self.original_balance = attributes[:'original_balance']
278
+ end
279
+
280
+ if attributes.key?(:'payment_due_at')
281
+ self.payment_due_at = attributes[:'payment_due_at']
282
+ end
283
+
284
+ if attributes.key?(:'payoff_balance')
285
+ self.payoff_balance = attributes[:'payoff_balance']
286
+ end
287
+
288
+ if attributes.key?(:'routing_number')
289
+ self.routing_number = attributes[:'routing_number']
290
+ end
291
+
292
+ if attributes.key?(:'started_on')
293
+ self.started_on = attributes[:'started_on']
294
+ end
295
+
296
+ if attributes.key?(:'subtype')
297
+ self.subtype = attributes[:'subtype']
298
+ end
299
+
300
+ if attributes.key?(:'type')
301
+ self.type = attributes[:'type']
302
+ end
303
+ end
304
+
305
+ # Show invalid properties with the reasons. Usually used together with valid?
306
+ # @return Array for valid properties with the reasons
307
+ def list_invalid_properties
308
+ invalid_properties = Array.new
309
+ if @balance.nil?
310
+ invalid_properties.push('invalid value for "balance", balance cannot be nil.')
311
+ end
312
+
313
+ if @name.nil?
314
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
315
+ end
316
+
317
+ if @type.nil?
318
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
319
+ end
320
+
321
+ invalid_properties
322
+ end
323
+
324
+ # Check to see if the all the properties in the model are valid
325
+ # @return true if the model is valid
326
+ def valid?
327
+ return false if @balance.nil?
328
+ return false if @name.nil?
329
+ return false if @type.nil?
330
+ true
331
+ end
332
+
333
+ # Checks equality by comparing each attribute.
334
+ # @param [Object] Object to be compared
335
+ def ==(o)
336
+ return true if self.equal?(o)
337
+ self.class == o.class &&
338
+ account_number == o.account_number &&
339
+ apr == o.apr &&
340
+ apy == o.apy &&
341
+ available_balance == o.available_balance &&
342
+ available_credit == o.available_credit &&
343
+ balance == o.balance &&
344
+ cash_surrender_value == o.cash_surrender_value &&
345
+ credit_limit == o.credit_limit &&
346
+ currency_code == o.currency_code &&
347
+ day_payment_is_due == o.day_payment_is_due &&
348
+ death_benefit == o.death_benefit &&
349
+ id == o.id &&
350
+ interest_rate == o.interest_rate &&
351
+ is_closed == o.is_closed &&
352
+ is_hidden == o.is_hidden &&
353
+ last_payment == o.last_payment &&
354
+ last_payment_at == o.last_payment_at &&
355
+ loan_amount == o.loan_amount &&
356
+ matures_on == o.matures_on &&
357
+ metadata == o.metadata &&
358
+ minimum_balance == o.minimum_balance &&
359
+ minimum_payment == o.minimum_payment &&
360
+ name == o.name &&
361
+ nickname == o.nickname &&
362
+ original_balance == o.original_balance &&
363
+ payment_due_at == o.payment_due_at &&
364
+ payoff_balance == o.payoff_balance &&
365
+ routing_number == o.routing_number &&
366
+ started_on == o.started_on &&
367
+ subtype == o.subtype &&
368
+ type == o.type
369
+ end
370
+
371
+ # @see the `==` method
372
+ # @param [Object] Object to be compared
373
+ def eql?(o)
374
+ self == o
375
+ end
376
+
377
+ # Calculates hash code according to all attributes.
378
+ # @return [Integer] Hash code
379
+ def hash
380
+ [account_number, apr, apy, available_balance, available_credit, balance, cash_surrender_value, credit_limit, currency_code, day_payment_is_due, death_benefit, id, interest_rate, is_closed, is_hidden, last_payment, last_payment_at, loan_amount, matures_on, metadata, minimum_balance, minimum_payment, name, nickname, original_balance, payment_due_at, payoff_balance, routing_number, started_on, subtype, type].hash
381
+ end
382
+
383
+ # Builds the object from hash
384
+ # @param [Hash] attributes Model attributes in the form of hash
385
+ # @return [Object] Returns the model itself
386
+ def self.build_from_hash(attributes)
387
+ new.build_from_hash(attributes)
388
+ end
389
+
390
+ # Builds the object from hash
391
+ # @param [Hash] attributes Model attributes in the form of hash
392
+ # @return [Object] Returns the model itself
393
+ def build_from_hash(attributes)
394
+ return nil unless attributes.is_a?(Hash)
395
+ self.class.openapi_types.each_pair do |key, type|
396
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
397
+ self.send("#{key}=", nil)
398
+ elsif type =~ /\AArray<(.*)>/i
399
+ # check to ensure the input is an array given that the attribute
400
+ # is documented as an array but the input is not
401
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
402
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
403
+ end
404
+ elsif !attributes[self.class.attribute_map[key]].nil?
405
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
406
+ end
407
+ end
408
+
409
+ self
410
+ end
411
+
412
+ # Deserializes the data based on type
413
+ # @param string type Data type
414
+ # @param string value Value to be deserialized
415
+ # @return [Object] Deserialized data
416
+ def _deserialize(type, value)
417
+ case type.to_sym
418
+ when :Time
419
+ Time.parse(value)
420
+ when :Date
421
+ Date.parse(value)
422
+ when :String
423
+ value.to_s
424
+ when :Integer
425
+ value.to_i
426
+ when :Float
427
+ value.to_f
428
+ when :Boolean
429
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
430
+ true
431
+ else
432
+ false
433
+ end
434
+ when :Object
435
+ # generic object (usually a Hash), return directly
436
+ value
437
+ when /\AArray<(?<inner_type>.+)>\z/
438
+ inner_type = Regexp.last_match[:inner_type]
439
+ value.map { |v| _deserialize(inner_type, v) }
440
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
441
+ k_type = Regexp.last_match[:k_type]
442
+ v_type = Regexp.last_match[:v_type]
443
+ {}.tap do |hash|
444
+ value.each do |k, v|
445
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
446
+ end
447
+ end
448
+ else # model
449
+ # models (e.g. Pet) or oneOf
450
+ klass = MxPlatformRuby.const_get(type)
451
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
452
+ end
453
+ end
454
+
455
+ # Returns the string representation of the object
456
+ # @return [String] String presentation of the object
457
+ def to_s
458
+ to_hash.to_s
459
+ end
460
+
461
+ # to_body is an alias to to_hash (backward compatibility)
462
+ # @return [Hash] Returns the object in the form of hash
463
+ def to_body
464
+ to_hash
465
+ end
466
+
467
+ # Returns the object in the form of hash
468
+ # @return [Hash] Returns the object in the form of hash
469
+ def to_hash
470
+ hash = {}
471
+ self.class.attribute_map.each_pair do |attr, param|
472
+ value = self.send(attr)
473
+ if value.nil?
474
+ is_nullable = self.class.openapi_nullable.include?(attr)
475
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
476
+ end
477
+
478
+ hash[param] = _to_hash(value)
479
+ end
480
+ hash
481
+ end
482
+
483
+ # Outputs non-array value in the form of hash
484
+ # For object, use to_hash. Otherwise, just return the value
485
+ # @param [Object] value Any valid value
486
+ # @return [Hash] Returns the value in the form of hash
487
+ def _to_hash(value)
488
+ if value.is_a?(Array)
489
+ value.compact.map { |v| _to_hash(v) }
490
+ elsif value.is_a?(Hash)
491
+ {}.tap do |hash|
492
+ value.each { |k, v| hash[k] = _to_hash(v) }
493
+ end
494
+ elsif value.respond_to? :to_hash
495
+ value.to_hash
496
+ else
497
+ value
498
+ end
499
+ end
500
+
501
+ end
502
+
503
+ end