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
|
|
@@ -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-SNAPSHOT
|
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-SNAPSHOT
|
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-SNAPSHOT
|
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-SNAPSHOT
|
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-SNAPSHOT
|
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-SNAPSHOT
|
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)
|
@@ -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
|
|
@@ -76,6 +76,7 @@ module Bandwidth
|
|
76
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
77
|
# @return Array for valid properties with the reasons
|
78
78
|
def list_invalid_properties
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
80
|
invalid_properties = Array.new
|
80
81
|
invalid_properties
|
81
82
|
end
|
@@ -83,6 +84,7 @@ module Bandwidth
|
|
83
84
|
# Check to see if the all the properties in the model are valid
|
84
85
|
# @return true if the model is valid
|
85
86
|
def valid?
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
86
88
|
true
|
87
89
|
end
|
88
90
|
|
@@ -111,37 +113,30 @@ module Bandwidth
|
|
111
113
|
# @param [Hash] attributes Model attributes in the form of hash
|
112
114
|
# @return [Object] Returns the model itself
|
113
115
|
def self.build_from_hash(attributes)
|
114
|
-
new.build_from_hash(attributes)
|
115
|
-
end
|
116
|
-
|
117
|
-
# Builds the object from hash
|
118
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
-
# @return [Object] Returns the model itself
|
120
|
-
def build_from_hash(attributes)
|
121
116
|
return nil unless attributes.is_a?(Hash)
|
122
117
|
attributes = attributes.transform_keys(&:to_sym)
|
123
|
-
|
124
|
-
|
125
|
-
|
118
|
+
transformed_hash = {}
|
119
|
+
openapi_types.each_pair do |key, type|
|
120
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
121
|
+
transformed_hash["#{key}"] = nil
|
126
122
|
elsif type =~ /\AArray<(.*)>/i
|
127
123
|
# check to ensure the input is an array given that the attribute
|
128
124
|
# is documented as an array but the input is not
|
129
|
-
if attributes[
|
130
|
-
|
125
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
126
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
131
127
|
end
|
132
|
-
elsif !attributes[
|
133
|
-
|
128
|
+
elsif !attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
134
130
|
end
|
135
131
|
end
|
136
|
-
|
137
|
-
self
|
132
|
+
new(transformed_hash)
|
138
133
|
end
|
139
134
|
|
140
135
|
# Deserializes the data based on type
|
141
136
|
# @param string type Data type
|
142
137
|
# @param string value Value to be deserialized
|
143
138
|
# @return [Object] Deserialized data
|
144
|
-
def _deserialize(type, value)
|
139
|
+
def self._deserialize(type, value)
|
145
140
|
case type.to_sym
|
146
141
|
when :Time
|
147
142
|
Time.parse(value)
|