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
 
@@ -85,14 +85,20 @@ module Bandwidth
85
85
 
86
86
  if attributes.key?(:'to')
87
87
  self.to = attributes[:'to']
88
+ else
89
+ self.to = nil
88
90
  end
89
91
 
90
92
  if attributes.key?(:'from')
91
93
  self.from = attributes[:'from']
94
+ else
95
+ self.from = nil
92
96
  end
93
97
 
94
98
  if attributes.key?(:'application_id')
95
99
  self.application_id = attributes[:'application_id']
100
+ else
101
+ self.application_id = nil
96
102
  end
97
103
 
98
104
  if attributes.key?(:'scope')
@@ -101,16 +107,21 @@ module Bandwidth
101
107
 
102
108
  if attributes.key?(:'message')
103
109
  self.message = attributes[:'message']
110
+ else
111
+ self.message = nil
104
112
  end
105
113
 
106
114
  if attributes.key?(:'digits')
107
115
  self.digits = attributes[:'digits']
116
+ else
117
+ self.digits = nil
108
118
  end
109
119
  end
110
120
 
111
121
  # Show invalid properties with the reasons. Usually used together with valid?
112
122
  # @return Array for valid properties with the reasons
113
123
  def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
125
  invalid_properties = Array.new
115
126
  if @to.nil?
116
127
  invalid_properties.push('invalid value for "to", to cannot be nil.')
@@ -172,6 +183,7 @@ module Bandwidth
172
183
  # Check to see if the all the properties in the model are valid
173
184
  # @return true if the model is valid
174
185
  def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
175
187
  return false if @to.nil?
176
188
  return false if @to !~ Regexp.new(/^\+[1-9]\d{1,14}$/)
177
189
  return false if @from.nil?
@@ -239,7 +251,11 @@ module Bandwidth
239
251
  # Custom attribute writer method with validation
240
252
  # @param [Object] scope Value to be assigned
241
253
  def scope=(scope)
242
- if !scope.nil? && scope.to_s.length > 25
254
+ if scope.nil?
255
+ fail ArgumentError, 'scope cannot be nil'
256
+ end
257
+
258
+ if scope.to_s.length > 25
243
259
  fail ArgumentError, 'invalid value for "scope", the character length must be smaller than or equal to 25.'
244
260
  end
245
261
 
@@ -307,37 +323,30 @@ module Bandwidth
307
323
  # @param [Hash] attributes Model attributes in the form of hash
308
324
  # @return [Object] Returns the model itself
309
325
  def self.build_from_hash(attributes)
310
- new.build_from_hash(attributes)
311
- end
312
-
313
- # Builds the object from hash
314
- # @param [Hash] attributes Model attributes in the form of hash
315
- # @return [Object] Returns the model itself
316
- def build_from_hash(attributes)
317
326
  return nil unless attributes.is_a?(Hash)
318
327
  attributes = attributes.transform_keys(&:to_sym)
319
- self.class.openapi_types.each_pair do |key, type|
320
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
321
- self.send("#{key}=", nil)
328
+ transformed_hash = {}
329
+ openapi_types.each_pair do |key, type|
330
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
331
+ transformed_hash["#{key}"] = nil
322
332
  elsif type =~ /\AArray<(.*)>/i
323
333
  # check to ensure the input is an array given that the attribute
324
334
  # is documented as an array but the input is not
325
- if attributes[self.class.attribute_map[key]].is_a?(Array)
326
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
335
+ if attributes[attribute_map[key]].is_a?(Array)
336
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
327
337
  end
328
- elsif !attributes[self.class.attribute_map[key]].nil?
329
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
338
+ elsif !attributes[attribute_map[key]].nil?
339
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
330
340
  end
331
341
  end
332
-
333
- self
342
+ new(transformed_hash)
334
343
  end
335
344
 
336
345
  # Deserializes the data based on type
337
346
  # @param string type Data type
