bandwidth-sdk 11.0.0.pre.beta.2.0 → 11.0.0.pre.beta.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/bandwidth-sdk.gemspec +1 -1
- data/bandwidth.yml +26 -0
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +264 -295
- data/coverage/index.html +2839 -3180
- data/docs/CreateCall.md +2 -0
- data/lib/bandwidth-sdk/api/calls_api.rb +1 -1
- data/lib/bandwidth-sdk/api/conferences_api.rb +1 -1
- data/lib/bandwidth-sdk/api/media_api.rb +1 -1
- data/lib/bandwidth-sdk/api/messages_api.rb +1 -1
- data/lib/bandwidth-sdk/api/mfa_api.rb +1 -1
- data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +1 -1
- data/lib/bandwidth-sdk/api/recordings_api.rb +1 -1
- data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
- data/lib/bandwidth-sdk/api_client.rb +1 -1
- data/lib/bandwidth-sdk/api_error.rb +1 -1
- data/lib/bandwidth-sdk/configuration.rb +10 -8
- data/lib/bandwidth-sdk/models/account_statistics.rb +13 -18
- data/lib/bandwidth-sdk/models/answer_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_recording_metadata.rb +13 -18
- data/lib/bandwidth-sdk/models/call_state.rb +13 -18
- data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/code_request.rb +28 -19
- data/lib/bandwidth-sdk/models/conference.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_completed_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_created_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_member.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/create_call.rb +48 -19
- data/lib/bandwidth-sdk/models/create_call_response.rb +27 -18
- data/lib/bandwidth-sdk/models/create_lookup_response.rb +13 -18
- data/lib/bandwidth-sdk/models/create_message_request_error.rb +17 -18
- data/lib/bandwidth-sdk/models/deferred_result.rb +13 -18
- data/lib/bandwidth-sdk/models/disconnect_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/diversion.rb +13 -18
- data/lib/bandwidth-sdk/models/dtmf_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/field_error.rb +13 -18
- data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/gather_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/inbound_message_callback.rb +23 -18
- data/lib/bandwidth-sdk/models/inbound_message_callback_message.rb +31 -18
- data/lib/bandwidth-sdk/models/initiate_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +13 -18
- data/lib/bandwidth-sdk/models/lookup_request.rb +15 -18
- data/lib/bandwidth-sdk/models/lookup_result.rb +13 -18
- data/lib/bandwidth-sdk/models/lookup_status.rb +13 -18
- data/lib/bandwidth-sdk/models/lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +13 -18
- data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_result.rb +13 -18
- data/lib/bandwidth-sdk/models/media.rb +13 -18
- data/lib/bandwidth-sdk/models/message.rb +21 -18
- data/lib/bandwidth-sdk/models/message_delivered_callback.rb +23 -18
- data/lib/bandwidth-sdk/models/message_delivered_callback_message.rb +33 -18
- data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_failed_callback.rb +25 -18
- data/lib/bandwidth-sdk/models/message_failed_callback_message.rb +35 -18
- data/lib/bandwidth-sdk/models/message_request.rb +24 -19
- data/lib/bandwidth-sdk/models/message_sending_callback.rb +23 -18
- data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +35 -18
- data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/messages_list.rb +13 -18
- data/lib/bandwidth-sdk/models/messaging_code_response.rb +13 -18
- data/lib/bandwidth-sdk/models/messaging_request_error.rb +17 -18
- data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +13 -18
- data/lib/bandwidth-sdk/models/mfa_request_error.rb +13 -18
- data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +13 -18
- data/lib/bandwidth-sdk/models/page_info.rb +13 -18
- data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_available_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/recording_complete_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/redirect_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/stir_shaken.rb +13 -18
- data/lib/bandwidth-sdk/models/tag.rb +13 -18
- data/lib/bandwidth-sdk/models/tn_lookup_request_error.rb +13 -18
- data/lib/bandwidth-sdk/models/transcribe_recording.rb +13 -18
- data/lib/bandwidth-sdk/models/transcription.rb +13 -18
- data/lib/bandwidth-sdk/models/transcription_available_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/transcription_list.rb +13 -18
- data/lib/bandwidth-sdk/models/transcription_metadata.rb +13 -18
- data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +13 -18
- data/lib/bandwidth-sdk/models/update_call.rb +13 -18
- data/lib/bandwidth-sdk/models/update_call_recording.rb +15 -18
- data/lib/bandwidth-sdk/models/update_conference.rb +13 -18
- data/lib/bandwidth-sdk/models/update_conference_member.rb +13 -18
- data/lib/bandwidth-sdk/models/verify_code_request.rb +19 -18
- data/lib/bandwidth-sdk/models/verify_code_response.rb +13 -18
- data/lib/bandwidth-sdk/models/voice_api_error.rb +13 -18
- data/lib/bandwidth-sdk/models/voice_code_response.rb +13 -18
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +1 -1
- data/openapitools.json +1 -1
- data/spec/api/calls_api_spec.rb +2 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +19 -7
- data/spec/integration/calls_api_integration_spec.rb +2 -0
- data/spec/models/call_state_spec.rb +0 -13
- data/spec/models/deferred_result_spec.rb +1 -14
- data/spec/models/message_spec.rb +10 -17
- data/spec/models/verify_code_request_spec.rb +7 -15
- metadata +36 -36
@@ -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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -126,40 +126,58 @@ module Bandwidth
|
|
126
126
|
|
127
127
|
if attributes.key?(:'id')
|
128
128
|
self.id = attributes[:'id']
|
129
|
+
else
|
130
|
+
self.id = nil
|
129
131
|
end
|
130
132
|
|
131
133
|
if attributes.key?(:'owner')
|
132
134
|
self.owner = attributes[:'owner']
|
135
|
+
else
|
136
|
+
self.owner = nil
|
133
137
|
end
|
134
138
|
|
135
139
|
if attributes.key?(:'application_id')
|
136
140
|
self.application_id = attributes[:'application_id']
|
141
|
+
else
|
142
|
+
self.application_id = nil
|
137
143
|
end
|
138
144
|
|
139
145
|
if attributes.key?(:'time')
|
140
146
|
self.time = attributes[:'time']
|
147
|
+
else
|
148
|
+
self.time = nil
|
141
149
|
end
|
142
150
|
|
143
151
|
if attributes.key?(:'segment_count')
|
144
152
|
self.segment_count = attributes[:'segment_count']
|
153
|
+
else
|
154
|
+
self.segment_count = nil
|
145
155
|
end
|
146
156
|
|
147
157
|
if attributes.key?(:'direction')
|
148
158
|
self.direction = attributes[:'direction']
|
159
|
+
else
|
160
|
+
self.direction = nil
|
149
161
|
end
|
150
162
|
|
151
163
|
if attributes.key?(:'to')
|
152
164
|
if (value = attributes[:'to']).is_a?(Array)
|
153
165
|
self.to = value
|
154
166
|
end
|
167
|
+
else
|
168
|
+
self.to = nil
|
155
169
|
end
|
156
170
|
|
157
171
|
if attributes.key?(:'from')
|
158
172
|
self.from = attributes[:'from']
|
173
|
+
else
|
174
|
+
self.from = nil
|
159
175
|
end
|
160
176
|
|
161
177
|
if attributes.key?(:'text')
|
162
178
|
self.text = attributes[:'text']
|
179
|
+
else
|
180
|
+
self.text = nil
|
163
181
|
end
|
164
182
|
|
165
183
|
if attributes.key?(:'tag')
|
@@ -180,6 +198,7 @@ module Bandwidth
|
|
180
198
|
# Show invalid properties with the reasons. Usually used together with valid?
|
181
199
|
# @return Array for valid properties with the reasons
|
182
200
|
def list_invalid_properties
|
201
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
183
202
|
invalid_properties = Array.new
|
184
203
|
if @id.nil?
|
185
204
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
@@ -223,6 +242,7 @@ module Bandwidth
|
|
223
242
|
# Check to see if the all the properties in the model are valid
|
224
243
|
# @return true if the model is valid
|
225
244
|
def valid?
|
245
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
226
246
|
return false if @id.nil?
|
227
247
|
return false if @owner.nil?
|
228
248
|
return false if @application_id.nil?
|
@@ -280,37 +300,30 @@ module Bandwidth
|
|
280
300
|
# @param [Hash] attributes Model attributes in the form of hash
|
281
301
|
# @return [Object] Returns the model itself
|
282
302
|
def self.build_from_hash(attributes)
|
283
|
-
new.build_from_hash(attributes)
|
284
|
-
end
|
285
|
-
|
286
|
-
# Builds the object from hash
|
287
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
288
|
-
# @return [Object] Returns the model itself
|
289
|
-
def build_from_hash(attributes)
|
290
303
|
return nil unless attributes.is_a?(Hash)
|
291
304
|
attributes = attributes.transform_keys(&:to_sym)
|
292
|
-
|
293
|
-
|
294
|
-
|
305
|
+
transformed_hash = {}
|
306
|
+
openapi_types.each_pair do |key, type|
|
307
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
308
|
+
transformed_hash["#{key}"] = nil
|
295
309
|
elsif type =~ /\AArray<(.*)>/i
|
296
310
|
# check to ensure the input is an array given that the attribute
|
297
311
|
# is documented as an array but the input is not
|
298
|
-
if attributes[
|
299
|
-
|
312
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
313
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
300
314
|
end
|
301
|
-
elsif !attributes[
|
302
|
-
|
315
|
+
elsif !attributes[attribute_map[key]].nil?
|
316
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
303
317
|
end
|
304
318
|
end
|
305
|
-
|
306
|
-
self
|
319
|
+
new(transformed_hash)
|
307
320
|
end
|
308
321
|
|
309
322
|
# Deserializes the data based on type
|
310
323
|
# @param string type Data type
|
311
324
|
# @param string value Value to be deserialized
|
312
325
|
# @return [Object] Deserialized data
|
313
|
-
def _deserialize(type, value)
|
326
|
+
def self._deserialize(type, value)
|
314
327
|
case type.to_sym
|
315
328
|
when :Time
|
316
329
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -185,6 +185,7 @@ module Bandwidth
|
|
185
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
186
186
|
# @return Array for valid properties with the reasons
|
187
187
|
def list_invalid_properties
|
188
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
188
189
|
invalid_properties = Array.new
|
189
190
|
invalid_properties
|
190
191
|
end
|
@@ -192,6 +193,7 @@ module Bandwidth
|
|
192
193
|
# Check to see if the all the properties in the model are valid
|
193
194
|
# @return true if the model is valid
|
194
195
|
def valid?
|
196
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
195
197
|
true
|
196
198
|
end
|
197
199
|
|
@@ -230,37 +232,30 @@ module Bandwidth
|
|
230
232
|
# @param [Hash] attributes Model attributes in the form of hash
|
231
233
|
# @return [Object] Returns the model itself
|
232
234
|
def self.build_from_hash(attributes)
|
233
|
-
new.build_from_hash(attributes)
|
234
|
-
end
|
235
|
-
|
236
|
-
# Builds the object from hash
|
237
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
238
|
-
# @return [Object] Returns the model itself
|
239
|
-
def build_from_hash(attributes)
|
240
235
|
return nil unless attributes.is_a?(Hash)
|
241
236
|
attributes = attributes.transform_keys(&:to_sym)
|
242
|
-
|
243
|
-
|
244
|
-
|
237
|
+
transformed_hash = {}
|
238
|
+
openapi_types.each_pair do |key, type|
|
239
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
240
|
+
transformed_hash["#{key}"] = nil
|
245
241
|
elsif type =~ /\AArray<(.*)>/i
|
246
242
|
# check to ensure the input is an array given that the attribute
|
247
243
|
# is documented as an array but the input is not
|
248
|
-
if attributes[
|
249
|
-
|
244
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
245
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
250
246
|
end
|
251
|
-
elsif !attributes[
|
252
|
-
|
247
|
+
elsif !attributes[attribute_map[key]].nil?
|
248
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
253
249
|
end
|
254
250
|
end
|
255
|
-
|
256
|
-
self
|
251
|
+
new(transformed_hash)
|
257
252
|
end
|
258
253
|
|
259
254
|
# Deserializes the data based on type
|
260
255
|
# @param string type Data type
|
261
256
|
# @param string value Value to be deserialized
|
262
257
|
# @return [Object] Deserialized data
|
263
|
-
def _deserialize(type, value)
|
258
|
+
def self._deserialize(type, value)
|
264
259
|
case type.to_sym
|
265
260
|
when :Time
|
266
261
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -235,6 +235,7 @@ module Bandwidth
|
|
235
235
|
# Show invalid properties with the reasons. Usually used together with valid?
|
236
236
|
# @return Array for valid properties with the reasons
|
237
237
|
def list_invalid_properties
|
238
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
238
239
|
invalid_properties = Array.new
|
239
240
|
invalid_properties
|
240
241
|
end
|
@@ -242,6 +243,7 @@ module Bandwidth
|
|
242
243
|
# Check to see if the all the properties in the model are valid
|
243
244
|
# @return true if the model is valid
|
244
245
|
def valid?
|
246
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
245
247
|
true
|
246
248
|
end
|
247
249
|
|
@@ -285,37 +287,30 @@ module Bandwidth
|
|
285
287
|
# @param [Hash] attributes Model attributes in the form of hash
|
286
288
|
# @return [Object] Returns the model itself
|
287
289
|
def self.build_from_hash(attributes)
|
288
|
-
new.build_from_hash(attributes)
|
289
|
-
end
|
290
|
-
|
291
|
-
# Builds the object from hash
|
292
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
293
|
-
# @return [Object] Returns the model itself
|
294
|
-
def build_from_hash(attributes)
|
295
290
|
return nil unless attributes.is_a?(Hash)
|
296
291
|
attributes = attributes.transform_keys(&:to_sym)
|
297
|
-
|
298
|
-
|
299
|
-
|
292
|
+
transformed_hash = {}
|
293
|
+
openapi_types.each_pair do |key, type|
|
294
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
295
|
+
transformed_hash["#{key}"] = nil
|
300
296
|
elsif type =~ /\AArray<(.*)>/i
|
301
297
|
# check to ensure the input is an array given that the attribute
|
302
298
|
# is documented as an array but the input is not
|
303
|
-
if attributes[
|
304
|
-
|
299
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
300
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
305
301
|
end
|
306
|
-
elsif !attributes[
|
307
|
-
|
302
|
+
elsif !attributes[attribute_map[key]].nil?
|
303
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
308
304
|
end
|
309
305
|
end
|
310
|
-
|
311
|
-
self
|
306
|
+
new(transformed_hash)
|
312
307
|
end
|
313
308
|
|
314
309
|
# Deserializes the data based on type
|
315
310
|
# @param string type Data type
|
316
311
|
# @param string value Value to be deserialized
|
317
312
|
# @return [Object] Deserialized data
|
318
|
-
def _deserialize(type, value)
|
313
|
+
def self._deserialize(type, value)
|
319
314
|
case type.to_sym
|
320
315
|
when :Time
|
321
316
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -62,12 +62,15 @@ module Bandwidth
|
|
62
62
|
if (value = attributes[:'tns']).is_a?(Array)
|
63
63
|
self.tns = value
|
64
64
|
end
|
65
|
+
else
|
66
|
+
self.tns = nil
|
65
67
|
end
|
66
68
|
end
|
67
69
|
|
68
70
|
# Show invalid properties with the reasons. Usually used together with valid?
|
69
71
|
# @return Array for valid properties with the reasons
|
70
72
|
def list_invalid_properties
|
73
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
71
74
|
invalid_properties = Array.new
|
72
75
|
if @tns.nil?
|
73
76
|
invalid_properties.push('invalid value for "tns", tns cannot be nil.')
|
@@ -79,6 +82,7 @@ module Bandwidth
|
|
79
82
|
# Check to see if the all the properties in the model are valid
|
80
83
|
# @return true if the model is valid
|
81
84
|
def valid?
|
85
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
82
86
|
return false if @tns.nil?
|
83
87
|
true
|
84
88
|
end
|
@@ -107,37 +111,30 @@ module Bandwidth
|
|
107
111
|
# @param [Hash] attributes Model attributes in the form of hash
|
108
112
|
# @return [Object] Returns the model itself
|
109
113
|
def self.build_from_hash(attributes)
|
110
|
-
new.build_from_hash(attributes)
|
111
|
-
end
|
112
|
-
|
113
|
-
# Builds the object from hash
|
114
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
-
# @return [Object] Returns the model itself
|
116
|
-
def build_from_hash(attributes)
|
117
114
|
return nil unless attributes.is_a?(Hash)
|
118
115
|
attributes = attributes.transform_keys(&:to_sym)
|
119
|
-
|
120
|
-
|
121
|
-
|
116
|
+
transformed_hash = {}
|
117
|
+
openapi_types.each_pair do |key, type|
|
118
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
119
|
+
transformed_hash["#{key}"] = nil
|
122
120
|
elsif type =~ /\AArray<(.*)>/i
|
123
121
|
# check to ensure the input is an array given that the attribute
|
124
122
|
# is documented as an array but the input is not
|
125
|
-
if attributes[
|
126
|
-
|
123
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
124
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
127
125
|
end
|
128
|
-
elsif !attributes[
|
129
|
-
|
126
|
+
elsif !attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
130
128
|
end
|
131
129
|
end
|
132
|
-
|
133
|
-
self
|
130
|
+
new(transformed_hash)
|
134
131
|
end
|
135
132
|
|
136
133
|
# Deserializes the data based on type
|
137
134
|
# @param string type Data type
|
138
135
|
# @param string value Value to be deserialized
|
139
136
|
# @return [Object] Deserialized data
|
140
|
-
def _deserialize(type, value)
|
137
|
+
def self._deserialize(type, value)
|
141
138
|
case type.to_sym
|
142
139
|
when :Time
|
143
140
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -139,6 +139,7 @@ module Bandwidth
|
|
139
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
140
140
|
# @return Array for valid properties with the reasons
|
141
141
|
def list_invalid_properties
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
142
143
|
invalid_properties = Array.new
|
143
144
|
invalid_properties
|
144
145
|
end
|
@@ -146,6 +147,7 @@ module Bandwidth
|
|
146
147
|
# Check to see if the all the properties in the model are valid
|
147
148
|
# @return true if the model is valid
|
148
149
|
def valid?
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
149
151
|
true
|
150
152
|
end
|
151
153
|
|
@@ -181,37 +183,30 @@ module Bandwidth
|
|
181
183
|
# @param [Hash] attributes Model attributes in the form of hash
|
182
184
|
# @return [Object] Returns the model itself
|
183
185
|
def self.build_from_hash(attributes)
|
184
|
-
new.build_from_hash(attributes)
|
185
|
-
end
|
186
|
-
|
187
|
-
# Builds the object from hash
|
188
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
-
# @return [Object] Returns the model itself
|
190
|
-
def build_from_hash(attributes)
|
191
186
|
return nil unless attributes.is_a?(Hash)
|
192
187
|
attributes = attributes.transform_keys(&:to_sym)
|
193
|
-
|
194
|
-
|
195
|
-
|
188
|
+
transformed_hash = {}
|
189
|
+
openapi_types.each_pair do |key, type|
|
190
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
191
|
+
transformed_hash["#{key}"] = nil
|
196
192
|
elsif type =~ /\AArray<(.*)>/i
|
197
193
|
# check to ensure the input is an array given that the attribute
|
198
194
|
# is documented as an array but the input is not
|
199
|
-
if attributes[
|
200
|
-
|
195
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
196
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
201
197
|
end
|
202
|
-
elsif !attributes[
|
203
|
-
|
198
|
+
elsif !attributes[attribute_map[key]].nil?
|
199
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
204
200
|
end
|
205
201
|
end
|
206
|
-
|
207
|
-
self
|
202
|
+
new(transformed_hash)
|
208
203
|
end
|
209
204
|
|
210
205
|
# Deserializes the data based on type
|
211
206
|
# @param string type Data type
|
212
207
|
# @param string value Value to be deserialized
|
213
208
|
# @return [Object] Deserialized data
|
214
|
-
def _deserialize(type, value)
|
209
|
+
def self._deserialize(type, value)
|
215
210
|
case type.to_sym
|
216
211
|
when :Time
|
217
212
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -119,6 +119,7 @@ module Bandwidth
|
|
119
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
120
|
# @return Array for valid properties with the reasons
|
121
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
123
|
invalid_properties = Array.new
|
123
124
|
invalid_properties
|
124
125
|
end
|
@@ -126,6 +127,7 @@ module Bandwidth
|
|
126
127
|
# Check to see if the all the properties in the model are valid
|
127
128
|
# @return true if the model is valid
|
128
129
|
def valid?
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
131
|
true
|
130
132
|
end
|
131
133
|
|
@@ -156,37 +158,30 @@ module Bandwidth
|
|
156
158
|
# @param [Hash] attributes Model attributes in the form of hash
|
157
159
|
# @return [Object] Returns the model itself
|
158
160
|
def self.build_from_hash(attributes)
|
159
|
-
new.build_from_hash(attributes)
|
160
|
-
end
|
161
|
-
|
162
|
-
# Builds the object from hash
|
163
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
164
|
-
# @return [Object] Returns the model itself
|
165
|
-
def build_from_hash(attributes)
|
166
161
|
return nil unless attributes.is_a?(Hash)
|
167
162
|
attributes = attributes.transform_keys(&:to_sym)
|
168
|
-
|
169
|
-
|
170
|
-
|
163
|
+
transformed_hash = {}
|
164
|
+
openapi_types.each_pair do |key, type|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
166
|
+
transformed_hash["#{key}"] = nil
|
171
167
|
elsif type =~ /\AArray<(.*)>/i
|
172
168
|
# check to ensure the input is an array given that the attribute
|
173
169
|
# is documented as an array but the input is not
|
174
|
-
if attributes[
|
175
|
-
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
176
172
|
end
|
177
|
-
elsif !attributes[
|
178
|
-
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
179
175
|
end
|
180
176
|
end
|
181
|
-
|
182
|
-
self
|
177
|
+
new(transformed_hash)
|
183
178
|
end
|
184
179
|
|
185
180
|
# Deserializes the data based on type
|
186
181
|
# @param string type Data type
|
187
182
|
# @param string value Value to be deserialized
|
188
183
|
# @return [Object] Deserialized data
|
189
|
-
def _deserialize(type, value)
|
184
|
+
def self._deserialize(type, value)
|
190
185
|
case type.to_sym
|
191
186
|
when :Time
|
192
187
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -208,6 +208,7 @@ module Bandwidth
|
|
208
208
|
# Show invalid properties with the reasons. Usually used together with valid?
|
209
209
|
# @return Array for valid properties with the reasons
|
210
210
|
def list_invalid_properties
|
211
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
211
212
|
invalid_properties = Array.new
|
212
213
|
invalid_properties
|
213
214
|
end
|
@@ -215,6 +216,7 @@ module Bandwidth
|
|
215
216
|
# Check to see if the all the properties in the model are valid
|
216
217
|
# @return true if the model is valid
|
217
218
|
def valid?
|
219
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
218
220
|
true
|
219
221
|
end
|
220
222
|
|
@@ -255,37 +257,30 @@ module Bandwidth
|
|
255
257
|
# @param [Hash] attributes Model attributes in the form of hash
|
256
258
|
# @return [Object] Returns the model itself
|
257
259
|
def self.build_from_hash(attributes)
|
258
|
-
new.build_from_hash(attributes)
|
259
|
-
end
|
260
|
-
|
261
|
-
# Builds the object from hash
|
262
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
263
|
-
# @return [Object] Returns the model itself
|
264
|
-
def build_from_hash(attributes)
|
265
260
|
return nil unless attributes.is_a?(Hash)
|
266
261
|
attributes = attributes.transform_keys(&:to_sym)
|
267
|
-
|
268
|
-
|
269
|
-
|
262
|
+
transformed_hash = {}
|
263
|
+
openapi_types.each_pair do |key, type|
|
264
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
265
|
+
transformed_hash["#{key}"] = nil
|
270
266
|
elsif type =~ /\AArray<(.*)>/i
|
271
267
|
# check to ensure the input is an array given that the attribute
|
272
268
|
# is documented as an array but the input is not
|
273
|
-
if attributes[
|
274
|
-
|
269
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
270
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
275
271
|
end
|
276
|
-
elsif !attributes[
|
277
|
-
|
272
|
+
elsif !attributes[attribute_map[key]].nil?
|
273
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
278
274
|
end
|
279
275
|
end
|
280
|
-
|
281
|
-
self
|
276
|
+
new(transformed_hash)
|
282
277
|
end
|
283
278
|
|
284
279
|
# Deserializes the data based on type
|
285
280
|
# @param string type Data type
|
286
281
|
# @param string value Value to be deserialized
|
287
282
|
# @return [Object] Deserialized data
|
288
|
-
def _deserialize(type, value)
|
283
|
+
def self._deserialize(type, value)
|
289
284
|
case type.to_sym
|
290
285
|
when :Time
|
291
286
|
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:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -242,6 +242,7 @@ module Bandwidth
|
|
242
242
|
# Show invalid properties with the reasons. Usually used together with valid?
|
243
243
|
# @return Array for valid properties with the reasons
|
244
244
|
def list_invalid_properties
|
245
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
245
246
|
invalid_properties = Array.new
|
246
247
|
if !@callback_url.nil? && @callback_url.to_s.length > 2048
|
247
248
|
invalid_properties.push('invalid value for "callback_url", the character length must be smaller than or equal to 2048.')
|
@@ -273,6 +274,7 @@ module Bandwidth
|
|
273
274
|
# Check to see if the all the properties in the model are valid
|
274
275
|
# @return true if the model is valid
|
275
276
|
def valid?
|
277
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
276
278
|
return false if !@callback_url.nil? && @callback_url.to_s.length > 2048
|
277
279
|
return false if !@username.nil? && @username.to_s.length > 1024
|
278
280
|
return false if !@password.nil? && @password.to_s.length > 1024
|
@@ -380,37 +382,30 @@ module Bandwidth
|
|
380
382
|
# @param [Hash] attributes Model attributes in the form of hash
|
381
383
|
# @return [Object] Returns the model itself
|
382
384
|
def self.build_from_hash(attributes)
|
383
|
-
new.build_from_hash(attributes)
|
384
|
-
end
|
385
|
-
|
386
|
-
# Builds the object from hash
|
387
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
388
|
-
# @return [Object] Returns the model itself
|
389
|
-
def build_from_hash(attributes)
|
390
385
|
return nil unless attributes.is_a?(Hash)
|
391
386
|
attributes = attributes.transform_keys(&:to_sym)
|
392
|
-
|
393
|
-
|
394
|
-
|
387
|
+
transformed_hash = {}
|
388
|
+
openapi_types.each_pair do |key, type|
|
389
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
390
|
+
transformed_hash["#{key}"] = nil
|
395
391
|
elsif type =~ /\AArray<(.*)>/i
|
396
392
|
# check to ensure the input is an array given that the attribute
|
397
393
|
# is documented as an array but the input is not
|
398
|
-
if attributes[
|
399
|
-
|
394
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
395
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
400
396
|
end
|
401
|
-
elsif !attributes[
|
402
|
-
|
397
|
+
elsif !attributes[attribute_map[key]].nil?
|
398
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
403
399
|
end
|
404
400
|
end
|
405
|
-
|
406
|
-
self
|
401
|
+
new(transformed_hash)
|
407
402
|
end
|
408
403
|
|
409
404
|
# Deserializes the data based on type
|
410
405
|
# @param string type Data type
|
411
406
|
# @param string value Value to be deserialized
|
412
407
|
# @return [Object] Deserialized data
|
413
|
-
def _deserialize(type, value)
|
408
|
+
def self._deserialize(type, value)
|
414
409
|
case type.to_sym
|
415
410
|
when :Time
|
416
411
|
Time.parse(value)
|