bandwidth-sdk 11.0.0.pre.beta.2.0 → 11.0.0.pre.beta.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/bandwidth-sdk.gemspec +1 -1
  4. data/coverage/.last_run.json +1 -1
  5. data/coverage/.resultset.json +262 -295
  6. data/coverage/index.html +2527 -2890
  7. data/lib/bandwidth-sdk/api/calls_api.rb +1 -1
  8. data/lib/bandwidth-sdk/api/conferences_api.rb +1 -1
  9. data/lib/bandwidth-sdk/api/media_api.rb +1 -1
  10. data/lib/bandwidth-sdk/api/messages_api.rb +1 -1
  11. data/lib/bandwidth-sdk/api/mfa_api.rb +1 -1
  12. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +1 -1
  13. data/lib/bandwidth-sdk/api/recordings_api.rb +1 -1
  14. data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
  15. data/lib/bandwidth-sdk/api_client.rb +1 -1
  16. data/lib/bandwidth-sdk/api_error.rb +1 -1
  17. data/lib/bandwidth-sdk/configuration.rb +10 -8
  18. data/lib/bandwidth-sdk/models/account_statistics.rb +13 -18
  19. data/lib/bandwidth-sdk/models/answer_callback.rb +13 -18
  20. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +13 -18
  21. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +13 -18
  22. data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
  23. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +13 -18
  24. data/lib/bandwidth-sdk/models/call_state.rb +13 -18
  25. data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
  26. data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
  27. data/lib/bandwidth-sdk/models/code_request.rb +28 -19
  28. data/lib/bandwidth-sdk/models/conference.rb +13 -18
  29. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +13 -18
  30. data/lib/bandwidth-sdk/models/conference_created_callback.rb +13 -18
  31. data/lib/bandwidth-sdk/models/conference_member.rb +13 -18
  32. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +13 -18
  33. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +13 -18
  34. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +13 -18
  35. data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +13 -18
  36. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +13 -18
  37. data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
  38. data/lib/bandwidth-sdk/models/create_call.rb +21 -18
  39. data/lib/bandwidth-sdk/models/create_call_response.rb +27 -18
  40. data/lib/bandwidth-sdk/models/create_lookup_response.rb +13 -18
  41. data/lib/bandwidth-sdk/models/create_message_request_error.rb +17 -18
  42. data/lib/bandwidth-sdk/models/deferred_result.rb +13 -18
  43. data/lib/bandwidth-sdk/models/disconnect_callback.rb +13 -18
  44. data/lib/bandwidth-sdk/models/diversion.rb +13 -18
  45. data/lib/bandwidth-sdk/models/dtmf_callback.rb +13 -18
  46. data/lib/bandwidth-sdk/models/field_error.rb +13 -18
  47. data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
  48. data/lib/bandwidth-sdk/models/gather_callback.rb +13 -18
  49. data/lib/bandwidth-sdk/models/inbound_message_callback.rb +23 -18
  50. data/lib/bandwidth-sdk/models/inbound_message_callback_message.rb +31 -18
  51. data/lib/bandwidth-sdk/models/initiate_callback.rb +13 -18
  52. data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
  53. data/lib/bandwidth-sdk/models/list_message_item.rb +13 -18
  54. data/lib/bandwidth-sdk/models/lookup_request.rb +15 -18
  55. data/lib/bandwidth-sdk/models/lookup_result.rb +13 -18
  56. data/lib/bandwidth-sdk/models/lookup_status.rb +13 -18
  57. data/lib/bandwidth-sdk/models/lookup_status_enum.rb +1 -1
  58. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +13 -18
  59. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +13 -18
  60. data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
  61. data/lib/bandwidth-sdk/models/machine_detection_result.rb +13 -18
  62. data/lib/bandwidth-sdk/models/media.rb +13 -18
  63. data/lib/bandwidth-sdk/models/message.rb +21 -18
  64. data/lib/bandwidth-sdk/models/message_delivered_callback.rb +23 -18
  65. data/lib/bandwidth-sdk/models/message_delivered_callback_message.rb +33 -18
  66. data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
  67. data/lib/bandwidth-sdk/models/message_failed_callback.rb +25 -18
  68. data/lib/bandwidth-sdk/models/message_failed_callback_message.rb +35 -18
  69. data/lib/bandwidth-sdk/models/message_request.rb +24 -19
  70. data/lib/bandwidth-sdk/models/message_sending_callback.rb +23 -18
  71. data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +35 -18
  72. data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
  73. data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
  74. data/lib/bandwidth-sdk/models/messages_list.rb +13 -18
  75. data/lib/bandwidth-sdk/models/messaging_code_response.rb +13 -18
  76. data/lib/bandwidth-sdk/models/messaging_request_error.rb +17 -18
  77. data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +13 -18
  78. data/lib/bandwidth-sdk/models/mfa_request_error.rb +13 -18
  79. data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +13 -18
  80. data/lib/bandwidth-sdk/models/page_info.rb +13 -18
  81. data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
  82. data/lib/bandwidth-sdk/models/recording_available_callback.rb +13 -18
  83. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +13 -18
  84. data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
  85. data/lib/bandwidth-sdk/models/redirect_callback.rb +13 -18
  86. data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
  87. data/lib/bandwidth-sdk/models/stir_shaken.rb +13 -18
  88. data/lib/bandwidth-sdk/models/tag.rb +13 -18
  89. data/lib/bandwidth-sdk/models/tn_lookup_request_error.rb +13 -18
  90. data/lib/bandwidth-sdk/models/transcribe_recording.rb +13 -18
  91. data/lib/bandwidth-sdk/models/transcription.rb +13 -18
  92. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +13 -18
  93. data/lib/bandwidth-sdk/models/transcription_list.rb +13 -18
  94. data/lib/bandwidth-sdk/models/transcription_metadata.rb +13 -18
  95. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +13 -18
  96. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +13 -18
  97. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +13 -18
  98. data/lib/bandwidth-sdk/models/update_call.rb +13 -18
  99. data/lib/bandwidth-sdk/models/update_call_recording.rb +15 -18
  100. data/lib/bandwidth-sdk/models/update_conference.rb +13 -18
  101. data/lib/bandwidth-sdk/models/update_conference_member.rb +13 -18
  102. data/lib/bandwidth-sdk/models/verify_code_request.rb +19 -18
  103. data/lib/bandwidth-sdk/models/verify_code_response.rb +13 -18
  104. data/lib/bandwidth-sdk/models/voice_api_error.rb +13 -18
  105. data/lib/bandwidth-sdk/models/voice_code_response.rb +13 -18
  106. data/lib/bandwidth-sdk/version.rb +1 -1
  107. data/lib/bandwidth-sdk.rb +1 -1
  108. data/spec/api_client_spec.rb +1 -1
  109. data/spec/configuration_spec.rb +19 -7
  110. data/spec/models/call_state_spec.rb +0 -13
  111. data/spec/models/deferred_result_spec.rb +1 -14
  112. data/spec/models/message_spec.rb +10 -17
  113. data/spec/models/verify_code_request_spec.rb +7 -15
  114. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -178,6 +178,7 @@ module Bandwidth