338
347
  # @param string value Value to be deserialized
339
348
  # @return [Object] Deserialized data
340
- def _deserialize(type, value)
349
+ def self._deserialize(type, value)
341
350
  case type.to_sym
342
351
  when :Time
343
352
  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
 
@@ -159,6 +159,7 @@ module Bandwidth
159
159
  # Show invalid properties with the reasons. Usually used together with valid?
160
160
  # @return Array for valid properties with the reasons
161
161
  def list_invalid_properties
162
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
162
163
  invalid_properties = Array.new
163
164
  invalid_properties
164
165
  end
@@ -166,6 +167,7 @@ module Bandwidth
166
167
  # Check to see if the all the properties in the model are valid
167
168
  # @return true if the model is valid
168
169
  def valid?
170
+ warn '[DEPRECATED] the `valid?` method is obsolete'
169
171
  true
170
172
  end
171
173
 
@@ -200,37 +202,30 @@ module Bandwidth
200
202
  # @param [Hash] attributes Model attributes in the form of hash
201
203
  # @return [Object] Returns the model itself
202
204
  def self.build_from_hash(attributes)
203
- new.build_from_hash(attributes)
204
- end
205
-
206
- # Builds the object from hash
207
- # @param [Hash] attributes Model attributes in the form of hash
208
- # @return [Object] Returns the model itself
209
- def build_from_hash(attributes)
210
205
  return nil unless attributes.is_a?(Hash)
211
206
  attributes = attributes.transform_keys(&:to_sym)
212
- self.class.openapi_types.each_pair do |key, type|
213
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
214
- self.send("#{key}=", nil)
207
+ transformed_hash = {}
208
+ openapi_types.each_pair do |key, type|
209
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = nil
215
211
  elsif type =~ /\AArray<(.*)>/i
216
212
  # check to ensure the input is an array given that the attribute
217
213
  # is documented as an array but the input is not
218
- if attributes[self.class.attribute_map[key]].is_a?(Array)
219
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
214
+ if attributes[attribute_map[key]].is_a?(Array)
215
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
220
216
  end
221
- elsif !attributes[self.class.attribute_map[key]].nil?
222
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
217
+ elsif !attributes[attribute_map[key]].nil?
218
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
223
219
  end
224
220
  end
225
-
226
- self
221
+ new(transformed_hash)
227
222
  end
228
223
 
229
224
  # Deserializes the data based on type
230
225
  # @param string type Data type
231
226
  # @param string value Value to be deserialized
232
227
  # @return [Object] Deserialized data
233
- def _deserialize(type, value)
228
+ def self._deserialize(type, value)
234
229
  case type.to_sym
235
230
  when :Time
236
231
  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
 
@@ -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
 
@@ -114,6 +114,7 @@ module Bandwidth
114
114
  # Show invalid properties with the reasons. Usually used together with valid?
115
115
  # @return Array for valid properties with the reasons
116
116
  def list_invalid_properties
117
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
118
  invalid_properties = Array.new
118
119
  invalid_properties
119
120
  end
@@ -121,6 +122,7 @@ module Bandwidth
121
122
  # Check to see if the all the properties in the model are valid
122
123
  # @return true if the model is valid
123
124
  def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
126
  true
125
127
  end
126
128
 
@@ -153,37 +155,30 @@ module Bandwidth
153
155
  # @param [Hash] attributes Model attributes in the form of hash
154
156
  # @return [Object] Returns the model itself
155
157
  def self.build_from_hash(attributes)
156
- new.build_from_hash(attributes)
157
- end
158
-
159
- # Builds the object from hash
160
- # @param [Hash] attributes Model attributes in the form of hash
161
- # @return [Object] Returns the model itself
162
- def build_from_hash(attributes)
163
158
  return nil unless attributes.is_a?(Hash)
164
159
  attributes = attributes.transform_keys(&:to_sym)
