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
|
|
@@ -84,6 +84,7 @@ module Bandwidth
|
|
84
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
85
|
# @return Array for valid properties with the reasons
|
86
86
|
def list_invalid_properties
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
88
|
invalid_properties = Array.new
|
88
89
|
invalid_properties
|
89
90
|
end
|
@@ -91,6 +92,7 @@ module Bandwidth
|
|
91
92
|
# Check to see if the all the properties in the model are valid
|
92
93
|
# @return true if the model is valid
|
93
94
|
def valid?
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
94
96
|
true
|
95
97
|
end
|
96
98
|
|
@@ -120,37 +122,30 @@ module Bandwidth
|
|
120
122
|
# @param [Hash] attributes Model attributes in the form of hash
|
121
123
|
# @return [Object] Returns the model itself
|
122
124
|
def self.build_from_hash(attributes)
|
123
|
-
new.build_from_hash(attributes)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Builds the object from hash
|
127
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
-
# @return [Object] Returns the model itself
|
129
|
-
def build_from_hash(attributes)
|
130
125
|
return nil unless attributes.is_a?(Hash)
|
131
126
|
attributes = attributes.transform_keys(&:to_sym)
|
132
|
-
|
133
|
-
|
134
|
-
|
127
|
+
transformed_hash = {}
|
128
|
+
openapi_types.each_pair do |key, type|
|
129
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
130
|
+
transformed_hash["#{key}"] = nil
|
135
131
|
elsif type =~ /\AArray<(.*)>/i
|
136
132
|
# check to ensure the input is an array given that the attribute
|
137
133
|
# is documented as an array but the input is not
|
138
|
-
if attributes[
|
139
|
-
|
134
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
135
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
140
136
|
end
|
141
|
-
elsif !attributes[
|
142
|
-
|
137
|
+
elsif !attributes[attribute_map[key]].nil?
|
138
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
143
139
|
end
|
144
140
|
end
|
145
|
-
|
146
|
-
self
|
141
|
+
new(transformed_hash)
|
147
142
|
end
|
148
143
|
|
149
144
|
# Deserializes the data based on type
|
150
145
|
# @param string type Data type
|
151
146
|
# @param string value Value to be deserialized
|
152
147
|
# @return [Object] Deserialized data
|
153
|
-
def _deserialize(type, value)
|
148
|
+
def self._deserialize(type, value)
|
154
149
|
case type.to_sym
|
155
150
|
when :Time
|
156
151
|
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
|
|
@@ -73,6 +73,7 @@ module Bandwidth
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
74
|
# @return Array for valid properties with the reasons
|
75
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
77
|
invalid_properties = Array.new
|
77
78
|
invalid_properties
|
78
79
|
end
|
@@ -80,6 +81,7 @@ module Bandwidth
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
81
82
|
# @return true if the model is valid
|
82
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
85
|
true
|
84
86
|
end
|
85
87
|
|
@@ -108,37 +110,30 @@ module Bandwidth
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
111
|
# @return [Object] Returns the model itself
|
110
112
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
119
114
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
123
119
|
elsif type =~ /\AArray<(.*)>/i
|
124
120
|
# check to ensure the input is an array given that the attribute
|
125
121
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
124
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
127
|
end
|
132
128
|
end
|
133
|
-
|
134
|
-
self
|
129
|
+
new(transformed_hash)
|
135
130
|
end
|
136
131
|
|
137
132
|
# Deserializes the data based on type
|
138
133
|
# @param string type Data type
|
139
134
|
# @param string value Value to be deserialized
|
140
135
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
142
137
|
case type.to_sym
|
143
138
|
when :Time
|
144
139
|
Time.parse(value)
|
@@ -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
|
|
@@ -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
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -153,6 +153,7 @@ module Bandwidth
|
|
153
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
154
154
|
# @return Array for valid properties with the reasons
|
155
155
|
def list_invalid_properties
|
156
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
156
157
|
invalid_properties = Array.new
|
157
158
|
if !@username.nil? && @username.to_s.length > 1024
|
158
159
|
invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 1024.')
|
@@ -176,6 +177,7 @@ module Bandwidth
|
|
176
177
|
# Check to see if the all the properties in the model are valid
|
177
178
|
# @return true if the model is valid
|
178
179
|
def valid?
|
180
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
179
181
|
return false if !@username.nil? && @username.to_s.length > 1024
|
180
182
|
return false if !@password.nil? && @password.to_s.length > 1024
|
181
183
|
return false if !@callback_timeout.nil? && @callback_timeout > 25
|
@@ -247,37 +249,30 @@ module Bandwidth
|
|
247
249
|
# @param [Hash] attributes Model attributes in the form of hash
|
248
250
|
# @return [Object] Returns the model itself
|
249
251
|
def self.build_from_hash(attributes)
|
250
|
-
new.build_from_hash(attributes)
|
251
|
-
end
|
252
|
-
|
253
|
-
# Builds the object from hash
|
254
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
255
|
-
# @return [Object] Returns the model itself
|
256
|
-
def build_from_hash(attributes)
|
257
252
|
return nil unless attributes.is_a?(Hash)
|
258
253
|
attributes = attributes.transform_keys(&:to_sym)
|
259
|
-
|
260
|
-
|
261
|
-
|
254
|
+
transformed_hash = {}
|
255
|
+
openapi_types.each_pair do |key, type|
|
256
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
257
|
+
transformed_hash["#{key}"] = nil
|
262
258
|
elsif type =~ /\AArray<(.*)>/i
|
263
259
|
# check to ensure the input is an array given that the attribute
|
264
260
|
# is documented as an array but the input is not
|
265
|
-
if attributes[
|
266
|
-
|
261
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
262
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
267
263
|
end
|
268
|
-
elsif !attributes[
|
269
|
-
|
264
|
+
elsif !attributes[attribute_map[key]].nil?
|
265
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
270
266
|
end
|
271
267
|
end
|
272
|
-
|
273
|
-
self
|
268
|
+
new(transformed_hash)
|
274
269
|
end
|
275
270
|
|
276
271
|
# Deserializes the data based on type
|
277
272
|
# @param string type Data type
|
278
273
|
# @param string value Value to be deserialized
|
279
274
|
# @return [Object] Deserialized data
|
280
|
-
def _deserialize(type, value)
|
275
|
+
def self._deserialize(type, value)
|
281
276
|
case type.to_sym
|
282
277
|
when :Time
|
283
278
|
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
|
|
@@ -75,6 +75,7 @@ module Bandwidth
|
|
75
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
76
|
# @return Array for valid properties with the reasons
|
77
77
|
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
79
|
invalid_properties = Array.new
|
79
80
|
invalid_properties
|
80
81
|
end
|
@@ -82,6 +83,7 @@ module Bandwidth
|
|
82
83
|
# Check to see if the all the properties in the model are valid
|
83
84
|
# @return true if the model is valid
|
84
85
|
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
87
|
true
|
86
88
|
end
|
87
89
|
|
@@ -110,37 +112,30 @@ module Bandwidth
|
|
110
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
111
113
|
# @return [Object] Returns the model itself
|
112
114
|
def self.build_from_hash(attributes)
|
113
|
-
new.build_from_hash(attributes)
|
114
|
-
end
|
115
|
-
|
116
|
-
# Builds the object from hash
|
117
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
-
# @return [Object] Returns the model itself
|
119
|
-
def build_from_hash(attributes)
|
120
115
|
return nil unless attributes.is_a?(Hash)
|
121
116
|
attributes = attributes.transform_keys(&:to_sym)
|
122
|
-
|
123
|
-
|
124
|
-
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
125
121
|
elsif type =~ /\AArray<(.*)>/i
|
126
122
|
# check to ensure the input is an array given that the attribute
|
127
123
|
# is documented as an array but the input is not
|
128
|
-
if attributes[
|
129
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
130
126
|
end
|
131
|
-
elsif !attributes[
|
132
|
-
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
133
129
|
end
|
134
130
|
end
|
135
|
-
|
136
|
-
self
|
131
|
+
new(transformed_hash)
|
137
132
|
end
|
138
133
|
|
139
134
|
# Deserializes the data based on type
|
140
135
|
# @param string type Data type
|
141
136
|
# @param string value Value to be deserialized
|
142
137
|
# @return [Object] Deserialized data
|
143
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
144
139
|
case type.to_sym
|
145
140
|
when :Time
|
146
141
|
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
|
|
@@ -269,6 +269,7 @@ module Bandwidth
|
|
269
269
|
# Show invalid properties with the reasons. Usually used together with valid?
|
270
270
|
# @return Array for valid properties with the reasons
|
271
271
|
def list_invalid_properties
|
272
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
272
273
|
invalid_properties = Array.new
|
273
274
|
invalid_properties
|
274
275
|
end
|
@@ -276,6 +277,7 @@ module Bandwidth
|
|
276
277
|
# Check to see if the all the properties in the model are valid
|
277
278
|
# @return true if the model is valid
|
278
279
|
def valid?
|
280
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
279
281
|
true
|
280
282
|
end
|
281
283
|
|
@@ -323,37 +325,30 @@ module Bandwidth
|
|
323
325
|
# @param [Hash] attributes Model attributes in the form of hash
|
324
326
|
# @return [Object] Returns the model itself
|
325
327
|
def self.build_from_hash(attributes)
|
326
|
-
new.build_from_hash(attributes)
|
327
|
-
end
|
328
|
-
|
329
|
-
# Builds the object from hash
|
330
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
331
|
-
# @return [Object] Returns the model itself
|
332
|
-
def build_from_hash(attributes)
|
333
328
|
return nil unless attributes.is_a?(Hash)
|
334
329
|
attributes = attributes.transform_keys(&:to_sym)
|
335
|
-
|
336
|
-
|
337
|
-
|
330
|
+
transformed_hash = {}
|
331
|
+
openapi_types.each_pair do |key, type|
|
332
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
333
|
+
transformed_hash["#{key}"] = nil
|
338
334
|
elsif type =~ /\AArray<(.*)>/i
|
339
335
|
# check to ensure the input is an array given that the attribute
|
340
336
|
# is documented as an array but the input is not
|
341
|
-
if attributes[
|
342
|
-
|
337
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
338
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
343
339
|
end
|
344
|
-
elsif !attributes[
|
345
|
-
|
340
|
+
elsif !attributes[attribute_map[key]].nil?
|
341
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
346
342
|
end
|
347
343
|
end
|
348
|
-
|
349
|
-
self
|
344
|
+
new(transformed_hash)
|
350
345
|
end
|
351
346
|
|
352
347
|
# Deserializes the data based on type
|
353
348
|
# @param string type Data type
|
354
349
|
# @param string value Value to be deserialized
|
355
350
|
# @return [Object] Deserialized data
|
356
|
-
def _deserialize(type, value)
|
351
|
+
def self._deserialize(type, value)
|
357
352
|
case type.to_sym
|
358
353
|
when :Time
|
359
354
|
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
|
|
@@ -67,6 +67,7 @@ module Bandwidth
|
|
67
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
68
|
# @return Array for valid properties with the reasons
|
69
69
|
def list_invalid_properties
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
71
|
invalid_properties = Array.new
|
71
72
|
invalid_properties
|
72
73
|
end
|
@@ -74,6 +75,7 @@ module Bandwidth
|
|
74
75
|
# Check to see if the all the properties in the model are valid
|
75
76
|
# @return true if the model is valid
|
76
77
|
def valid?
|
78
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
77
79
|
true
|
78
80
|
end
|
79
81
|
|
@@ -101,37 +103,30 @@ module Bandwidth
|
|
101
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
102
104
|
# @return [Object] Returns the model itself
|
103
105
|
def self.build_from_hash(attributes)
|
104
|
-
new.build_from_hash(attributes)
|
105
|
-
end
|
106
|
-
|
107
|
-
# Builds the object from hash
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
-
# @return [Object] Returns the model itself
|
110
|
-
def build_from_hash(attributes)
|
111
106
|
return nil unless attributes.is_a?(Hash)
|
112
107
|
attributes = attributes.transform_keys(&:to_sym)
|
113
|
-
|
114
|
-
|
115
|
-
|
108
|
+
transformed_hash = {}
|
109
|
+
openapi_types.each_pair do |key, type|
|
110
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
111
|
+
transformed_hash["#{key}"] = nil
|
116
112
|
elsif type =~ /\AArray<(.*)>/i
|
117
113
|
# check to ensure the input is an array given that the attribute
|
118
114
|
# is documented as an array but the input is not
|
119
|
-
if attributes[
|
120
|
-
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
121
117
|
end
|
122
|
-
elsif !attributes[
|
123
|
-
|
118
|
+
elsif !attributes[attribute_map[key]].nil?
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
124
120
|
end
|
125
121
|
end
|
126
|
-
|
127
|
-
self
|
122
|
+
new(transformed_hash)
|
128
123
|
end
|
129
124
|
|
130
125
|
# Deserializes the data based on type
|
131
126
|
# @param string type Data type
|
132
127
|
# @param string value Value to be deserialized
|
133
128
|
# @return [Object] Deserialized data
|
134
|
-
def _deserialize(type, value)
|
129
|
+
def self._deserialize(type, value)
|
135
130
|
case type.to_sym
|
136
131
|
when :Time
|
137
132
|
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
|
|
@@ -94,6 +94,7 @@ module Bandwidth
|
|
94
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
95
95
|
# @return Array for valid properties with the reasons
|
96
96
|
def list_invalid_properties
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
97
98
|
invalid_properties = Array.new
|
98
99
|
invalid_properties
|
99
100
|
end
|
@@ -101,6 +102,7 @@ module Bandwidth
|
|
101
102
|
# Check to see if the all the properties in the model are valid
|
102
103
|
# @return true if the model is valid
|
103
104
|
def valid?
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
104
106
|
true
|
105
107
|
end
|
106
108
|
|
@@ -131,37 +133,30 @@ module Bandwidth
|
|
131
133
|
# @param [Hash] attributes Model attributes in the form of hash
|
132
134
|
# @return [Object] Returns the model itself
|
133
135
|
def self.build_from_hash(attributes)
|
134
|
-
new.build_from_hash(attributes)
|
135
|
-
end
|
136
|
-
|
137
|
-
# Builds the object from hash
|
138
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
-
# @return [Object] Returns the model itself
|
140
|
-
def build_from_hash(attributes)
|
141
136
|
return nil unless attributes.is_a?(Hash)
|
142
137
|
attributes = attributes.transform_keys(&:to_sym)
|
143
|
-
|
144
|
-
|
145
|
-
|
138
|
+
transformed_hash = {}
|
139
|
+
openapi_types.each_pair do |key, type|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = nil
|
146
142
|
elsif type =~ /\AArray<(.*)>/i
|
147
143
|
# check to ensure the input is an array given that the attribute
|
148
144
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
147
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
154
150
|
end
|
155
151
|
end
|
156
|
-
|
157
|
-
self
|
152
|
+
new(transformed_hash)
|
158
153
|
end
|
159
154
|
|
160
155
|
# Deserializes the data based on type
|
161
156
|
# @param string type Data type
|
162
157
|
# @param string value Value to be deserialized
|
163
158
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
159
|
+
def self._deserialize(type, value)
|
165
160
|
case type.to_sym
|
166
161
|
when :Time
|
167
162
|
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
|
|
@@ -217,6 +217,7 @@ module Bandwidth
|
|
217
217
|
# Show invalid properties with the reasons. Usually used together with valid?
|
218
218
|
# @return Array for valid properties with the reasons
|
219
219
|
def list_invalid_properties
|
220
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
220
221
|
invalid_properties = Array.new
|
221
222
|
invalid_properties
|
222
223
|
end
|
@@ -224,6 +225,7 @@ module Bandwidth
|
|
224
225
|
# Check to see if the all the properties in the model are valid
|
225
226
|
# @return true if the model is valid
|
226
227
|
def valid?
|
228
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
227
229
|
true
|
228
230
|
end
|
229
231
|
|
@@ -265,37 +267,30 @@ module Bandwidth
|
|
265
267
|
# @param [Hash] attributes Model attributes in the form of hash
|
266
268
|
# @return [Object] Returns the model itself
|
267
269
|
def self.build_from_hash(attributes)
|
268
|
-
new.build_from_hash(attributes)
|
269
|
-
end
|
270
|
-
|
271
|
-
# Builds the object from hash
|
272
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
273
|
-
# @return [Object] Returns the model itself
|
274
|
-
def build_from_hash(attributes)
|
275
270
|
return nil unless attributes.is_a?(Hash)
|
276
271
|
attributes = attributes.transform_keys(&:to_sym)
|
277
|
-
|
278
|
-
|
279
|
-
|
272
|
+
transformed_hash = {}
|
273
|
+
openapi_types.each_pair do |key, type|
|
274
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
275
|
+
transformed_hash["#{key}"] = nil
|
280
276
|
elsif type =~ /\AArray<(.*)>/i
|
281
277
|
# check to ensure the input is an array given that the attribute
|
282
278
|
# is documented as an array but the input is not
|
283
|
-
if attributes[
|
284
|
-
|
279
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
280
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
285
281
|
end
|
286
|
-
elsif !attributes[
|
287
|
-
|
282
|
+
elsif !attributes[attribute_map[key]].nil?
|
283
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
288
284
|
end
|
289
285
|
end
|
290
|
-
|
291
|
-
self
|
286
|
+
new(transformed_hash)
|
292
287
|
end
|
293
288
|
|
294
289
|
# Deserializes the data based on type
|
295
290
|
# @param string type Data type
|
296
291
|
# @param string value Value to be deserialized
|
297
292
|
# @return [Object] Deserialized data
|
298
|
-
def _deserialize(type, value)
|
293
|
+
def self._deserialize(type, value)
|
299
294
|
case type.to_sym
|
300
295
|
when :Time
|
301
296
|
Time.parse(value)
|