mx-platform-ruby 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +40 -41
  4. data/docs/AccountNumberResponse.md +32 -0
  5. data/docs/AccountNumbersResponseBody.md +2 -2
  6. data/docs/AccountOwnerResponse.md +40 -0
  7. data/docs/AccountOwnersResponseBody.md +2 -2
  8. data/docs/AccountResponse.md +96 -0
  9. data/docs/AccountResponseBody.md +1 -1
  10. data/docs/AccountsResponseBody.md +2 -2
  11. data/docs/CategoriesResponseBody.md +2 -2
  12. data/docs/CategoryResponse.md +32 -0
  13. data/docs/CategoryResponseBody.md +1 -1
  14. data/docs/ChallengeResponse.md +30 -0
  15. data/docs/ChallengeResponseImageOptions.md +22 -0
  16. data/docs/ChallengeResponseOptions.md +20 -0
  17. data/docs/ChallengesResponseBody.md +2 -2
  18. data/docs/ConnectWidgetResponse.md +20 -0
  19. data/docs/ConnectWidgetResponseBody.md +1 -1
  20. data/docs/CredentialResponse.md +26 -0
  21. data/docs/CredentialsResponseBody.md +2 -2
  22. data/docs/EnhanceTransactionResponse.md +48 -0
  23. data/docs/EnhanceTransactionsResponseBody.md +1 -1
  24. data/docs/HoldingResponse.md +52 -0
  25. data/docs/HoldingResponseBody.md +1 -1
  26. data/docs/HoldingsResponseBody.md +2 -2
  27. data/docs/InstitutionResponse.md +36 -0
  28. data/docs/InstitutionResponseBody.md +1 -1
  29. data/docs/InstitutionsResponseBody.md +2 -2
  30. data/docs/MemberResponse.md +40 -0
  31. data/docs/MemberResponseBody.md +1 -1
  32. data/docs/MemberStatusResponse.md +34 -0
  33. data/docs/MemberStatusResponseBody.md +1 -1
  34. data/docs/MembersResponseBody.md +2 -2
  35. data/docs/MerchantResponse.md +28 -0
  36. data/docs/MerchantResponseBody.md +1 -1
  37. data/docs/MerchantsResponseBody.md +2 -2
  38. data/docs/MxPlatformApi.md +196 -196
  39. data/docs/OAuthWindowResponse.md +20 -0
  40. data/docs/OAuthWindowResponseBody.md +1 -1
  41. data/docs/PaginationResponse.md +24 -0
  42. data/docs/StatementResponse.md +32 -0
  43. data/docs/StatementResponseBody.md +1 -1
  44. data/docs/StatementsResponseBody.md +2 -2
  45. data/docs/TagResponse.md +22 -0
  46. data/docs/TagResponseBody.md +1 -1
  47. data/docs/TaggingResponse.md +26 -0
  48. data/docs/TaggingResponseBody.md +1 -1
  49. data/docs/TaggingsResponseBody.md +2 -2
  50. data/docs/TagsResponseBody.md +2 -2
  51. data/docs/TransactionResponse.md +88 -0
  52. data/docs/TransactionResponseBody.md +1 -1
  53. data/docs/TransactionRuleResponse.md +30 -0
  54. data/docs/TransactionRuleResponseBody.md +1 -1
  55. data/docs/TransactionRulesResponseBody.md +2 -2
  56. data/docs/TransactionsResponseBody.md +2 -2
  57. data/docs/UserResponse.md +26 -0
  58. data/docs/UserResponseBody.md +1 -1
  59. data/docs/UsersResponseBody.md +2 -2
  60. data/docs/WidgetResponse.md +22 -0
  61. data/docs/WidgetResponseBody.md +1 -1
  62. data/lib/mx-platform-ruby.rb +24 -25
  63. data/lib/mx-platform-ruby/api/mx_platform_api.rb +185 -185
  64. data/lib/mx-platform-ruby/models/account_number_response.rb +281 -0
  65. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +2 -2
  66. data/lib/mx-platform-ruby/models/account_owner_response.rb +317 -0
  67. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +2 -2
  68. data/lib/mx-platform-ruby/models/account_response.rb +569 -0
  69. data/lib/mx-platform-ruby/models/account_response_body.rb +1 -1
  70. data/lib/mx-platform-ruby/models/accounts_response_body.rb +2 -2
  71. data/lib/mx-platform-ruby/models/categories_response_body.rb +2 -2
  72. data/lib/mx-platform-ruby/models/category_response.rb +281 -0
  73. data/lib/mx-platform-ruby/models/category_response_body.rb +1 -1
  74. data/lib/mx-platform-ruby/models/challenge_response.rb +276 -0
  75. data/lib/mx-platform-ruby/models/challenge_response_image_options.rb +236 -0
  76. data/lib/mx-platform-ruby/models/challenge_response_options.rb +227 -0
  77. data/lib/mx-platform-ruby/models/challenges_response_body.rb +2 -2
  78. data/lib/mx-platform-ruby/models/connect_widget_response.rb +227 -0
  79. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +1 -1
  80. data/lib/mx-platform-ruby/models/credential_response.rb +254 -0
  81. data/lib/mx-platform-ruby/models/credentials_response_body.rb +2 -2
  82. data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +353 -0
  83. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +1 -1
  84. data/lib/mx-platform-ruby/models/holding_response.rb +371 -0
  85. data/lib/mx-platform-ruby/models/holding_response_body.rb +1 -1
  86. data/lib/mx-platform-ruby/models/holdings_response_body.rb +2 -2
  87. data/lib/mx-platform-ruby/models/institution_response.rb +299 -0
  88. data/lib/mx-platform-ruby/models/institution_response_body.rb +1 -1
  89. data/lib/mx-platform-ruby/models/institutions_response_body.rb +2 -2
  90. data/lib/mx-platform-ruby/models/member_response.rb +317 -0
  91. data/lib/mx-platform-ruby/models/member_response_body.rb +1 -1
  92. data/lib/mx-platform-ruby/models/member_status_response.rb +292 -0
  93. data/lib/mx-platform-ruby/models/member_status_response_body.rb +1 -1
  94. data/lib/mx-platform-ruby/models/members_response_body.rb +2 -2
  95. data/lib/mx-platform-ruby/models/merchant_response.rb +263 -0
  96. data/lib/mx-platform-ruby/models/merchant_response_body.rb +1 -1
  97. data/lib/mx-platform-ruby/models/merchants_response_body.rb +2 -2
  98. data/lib/mx-platform-ruby/models/o_auth_window_response.rb +227 -0
  99. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +1 -1
  100. data/lib/mx-platform-ruby/models/pagination_response.rb +245 -0
  101. data/lib/mx-platform-ruby/models/statement_response.rb +281 -0
  102. data/lib/mx-platform-ruby/models/statement_response_body.rb +1 -1
  103. data/lib/mx-platform-ruby/models/statements_response_body.rb +2 -2
  104. data/lib/mx-platform-ruby/models/tag_response.rb +236 -0
  105. data/lib/mx-platform-ruby/models/tag_response_body.rb +1 -1
  106. data/lib/mx-platform-ruby/models/tagging_response.rb +254 -0
  107. data/lib/mx-platform-ruby/models/tagging_response_body.rb +1 -1
  108. data/lib/mx-platform-ruby/models/taggings_response_body.rb +2 -2
  109. data/lib/mx-platform-ruby/models/tags_response_body.rb +2 -2
  110. data/lib/mx-platform-ruby/models/transaction_response.rb +533 -0
  111. data/lib/mx-platform-ruby/models/transaction_response_body.rb +1 -1
  112. data/lib/mx-platform-ruby/models/transaction_rule_response.rb +272 -0
  113. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +1 -1
  114. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +2 -2
  115. data/lib/mx-platform-ruby/models/transactions_response_body.rb +2 -2
  116. data/lib/mx-platform-ruby/models/user_response.rb +254 -0
  117. data/lib/mx-platform-ruby/models/user_response_body.rb +1 -1
  118. data/lib/mx-platform-ruby/models/users_response_body.rb +2 -2
  119. data/lib/mx-platform-ruby/models/widget_response.rb +236 -0
  120. data/lib/mx-platform-ruby/models/widget_response_body.rb +1 -1
  121. data/lib/mx-platform-ruby/version.rb +1 -1
  122. data/openapi/config.yml +11 -0
  123. data/pkg/mx-platform-ruby-0.2.1.gem +0 -0
  124. data/spec/api/mx_platform_api_spec.rb +51 -51
  125. data/spec/models/account_number_response_spec.rb +76 -0
  126. data/spec/models/account_owner_response_spec.rb +100 -0
  127. data/spec/models/account_response_spec.rb +268 -0
  128. data/spec/models/category_response_spec.rb +76 -0
  129. data/spec/models/challenge_response_image_options_spec.rb +46 -0
  130. data/spec/models/challenge_response_options_spec.rb +40 -0
  131. data/spec/models/challenge_response_spec.rb +70 -0
  132. data/spec/models/connect_widget_response_spec.rb +40 -0
  133. data/spec/models/credential_response_spec.rb +58 -0
  134. data/spec/models/enhance_transaction_response_spec.rb +124 -0
  135. data/spec/models/holding_response_spec.rb +136 -0
  136. data/spec/models/institution_response_spec.rb +88 -0
  137. data/spec/models/member_response_spec.rb +100 -0
  138. data/spec/models/member_status_response_spec.rb +82 -0
  139. data/spec/models/merchant_response_spec.rb +64 -0
  140. data/spec/models/o_auth_window_response_spec.rb +40 -0
  141. data/spec/models/pagination_response_spec.rb +52 -0
  142. data/spec/models/statement_response_spec.rb +76 -0
  143. data/spec/models/tag_response_spec.rb +46 -0
  144. data/spec/models/tagging_response_spec.rb +58 -0
  145. data/spec/models/transaction_response_spec.rb +244 -0
  146. data/spec/models/transaction_rule_response_spec.rb +70 -0
  147. data/spec/models/user_response_spec.rb +58 -0
  148. data/spec/models/widget_response_spec.rb +46 -0
  149. metadata +100 -2