165
- self.class.openapi_types.each_pair do |key, type|
166
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
- self.send("#{key}=", nil)
160
+ transformed_hash = {}
161
+ openapi_types.each_pair do |key, type|
162
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = nil
168
164
  elsif type =~ /\AArray<(.*)>/i
169
165
  # check to ensure the input is an array given that the attribute
170
166
  # is documented as an array but the input is not
171
- if attributes[self.class.attribute_map[key]].is_a?(Array)
172
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
167
+ if attributes[attribute_map[key]].is_a?(Array)
168
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
169
  end
174
- elsif !attributes[self.class.attribute_map[key]].nil?
175
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
170
+ elsif !attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
172
  end
177
173
  end
178
-
179
- self
174
+ new(transformed_hash)
180
175
  end
181
176
 
182
177
  # Deserializes the data based on type
183
178
  # @param string type Data type
184
179
  # @param string value Value to be deserialized
185
180
  # @return [Object] Deserialized data
186
- def _deserialize(type, value)
181
+ def self._deserialize(type, value)
187
182
  case type.to_sym
188
183
  when :Time
189
184
  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
 
@@ -131,6 +131,7 @@ module Bandwidth
131
131
  # Show invalid properties with the reasons. Usually used together with valid?
132
132
  # @return Array for valid properties with the reasons
133
133
  def list_invalid_properties
134
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
134
135
  invalid_properties = Array.new
135
136
  invalid_properties
136
137
  end
@@ -138,6 +139,7 @@ module Bandwidth
138
139
  # Check to see if the all the properties in the model are valid
139
140
  # @return true if the model is valid
140
141
  def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
143
  true
142
144
  end
143
145
 
@@ -172,37 +174,30 @@ module Bandwidth
172
174
  # @param [Hash] attributes Model attributes in the form of hash
173
175
  # @return [Object] Returns the model itself
174
176
  def self.build_from_hash(attributes)
175
- new.build_from_hash(attributes)
176
- end
177
-
178
- # Builds the object from hash
179
- # @param [Hash] attributes Model attributes in the form of hash
180
- # @return [Object] Returns the model itself
181
- def build_from_hash(attributes)
182
177
  return nil unless attributes.is_a?(Hash)
183
178
  attributes = attributes.transform_keys(&:to_sym)
184
- self.class.openapi_types.each_pair do |key, type|
185
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
186
- self.send("#{key}=", nil)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
187
183
  elsif type =~ /\AArray<(.*)>/i
188
184
  # check to ensure the input is an array given that the attribute
189
185
  # is documented as an array but the input is not
190
- if attributes[self.class.attribute_map[key]].is_a?(Array)
191
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
188
  end
193
- elsif !attributes[self.class.attribute_map[key]].nil?
194
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
191
  end
196
192
  end
197
-
198
- self
193
+ new(transformed_hash)
199
194
  end
200
195
 
201
196
  # Deserializes the data based on type
202
197
  # @param string type Data type
203
198
  # @param string value Value to be deserialized
204
199
  # @return [Object] Deserialized data
205
- def _deserialize(type, value)
200
+ def self._deserialize(type, value)
206
201
  case type.to_sym
207
202
  when :Time
208
203
  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
 
@@ -131,6 +131,7 @@ module Bandwidth
131
131
  # Show invalid properties with the reasons. Usually used together with valid?
132
132
  # @return Array for valid properties with the reasons
133
133
  def list_invalid_properties
134
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
134
135
  invalid_properties = Array.new
135
136
  invalid_properties
136
137
  end
@@ -138,6 +139,7 @@ module Bandwidth
138
139
  # Check to see if the all the properties in the model are valid
139
140
  # @return true if the model is valid
140
141
  def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
143
  true
142
144
  end
143
145
 
@@ -172,37 +174,30 @@ module Bandwidth
172
174
  # @param [Hash] attributes Model attributes in the form of hash
