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
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Bandwidth
|
|
17
|
-
class TfvSubmissionInfo
|
|
17
|
+
class TfvSubmissionInfo < ApiModelBase
|
|
18
18
|
attr_accessor :business_address
|
|
19
19
|
|
|
20
20
|
attr_accessor :business_contact
|
|
@@ -98,9 +98,14 @@ module Bandwidth
|
|
|
98
98
|
}
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
+
# Returns attribute mapping this model knows about
|
|
102
|
+
def self.acceptable_attribute_map
|
|
103
|
+
attribute_map
|
|
104
|
+
end
|
|
105
|
+
|
|
101
106
|
# Returns all the JSON keys this model knows about
|
|
102
107
|
def self.acceptable_attributes
|
|
103
|
-
|
|
108
|
+
acceptable_attribute_map.values
|
|
104
109
|
end
|
|
105
110
|
|
|
106
111
|
# Attribute type mapping.
|
|
@@ -143,9 +148,10 @@ module Bandwidth
|
|
|
143
148
|
end
|
|
144
149
|
|
|
145
150
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
151
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
146
152
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
147
|
-
if (!
|
|
148
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TfvSubmissionInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
153
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
154
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TfvSubmissionInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
149
155
|
end
|
|
150
156
|
h[k.to_sym] = v
|
|
151
157
|
}
|
|
@@ -229,7 +235,7 @@ module Bandwidth
|
|
|
229
235
|
end
|
|
230
236
|
|
|
231
237
|
if !@use_case.nil? && @use_case.to_s.length < 0
|
|
232
|
-
invalid_properties.push('invalid value for "use_case", the character length must be
|
|
238
|
+
invalid_properties.push('invalid value for "use_case", the character length must be greater than or equal to 0.')
|
|
233
239
|
end
|
|
234
240
|
|
|
235
241
|
if !@use_case_summary.nil? && @use_case_summary.to_s.length > 500
|
|
@@ -237,7 +243,7 @@ module Bandwidth
|
|
|
237
243
|
end
|
|
238
244
|
|
|
239
245
|
if !@use_case_summary.nil? && @use_case_summary.to_s.length < 0
|
|
240
|
-
invalid_properties.push('invalid value for "use_case_summary", the character length must be
|
|
246
|
+
invalid_properties.push('invalid value for "use_case_summary", the character length must be greater than or equal to 0.')
|
|
241
247
|
end
|
|
242
248
|
|
|
243
249
|
if !@production_message_content.nil? && @production_message_content.to_s.length > 500
|
|
@@ -245,7 +251,7 @@ module Bandwidth
|
|
|
245
251
|
end
|
|
246
252
|
|
|
247
253
|
if !@production_message_content.nil? && @production_message_content.to_s.length < 0
|
|
248
|
-
invalid_properties.push('invalid value for "production_message_content", the character length must be
|
|
254
|
+
invalid_properties.push('invalid value for "production_message_content", the character length must be greater than or equal to 0.')
|
|
249
255
|
end
|
|
250
256
|
|
|
251
257
|
if !@additional_information.nil? && @additional_information.to_s.length > 500
|
|
@@ -253,7 +259,7 @@ module Bandwidth
|
|
|
253
259
|
end
|
|
254
260
|
|
|
255
261
|
if !@additional_information.nil? && @additional_information.to_s.length < 0
|
|
256
|
-
invalid_properties.push('invalid value for "additional_information", the character length must be
|
|
262
|
+
invalid_properties.push('invalid value for "additional_information", the character length must be greater than or equal to 0.')
|
|
257
263
|
end
|
|
258
264
|
|
|
259
265
|
if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
|
|
@@ -261,7 +267,7 @@ module Bandwidth
|
|
|
261
267
|
end
|
|
262
268
|
|
|
263
269
|
if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
|
|
264
|
-
invalid_properties.push('invalid value for "isv_reseller", the character length must be
|
|
270
|
+
invalid_properties.push('invalid value for "isv_reseller", the character length must be greater than or equal to 0.')
|
|
265
271
|
end
|
|
266
272
|
|
|
267
273
|
if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
|
@@ -321,7 +327,7 @@ module Bandwidth
|
|
|
321
327
|
end
|
|
322
328
|
|
|
323
329
|
if use_case.to_s.length < 0
|
|
324
|
-
fail ArgumentError, 'invalid value for "use_case", the character length must be
|
|
330
|
+
fail ArgumentError, 'invalid value for "use_case", the character length must be greater than or equal to 0.'
|
|
325
331
|
end
|
|
326
332
|
|
|
327
333
|
@use_case = use_case
|
|
@@ -339,7 +345,7 @@ module Bandwidth
|
|
|
339
345
|
end
|
|
340
346
|
|
|
341
347
|
if use_case_summary.to_s.length < 0
|
|
342
|
-
fail ArgumentError, 'invalid value for "use_case_summary", the character length must be
|
|
348
|
+
fail ArgumentError, 'invalid value for "use_case_summary", the character length must be greater than or equal to 0.'
|
|
343
349
|
end
|
|
344
350
|
|
|
345
351
|
@use_case_summary = use_case_summary
|
|
@@ -357,7 +363,7 @@ module Bandwidth
|
|
|
357
363
|
end
|
|
358
364
|
|
|
359
365
|
if production_message_content.to_s.length < 0
|
|
360
|
-
fail ArgumentError, 'invalid value for "production_message_content", the character length must be
|
|
366
|
+
fail ArgumentError, 'invalid value for "production_message_content", the character length must be greater than or equal to 0.'
|
|
361
367
|
end
|
|
362
368
|
|
|
363
369
|
@production_message_content = production_message_content
|
|
@@ -371,7 +377,7 @@ module Bandwidth
|
|
|
371
377
|
end
|
|
372
378
|
|
|
373
379
|
if !additional_information.nil? && additional_information.to_s.length < 0
|
|
374
|
-
fail ArgumentError, 'invalid value for "additional_information", the character length must be
|
|
380
|
+
fail ArgumentError, 'invalid value for "additional_information", the character length must be greater than or equal to 0.'
|
|
375
381
|
end
|
|
376
382
|
|
|
377
383
|
@additional_information = additional_information
|
|
@@ -385,7 +391,7 @@ module Bandwidth
|
|
|
385
391
|
end
|
|
386
392
|
|
|
387
393
|
if !isv_reseller.nil? && isv_reseller.to_s.length < 0
|
|
388
|
-
fail ArgumentError, 'invalid value for "isv_reseller", the character length must be
|
|
394
|
+
fail ArgumentError, 'invalid value for "isv_reseller", the character length must be greater than or equal to 0.'
|
|
389
395
|
end
|
|
390
396
|
|
|
391
397
|
@isv_reseller = isv_reseller
|
|
@@ -458,61 +464,6 @@ module Bandwidth
|
|
|
458
464
|
new(transformed_hash)
|
|
459
465
|
end
|
|
460
466
|
|
|
461
|
-
# Deserializes the data based on type
|
|
462
|
-
# @param string type Data type
|
|
463
|
-
# @param string value Value to be deserialized
|
|
464
|
-
# @return [Object] Deserialized data
|
|
465
|
-
def self._deserialize(type, value)
|
|
466
|
-
case type.to_sym
|
|
467
|
-
when :Time
|
|
468
|
-
Time.parse(value)
|
|
469
|
-
when :Date
|
|
470
|
-
Date.parse(value)
|
|
471
|
-
when :String
|
|
472
|
-
value.to_s
|
|
473
|
-
when :Integer
|
|
474
|
-
value.to_i
|
|
475
|
-
when :Float
|
|
476
|
-
value.to_f
|
|
477
|
-
when :Boolean
|
|
478
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
479
|
-
true
|
|
480
|
-
else
|
|
481
|
-
false
|
|
482
|
-
end
|
|
483
|
-
when :Object
|
|
484
|
-
# generic object (usually a Hash), return directly
|
|
485
|
-
value
|
|
486
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
487
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
488
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
489
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
490
|
-
k_type = Regexp.last_match[:k_type]
|
|
491
|
-
v_type = Regexp.last_match[:v_type]
|
|
492
|
-
{}.tap do |hash|
|
|
493
|
-
value.each do |k, v|
|
|
494
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
495
|
-
end
|
|
496
|
-
end
|
|
497
|
-
else # model
|
|
498
|
-
# models (e.g. Pet) or oneOf
|
|
499
|
-
klass = Bandwidth.const_get(type)
|
|
500
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
501
|
-
end
|
|
502
|
-
end
|
|
503
|
-
|
|
504
|
-
# Returns the string representation of the object
|
|
505
|
-
# @return [String] String presentation of the object
|
|
506
|
-
def to_s
|
|
507
|
-
to_hash.to_s
|
|
508
|
-
end
|
|
509
|
-
|
|
510
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
511
|
-
# @return [Hash] Returns the object in the form of hash
|
|
512
|
-
def to_body
|
|
513
|
-
to_hash
|
|
514
|
-
end
|
|
515
|
-
|
|
516
467
|
# Returns the object in the form of hash
|
|
517
468
|
# @return [Hash] Returns the object in the form of hash
|
|
518
469
|
def to_hash
|
|
@@ -528,23 +479,5 @@ module Bandwidth
|
|
|
528
479
|
end
|
|
529
480
|
hash
|
|
530
481
|
end
|
|
531
|
-
|
|
532
|
-
# Outputs non-array value in the form of hash
|
|
533
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
534
|
-
# @param [Object] value Any valid value
|
|
535
|
-
# @return [Hash] Returns the value in the form of hash
|
|
536
|
-
def _to_hash(value)
|
|
537
|
-
if value.is_a?(Array)
|
|
538
|
-
value.compact.map { |v| _to_hash(v) }
|
|
539
|
-
elsif value.is_a?(Hash)
|
|
540
|
-
{}.tap do |hash|
|
|
541
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
542
|
-
end
|
|
543
|
-
elsif value.respond_to? :to_hash
|
|
544
|
-
value.to_hash
|
|
545
|
-
else
|
|
546
|
-
value
|
|
547
|
-
end
|
|
548
|
-
end
|
|
549
482
|
end
|
|
550
483
|
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 TfvSubmissionWrapper
|
|
17
|
+
class TfvSubmissionWrapper < ApiModelBase
|
|
18
18
|
attr_accessor :submission
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -24,9 +24,14 @@ module Bandwidth
|
|
|
24
24
|
}
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
27
32
|
# Returns all the JSON keys this model knows about
|
|
28
33
|
def self.acceptable_attributes
|
|
29
|
-
|
|
34
|
+
acceptable_attribute_map.values
|
|
30
35
|
end
|
|
31
36
|
|
|
32
37
|
# Attribute type mapping.
|
|
@@ -50,9 +55,10 @@ module Bandwidth
|
|
|
50
55
|
end
|
|
51
56
|
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
53
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
-
if (!
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TfvSubmissionWrapper`. Please check the name to make sure it's valid. List of attributes: " +
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TfvSubmissionWrapper`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
56
62
|
end
|
|
57
63
|
h[k.to_sym] = v
|
|
58
64
|
}
|
|
@@ -120,61 +126,6 @@ module Bandwidth
|
|
|
120
126
|
new(transformed_hash)
|
|
121
127
|
end
|
|
122
128
|
|
|
123
|
-
# Deserializes the data based on type
|
|
124
|
-
# @param string type Data type
|
|
125
|
-
# @param string value Value to be deserialized
|
|
126
|
-
# @return [Object] Deserialized data
|
|
127
|
-
def self._deserialize(type, value)
|
|
128
|
-
case type.to_sym
|
|
129
|
-
when :Time
|
|
130
|
-
Time.parse(value)
|
|
131
|
-
when :Date
|
|
132
|
-
Date.parse(value)
|
|
133
|
-
when :String
|
|
134
|
-
value.to_s
|
|
135
|
-
when :Integer
|
|
136
|
-
value.to_i
|
|
137
|
-
when :Float
|
|
138
|
-
value.to_f
|
|
139
|
-
when :Boolean
|
|
140
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
141
|
-
true
|
|
142
|
-
else
|
|
143
|
-
false
|
|
144
|
-
end
|
|
145
|
-
when :Object
|
|
146
|
-
# generic object (usually a Hash), return directly
|
|
147
|
-
value
|
|
148
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
149
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
150
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
151
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
152
|
-
k_type = Regexp.last_match[:k_type]
|
|
153
|
-
v_type = Regexp.last_match[:v_type]
|
|
154
|
-
{}.tap do |hash|
|
|
155
|
-
value.each do |k, v|
|
|
156
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
else # model
|
|
160
|
-
# models (e.g. Pet) or oneOf
|
|
161
|
-
klass = Bandwidth.const_get(type)
|
|
162
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Returns the string representation of the object
|
|
167
|
-
# @return [String] String presentation of the object
|
|
168
|
-
def to_s
|
|
169
|
-
to_hash.to_s
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
173
|
-
# @return [Hash] Returns the object in the form of hash
|
|
174
|
-
def to_body
|
|
175
|
-
to_hash
|
|
176
|
-
end
|
|
177
|
-
|
|
178
129
|
# Returns the object in the form of hash
|
|
179
130
|
# @return [Hash] Returns the object in the form of hash
|
|
180
131
|
def to_hash
|
|
@@ -190,23 +141,5 @@ module Bandwidth
|
|
|
190
141
|
end
|
|
191
142
|
hash
|
|
192
143
|
end
|
|
193
|
-
|
|
194
|
-
# Outputs non-array value in the form of hash
|
|
195
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
196
|
-
# @param [Object] value Any valid value
|
|
197
|
-
# @return [Hash] Returns the value in the form of hash
|
|
198
|
-
def _to_hash(value)
|
|
199
|
-
if value.is_a?(Array)
|
|
200
|
-
value.compact.map { |v| _to_hash(v) }
|
|
201
|
-
elsif value.is_a?(Hash)
|
|
202
|
-
{}.tap do |hash|
|
|
203
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
204
|
-
end
|
|
205
|
-
elsif value.respond_to? :to_hash
|
|
206
|
-
value.to_hash
|
|
207
|
-
else
|
|
208
|
-
value
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
144
|
end
|
|
212
145
|
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 TranscribeRecording
|
|
17
|
+
class TranscribeRecording < ApiModelBase
|
|
18
18
|
# The URL to send the [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization.
|
|
19
19
|
attr_accessor :callback_url
|
|
20
20
|
|
|
@@ -70,9 +70,14 @@ module Bandwidth
|
|
|
70
70
|
}
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
# Returns attribute mapping this model knows about
|
|
74
|
+
def self.acceptable_attribute_map
|
|
75
|
+
attribute_map
|
|
76
|
+
end
|
|
77
|
+
|
|
73
78
|
# Returns all the JSON keys this model knows about
|
|
74
79
|
def self.acceptable_attributes
|
|
75
|
-
|
|
80
|
+
acceptable_attribute_map.values
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
# Attribute type mapping.
|
|
@@ -108,9 +113,10 @@ module Bandwidth
|
|
|
108
113
|
end
|
|
109
114
|
|
|
110
115
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
111
117
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
-
if (!
|
|
113
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TranscribeRecording`. Please check the name to make sure it's valid. List of attributes: " +
|
|
118
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TranscribeRecording`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
114
120
|
end
|
|
115
121
|
h[k.to_sym] = v
|
|
116
122
|
}
|
|
@@ -268,61 +274,6 @@ module Bandwidth
|
|
|
268
274
|
new(transformed_hash)
|
|
269
275
|
end
|
|
270
276
|
|
|
271
|
-
# Deserializes the data based on type
|
|
272
|
-
# @param string type Data type
|
|
273
|
-
# @param string value Value to be deserialized
|
|
274
|
-
# @return [Object] Deserialized data
|
|
275
|
-
def self._deserialize(type, value)
|
|
276
|
-
case type.to_sym
|
|
277
|
-
when :Time
|
|
278
|
-
Time.parse(value)
|
|
279
|
-
when :Date
|
|
280
|
-
Date.parse(value)
|
|
281
|
-
when :String
|
|
282
|
-
value.to_s
|
|
283
|
-
when :Integer
|
|
284
|
-
value.to_i
|
|
285
|
-
when :Float
|
|
286
|
-
value.to_f
|
|
287
|
-
when :Boolean
|
|
288
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
289
|
-
true
|
|
290
|
-
else
|
|
291
|
-
false
|
|
292
|
-
end
|
|
293
|
-
when :Object
|
|
294
|
-
# generic object (usually a Hash), return directly
|
|
295
|
-
value
|
|
296
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
297
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
298
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
299
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
300
|
-
k_type = Regexp.last_match[:k_type]
|
|
301
|
-
v_type = Regexp.last_match[:v_type]
|
|
302
|
-
{}.tap do |hash|
|
|
303
|
-
value.each do |k, v|
|
|
304
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
305
|
-
end
|
|
306
|
-
end
|
|
307
|
-
else # model
|
|
308
|
-
# models (e.g. Pet) or oneOf
|
|
309
|
-
klass = Bandwidth.const_get(type)
|
|
310
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
311
|
-
end
|
|
312
|
-
end
|
|
313
|
-
|
|
314
|
-
# Returns the string representation of the object
|
|
315
|
-
# @return [String] String presentation of the object
|
|
316
|
-
def to_s
|
|
317
|
-
to_hash.to_s
|
|
318
|
-
end
|
|
319
|
-
|
|
320
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
321
|
-
# @return [Hash] Returns the object in the form of hash
|
|
322
|
-
def to_body
|
|
323
|
-
to_hash
|
|
324
|
-
end
|
|
325
|
-
|
|
326
277
|
# Returns the object in the form of hash
|
|
327
278
|
# @return [Hash] Returns the object in the form of hash
|
|
328
279
|
def to_hash
|
|
@@ -338,23 +289,5 @@ module Bandwidth
|
|
|
338
289
|
end
|
|
339
290
|
hash
|
|
340
291
|
end
|
|
341
|
-
|
|
342
|
-
# Outputs non-array value in the form of hash
|
|
343
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
344
|
-
# @param [Object] value Any valid value
|
|
345
|
-
# @return [Hash] Returns the value in the form of hash
|
|
346
|
-
def _to_hash(value)
|
|
347
|
-
if value.is_a?(Array)
|
|
348
|
-
value.compact.map { |v| _to_hash(v) }
|
|
349
|
-
elsif value.is_a?(Hash)
|
|
350
|
-
{}.tap do |hash|
|
|
351
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
352
|
-
end
|
|
353
|
-
elsif value.respond_to? :to_hash
|
|
354
|
-
value.to_hash
|
|
355
|
-
else
|
|
356
|
-
value
|
|
357
|
-
end
|
|
358
|
-
end
|
|
359
292
|
end
|
|
360
293
|
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 Transcription
|
|
17
|
+
class Transcription < ApiModelBase
|
|
18
18
|
# The transcribed text
|
|
19
19
|
attr_accessor :text
|
|
20
20
|
|
|
@@ -29,9 +29,14 @@ module Bandwidth
|
|
|
29
29
|
}
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
32
37
|
# Returns all the JSON keys this model knows about
|
|
33
38
|
def self.acceptable_attributes
|
|
34
|
-
|
|
39
|
+
acceptable_attribute_map.values
|
|
35
40
|
end
|
|
36
41
|
|
|
37
42
|
# Attribute type mapping.
|
|
@@ -56,9 +61,10 @@ module Bandwidth
|
|
|
56
61
|
end
|
|
57
62
|
|
|
58
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
-
if (!
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Transcription`. Please check the name to make sure it's valid. List of attributes: " +
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Transcription`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
68
|
end
|
|
63
69
|
h[k.to_sym] = v
|
|
64
70
|
}
|
|
@@ -131,61 +137,6 @@ module Bandwidth
|
|
|
131
137
|
new(transformed_hash)
|
|
132
138
|
end
|
|
133
139
|
|
|
134
|
-
# Deserializes the data based on type
|
|
135
|
-
# @param string type Data type
|
|
136
|
-
# @param string value Value to be deserialized
|
|
137
|
-
# @return [Object] Deserialized data
|
|
138
|
-
def self._deserialize(type, value)
|
|
139
|
-
case type.to_sym
|
|
140
|
-
when :Time
|
|
141
|
-
Time.parse(value)
|
|
142
|
-
when :Date
|
|
143
|
-
Date.parse(value)
|
|
144
|
-
when :String
|
|
145
|
-
value.to_s
|
|
146
|
-
when :Integer
|
|
147
|
-
value.to_i
|
|
148
|
-
when :Float
|
|
149
|
-
value.to_f
|
|
150
|
-
when :Boolean
|
|
151
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
152
|
-
true
|
|
153
|
-
else
|
|
154
|
-
false
|
|
155
|
-
end
|
|
156
|
-
when :Object
|
|
157
|
-
# generic object (usually a Hash), return directly
|
|
158
|
-
value
|
|
159
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
160
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
161
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
162
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
163
|
-
k_type = Regexp.last_match[:k_type]
|
|
164
|
-
v_type = Regexp.last_match[:v_type]
|
|
165
|
-
{}.tap do |hash|
|
|
166
|
-
value.each do |k, v|
|
|
167
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
else # model
|
|
171
|
-
# models (e.g. Pet) or oneOf
|
|
172
|
-
klass = Bandwidth.const_get(type)
|
|
173
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
174
|
-
end
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Returns the string representation of the object
|
|
178
|
-
# @return [String] String presentation of the object
|
|
179
|
-
def to_s
|
|
180
|
-
to_hash.to_s
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
-
# @return [Hash] Returns the object in the form of hash
|
|
185
|
-
def to_body
|
|
186
|
-
to_hash
|
|
187
|
-
end
|
|
188
|
-
|
|
189
140
|
# Returns the object in the form of hash
|
|
190
141
|
# @return [Hash] Returns the object in the form of hash
|
|
191
142
|
def to_hash
|
|
@@ -201,23 +152,5 @@ module Bandwidth
|
|
|
201
152
|
end
|
|
202
153
|
hash
|
|
203
154
|
end
|
|
204
|
-
|
|
205
|
-
# Outputs non-array value in the form of hash
|
|
206
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
207
|
-
# @param [Object] value Any valid value
|
|
208
|
-
# @return [Hash] Returns the value in the form of hash
|
|
209
|
-
def _to_hash(value)
|
|
210
|
-
if value.is_a?(Array)
|
|
211
|
-
value.compact.map { |v| _to_hash(v) }
|
|
212
|
-
elsif value.is_a?(Hash)
|
|
213
|
-
{}.tap do |hash|
|
|
214
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
215
|
-
end
|
|
216
|
-
elsif value.respond_to? :to_hash
|
|
217
|
-
value.to_hash
|
|
218
|
-
else
|
|
219
|
-
value
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
155
|
end
|
|
223
156
|
end
|