178
178
  # Show invalid properties with the reasons. Usually used together with valid?
179
179
  # @return Array for valid properties with the reasons
180
180
  def list_invalid_properties
181
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
181
182
  invalid_properties = Array.new
182
183
  invalid_properties
183
184
  end
@@ -185,6 +186,7 @@ module Bandwidth
185
186
  # Check to see if the all the properties in the model are valid
186
187
  # @return true if the model is valid
187
188
  def valid?
189
+ warn '[DEPRECATED] the `valid?` method is obsolete'
188
190
  true
189
191
  end
190
192
 
@@ -222,37 +224,30 @@ module Bandwidth
222
224
  # @param [Hash] attributes Model attributes in the form of hash
223
225
  # @return [Object] Returns the model itself
224
226
  def self.build_from_hash(attributes)
225
- new.build_from_hash(attributes)
226
- end
227
-
228
- # Builds the object from hash
229
- # @param [Hash] attributes Model attributes in the form of hash
230
- # @return [Object] Returns the model itself
231
- def build_from_hash(attributes)
232
227
  return nil unless attributes.is_a?(Hash)
233
228
  attributes = attributes.transform_keys(&:to_sym)
234
- self.class.openapi_types.each_pair do |key, type|
235
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
236
- self.send("#{key}=", nil)
229
+ transformed_hash = {}
230
+ openapi_types.each_pair do |key, type|
231
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
232
+ transformed_hash["#{key}"] = nil
237
233
  elsif type =~ /\AArray<(.*)>/i