173
175
  # @return [Object] Returns the model itself
174
176
  def self.build_from_hash(attributes)
175
- new.build_from_hash(attributes)
176
- end
177
-
178
- # Builds the object from hash
179
- # @param [Hash] attributes Model attributes in the form of hash
180
- # @return [Object] Returns the model itself
181
- def build_from_hash(attributes)
182
177
  return nil unless attributes.is_a?(Hash)
183
178
  attributes = attributes.transform_keys(&:to_sym)
184
- self.class.openapi_types.each_pair do |key, type|
185
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
186
- self.send("#{key}=", nil)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
187
183
  elsif type =~ /\AArray<(.*)>/i
188
184
  # check to ensure the input is an array given that the attribute
189
185
  # is documented as an array but the input is not
190
- if attributes[self.class.attribute_map[key]].is_a?(Array)
191
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
188
  end
193
- elsif !attributes[self.class.attribute_map[key]].nil?
194
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
191
  end
196
192
  end
197
-
198
- self
193
+ new(transformed_hash)
199
194
  end
200
195
 
201
196
  # Deserializes the data based on type
202
197
  # @param string type Data type
203
198
  # @param string value Value to be deserialized
204
199
  # @return [Object] Deserialized data
205
- def _deserialize(type, value)
200
+ def self._deserialize(type, value)
206
201
  case type.to_sym
207
202
  when :Time
208
203
  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
 
@@ -207,6 +207,7 @@ module Bandwidth
207
207
  # Show invalid properties with the reasons. Usually used together with valid?
208
208
  # @return Array for valid properties with the reasons
209
209
  def list_invalid_properties
210
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
210
211
  invalid_properties = Array.new
211
212
  invalid_properties
212
213
  end
@@ -214,6 +215,7 @@ module Bandwidth
214
215
  # Check to see if the all the properties in the model are valid
215
216
  # @return true if the model is valid
216
217
  def valid?
218
+ warn '[DEPRECATED] the `valid?` method is obsolete'
217
219
  true
218
220
  end
219
221
 
@@ -254,37 +256,30 @@ module Bandwidth
254
256
  # @param [Hash] attributes Model attributes in the form of hash
255
257
  # @return [Object] Returns the model itself
256
258
  def self.build_from_hash(attributes)
257
- new.build_from_hash(attributes)
258
- end
259
-
260
- # Builds the object from hash
261
- # @param [Hash] attributes Model attributes in the form of hash
262
- # @return [Object] Returns the model itself
263
- def build_from_hash(attributes)
264
259
  return nil unless attributes.is_a?(Hash)
265
260
  attributes = attributes.transform_keys(&:to_sym)
266
- self.class.openapi_types.each_pair do |key, type|
267
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
268
- self.send("#{key}=", nil)
261
+ transformed_hash = {}
262
+ openapi_types.each_pair do |key, type|
263
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
264
+ transformed_hash["#{key}"] = nil
269
265
  elsif type =~ /\AArray<(.*)>/i
270
266
  # check to ensure the input is an array given that the attribute
271
267
  # is documented as an array but the input is not
272
- if attributes[self.class.attribute_map[key]].is_a?(Array)
273
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
268
+ if attributes[attribute_map[key]].is_a?(Array)
269
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
274
270
  end
275
- elsif !attributes[self.class.attribute_map[key]].nil?
276
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
271
+ elsif !attributes[attribute_map[key]].nil?
272
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
277
273
  end
278
274
  end
279
-
280
- self
275
+ new(transformed_hash)
281
276
  end
282
277
 
283
278
  # Deserializes the data based on type
284
279
  # @param string type Data type
285
280
  # @param string value Value to be deserialized
286
281
  # @return [Object] Deserialized data
287
- def _deserialize(type, value)
282
+ def self._deserialize(type, value)
288
283
  case type.to_sym
289
284
  when :Time
290
285
  Time.parse(value)