bandwidth-sdk 17.0.1 → 17.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +18 -0
- data/bandwidth-sdk.gemspec +1 -2
- data/bandwidth.yml +7 -0
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +198 -387
- data/coverage/index.html +5842 -7703
- data/custom_templates/README.mustache +4 -1
- data/custom_templates/api_client.mustache +254 -0
- data/custom_templates/configuration.mustache +545 -0
- data/custom_templates/gem.mustache +2 -0
- data/docs/CallsApi.md +20 -5
- data/docs/ConferencesApi.md +36 -9
- data/docs/MFAApi.md +12 -3
- data/docs/MediaApi.md +16 -4
- data/docs/MessagesApi.md +8 -2
- data/docs/MultiChannelApi.md +4 -1
- data/docs/PhoneNumberLookupApi.md +12 -3
- data/docs/RecordingsApi.md +40 -10
- data/docs/StatisticsApi.md +4 -1
- data/docs/TollFreeVerificationApi.md +36 -9
- data/docs/TranscriptionsApi.md +12 -3
- data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
- data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
- data/lib/bandwidth-sdk/api/media_api.rb +5 -5
- data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
- data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
- data/lib/bandwidth-sdk/api/multi_channel_api.rb +2 -2
- data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +4 -4
- data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
- data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
- data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +13 -13
- data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
- data/lib/bandwidth-sdk/api_client.rb +9 -5
- data/lib/bandwidth-sdk/api_error.rb +1 -1
- data/lib/bandwidth-sdk/api_model_base.rb +88 -0
- data/lib/bandwidth-sdk/configuration.rb +50 -1
- data/lib/bandwidth-sdk/models/account_statistics.rb +11 -78
- data/lib/bandwidth-sdk/models/additional_denial_reason.rb +41 -78
- data/lib/bandwidth-sdk/models/address.rb +23 -90
- data/lib/bandwidth-sdk/models/answer_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/async_lookup_request.rb +11 -78
- data/lib/bandwidth-sdk/models/blocked_webhook.rb +13 -80
- data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_recording_metadata.rb +11 -78
- data/lib/bandwidth-sdk/models/call_state.rb +11 -78
- data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription.rb +11 -78
- data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +11 -78
- data/lib/bandwidth-sdk/models/call_transcription_response.rb +11 -78
- data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/callback.rb +1 -1
- data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/card_width_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/code_request.rb +11 -78
- data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/conference.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_completed_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_created_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_member.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/contact.rb +19 -86
- data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +11 -78
- data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb +11 -78
- data/lib/bandwidth-sdk/models/create_call.rb +41 -78
- data/lib/bandwidth-sdk/models/create_call_response.rb +81 -78
- data/lib/bandwidth-sdk/models/create_message_request_error.rb +31 -78
- data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +11 -78
- data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +11 -78
- data/lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb +11 -78
- data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/disconnect_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/diversion.rb +11 -78
- data/lib/bandwidth-sdk/models/dtmf_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/error.rb +11 -78
- data/lib/bandwidth-sdk/models/error_object.rb +41 -78
- data/lib/bandwidth-sdk/models/error_source.rb +11 -78
- data/lib/bandwidth-sdk/models/failure_webhook.rb +13 -80
- data/lib/bandwidth-sdk/models/field_error.rb +11 -78
- data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/gather_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +11 -78
- data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +11 -78
- data/lib/bandwidth-sdk/models/in_progress_lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_callback.rb +61 -78
- data/lib/bandwidth-sdk/models/inbound_callback_message.rb +81 -78
- data/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/initiate_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/line_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/link.rb +11 -78
- data/lib/bandwidth-sdk/models/link_schema.rb +11 -78
- data/lib/bandwidth-sdk/models/links_object.rb +11 -78
- data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +11 -78
- data/lib/bandwidth-sdk/models/lookup_error_response.rb +11 -78
- data/lib/bandwidth-sdk/models/lookup_error_schema.rb +11 -78
- data/lib/bandwidth-sdk/models/lookup_error_schema_meta.rb +11 -78
- data/lib/bandwidth-sdk/models/lookup_result.rb +11 -78
- data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +11 -78
- data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_result.rb +11 -78
- data/lib/bandwidth-sdk/models/media.rb +11 -78
- data/lib/bandwidth-sdk/models/message.rb +11 -78
- data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_request.rb +31 -78
- 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 +11 -78
- data/lib/bandwidth-sdk/models/messaging_code_response.rb +11 -78
- data/lib/bandwidth-sdk/models/messaging_request_error.rb +31 -78
- data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +11 -78
- data/lib/bandwidth-sdk/models/mfa_request_error.rb +11 -78
- data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +11 -78
- data/lib/bandwidth-sdk/models/mms_message_content.rb +11 -78
- data/lib/bandwidth-sdk/models/mms_message_content_file.rb +11 -78
- data/lib/bandwidth-sdk/models/multi_channel_action.rb +3 -4
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +41 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_object.rb +51 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_response_object.rb +61 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +41 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +21 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +51 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object_all_of_content.rb +3 -4
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +61 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +3 -4
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +3 -4
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +51 -78
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +61 -78
- data/lib/bandwidth-sdk/models/multi_channel_error.rb +11 -78
- data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_message_content.rb +11 -78
- data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +21 -78
- data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +41 -78
- data/lib/bandwidth-sdk/models/opt_in_workflow.rb +25 -82
- data/lib/bandwidth-sdk/models/page_info.rb +11 -78
- data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/product_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -78
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +31 -78
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -78
- data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +41 -78
- data/lib/bandwidth-sdk/models/rbm_card_content.rb +11 -78
- data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +21 -78
- data/lib/bandwidth-sdk/models/rbm_location_response.rb +11 -78
- data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +21 -78
- data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +11 -78
- data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +3 -4
- data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +11 -78
- data/lib/bandwidth-sdk/models/rbm_message_media.rb +21 -78
- data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +41 -78
- data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +11 -78
- data/lib/bandwidth-sdk/models/recording_available_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/recording_complete_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +11 -78
- data/lib/bandwidth-sdk/models/recording_transcriptions.rb +11 -78
- data/lib/bandwidth-sdk/models/redirect_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/sms_message_content.rb +11 -78
- data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/status_callback.rb +61 -78
- data/lib/bandwidth-sdk/models/status_callback_message.rb +81 -78
- data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +6 -6
- data/lib/bandwidth-sdk/models/stir_shaken.rb +11 -78
- data/lib/bandwidth-sdk/models/sync_lookup_request.rb +11 -78
- data/lib/bandwidth-sdk/models/telephone_number.rb +11 -78
- data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +11 -78
- data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_error.rb +11 -78
- data/lib/bandwidth-sdk/models/tfv_status.rb +13 -80
- data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +21 -88
- data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +11 -78
- data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/transcribe_recording.rb +11 -78
- data/lib/bandwidth-sdk/models/transcription.rb +11 -78
- data/lib/bandwidth-sdk/models/transcription_available_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +11 -78
- data/lib/bandwidth-sdk/models/update_call.rb +11 -78
- data/lib/bandwidth-sdk/models/update_call_recording.rb +21 -78
- data/lib/bandwidth-sdk/models/update_conference.rb +11 -78
- data/lib/bandwidth-sdk/models/update_conference_member.rb +11 -78
- data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +13 -80
- data/lib/bandwidth-sdk/models/verification_request.rb +51 -88
- data/lib/bandwidth-sdk/models/verification_update_request.rb +51 -88
- data/lib/bandwidth-sdk/models/verification_webhook.rb +13 -80
- data/lib/bandwidth-sdk/models/verify_code_request.rb +13 -80
- data/lib/bandwidth-sdk/models/verify_code_response.rb +11 -78
- data/lib/bandwidth-sdk/models/voice_api_error.rb +11 -78
- data/lib/bandwidth-sdk/models/voice_code_response.rb +11 -78
- data/lib/bandwidth-sdk/models/webhook_subscription.rb +13 -80
- data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +11 -78
- data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +15 -82
- data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +21 -78
- data/lib/bandwidth-sdk/version.rb +2 -2
- data/lib/bandwidth-sdk.rb +2 -1
- data/openapitools.json +1 -1
- data/spec/smoke/calls_api_spec.rb +50 -76
- data/spec/smoke/conferences_api_spec.rb +7 -5
- data/spec/smoke/media_api_spec.rb +4 -2
- data/spec/smoke/messages_api_spec.rb +9 -4
- data/spec/smoke/mfa_api_spec.rb +9 -4
- data/spec/smoke/multi_channel_api_spec.rb +4 -2
- data/spec/smoke/phone_number_lookup_api_spec.rb +6 -4
- data/spec/smoke/recordings_api_spec.rb +7 -33
- data/spec/smoke/statistics_api_spec.rb +16 -8
- data/spec/smoke/toll_free_verification_api_spec.rb +6 -4
- data/spec/smoke/transcriptions_api_spec.rb +7 -5
- data/spec/spec_helper.rb +2 -0
- data/spec/unit/models/verify_code_request_spec.rb +1 -1
- metadata +5 -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.17.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Bandwidth
|
|
17
17
|
# Basic authentication credentials are not required, but if present, both username and password must be provided.
|
|
18
|
-
class WebhookSubscriptionBasicAuthentication
|
|
18
|
+
class WebhookSubscriptionBasicAuthentication < ApiModelBase
|
|
19
19
|
attr_accessor :username
|
|
20
20
|
|
|
21
21
|
attr_accessor :password
|
|
@@ -28,9 +28,14 @@ module Bandwidth
|
|
|
28
28
|
}
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
# Returns all the JSON keys this model knows about
|
|
32
37
|
def self.acceptable_attributes
|
|
33
|
-
|
|
38
|
+
acceptable_attribute_map.values
|
|
34
39
|
end
|
|
35
40
|
|
|
36
41
|
# Attribute type mapping.
|
|
@@ -55,9 +60,10 @@ module Bandwidth
|
|
|
55
60
|
end
|
|
56
61
|
|
|
57
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
58
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
59
|
-
if (!
|
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::WebhookSubscriptionBasicAuthentication`. Please check the name to make sure it's valid. List of attributes: " +
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::WebhookSubscriptionBasicAuthentication`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
61
67
|
end
|
|
62
68
|
h[k.to_sym] = v
|
|
63
69
|
}
|
|
@@ -182,61 +188,6 @@ module Bandwidth
|
|
|
182
188
|
new(transformed_hash)
|
|
183
189
|
end
|
|
184
190
|
|
|
185
|
-
# Deserializes the data based on type
|
|
186
|
-
# @param string type Data type
|
|
187
|
-
# @param string value Value to be deserialized
|
|
188
|
-
# @return [Object] Deserialized data
|
|
189
|
-
def self._deserialize(type, value)
|
|
190
|
-
case type.to_sym
|
|
191
|
-
when :Time
|
|
192
|
-
Time.parse(value)
|
|
193
|
-
when :Date
|
|
194
|
-
Date.parse(value)
|
|
195
|
-
when :String
|
|
196
|
-
value.to_s
|
|
197
|
-
when :Integer
|
|
198
|
-
value.to_i
|
|
199
|
-
when :Float
|
|
200
|
-
value.to_f
|
|
201
|
-
when :Boolean
|
|
202
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
203
|
-
true
|
|
204
|
-
else
|
|
205
|
-
false
|
|
206
|
-
end
|
|
207
|
-
when :Object
|
|
208
|
-
# generic object (usually a Hash), return directly
|
|
209
|
-
value
|
|
210
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
211
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
212
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
213
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
214
|
-
k_type = Regexp.last_match[:k_type]
|
|
215
|
-
v_type = Regexp.last_match[:v_type]
|
|
216
|
-
{}.tap do |hash|
|
|
217
|
-
value.each do |k, v|
|
|
218
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
219
|
-
end
|
|
220
|
-
end
|
|
221
|
-
else # model
|
|
222
|
-
# models (e.g. Pet) or oneOf
|
|
223
|
-
klass = Bandwidth.const_get(type)
|
|
224
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# Returns the string representation of the object
|
|
229
|
-
# @return [String] String presentation of the object
|
|
230
|
-
def to_s
|
|
231
|
-
to_hash.to_s
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
235
|
-
# @return [Hash] Returns the object in the form of hash
|
|
236
|
-
def to_body
|
|
237
|
-
to_hash
|
|
238
|
-
end
|
|
239
|
-
|
|
240
191
|
# Returns the object in the form of hash
|
|
241
192
|
# @return [Hash] Returns the object in the form of hash
|
|
242
193
|
def to_hash
|
|
@@ -252,23 +203,5 @@ module Bandwidth
|
|
|
252
203
|
end
|
|
253
204
|
hash
|
|
254
205
|
end
|
|
255
|
-
|
|
256
|
-
# Outputs non-array value in the form of hash
|
|
257
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
258
|
-
# @param [Object] value Any valid value
|
|
259
|
-
# @return [Hash] Returns the value in the form of hash
|
|
260
|
-
def _to_hash(value)
|
|
261
|
-
if value.is_a?(Array)
|
|
262
|
-
value.compact.map { |v| _to_hash(v) }
|
|
263
|
-
elsif value.is_a?(Hash)
|
|
264
|
-
{}.tap do |hash|
|
|
265
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
266
|
-
end
|
|
267
|
-
elsif value.respond_to? :to_hash
|
|
268
|
-
value.to_hash
|
|
269
|
-
else
|
|
270
|
-
value
|
|
271
|
-
end
|
|
272
|
-
end
|
|
273
206
|
end
|
|
274
207
|
end
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.17.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Bandwidth
|
|
17
|
-
class WebhookSubscriptionRequestSchema
|
|
17
|
+
class WebhookSubscriptionRequestSchema < ApiModelBase
|
|
18
18
|
attr_accessor :basic_authentication
|
|
19
19
|
|
|
20
20
|
# Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID.
|
|
@@ -32,9 +32,14 @@ module Bandwidth
|
|
|
32
32
|
}
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# Returns attribute mapping this model knows about
|
|
36
|
+
def self.acceptable_attribute_map
|
|
37
|
+
attribute_map
|
|
38
|
+
end
|
|
39
|
+
|
|
35
40
|
# Returns all the JSON keys this model knows about
|
|
36
41
|
def self.acceptable_attributes
|
|
37
|
-
|
|
42
|
+
acceptable_attribute_map.values
|
|
38
43
|
end
|
|
39
44
|
|
|
40
45
|
# Attribute type mapping.
|
|
@@ -62,9 +67,10 @@ module Bandwidth
|
|
|
62
67
|
end
|
|
63
68
|
|
|
64
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
71
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
-
if (!
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::WebhookSubscriptionRequestSchema`. Please check the name to make sure it's valid. List of attributes: " +
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::WebhookSubscriptionRequestSchema`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
74
|
end
|
|
69
75
|
h[k.to_sym] = v
|
|
70
76
|
}
|
|
@@ -94,7 +100,7 @@ module Bandwidth
|
|
|
94
100
|
end
|
|
95
101
|
|
|
96
102
|
if @callback_url.to_s.length < 0
|
|
97
|
-
invalid_properties.push('invalid value for "callback_url", the character length must be
|
|
103
|
+
invalid_properties.push('invalid value for "callback_url", the character length must be greater than or equal to 0.')
|
|
98
104
|
end
|
|
99
105
|
|
|
100
106
|
pattern = Regexp.new(/^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&\/\/=]*)/)
|
|
@@ -107,7 +113,7 @@ module Bandwidth
|
|
|
107
113
|
end
|
|
108
114
|
|
|
109
115
|
if !@shared_secret_key.nil? && @shared_secret_key.to_s.length < 16
|
|
110
|
-
invalid_properties.push('invalid value for "shared_secret_key", the character length must be
|
|
116
|
+
invalid_properties.push('invalid value for "shared_secret_key", the character length must be greater than or equal to 16.')
|
|
111
117
|
end
|
|
112
118
|
|
|
113
119
|
pattern = Regexp.new(/^[ -~]{16,64}$/)
|
|
@@ -139,7 +145,7 @@ module Bandwidth
|
|
|
139
145
|
end
|
|
140
146
|
|
|
141
147
|
if !callback_url.nil? && callback_url.to_s.length < 0
|
|
142
|
-
fail ArgumentError, 'invalid value for "callback_url", the character length must be
|
|
148
|
+
fail ArgumentError, 'invalid value for "callback_url", the character length must be greater than or equal to 0.'
|
|
143
149
|
end
|
|
144
150
|
|
|
145
151
|
pattern = Regexp.new(/^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&\/\/=]*)/)
|
|
@@ -158,7 +164,7 @@ module Bandwidth
|
|
|
158
164
|
end
|
|
159
165
|
|
|
160
166
|
if !shared_secret_key.nil? && shared_secret_key.to_s.length < 16
|
|
161
|
-
fail ArgumentError, 'invalid value for "shared_secret_key", the character length must be
|
|
167
|
+
fail ArgumentError, 'invalid value for "shared_secret_key", the character length must be greater than or equal to 16.'
|
|
162
168
|
end
|
|
163
169
|
|
|
164
170
|
pattern = Regexp.new(/^[ -~]{16,64}$/)
|
|
@@ -214,61 +220,6 @@ module Bandwidth
|
|
|
214
220
|
new(transformed_hash)
|
|
215
221
|
end
|
|
216
222
|
|
|
217
|
-
# Deserializes the data based on type
|
|
218
|
-
# @param string type Data type
|
|
219
|
-
# @param string value Value to be deserialized
|
|
220
|
-
# @return [Object] Deserialized data
|
|
221
|
-
def self._deserialize(type, value)
|
|
222
|
-
case type.to_sym
|
|
223
|
-
when :Time
|
|
224
|
-
Time.parse(value)
|
|
225
|
-
when :Date
|
|
226
|
-
Date.parse(value)
|
|
227
|
-
when :String
|
|
228
|
-
value.to_s
|
|
229
|
-
when :Integer
|
|
230
|
-
value.to_i
|
|
231
|
-
when :Float
|
|
232
|
-
value.to_f
|
|
233
|
-
when :Boolean
|
|
234
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
235
|
-
true
|
|
236
|
-
else
|
|
237
|
-
false
|
|
238
|
-
end
|
|
239
|
-
when :Object
|
|
240
|
-
# generic object (usually a Hash), return directly
|
|
241
|
-
value
|
|
242
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
243
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
244
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
245
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
246
|
-
k_type = Regexp.last_match[:k_type]
|
|
247
|
-
v_type = Regexp.last_match[:v_type]
|
|
248
|
-
{}.tap do |hash|
|
|
249
|
-
value.each do |k, v|
|
|
250
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
251
|
-
end
|
|
252
|
-
end
|
|
253
|
-
else # model
|
|
254
|
-
# models (e.g. Pet) or oneOf
|
|
255
|
-
klass = Bandwidth.const_get(type)
|
|
256
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
257
|
-
end
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
# Returns the string representation of the object
|
|
261
|
-
# @return [String] String presentation of the object
|
|
262
|
-
def to_s
|
|
263
|
-
to_hash.to_s
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
267
|
-
# @return [Hash] Returns the object in the form of hash
|
|
268
|
-
def to_body
|
|
269
|
-
to_hash
|
|
270
|
-
end
|
|
271
|
-
|
|
272
223
|
# Returns the object in the form of hash
|
|
273
224
|
# @return [Hash] Returns the object in the form of hash
|
|
274
225
|
def to_hash
|
|
@@ -284,23 +235,5 @@ module Bandwidth
|
|
|
284
235
|
end
|
|
285
236
|
hash
|
|
286
237
|
end
|
|
287
|
-
|
|
288
|
-
# Outputs non-array value in the form of hash
|
|
289
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
290
|
-
# @param [Object] value Any valid value
|
|
291
|
-
# @return [Hash] Returns the value in the form of hash
|
|
292
|
-
def _to_hash(value)
|
|
293
|
-
if value.is_a?(Array)
|
|
294
|
-
value.compact.map { |v| _to_hash(v) }
|
|
295
|
-
elsif value.is_a?(Hash)
|
|
296
|
-
{}.tap do |hash|
|
|
297
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
298
|
-
end
|
|
299
|
-
elsif value.respond_to? :to_hash
|
|
300
|
-
value.to_hash
|
|
301
|
-
else
|
|
302
|
-
value
|
|
303
|
-
end
|
|
304
|
-
end
|
|
305
238
|
end
|
|
306
239
|
end
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.17.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Bandwidth
|
|
17
17
|
# A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated).
|
|
18
|
-
class WebhookSubscriptionsListBody
|
|
18
|
+
class WebhookSubscriptionsListBody < ApiModelBase
|
|
19
19
|
attr_accessor :links
|
|
20
20
|
|
|
21
21
|
attr_accessor :errors
|
|
@@ -31,9 +31,14 @@ module Bandwidth
|
|
|
31
31
|
}
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
34
39
|
# Returns all the JSON keys this model knows about
|
|
35
40
|
def self.acceptable_attributes
|
|
36
|
-
|
|
41
|
+
acceptable_attribute_map.values
|
|
37
42
|
end
|
|
38
43
|
|
|
39
44
|
# Attribute type mapping.
|
|
@@ -59,9 +64,10 @@ module Bandwidth
|
|
|
59
64
|
end
|
|
60
65
|
|
|
61
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
62
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
|
-
if (!
|
|
64
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::WebhookSubscriptionsListBody`. Please check the name to make sure it's valid. List of attributes: " +
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::WebhookSubscriptionsListBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
65
71
|
end
|
|
66
72
|
h[k.to_sym] = v
|
|
67
73
|
}
|
|
@@ -105,6 +111,16 @@ module Bandwidth
|
|
|
105
111
|
true
|
|
106
112
|
end
|
|
107
113
|
|
|
114
|
+
# Custom attribute writer method with validation
|
|
115
|
+
# @param [Object] data Value to be assigned
|
|
116
|
+
def data=(data)
|
|
117
|
+
if data.nil?
|
|
118
|
+
fail ArgumentError, 'data cannot be nil'
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
@data = data
|
|
122
|
+
end
|
|
123
|
+
|
|
108
124
|
# Checks equality by comparing each attribute.
|
|
109
125
|
# @param [Object] Object to be compared
|
|
110
126
|
def ==(o)
|
|
@@ -150,61 +166,6 @@ module Bandwidth
|
|
|
150
166
|
new(transformed_hash)
|
|
151
167
|
end
|
|
152
168
|
|
|
153
|
-
# Deserializes the data based on type
|
|
154
|
-
# @param string type Data type
|
|
155
|
-
# @param string value Value to be deserialized
|
|
156
|
-
# @return [Object] Deserialized data
|
|
157
|
-
def self._deserialize(type, value)
|
|
158
|
-
case type.to_sym
|
|
159
|
-
when :Time
|
|
160
|
-
Time.parse(value)
|
|
161
|
-
when :Date
|
|
162
|
-
Date.parse(value)
|
|
163
|
-
when :String
|
|
164
|
-
value.to_s
|
|
165
|
-
when :Integer
|
|
166
|
-
value.to_i
|
|
167
|
-
when :Float
|
|
168
|
-
value.to_f
|
|
169
|
-
when :Boolean
|
|
170
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
171
|
-
true
|
|
172
|
-
else
|
|
173
|
-
false
|
|
174
|
-
end
|
|
175
|
-
when :Object
|
|
176
|
-
# generic object (usually a Hash), return directly
|
|
177
|
-
value
|
|
178
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
179
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
180
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
181
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
182
|
-
k_type = Regexp.last_match[:k_type]
|
|
183
|
-
v_type = Regexp.last_match[:v_type]
|
|
184
|
-
{}.tap do |hash|
|
|
185
|
-
value.each do |k, v|
|
|
186
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
else # model
|
|
190
|
-
# models (e.g. Pet) or oneOf
|
|
191
|
-
klass = Bandwidth.const_get(type)
|
|
192
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
193
|
-
end
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
# Returns the string representation of the object
|
|
197
|
-
# @return [String] String presentation of the object
|
|
198
|
-
def to_s
|
|
199
|
-
to_hash.to_s
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
203
|
-
# @return [Hash] Returns the object in the form of hash
|
|
204
|
-
def to_body
|
|
205
|
-
to_hash
|
|
206
|
-
end
|
|
207
|
-
|
|
208
169
|
# Returns the object in the form of hash
|
|
209
170
|
# @return [Hash] Returns the object in the form of hash
|
|
210
171
|
def to_hash
|
|
@@ -220,23 +181,5 @@ module Bandwidth
|
|
|
220
181
|
end
|
|
221
182
|
hash
|
|
222
183
|
end
|
|
223
|
-
|
|
224
|
-
# Outputs non-array value in the form of hash
|
|
225
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
226
|
-
# @param [Object] value Any valid value
|
|
227
|
-
# @return [Hash] Returns the value in the form of hash
|
|
228
|
-
def _to_hash(value)
|
|
229
|
-
if value.is_a?(Array)
|
|
230
|
-
value.compact.map { |v| _to_hash(v) }
|
|
231
|
-
elsif value.is_a?(Hash)
|
|
232
|
-
{}.tap do |hash|
|
|
233
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
234
|
-
end
|
|
235
|
-
elsif value.respond_to? :to_hash
|
|
236
|
-
value.to_hash
|
|
237
|
-
else
|
|
238
|
-
value
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
184
|
end
|
|
242
185
|
end
|
|
@@ -6,10 +6,10 @@
|
|
|
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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.17.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module Bandwidth
|
|
14
|
-
VERSION = '17.0
|
|
14
|
+
VERSION = '17.1.0'
|
|
15
15
|
end
|
data/lib/bandwidth-sdk.rb
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.17.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
# Common files
|
|
14
14
|
require 'bandwidth-sdk/api_client'
|
|
15
15
|
require 'bandwidth-sdk/api_error'
|
|
16
|
+
require 'bandwidth-sdk/api_model_base'
|
|
16
17
|
require 'bandwidth-sdk/version'
|
|
17
18
|
require 'bandwidth-sdk/configuration'
|
|
18
19
|
|
data/openapitools.json
CHANGED
|
@@ -16,11 +16,13 @@ describe 'CallsApi Integration Tests' do
|
|
|
16
16
|
let(:callback_timeout) { 15.0 }
|
|
17
17
|
|
|
18
18
|
before(:all) do
|
|
19
|
-
Bandwidth.
|
|
20
|
-
|
|
21
|
-
config.
|
|
19
|
+
config = Bandwidth::Configuration.new
|
|
20
|
+
config.configure do |config|
|
|
21
|
+
config.client_id = BW_CLIENT_ID
|
|
22
|
+
config.client_secret = BW_CLIENT_SECRET
|
|
22
23
|
end
|
|
23
|
-
|
|
24
|
+
client = Bandwidth::ApiClient.new(config)
|
|
25
|
+
@calls_api_instance = Bandwidth::CallsApi.new(client)
|
|
24
26
|
|
|
25
27
|
# call id
|
|
26
28
|
$call_info_id = ''
|
|
@@ -92,58 +94,58 @@ describe 'CallsApi Integration Tests' do
|
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
# Get Call State Information
|
|
95
|
-
describe 'get_call_state' do
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
end
|
|
97
|
+
# describe 'get_call_state' do
|
|
98
|
+
# it 'gets the call state' do
|
|
99
|
+
# sleep(40) # wait 40s for voice API to update call status
|
|
100
|
+
# data, status_code = @calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id)
|
|
101
|
+
|
|
102
|
+
# expect(status_code).to eq(200)
|
|
103
|
+
# expect(data).to be_instance_of(Bandwidth::CallState)
|
|
104
|
+
# expect(data.call_id).to eq($call_info_id)
|
|
105
|
+
# expect(data.account_id).to eq(BW_ACCOUNT_ID)
|
|
106
|
+
# expect(data.application_id).to eq(BW_VOICE_APPLICATION_ID)
|
|
107
|
+
# expect(data.start_time).to be_instance_of(Time).or be_nil
|
|
108
|
+
# expect(data.last_update).to be_instance_of(Time)
|
|
109
|
+
# expect(data.state).to be_instance_of(String)
|
|
110
|
+
# expect(data.direction).to eq(direction)
|
|
111
|
+
# end
|
|
112
|
+
# end
|
|
111
113
|
|
|
112
114
|
# Update Call
|
|
113
|
-
describe 'update_call' do
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
# describe 'update_call' do
|
|
116
|
+
# it 'creates and updates a call' do
|
|
117
|
+
# update_call_body = Bandwidth::UpdateCall.new(
|
|
118
|
+
# state: Bandwidth::CallStateEnum::ACTIVE,
|
|
119
|
+
# redirect_url: MANTECA_BASE_URL + '/bxml/pause'
|
|
120
|
+
# )
|
|
119
121
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
# update_call_id = create_manteca_call(@calls_api_instance)
|
|
123
|
+
# sleep(SLEEP_TIME_S)
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
# _update_data, update_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, update_call_body)
|
|
126
|
+
# expect(update_status_code).to eq(200)
|
|
127
|
+
# sleep(SLEEP_TIME_S)
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
end
|
|
129
|
+
# _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body)
|
|
130
|
+
# expect(complete_status_code).to eq(200)
|
|
131
|
+
# end
|
|
132
|
+
# end
|
|
131
133
|
|
|
132
134
|
# Update Call BXML
|
|
133
|
-
describe 'update_call_bxml' do
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
# describe 'update_call_bxml' do
|
|
136
|
+
# it 'updates a call using bxml' do
|
|
137
|
+
# update_call_id = create_manteca_call(@calls_api_instance)
|
|
138
|
+
# sleep(SLEEP_TIME_S)
|
|
139
|
+
|
|
140
|
+
# update_bxml = '<?xml version="1.0" encoding="UTF-8"?><Bxml><SpeakSentence locale="en_US" gender="female" voice="susan">This is a test bxml response</SpeakSentence><Pause duration="3"/></Bxml>'
|
|
141
|
+
# _update_data, update_status_code = @calls_api_instance.update_call_bxml_with_http_info(BW_ACCOUNT_ID, update_call_id, update_bxml)
|
|
142
|
+
# expect(update_status_code).to eq(204)
|
|
143
|
+
# sleep(SLEEP_TIME_S)
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
end
|
|
145
|
+
# _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body)
|
|
146
|
+
# expect(complete_status_code).to eq(200)
|
|
147
|
+
# end
|
|
148
|
+
# end
|
|
147
149
|
|
|
148
150
|
# HTTP 4XX Errors
|
|
149
151
|
describe 'http error' do
|
|
@@ -174,33 +176,5 @@ describe 'CallsApi Integration Tests' do
|
|
|
174
176
|
expect(e.code).to eq(404)
|
|
175
177
|
}
|
|
176
178
|
end
|
|
177
|
-
|
|
178
|
-
it 'causes a 401 error' do
|
|
179
|
-
Bandwidth.configure do |config|
|
|
180
|
-
config.username = UNAUTHORIZED_USERNAME
|
|
181
|
-
config.password = UNAUTHORIZED_PASSWORD
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
expect {
|
|
185
|
-
@calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id)
|
|
186
|
-
}.to raise_error { |e|
|
|
187
|
-
expect(e).to be_instance_of(Bandwidth::ApiError)
|
|
188
|
-
expect(e.code).to eq(401)
|
|
189
|
-
}
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
it 'causes a 403 error' do
|
|
193
|
-
Bandwidth.configure do |config|
|
|
194
|
-
config.username = FORBIDDEN_USERNAME
|
|
195
|
-
config.password = FORBIDDEN_PASSWORD
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
expect {
|
|
199
|
-
@calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id)
|
|
200
|
-
}.to raise_error { |e|
|
|
201
|
-
expect(e).to be_instance_of(Bandwidth::ApiError)
|
|
202
|
-
expect(e.code).to eq(403)
|
|
203
|
-
}
|
|
204
|
-
end
|
|
205
179
|
end
|
|
206
180
|
end
|
|
@@ -3,13 +3,15 @@ require_relative '../call_utils'
|
|
|
3
3
|
# Integration Tests for Bandwidth::ConferencesApi
|
|
4
4
|
describe 'ConferencesApi Integration Tests' do
|
|
5
5
|
before(:all) do
|
|
6
|
-
Bandwidth.
|
|
7
|
-
|
|
8
|
-
config.
|
|
6
|
+
config = Bandwidth::Configuration.new
|
|
7
|
+
config.configure do |config|
|
|
8
|
+
config.client_id = BW_CLIENT_ID
|
|
9
|
+
config.client_secret = BW_CLIENT_SECRET
|
|
9
10
|
config.return_binary_data = true
|
|
10
11
|
end
|
|
11
|
-
|
|
12
|
-
@
|
|
12
|
+
client = Bandwidth::ApiClient.new(config)
|
|
13
|
+
@conferences_api_instance = Bandwidth::ConferencesApi.new(client)
|
|
14
|
+
@calls_api_instance = Bandwidth::CallsApi.new(client)
|
|
13
15
|
|
|
14
16
|
# conference info
|
|
15
17
|
$manteca_test_id = setup_manteca('conference')
|