238
234
  # check to ensure the input is an array given that the attribute
239
235
  # is documented as an array but the input is not
240
- if attributes[self.class.attribute_map[key]].is_a?(Array)
241
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
236
+ if attributes[attribute_map[key]].is_a?(Array)
237
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
242
238
  end
243
- elsif !attributes[self.class.attribute_map[key]].nil?
244
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
239
+ elsif !attributes[attribute_map[key]].nil?
240
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
245
241
  end
246
242
  end
247
-
248
- self
243
+ new(transformed_hash)
249
244
  end
250
245
 
251
246
  # Deserializes the data based on type
252
247
  # @param string type Data type
253
248
  # @param string value Value to be deserialized
254
249
  # @return [Object] Deserialized data
255
- def _deserialize(type, value)
250
+ def self._deserialize(type, value)
256
251
  case type.to_sym
257
252
  when :Time
258
253
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -104,6 +104,7 @@ module Bandwidth
104
104
  # Show invalid properties with the reasons. Usually used together with valid?
105
105
  # @return Array for valid properties with the reasons
106
106
  def list_invalid_properties
107
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
108
  invalid_properties = Array.new
108
109
  invalid_properties
109
110
  end
@@ -111,6 +112,7 @@ module Bandwidth
111
112
  # Check to see if the all the properties in the model are valid
112
113
  # @return true if the model is valid
113
114
  def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
116
  true
115
117
  end
116
118
 
@@ -142,37 +144,30 @@ module Bandwidth
142
144
  # @param [Hash] attributes Model attributes in the form of hash
143
145
  # @return [Object] Returns the model itself
144
146
  def self.build_from_hash(attributes)
145
- new.build_from_hash(attributes)
146
- end
147
-
148
- # Builds the object from hash
149
- # @param [Hash] attributes Model attributes in the form of hash
150
- # @return [Object] Returns the model itself
151
- def build_from_hash(attributes)
152
147
  return nil unless attributes.is_a?(Hash)
153
148
  attributes = attributes.transform_keys(&:to_sym)
154
- self.class.openapi_types.each_pair do |key, type|
155
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
156
- self.send("#{key}=", nil)
149
+ transformed_hash = {}
150
+ openapi_types.each_pair do |key, type|
151
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = nil
157
153
  elsif type =~ /\AArray<(.*)>/i
158
154
  # check to ensure the input is an array given that the attribute
159
155
  # is documented as an array but the input is not
160
- if attributes[self.class.attribute_map[key]].is_a?(Array)
161
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
+ if attributes[attribute_map[key]].is_a?(Array)
157
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
162
158
  end
163
- elsif !attributes[self.class.attribute_map[key]].nil?
164
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
+ elsif !attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
165
161
  end
166
162
  end
167
-
168
- self
163
+ new(transformed_hash)
169
164
  end
170
165
 
171
166
  # Deserializes the data based on type
172
167
  # @param string type Data type
173
168
  # @param string value Value to be deserialized
174
169
  # @return [Object] Deserialized data
175
- def _deserialize(type, value)
170
+ def self._deserialize(type, value)
176
171
  case type.to_sym
177
172
  when :Time
178
173
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -182,10 +182,14 @@ module Bandwidth
182
182
 
183
183
  if attributes.key?(:'to')
184
184
  self.to = attributes[:'to']
185
+ else
186
+ self.to = nil
185
187
  end
186
188
 
187
189
  if attributes.key?(:'from')
188
190
  self.from = attributes[:'from']
191
+ else
192
+ self.from = nil
189
193
  end
190
194
 
191
195
  if attributes.key?(:'uui')
@@ -194,10 +198,14 @@ module Bandwidth
194
198
 
195
199
  if attributes.key?(:'application_id')
196
200
  self.application_id = attributes[:'application_id']
201
+ else
202
+ self.application_id = nil
197
203
  end
198
204
 
199
205
  if attributes.key?(:'answer_url')
200
206
  self.answer_url = attributes[:'answer_url']
207
+ else
208
+ self.answer_url = nil
201
209
  end
202
210
 
203
211
  if attributes.key?(:'answer_method')
