mx-platform-ruby 0.3.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +29 -222
  4. data/docs/ChallengeResponse.md +2 -2
  5. data/docs/{ChallengeImageOptions.md → ImageOptionResponse.md} +2 -2
  6. data/docs/{ChallengeOptions.md → OptionResponse.md} +2 -2
  7. data/lib/mx-platform-ruby/models/challenge_response.rb +2 -2
  8. data/lib/mx-platform-ruby/models/{challenge_image_options.rb → image_option_response.rb} +3 -3
  9. data/lib/mx-platform-ruby/models/{challenge_options.rb → option_response.rb} +3 -3
  10. data/lib/mx-platform-ruby/version.rb +1 -1
  11. data/lib/mx-platform-ruby.rb +2 -2
  12. data/openapi/config.yml +1 -1
  13. data/openapi/templates/README.mustache +71 -0
  14. data/spec/models/{challenge_image_options_spec.rb → image_option_response_spec.rb} +6 -6
  15. data/spec/models/{challenge_options_spec.rb → option_response_spec.rb} +6 -6
  16. metadata +88 -190
  17. data/docs/Account.md +0 -96
  18. data/docs/AccountNumber.md +0 -32
  19. data/docs/AccountOwner.md +0 -40
  20. data/docs/Category.md +0 -32
  21. data/docs/Challenge.md +0 -30
  22. data/docs/ChallengeResponseImageOptions.md +0 -22
  23. data/docs/ChallengeResponseOptions.md +0 -20
  24. data/docs/ConnectWidget.md +0 -20
  25. data/docs/Credential.md +0 -26
  26. data/docs/EnhanceTransaction.md +0 -48
  27. data/docs/Holding.md +0 -52
  28. data/docs/InlineResponse200.md +0 -18
  29. data/docs/Institution.md +0 -36
  30. data/docs/Member.md +0 -40
  31. data/docs/MemberStatus.md +0 -34
  32. data/docs/Merchant.md +0 -28
  33. data/docs/OAuthWindow.md +0 -20
  34. data/docs/Pagination.md +0 -24
  35. data/docs/Statement.md +0 -32
  36. data/docs/Tag.md +0 -22
  37. data/docs/Tagging.md +0 -26
  38. data/docs/Transaction.md +0 -88
  39. data/docs/TransactionRule.md +0 -30
  40. data/docs/User.md +0 -26
  41. data/docs/Widget.md +0 -22
  42. data/lib/mx-platform-ruby/models/account.rb +0 -569
  43. data/lib/mx-platform-ruby/models/account_number.rb +0 -281
  44. data/lib/mx-platform-ruby/models/account_owner.rb +0 -317
  45. data/lib/mx-platform-ruby/models/category.rb +0 -281
  46. data/lib/mx-platform-ruby/models/challenge.rb +0 -276
  47. data/lib/mx-platform-ruby/models/challenge_response_image_options.rb +0 -236
  48. data/lib/mx-platform-ruby/models/challenge_response_options.rb +0 -227
  49. data/lib/mx-platform-ruby/models/connect_widget.rb +0 -227
  50. data/lib/mx-platform-ruby/models/credential.rb +0 -254
  51. data/lib/mx-platform-ruby/models/enhance_transaction.rb +0 -353
  52. data/lib/mx-platform-ruby/models/holding.rb +0 -371
  53. data/lib/mx-platform-ruby/models/inline_response200.rb +0 -218
  54. data/lib/mx-platform-ruby/models/institution.rb +0 -299
  55. data/lib/mx-platform-ruby/models/member.rb +0 -317
  56. data/lib/mx-platform-ruby/models/member_status.rb +0 -292
  57. data/lib/mx-platform-ruby/models/merchant.rb +0 -263
  58. data/lib/mx-platform-ruby/models/o_auth_window.rb +0 -227
  59. data/lib/mx-platform-ruby/models/pagination.rb +0 -245
  60. data/lib/mx-platform-ruby/models/statement.rb +0 -281
  61. data/lib/mx-platform-ruby/models/tag.rb +0 -236
  62. data/lib/mx-platform-ruby/models/tagging.rb +0 -254
  63. data/lib/mx-platform-ruby/models/transaction.rb +0 -533
  64. data/lib/mx-platform-ruby/models/transaction_rule.rb +0 -272
  65. data/lib/mx-platform-ruby/models/user.rb +0 -254
  66. data/lib/mx-platform-ruby/models/widget.rb +0 -236
  67. data/openapi/mx_platform_ruby.yml +0 -11
  68. data/pkg/mx-platform-ruby-0.2.0.gem +0 -0
  69. data/pkg/mx-platform-ruby-0.2.1.gem +0 -0
  70. data/spec/models/account_number_spec.rb +0 -76
  71. data/spec/models/account_owner_spec.rb +0 -100
  72. data/spec/models/account_spec.rb +0 -268
  73. data/spec/models/category_spec.rb +0 -76
  74. data/spec/models/challenge_response_image_options_spec.rb +0 -46
  75. data/spec/models/challenge_response_options_spec.rb +0 -40
  76. data/spec/models/challenge_spec.rb +0 -70
  77. data/spec/models/connect_widget_spec.rb +0 -40
  78. data/spec/models/credential_spec.rb +0 -58
  79. data/spec/models/enhance_transaction_spec.rb +0 -124
  80. data/spec/models/holding_spec.rb +0 -136
  81. data/spec/models/inline_response200_spec.rb +0 -34
  82. data/spec/models/institution_spec.rb +0 -88
  83. data/spec/models/member_spec.rb +0 -100
  84. data/spec/models/member_status_spec.rb +0 -82
  85. data/spec/models/merchant_spec.rb +0 -64
  86. data/spec/models/o_auth_window_spec.rb +0 -40
  87. data/spec/models/pagination_spec.rb +0 -52
  88. data/spec/models/statement_spec.rb +0 -76
  89. data/spec/models/tag_spec.rb +0 -46
  90. data/spec/models/tagging_spec.rb +0 -58
  91. data/spec/models/transaction_rule_spec.rb +0 -70
  92. data/spec/models/transaction_spec.rb +0 -244
  93. data/spec/models/user_spec.rb +0 -58
  94. data/spec/models/widget_spec.rb +0 -46
@@ -1,569 +0,0 @@
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 Account
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::Account` 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::Account`. 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