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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bandwidth-sdk.gemspec +1 -1
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +262 -295
- data/coverage/index.html +2527 -2890
- 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 +21 -18
- 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/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +19 -7
- 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 +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:
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -264,6 +264,7 @@ module Bandwidth
|
|
264
264
|
# Show invalid properties with the reasons. Usually used together with valid?
|
265
265
|
# @return Array for valid properties with the reasons
|
266
266
|
def list_invalid_properties
|
267
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
267
268
|
invalid_properties = Array.new
|
268
269
|
invalid_properties
|
269
270
|
end
|
@@ -271,6 +272,7 @@ module Bandwidth
|
|
271
272
|
# Check to see if the all the properties in the model are valid
|
272
273
|
# @return true if the model is valid
|
273
274
|
def valid?
|
275
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
274
276
|
true
|
275
277
|
end
|
276
278
|
|
@@ -317,37 +319,30 @@ module Bandwidth
|
|
317
319
|
# @param [Hash] attributes Model attributes in the form of hash
|
318
320
|
# @return [Object] Returns the model itself
|
319
321
|
def self.build_from_hash(attributes)
|
320
|
-
new.build_from_hash(attributes)
|
321
|
-
end
|
322
|
-
|
323
|
-
# Builds the object from hash
|
324
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
325
|
-
# @return [Object] Returns the model itself
|
326
|
-
def build_from_hash(attributes)
|
327
322
|
return nil unless attributes.is_a?(Hash)
|
328
323
|
attributes = attributes.transform_keys(&:to_sym)
|
329
|
-
|
330
|
-
|
331
|
-
|
324
|
+
transformed_hash = {}
|
325
|
+
openapi_types.each_pair do |key, type|
|
326
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
327
|
+
transformed_hash["#{key}"] = nil
|
332
328
|
elsif type =~ /\AArray<(.*)>/i
|
333
329
|
# check to ensure the input is an array given that the attribute
|
334
330
|
# is documented as an array but the input is not
|
335
|
-
if attributes[
|
336
|
-
|
331
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
332
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
337
333
|
end
|
338
|
-
elsif !attributes[
|
339
|
-
|
334
|
+
elsif !attributes[attribute_map[key]].nil?
|
335
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
340
336
|
end
|
341
337
|
end
|
342
|
-
|
343
|
-
self
|
338
|
+
new(transformed_hash)
|
344
339
|
end
|
345
340
|
|
346
341
|
# Deserializes the data based on type
|
347
342
|
# @param string type Data type
|
348
343
|
# @param string value Value to be deserialized
|
349
344
|
# @return [Object] Deserialized data
|
350
|
-
def _deserialize(type, value)
|
345
|
+
def self._deserialize(type, value)
|
351
346
|
case type.to_sym
|
352
347
|
when :Time
|
353
348
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -182,6 +182,7 @@ module Bandwidth
|
|
182
182
|
# Show invalid properties with the reasons. Usually used together with valid?
|
183
183
|
# @return Array for valid properties with the reasons
|
184
184
|
def list_invalid_properties
|
185
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
185
186
|
invalid_properties = Array.new
|
186
187
|
if !@username.nil? && @username.to_s.length > 1024
|
187
188
|
invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 1024.')
|
@@ -209,6 +210,7 @@ module Bandwidth
|
|
209
210
|
# Check to see if the all the properties in the model are valid
|
210
211
|
# @return true if the model is valid
|
211
212
|
def valid?
|
213
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
212
214
|
return false if !@username.nil? && @username.to_s.length > 1024
|
213
215
|
return false if !@password.nil? && @password.to_s.length > 1024
|
214
216
|
return false if !@fallback_username.nil? && @fallback_username.to_s.length > 1024
|
@@ -300,37 +302,30 @@ module Bandwidth
|
|
300
302
|
# @param [Hash] attributes Model attributes in the form of hash
|
301
303
|
# @return [Object] Returns the model itself
|
302
304
|
def self.build_from_hash(attributes)
|
303
|
-
new.build_from_hash(attributes)
|
304
|
-
end
|
305
|
-
|
306
|
-
# Builds the object from hash
|
307
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
308
|
-
# @return [Object] Returns the model itself
|
309
|
-
def build_from_hash(attributes)
|
310
305
|
return nil unless attributes.is_a?(Hash)
|
311
306
|
attributes = attributes.transform_keys(&:to_sym)
|
312
|
-
|
313
|
-
|
314
|
-
|
307
|
+
transformed_hash = {}
|
308
|
+
openapi_types.each_pair do |key, type|
|
309
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
310
|
+
transformed_hash["#{key}"] = nil
|
315
311
|
elsif type =~ /\AArray<(.*)>/i
|
316
312
|
# check to ensure the input is an array given that the attribute
|
317
313
|
# is documented as an array but the input is not
|
318
|
-
if attributes[
|
319
|
-
|
314
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
315
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
320
316
|
end
|
321
|
-
elsif !attributes[
|
322
|
-
|
317
|
+
elsif !attributes[attribute_map[key]].nil?
|
318
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
323
319
|
end
|
324
320
|
end
|
325
|
-
|
326
|
-
self
|
321
|
+
new(transformed_hash)
|
327
322
|
end
|
328
323
|
|
329
324
|
# Deserializes the data based on type
|
330
325
|
# @param string type Data type
|
331
326
|
# @param string value Value to be deserialized
|
332
327
|
# @return [Object] Deserialized data
|
333
|
-
def _deserialize(type, value)
|
328
|
+
def self._deserialize(type, value)
|
334
329
|
case type.to_sym
|
335
330
|
when :Time
|
336
331
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -81,12 +81,15 @@ module Bandwidth
|
|
81
81
|
|
82
82
|
if attributes.key?(:'state')
|
83
83
|
self.state = attributes[:'state']
|
84
|
+
else
|
85
|
+
self.state = nil
|
84
86
|
end
|
85
87
|
end
|
86
88
|
|
87
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
90
|
# @return Array for valid properties with the reasons
|
89
91
|
def list_invalid_properties
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
93
|
invalid_properties = Array.new
|
91
94
|
if @state.nil?
|
92
95
|
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
@@ -98,6 +101,7 @@ module Bandwidth
|
|
98
101
|
# Check to see if the all the properties in the model are valid
|
99
102
|
# @return true if the model is valid
|
100
103
|
def valid?
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
105
|
return false if @state.nil?
|
102
106
|
true
|
103
107
|
end
|
@@ -126,37 +130,30 @@ module Bandwidth
|
|
126
130
|
# @param [Hash] attributes Model attributes in the form of hash
|
127
131
|
# @return [Object] Returns the model itself
|
128
132
|
def self.build_from_hash(attributes)
|
129
|
-
new.build_from_hash(attributes)
|
130
|
-
end
|
131
|
-
|
132
|
-
# Builds the object from hash
|
133
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
-
# @return [Object] Returns the model itself
|
135
|
-
def build_from_hash(attributes)
|
136
133
|
return nil unless attributes.is_a?(Hash)
|
137
134
|
attributes = attributes.transform_keys(&:to_sym)
|
138
|
-
|
139
|
-
|
140
|
-
|
135
|
+
transformed_hash = {}
|
136
|
+
openapi_types.each_pair do |key, type|
|
137
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
138
|
+
transformed_hash["#{key}"] = nil
|
141
139
|
elsif type =~ /\AArray<(.*)>/i
|
142
140
|
# check to ensure the input is an array given that the attribute
|
143
141
|
# is documented as an array but the input is not
|
144
|
-
if attributes[
|
145
|
-
|
142
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
143
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
146
144
|
end
|
147
|
-
elsif !attributes[
|
148
|
-
|
145
|
+
elsif !attributes[attribute_map[key]].nil?
|
146
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
149
147
|
end
|
150
148
|
end
|
151
|
-
|
152
|
-
self
|
149
|
+
new(transformed_hash)
|
153
150
|
end
|
154
151
|
|
155
152
|
# Deserializes the data based on type
|
156
153
|
# @param string type Data type
|
157
154
|
# @param string value Value to be deserialized
|
158
155
|
# @return [Object] Deserialized data
|
159
|
-
def _deserialize(type, value)
|
156
|
+
def self._deserialize(type, value)
|
160
157
|
case type.to_sym
|
161
158
|
when :Time
|
162
159
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -172,6 +172,7 @@ module Bandwidth
|
|
172
172
|
# Show invalid properties with the reasons. Usually used together with valid?
|
173
173
|
# @return Array for valid properties with the reasons
|
174
174
|
def list_invalid_properties
|
175
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
175
176
|
invalid_properties = Array.new
|
176
177
|
if !@username.nil? && @username.to_s.length > 1024
|
177
178
|
invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 1024.')
|
@@ -195,6 +196,7 @@ module Bandwidth
|
|
195
196
|
# Check to see if the all the properties in the model are valid
|
196
197
|
# @return true if the model is valid
|
197
198
|
def valid?
|
199
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
198
200
|
return false if !@username.nil? && @username.to_s.length > 1024
|
199
201
|
return false if !@password.nil? && @password.to_s.length > 1024
|
200
202
|
return false if !@fallback_username.nil? && @fallback_username.to_s.length > 1024
|
@@ -274,37 +276,30 @@ module Bandwidth
|
|
274
276
|
# @param [Hash] attributes Model attributes in the form of hash
|
275
277
|
# @return [Object] Returns the model itself
|
276
278
|
def self.build_from_hash(attributes)
|
277
|
-
new.build_from_hash(attributes)
|
278
|
-
end
|
279
|
-
|
280
|
-
# Builds the object from hash
|
281
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
282
|
-
# @return [Object] Returns the model itself
|
283
|
-
def build_from_hash(attributes)
|
284
279
|
return nil unless attributes.is_a?(Hash)
|
285
280
|
attributes = attributes.transform_keys(&:to_sym)
|
286
|
-
|
287
|
-
|
288
|
-
|
281
|
+
transformed_hash = {}
|
282
|
+
openapi_types.each_pair do |key, type|
|
283
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
284
|
+
transformed_hash["#{key}"] = nil
|
289
285
|
elsif type =~ /\AArray<(.*)>/i
|
290
286
|
# check to ensure the input is an array given that the attribute
|
291
287
|
# is documented as an array but the input is not
|
292
|
-
if attributes[
|
293
|
-
|
288
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
289
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
294
290
|
end
|
295
|
-
elsif !attributes[
|
296
|
-
|
291
|
+
elsif !attributes[attribute_map[key]].nil?
|
292
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
297
293
|
end
|
298
294
|
end
|
299
|
-
|
300
|
-
self
|
295
|
+
new(transformed_hash)
|
301
296
|
end
|
302
297
|
|
303
298
|
# Deserializes the data based on type
|
304
299
|
# @param string type Data type
|
305
300
|
# @param string value Value to be deserialized
|
306
301
|
# @return [Object] Deserialized data
|
307
|
-
def _deserialize(type, value)
|
302
|
+
def self._deserialize(type, value)
|
308
303
|
case type.to_sym
|
309
304
|
when :Time
|
310
305
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -87,6 +87,7 @@ module Bandwidth
|
|
87
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
88
|
# @return Array for valid properties with the reasons
|
89
89
|
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
91
|
invalid_properties = Array.new
|
91
92
|
invalid_properties
|
92
93
|
end
|
@@ -94,6 +95,7 @@ module Bandwidth
|
|
94
95
|
# Check to see if the all the properties in the model are valid
|
95
96
|
# @return true if the model is valid
|
96
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
97
99
|
true
|
98
100
|
end
|
99
101
|
|
@@ -123,37 +125,30 @@ module Bandwidth
|
|
123
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
124
126
|
# @return [Object] Returns the model itself
|
125
127
|
def self.build_from_hash(attributes)
|
126
|
-
new.build_from_hash(attributes)
|
127
|
-
end
|
128
|
-
|
129
|
-
# Builds the object from hash
|
130
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
-
# @return [Object] Returns the model itself
|
132
|
-
def build_from_hash(attributes)
|
133
128
|
return nil unless attributes.is_a?(Hash)
|
134
129
|
attributes = attributes.transform_keys(&:to_sym)
|
135
|
-
|
136
|
-
|
137
|
-
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
138
134
|
elsif type =~ /\AArray<(.*)>/i
|
139
135
|
# check to ensure the input is an array given that the attribute
|
140
136
|
# is documented as an array but the input is not
|
141
|
-
if attributes[
|
142
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
143
139
|
end
|
144
|
-
elsif !attributes[
|
145
|
-
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
146
142
|
end
|
147
143
|
end
|
148
|
-
|
149
|
-
self
|
144
|
+
new(transformed_hash)
|
150
145
|
end
|
151
146
|
|
152
147
|
# Deserializes the data based on type
|
153
148
|
# @param string type Data type
|
154
149
|
# @param string value Value to be deserialized
|
155
150
|
# @return [Object] Deserialized data
|
156
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
157
152
|
case type.to_sym
|
158
153
|
when :Time
|
159
154
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -75,6 +75,8 @@ module Bandwidth
|
|
75
75
|
|
76
76
|
if attributes.key?(:'to')
|
77
77
|
self.to = attributes[:'to']
|
78
|
+
else
|
79
|
+
self.to = nil
|
78
80
|
end
|
79
81
|
|
80
82
|
if attributes.key?(:'scope')
|
@@ -83,16 +85,21 @@ module Bandwidth
|
|
83
85
|
|
84
86
|
if attributes.key?(:'expiration_time_in_minutes')
|
85
87
|
self.expiration_time_in_minutes = attributes[:'expiration_time_in_minutes']
|
88
|
+
else
|
89
|
+
self.expiration_time_in_minutes = nil
|
86
90
|
end
|
87
91
|
|
88
92
|
if attributes.key?(:'code')
|
89
93
|
self.code = attributes[:'code']
|
94
|
+
else
|
95
|
+
self.code = nil
|
90
96
|
end
|
91
97
|
end
|
92
98
|
|
93
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
94
100
|
# @return Array for valid properties with the reasons
|
95
101
|
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
96
103
|
invalid_properties = Array.new
|
97
104
|
if @to.nil?
|
98
105
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
@@ -133,6 +140,7 @@ module Bandwidth
|
|
133
140
|
# Check to see if the all the properties in the model are valid
|
134
141
|
# @return true if the model is valid
|
135
142
|
def valid?
|
143
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
136
144
|
return false if @to.nil?
|
137
145
|
return false if @to !~ Regexp.new(/^\+[1-9]\d{1,14}$/)
|
138
146
|
return false if @expiration_time_in_minutes.nil?
|
@@ -222,37 +230,30 @@ module Bandwidth
|
|
222
230
|
# @param [Hash] attributes Model attributes in the form of hash
|
223
231
|
# @return [Object] Returns the model itself
|
224
232
|
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
233
|
return nil unless attributes.is_a?(Hash)
|
233
234
|
attributes = attributes.transform_keys(&:to_sym)
|
234
|
-
|
235
|
-
|
236
|
-
|
235
|
+
transformed_hash = {}
|
236
|
+
openapi_types.each_pair do |key, type|
|
237
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
238
|
+
transformed_hash["#{key}"] = nil
|
237
239
|
elsif type =~ /\AArray<(.*)>/i
|
238
240
|
# check to ensure the input is an array given that the attribute
|
239
241
|
# is documented as an array but the input is not
|
240
|
-
if attributes[
|
241
|
-
|
242
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
243
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
242
244
|
end
|
243
|
-
elsif !attributes[
|
244
|
-
|
245
|
+
elsif !attributes[attribute_map[key]].nil?
|
246
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
245
247
|
end
|
246
248
|
end
|
247
|
-
|
248
|
-
self
|
249
|
+
new(transformed_hash)
|
249
250
|
end
|
250
251
|
|
251
252
|
# Deserializes the data based on type
|
252
253
|
# @param string type Data type
|
253
254
|
# @param string value Value to be deserialized
|
254
255
|
# @return [Object] Deserialized data
|
255
|
-
def _deserialize(type, value)
|
256
|
+
def self._deserialize(type, value)
|
256
257
|
case type.to_sym
|
257
258
|
when :Time
|
258
259
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -66,6 +66,7 @@ module Bandwidth
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
70
|
invalid_properties = Array.new
|
70
71
|
invalid_properties
|
71
72
|
end
|
@@ -73,6 +74,7 @@ module Bandwidth
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
74
75
|
# @return true if the model is valid
|
75
76
|
def valid?
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
76
78
|
true
|
77
79
|
end
|
78
80
|
|
@@ -100,37 +102,30 @@ module Bandwidth
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
103
|
# @return [Object] Returns the model itself
|
102
104
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
111
106
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
107
|
+
transformed_hash = {}
|
108
|
+
openapi_types.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash["#{key}"] = nil
|
115
111
|
elsif type =~ /\AArray<(.*)>/i
|
116
112
|
# check to ensure the input is an array given that the attribute
|
117
113
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
116
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
119
|
end
|
124
120
|
end
|
125
|
-
|
126
|
-
self
|
121
|
+
new(transformed_hash)
|
127
122
|
end
|
128
123
|
|
129
124
|
# Deserializes the data based on type
|
130
125
|
# @param string type Data type
|
131
126
|
# @param string value Value to be deserialized
|
132
127
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
128
|
+
def self._deserialize(type, value)
|
134
129
|
case type.to_sym
|
135
130
|
when :Time
|
136
131
|
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-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -82,6 +82,7 @@ module Bandwidth
|
|
82
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
83
|
# @return Array for valid properties with the reasons
|
84
84
|
def list_invalid_properties
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
86
|
invalid_properties = Array.new
|
86
87
|
invalid_properties
|
87
88
|
end
|
@@ -89,6 +90,7 @@ module Bandwidth
|
|
89
90
|
# Check to see if the all the properties in the model are valid
|
90
91
|
# @return true if the model is valid
|
91
92
|
def valid?
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
92
94
|
true
|
93
95
|
end
|
94
96
|
|
@@ -118,37 +120,30 @@ module Bandwidth
|
|
118
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
119
121
|
# @return [Object] Returns the model itself
|
120
122
|
def self.build_from_hash(attributes)
|
121
|
-
new.build_from_hash(attributes)
|
122
|
-
end
|
123
|
-
|
124
|
-
# Builds the object from hash
|
125
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
-
# @return [Object] Returns the model itself
|
127
|
-
def build_from_hash(attributes)
|
128
123
|
return nil unless attributes.is_a?(Hash)
|
129
124
|
attributes = attributes.transform_keys(&:to_sym)
|
130
|
-
|
131
|
-
|
132
|
-
|
125
|
+
transformed_hash = {}
|
126
|
+
openapi_types.each_pair do |key, type|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = nil
|
133
129
|
elsif type =~ /\AArray<(.*)>/i
|
134
130
|
# check to ensure the input is an array given that the attribute
|
135
131
|
# is documented as an array but the input is not
|
136
|
-
if attributes[
|
137
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
138
134
|
end
|
139
|
-
elsif !attributes[
|
140
|
-
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
141
137
|
end
|
142
138
|
end
|
143
|
-
|
144
|
-
self
|
139
|
+
new(transformed_hash)
|
145
140
|
end
|
146
141
|
|
147
142
|
# Deserializes the data based on type
|
148
143
|
# @param string type Data type
|
149
144
|
# @param string value Value to be deserialized
|
150
145
|
# @return [Object] Deserialized data
|
151
|
-
def _deserialize(type, value)
|
146
|
+
def self._deserialize(type, value)
|
152
147
|
case type.to_sym
|
153
148
|
when :Time
|
154
149
|
Time.parse(value)
|