@@ -272,6 +280,7 @@ module Bandwidth
272
280
  # Show invalid properties with the reasons. Usually used together with valid?
273
281
  # @return Array for valid properties with the reasons
274
282
  def list_invalid_properties
283
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
275
284
  invalid_properties = Array.new
276
285
  if @to.nil?
277
286
  invalid_properties.push('invalid value for "to", to cannot be nil.')
@@ -351,6 +360,7 @@ module Bandwidth
351
360
  # Check to see if the all the properties in the model are valid
352
361
  # @return true if the model is valid
353
362
  def valid?
363
+ warn '[DEPRECATED] the `valid?` method is obsolete'
354
364
  return false if @to.nil?
355
365
  return false if @from.nil?
356
366
  return false if @application_id.nil?
@@ -540,37 +550,30 @@ module Bandwidth
540
550
  # @param [Hash] attributes Model attributes in the form of hash
541
551
  # @return [Object] Returns the model itself
542
552
  def self.build_from_hash(attributes)
543
- new.build_from_hash(attributes)
544
- end
545
-
546
- # Builds the object from hash
547
- # @param [Hash] attributes Model attributes in the form of hash
548
- # @return [Object] Returns the model itself
549
- def build_from_hash(attributes)
550
553
  return nil unless attributes.is_a?(Hash)
551
554
  attributes = attributes.transform_keys(&:to_sym)
552
- self.class.openapi_types.each_pair do |key, type|
553
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
554
- self.send("#{key}=", nil)
555
+ transformed_hash = {}
556
+ openapi_types.each_pair do |key, type|
557
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
558
+ transformed_hash["#{key}"] = nil
555
559
  elsif type =~ /\AArray<(.*)>/i
556
560
  # check to ensure the input is an array given that the attribute
557
561
  # is documented as an array but the input is not
558
- if attributes[self.class.attribute_map[key]].is_a?(Array)
559
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
562
+ if attributes[attribute_map[key]].is_a?(Array)
563
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
560
564
  end
561
- elsif !attributes[self.class.attribute_map[key]].nil?
562
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
565
+ elsif !attributes[attribute_map[key]].nil?
566
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
563
567
  end
564
568
  end
565
-
566
- self
569
+ new(transformed_hash)
567
570
  end
568
571
 
569
572
  # Deserializes the data based on type
570
573
  # @param string type Data type
571
574
  # @param string value Value to be deserialized
572
575
  # @return [Object] Deserialized data
573
- def _deserialize(type, value)
576
+ def self._deserialize(type, value)
574
577
  case type.to_sym
575
578
  when :Time
576
579
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -191,22 +191,32 @@ module Bandwidth
191
191
 
192
192
  if attributes.key?(:'application_id')
193
193
  self.application_id = attributes[:'application_id']
194
+ else
195
+ self.application_id = nil
194
196
  end
195
197
 
196
198
  if attributes.key?(:'account_id')
197
199
  self.account_id = attributes[:'account_id']
200
+ else
201
+ self.account_id = nil
198
202
  end
199
203
 
200
204
  if attributes.key?(:'call_id')
201
205
  self.call_id = attributes[:'call_id']
206
+ else
207
+ self.call_id = nil
202
208
  end
203
209
 
204
210
  if attributes.key?(:'to')
205
211
  self.to = attributes[:'to']
212
+ else
213
+ self.to = nil
206
214
  end
207
215
 
208
216
  if attributes.key?(:'from')
209
217
  self.from = attributes[:'from']
218
+ else
219
+ self.from = nil
210
220
  end
211
221
 
212
222
  if attributes.key?(:'enqueued_time')
@@ -215,6 +225,8 @@ module Bandwidth
215
225
 
216
226
  if attributes.key?(:'call_url')
217
227
  self.call_url = attributes[:'call_url']
228
+ else
229
+ self.call_url = nil
218
230
  end
219
231
 
220
232
  if attributes.key?(:'call_timeout')
@@ -237,6 +249,8 @@ module Bandwidth
237
249
 
238
250
  if attributes.key?(:'answer_url')
239
251
  self.answer_url = attributes[:'answer_url']
252
+ else
253
+ self.answer_url = nil
240
254
  end
241
255
 
242
256
  if attributes.key?(:'answer_fallback_method')
@@ -283,6 +297,7 @@ module Bandwidth
283
297
  # Show invalid properties with the reasons. Usually used together with valid?