@@ -35,8 +35,8 @@ module MxPlatformRuby
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
- :'account_owners' => :'Array<AccountOwner>',
39
- :'pagination' => :'Pagination'
38
+ :'account_owners' => :'Array<AccountOwnerResponse>',
39
+ :'pagination' => :'PaginationResponse'
40
40
  }
41
41
  end
42
42
 
@@ -0,0 +1,569 @@
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.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class AccountResponse
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_balance
31
+
32
+ attr_accessor :cash_surrender_value
33
+
34
+ attr_accessor :created_at
35
+
36
+ attr_accessor :credit_limit
37
+
38
+ attr_accessor :currency_code
39
+
40
+ attr_accessor :day_payment_is_due
41
+
42
+ attr_accessor :death_benefit
43
+
44
+ attr_accessor :guid
45
+
46
+ attr_accessor :holdings_value
47
+
48
+ attr_accessor :id
49
+
50
+ attr_accessor :institution_code
51
+
52
+ attr_accessor :insured_name
53
+
54
+ attr_accessor :interest_rate
55
+
56
+ attr_accessor :is_closed
57
+
58
+ attr_accessor :is_hidden
59
+
60
+ attr_accessor :last_payment
61
+
62
+ attr_accessor :last_payment_at
63
+
64
+ attr_accessor :loan_amount
65
+
66
+ attr_accessor :matures_on
67
+
68
+ attr_accessor :member_guid
69
+
70
+ attr_accessor :minimum_balance
71
+
72
+ attr_accessor :minimum_payment
73
+
74
+ attr_accessor :name
75
+
76
+ attr_accessor :original_balance
77
+
78
+ attr_accessor :pay_out_amount
79
+
80
+ attr_accessor :payment_due_at
81
+
82
+ attr_accessor :payoff_balance
83
+
84
+ attr_accessor :premium_amount
85
+
86
+ attr_accessor :started_on
87
+
88
+ attr_accessor :subtype
89
+
90
+ attr_accessor :total_account_value
91
+
92
+ attr_accessor :type
93
+
94
+ attr_accessor :updated_at
95
+
96
+ attr_accessor :user_guid
97
+
98
+ # Attribute mapping from ruby-style variable name to JSON key.
99
+ def self.attribute_map
100
+ {
101
+ :'account_number' => :'account_number',
102
+ :'apr' => :'apr',
103
+ :'apy' => :'apy',
104
+ :'available_balance' => :'available_balance',
105
+ :'available_credit' => :'available_credit',
106
+ :'balance' => :'balance',
107
+ :'cash_balance' => :'cash_balance',
108
+ :'cash_surrender_value' => :'cash_surrender_value',
109
+ :'created_at' => :'created_at',
110
+ :'credit_limit' => :'credit_limit',
111
+ :'currency_code' => :'currency_code',
112
+ :'day_payment_is_due' => :'day_payment_is_due',
113
+ :'death_benefit' => :'death_benefit',
114
+ :'guid' => :'guid',
115
+ :'holdings_value' => :'holdings_value',
116
+ :'id' => :'id',
117
+ :'institution_code' => :'institution_code',
118
+ :'insured_name' => :'insured_name',
119
+ :'interest_rate' => :'interest_rate',
120
+ :'is_closed' => :'is_closed',
121
+ :'is_hidden' => :'is_hidden',
122
+ :'last_payment' => :'last_payment',
123
+ :'last_payment_at' => :'last_payment_at',
124
+ :'loan_amount' => :'loan_amount',
125
+ :'matures_on' => :'matures_on',
126
+ :'member_guid' => :'member_guid',
127
+ :'minimum_balance' => :'minimum_balance',
128
+ :'minimum_payment' => :'minimum_payment',
129
+ :'name' => :'name',
130
+ :'original_balance' => :'original_balance',
131
+ :'pay_out_amount' => :'pay_out_amount',
132
+ :'payment_due_at' => :'payment_due_at',
133
+ :'payoff_balance' => :'payoff_balance',
134
+ :'premium_amount' => :'premium_amount',
135
+ :'started_on' => :'started_on',
136
+ :'subtype' => :'subtype',
137
+ :'total_account_value' => :'total_account_value',
138
+ :'type' => :'type',
139
+ :'updated_at' => :'updated_at',
140
+ :'user_guid' => :'user_guid'
141
+ }
142
+ end
143
+
144
+ # Returns all the JSON keys this model knows about
145
+ def self.acceptable_attributes
146
+ attribute_map.values
147
+ end
148
+
149
+ # Attribute type mapping.
150
+ def self.openapi_types
151
+ {
152
+ :'account_number' => :'String',
153
+ :'apr' => :'Float',
154
+ :'apy' => :'Float',
155
+ :'available_balance' => :'Float',
156
+ :'available_credit' => :'Float',
157
+ :'balance' => :'Float',
158
+ :'cash_balance' => :'Float',
159
+ :'cash_surrender_value' => :'Float',
160
+ :'created_at' => :'String',
161
+ :'credit_limit' => :'Float',
162
+ :'currency_code' => :'String',
163
+ :'day_payment_is_due' => :'Integer',
164
+ :'death_benefit' => :'Integer',
165
+ :'guid' => :'String',
166
+ :'holdings_value' => :'Float',
167
+ :'id' => :'String',
168
+ :'institution_code' => :'String',
169
+ :'insured_name' => :'String',
170
+ :'interest_rate' => :'Float',
171
+ :'is_closed' => :'Boolean',
172
+ :'is_hidden' => :'Boolean',
173
+ :'last_payment' => :'Float',
174
+ :'last_payment_at' => :'String',
175
+ :'loan_amount' => :'Float',
176
+ :'matures_on' => :'String',
177
+ :'member_guid' => :'String',
178
+ :'minimum_balance' => :'Float',
179
+ :'minimum_payment' => :'Float',
180
+ :'name' => :'String',
181
+ :'original_balance' => :'Float',
182
+ :'pay_out_amount' => :'Float',
183
+ :'payment_due_at' => :'String',
184
+ :'payoff_balance' => :'Float',
185
+ :'premium_amount' => :'Float',
186
+ :'started_on' => :'String',
187
+ :'subtype' => :'String',
188
+ :'total_account_value' => :'Float',
189
+ :'type' => :'String',
190
+ :'updated_at' => :'String',
191
+ :'user_guid' => :'String'
192
+ }
193
+ end
194
+
195
+ # List of attributes with nullable: true
196
+ def self.openapi_nullable
197
+ Set.new([
198
+ ])
199
+ end
200
+
201
+ # Initializes the object
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ def initialize(attributes = {})
204
+ if (!attributes.is_a?(Hash))
205
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::AccountResponse` initialize method"
206
+ end
207
+
208
+ # check to see if the attribute exists and convert string to symbol for hash key
209
+ attributes = attributes.each_with_object({}) { |(k, v), h|
210
+ if (!self.class.attribute_map.key?(k.to_sym))
211
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::AccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
212
+ end
213
+ h[k.to_sym] = v
214
+ }
215
+
216
+ if attributes.key?(:'account_number')
217
+ self.account_number = attributes[:'account_number']
218
+ end
219
+
220
+ if attributes.key?(:'apr')
221
+ self.apr = attributes[:'apr']
222
+ end
223
+
224
+ if attributes.key?(:'apy')
225
+ self.apy = attributes[:'apy']
226
+ end
227
+
228
+ if attributes.key?(:'available_balance')
229
+ self.available_balance = attributes[:'available_balance']
230
+ end
231
+
232
+ if attributes.key?(:'available_credit')
233
+ self.available_credit = attributes[:'available_credit']
234
+ end
235
+
236
+ if attributes.key?(:'balance')
237
+ self.balance = attributes[:'balance']
238
+ end
239
+
240
+ if attributes.key?(:'cash_balance')
241
+ self.cash_balance = attributes[:'cash_balance']
242
+ end
243
+
244
+ if attributes.key?(:'cash_surrender_value')
245
+ self.cash_surrender_value = attributes[:'cash_surrender_value']
246
+ end
247
+
248
+ if attributes.key?(:'created_at')
249
+ self.created_at = attributes[:'created_at']
250
+ end
251
+
252
+ if attributes.key?(:'credit_limit')
253
+ self.credit_limit = attributes[:'credit_limit']
254
+ end
255
+
256
+ if attributes.key?(:'currency_code')
257
+ self.currency_code = attributes[:'currency_code']
258
+ end
259
+
260
+ if attributes.key?(:'day_payment_is_due')
261
+ self.day_payment_is_due = attributes[:'day_payment_is_due']
262
+ end
263
+
264
+ if attributes.key?(:'death_benefit')
265
+ self.death_benefit = attributes[:'death_benefit']
266
+ end
267
+
268
+ if attributes.key?(:'guid')
269
+ self.guid = attributes[:'guid']
270
+ end
271
+
272
+ if attributes.key?(:'holdings_value')
273
+ self.holdings_value = attributes[:'holdings_value']
274
+ end
275
+
276
+ if attributes.key?(:'id')
277
+ self.id = attributes[:'id']
278
+ end
279
+
280
+ if attributes.key?(:'institution_code')
281
+ self.institution_code = attributes[:'institution_code']
282
+ end
283
+
284
+ if attributes.key?(:'insured_name')
285
+ self.insured_name = attributes[:'insured_name']
286
+ end
287
+
288
+ if attributes.key?(:'interest_rate')
289
+ self.interest_rate = attributes[:'interest_rate']
290
+ end
291
+
292
+ if attributes.key?(:'is_closed')
293
+ self.is_closed = attributes[:'is_closed']
294
+ end
295
+
296
+ if attributes.key?(:'is_hidden')
297
+ self.is_hidden = attributes[:'is_hidden']
298
+ end
299
+
300
+ if attributes.key?(:'last_payment')
301
+ self.last_payment = attributes[:'last_payment']
302
+ end
303
+
304
+ if attributes.key?(:'last_payment_at')
305
+ self.last_payment_at = attributes[:'last_payment_at']
306
+ end
307
+
308
+ if attributes.key?(:'loan_amount')
309
+ self.loan_amount = attributes[:'loan_amount']
310
+ end
311
+
312
+ if attributes.key?(:'matures_on')
313
+ self.matures_on = attributes[:'matures_on']
314
+ end
315
+
316
+ if attributes.key?(:'member_guid')
317
+ self.member_guid = attributes[:'member_guid']
318
+ end
319
+
320
+ if attributes.key?(:'minimum_balance')
321
+ self.minimum_balance = attributes[:'minimum_balance']
322
+ end
323
+
324
+ if attributes.key?(:'minimum_payment')
325
+ self.minimum_payment = attributes[:'minimum_payment']
326
+ end
327
+
328
+ if attributes.key?(:'name')
329
+ self.name = attributes[:'name']
330
+ end
331
+
332
+ if attributes.key?(:'original_balance')
333
+ self.original_balance = attributes[:'original_balance']
334
+ end
335
+
336
+ if attributes.key?(:'pay_out_amount')
337
+ self.pay_out_amount = attributes[:'pay_out_amount']
338
+ end
339
+
340
+ if attributes.key?(:'payment_due_at')
341
+ self.payment_due_at = attributes[:'payment_due_at']
342
+ end
343
+
344
+ if attributes.key?(:'payoff_balance')
345
+ self.payoff_balance = attributes[:'payoff_balance']
346
+ end
347
+
348
+ if attributes.key?(:'premium_amount')
349
+ self.premium_amount = attributes[:'premium_amount']
350
+ end
351
+
352
+ if attributes.key?(:'started_on')
353
+ self.started_on = attributes[:'started_on']
354
+ end
355
+
356
+ if attributes.key?(:'subtype')
357
+ self.subtype = attributes[:'subtype']
358
+ end
359
+
360
+ if attributes.key?(:'total_account_value')
361
+ self.total_account_value = attributes[:'total_account_value']
362
+ end
363
+
364
+ if attributes.key?(:'type')
365
+ self.type = attributes[:'type']
366
+ end
367
+
368
+ if attributes.key?(:'updated_at')
369
+ self.updated_at = attributes[:'updated_at']
370
+ end
371
+
372
+ if attributes.key?(:'user_guid')
373
+ self.user_guid = attributes[:'user_guid']
374
+ end
375
+ end
376
+
377
+ # Show invalid properties with the reasons. Usually used together with valid?
378
+ # @return Array for valid properties with the reasons
379
+ def list_invalid_properties
380
+ invalid_properties = Array.new
381
+ invalid_properties
382
+ end
383
+
384
+ # Check to see if the all the properties in the model are valid
385
+ # @return true if the model is valid
386
+ def valid?
387
+ true
388
+ end
389
+
390
+ # Checks equality by comparing each attribute.
391
+ # @param [Object] Object to be compared
392
+ def ==(o)
393
+ return true if self.equal?(o)
394
+ self.class == o.class &&
395
+ account_number == o.account_number &&
396
+ apr == o.apr &&
397
+ apy == o.apy &&
398
+ available_balance == o.available_balance &&
399
+ available_credit == o.available_credit &&
400
+ balance == o.balance &&
401
+ cash_balance == o.cash_balance &&
402
+ cash_surrender_value == o.cash_surrender_value &&
403
+ created_at == o.created_at &&
404
+ credit_limit == o.credit_limit &&
405
+ currency_code == o.currency_code &&
406
+ day_payment_is_due == o.day_payment_is_due &&
407
+ death_benefit == o.death_benefit &&
408
+ guid == o.guid &&
409
+ holdings_value == o.holdings_value &&
410
+ id == o.id &&
411
+ institution_code == o.institution_code &&
412
+ insured_name == o.insured_name &&
413
+ interest_rate == o.interest_rate &&
414
+ is_closed == o.is_closed &&
415
+ is_hidden == o.is_hidden &&
416
+ last_payment == o.last_payment &&
417
+ last_payment_at == o.last_payment_at &&
418
+ loan_amount == o.loan_amount &&
419
+ matures_on == o.matures_on &&
420
+ member_guid == o.member_guid &&
421
+ minimum_balance == o.minimum_balance &&
422
+ minimum_payment == o.minimum_payment &&
423
+ name == o.name &&
424
+ original_balance == o.original_balance &&
425
+ pay_out_amount == o.pay_out_amount &&
426
+ payment_due_at == o.payment_due_at &&
427
+ payoff_balance == o.payoff_balance &&
428
+ premium_amount == o.premium_amount &&
429
+ started_on == o.started_on &&
430
+ subtype == o.subtype &&
431
+ total_account_value == o.total_account_value &&
432
+ type == o.type &&
433
+ updated_at == o.updated_at &&
434
+ user_guid == o.user_guid
435
+ end
436
+
437
+ # @see the `==` method
438
+ # @param [Object] Object to be compared
439
+ def eql?(o)
440
+ self == o
441
+ end
442
+
443
+ # Calculates hash code according to all attributes.
444
+ # @return [Integer] Hash code
445
+ def hash
446
+ [account_number, apr, apy, available_balance, available_credit, balance, cash_balance, cash_surrender_value, created_at, credit_limit, currency_code, day_payment_is_due, death_benefit, guid, holdings_value, id, institution_code, insured_name, interest_rate, is_closed, is_hidden, last_payment, last_payment_at, loan_amount, matures_on, member_guid, minimum_balance, minimum_payment, name, original_balance, pay_out_amount, payment_due_at, payoff_balance, premium_amount, started_on, subtype, total_account_value, type, updated_at, user_guid].hash
447
+ end
448
+
449
+ # Builds the object from hash
450
+ # @param [Hash] attributes Model attributes in the form of hash
451
+ # @return [Object] Returns the model itself
452
+ def self.build_from_hash(attributes)
453
+ new.build_from_hash(attributes)
454
+ end
455
+
456
+ # Builds the object from hash
457
+ # @param [Hash] attributes Model attributes in the form of hash
458
+ # @return [Object] Returns the model itself
459
+ def build_from_hash(attributes)
460
+ return nil unless attributes.is_a?(Hash)
461
+ self.class.openapi_types.each_pair do |key, type|
462
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
463
+ self.send("#{key}=", nil)
464
+ elsif type =~ /\AArray<(.*)>/i
465
+ # check to ensure the input is an array given that the attribute
466
+ # is documented as an array but the input is not
467
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
468
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
469
+ end
470
+ elsif !attributes[self.class.attribute_map[key]].nil?
471
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
472
+ end
473
+ end
474
+
475
+ self
476
+ end
477
+
478
+ # Deserializes the data based on type
479
+ # @param string type Data type
480
+ # @param string value Value to be deserialized
481
+ # @return [Object] Deserialized data
482
+ def _deserialize(type, value)
483
+ case type.to_sym
484
+ when :Time
485
+ Time.parse(value)
486
+ when :Date
487
+ Date.parse(value)
488
+ when :String
489
+ value.to_s
490
+ when :Integer
491
+ value.to_i
492
+ when :Float
493
+ value.to_f
494
+ when :Boolean
495
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
496
+ true
497
+ else
498
+ false
499
+ end
500
+ when :Object
501
+ # generic object (usually a Hash), return directly
502
+ value
503
+ when /\AArray<(?<inner_type>.+)>\z/
504
+ inner_type = Regexp.last_match[:inner_type]
505
+ value.map { |v| _deserialize(inner_type, v) }
506
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
507
+ k_type = Regexp.last_match[:k_type]
508
+ v_type = Regexp.last_match[:v_type]
509
+ {}.tap do |hash|
510
+ value.each do |k, v|
511
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
512
+ end
513
+ end
514
+ else # model
515
+ # models (e.g. Pet) or oneOf
516
+ klass = MxPlatformRuby.const_get(type)
517
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
518
+ end
519
+ end
520
+
521
+ # Returns the string representation of the object
522
+ # @return [String] String presentation of the object
523
+ def to_s
524
+ to_hash.to_s
525
+ end
526
+
527
+ # to_body is an alias to to_hash (backward compatibility)
528
+ # @return [Hash] Returns the object in the form of hash
529
+ def to_body
530
+ to_hash
531
+ end
532
+
533
+ # Returns the object in the form of hash
534
+ # @return [Hash] Returns the object in the form of hash
535
+ def to_hash
536
+ hash = {}
537
+ self.class.attribute_map.each_pair do |attr, param|
538
+ value = self.send(attr)
539
+ if value.nil?
540
+ is_nullable = self.class.openapi_nullable.include?(attr)
541
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
542
+ end
543
+
544
+ hash[param] = _to_hash(value)
545
+ end
546
+ hash
547
+ end
548
+
549
+ # Outputs non-array value in the form of hash
550
+ # For object, use to_hash. Otherwise, just return the value
551
+ # @param [Object] value Any valid value
552
+ # @return [Hash] Returns the value in the form of hash
553
+ def _to_hash(value)
554
+ if value.is_a?(Array)
555
+ value.compact.map { |v| _to_hash(v) }
556
+ elsif value.is_a?(Hash)
557
+ {}.tap do |hash|
558
+ value.each { |k, v| hash[k] = _to_hash(v) }
559
+ end
560
+ elsif value.respond_to? :to_hash
561
+ value.to_hash
562
+ else
563
+ value
564
+ end
565
+ end
566
+
567
+ end
568
+
569
+ end