284
298
  # @return Array for valid properties with the reasons
285
299
  def list_invalid_properties
300
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
286
301
  invalid_properties = Array.new
287
302
  if @application_id.nil?
288
303
  invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
@@ -334,6 +349,7 @@ module Bandwidth
334
349
  # Check to see if the all the properties in the model are valid
335
350
  # @return true if the model is valid
336
351
  def valid?
352
+ warn '[DEPRECATED] the `valid?` method is obsolete'
337
353
  return false if @application_id.nil?
338
354
  return false if @account_id.nil?
339
355
  return false if @call_id.nil?
@@ -432,37 +448,30 @@ module Bandwidth
432
448
  # @param [Hash] attributes Model attributes in the form of hash
433
449
  # @return [Object] Returns the model itself
434
450
  def self.build_from_hash(attributes)
435
- new.build_from_hash(attributes)
436
- end
437
-
438
- # Builds the object from hash
439
- # @param [Hash] attributes Model attributes in the form of hash
440
- # @return [Object] Returns the model itself
441
- def build_from_hash(attributes)
442
451
  return nil unless attributes.is_a?(Hash)
443
452
  attributes = attributes.transform_keys(&:to_sym)
444
- self.class.openapi_types.each_pair do |key, type|
445
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
446
- self.send("#{key}=", nil)
453
+ transformed_hash = {}
454
+ openapi_types.each_pair do |key, type|
455
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
456
+ transformed_hash["#{key}"] = nil
447
457
  elsif type =~ /\AArray<(.*)>/i
448
458
  # check to ensure the input is an array given that the attribute
449
459
  # is documented as an array but the input is not
450
- if attributes[self.class.attribute_map[key]].is_a?(Array)
451
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
460
+ if attributes[attribute_map[key]].is_a?(Array)
461
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
452
462
  end
453
- elsif !attributes[self.class.attribute_map[key]].nil?
454
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
463
+ elsif !attributes[attribute_map[key]].nil?
464
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
455
465
  end
456
466
  end
457
-
458
- self
467
+ new(transformed_hash)
459
468
  end
460
469
 
461
470
  # Deserializes the data based on type
462
471
  # @param string type Data type
463
472
  # @param string value Value to be deserialized
464
473
  # @return [Object] Deserialized data
465
- def _deserialize(type, value)
474
+ def self._deserialize(type, value)
466
475
  case type.to_sym
467
476
  when :Time
468
477
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -97,6 +97,7 @@ module Bandwidth
97
97
  # Show invalid properties with the reasons. Usually used together with valid?
98
98
  # @return Array for valid properties with the reasons
99
99
  def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
101
  invalid_properties = Array.new
101
102
  invalid_properties
102
103
  end
@@ -104,6 +105,7 @@ module Bandwidth
104
105
  # Check to see if the all the properties in the model are valid
105
106
  # @return true if the model is valid
106
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
109
  true
108
110
  end
109
111
 
@@ -132,37 +134,30 @@ module Bandwidth
132
134
  # @param [Hash] attributes Model attributes in the form of hash
133
135
  # @return [Object] Returns the model itself
134
136
  def self.build_from_hash(attributes)
135
- new.build_from_hash(attributes)
136
- end
137
-
138
- # Builds the object from hash
139
- # @param [Hash] attributes Model attributes in the form of hash
140
- # @return [Object] Returns the model itself
141
- def build_from_hash(attributes)
142
137
  return nil unless attributes.is_a?(Hash)
143
138
  attributes = attributes.transform_keys(&:to_sym)
144
- self.class.openapi_types.each_pair do |key, type|
145
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
- self.send("#{key}=", nil)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
147
143
  elsif type =~ /\AArray<(.*)>/i
148
144
  # check to ensure the input is an array given that the attribute
149
145
  # is documented as an array but the input is not
150
- if attributes[self.class.attribute_map[key]].is_a?(Array)
151
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
148
  end
153
- elsif !attributes[self.class.attribute_map[key]].nil?
154
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
151
  end
156
152
  end
157
-
158
- self
153
+ new(transformed_hash)
159
154
  end
160
155
 
161
156
  # Deserializes the data based on type
162
157
  # @param string type Data type
163
158
  # @param string value Value to be deserialized
164
159
  # @return [Object] Deserialized data
165
- def _deserialize(type, value)
160
+ def self._deserialize(type, value)
166
161
  case type.to_sym
167
162
  when :Time
168
163
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -67,10 +67,14 @@ module Bandwidth
67
67
 
68
68
  if attributes.key?(:'type')
69
69
  self.type = attributes[:'type']
70
+ else
71
+ self.type = nil
70
72
  end
71
73
 
72
74
  if attributes.key?(:'description')
73
75
  self.description = attributes[:'description']
76
+ else
77
+ self.description = nil
74
78
  end
75
79
 
76
80
  if attributes.key?(:'field_errors')
@@ -83,6 +87,7 @@ module Bandwidth
83
87
  # Show invalid properties with the reasons. Usually used together with valid?
84
88
  # @return Array for valid properties with the reasons
85
89
  def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
91
  invalid_properties = Array.new
87
92
  if @type.nil?
88
93
  invalid_properties.push('invalid value for "type", type cannot be nil.')
@@ -98,6 +103,7 @@ module Bandwidth
98
103
  # Check to see if the all the properties in the model are valid
99
104
  # @return true if the model is valid
100
105
  def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
107
  return false if @type.nil?
102
108
  return false if @description.nil?
103
109
  true
@@ -129,37 +135,30 @@ module Bandwidth
129
135
  # @param [Hash] attributes Model attributes in the form of hash
130
136
  # @return [Object] Returns the model itself
131
137
  def self.build_from_hash(attributes)
132
- new.build_from_hash(attributes)
133
- end
134
-
135
- # Builds the object from hash
136
- # @param [Hash] attributes Model attributes in the form of hash
137
- # @return [Object] Returns the model itself
138
- def build_from_hash(attributes)
139
138
  return nil unless attributes.is_a?(Hash)
140
139
  attributes = attributes.transform_keys(&:to_sym)
141
- self.class.openapi_types.each_pair do |key, type|
142
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
143
- self.send("#{key}=", nil)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
144
  elsif type =~ /\AArray<(.*)>/i
145
145
  # check to ensure the input is an array given that the attribute
146
146
  # is documented as an array but the input is not
147
- if attributes[self.class.attribute_map[key]].is_a?(Array)
148
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
149
  end
150
- elsif !attributes[self.class.attribute_map[key]].nil?
151
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
152
  end
153
153
  end
154
-
155
- self
154
+ new(transformed_hash)
156
155
  end
157
156
 
158
157
  # Deserializes the data based on type
159
158
  # @param string type Data type
160
159
  # @param string value Value to be deserialized
161
160
  # @return [Object] Deserialized data
162
- def _deserialize(type, value)
161
+ def self._deserialize(type, value)
163
162
  case type.to_sym
164
163
  when :Time
165
164
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -73,6 +73,7 @@ module Bandwidth
73
73
  # Show invalid properties with the reasons. Usually used together with valid?
74
74
  # @return Array for valid properties with the reasons
75
75
  def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
77
  invalid_properties = Array.new
77
78
  invalid_properties
78
79
  end
@@ -80,6 +81,7 @@ module Bandwidth
80
81
  # Check to see if the all the properties in the model are valid
81
82
  # @return true if the model is valid
82
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
85
  true
84
86
  end
85
87
 
@@ -108,37 +110,30 @@ module Bandwidth
108
110
  # @param [Hash] attributes Model attributes in the form of hash
109
111
  # @return [Object] Returns the model itself
110
112
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
113
  return nil unless attributes.is_a?(Hash)
119
114
  attributes = attributes.transform_keys(&:to_sym)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
- self.send("#{key}=", nil)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
123
119
  elsif type =~ /\AArray<(.*)>/i
124
120
  # check to ensure the input is an array given that the attribute
125
121
  # is documented as an array but the input is not
126
- if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
124
  end
129
- elsif !attributes[self.class.attribute_map[key]].nil?
130
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
127
  end
132
128
  end
133
-
134
- self
129
+ new(transformed_hash)
135
130
  end
136
131
 
137
132
  # Deserializes the data based on type
138
133
  # @param string type Data type
139
134
  # @param string value Value to be deserialized
140
135
  # @return [Object] Deserialized data
141
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
142
137
  case type.to_sym
143
138
  when :Time
144
139
  Time.parse(value)