bandwidth-sdk 17.0.0 → 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 +4 -4
- data/README.md +29 -3
- data/bandwidth-sdk.gemspec +1 -2
- data/bandwidth.yml +85 -22
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +317 -487
- data/coverage/index.html +6317 -7908
- 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/MultiChannelAction.md +32 -81
- data/docs/MultiChannelApi.md +5 -2
- data/docs/{MultiChannelChannelListObject.md → MultiChannelChannelListMMSObject.md} +3 -3
- data/docs/{MultiChannelMessageResponseDataChannelListInner.md → MultiChannelChannelListMMSResponseObject.md} +3 -3
- data/docs/MultiChannelChannelListObjectBase.md +22 -0
- data/docs/MultiChannelChannelListOwnerObject.md +18 -0
- data/docs/MultiChannelChannelListRBMObject.md +24 -0
- data/docs/{MultiChannelChannelListObjectContent.md → MultiChannelChannelListRBMObjectAllOfContent.md} +6 -10
- data/docs/MultiChannelChannelListRBMResponseObject.md +26 -0
- data/docs/MultiChannelChannelListRequestObject.md +24 -0
- data/docs/MultiChannelChannelListResponseObject.md +26 -0
- data/docs/MultiChannelChannelListSMSObject.md +24 -0
- data/docs/MultiChannelChannelListSMSResponseObject.md +26 -0
- data/docs/MultiChannelMessageRequest.md +1 -1
- data/docs/MultiChannelMessageResponseData.md +1 -1
- data/docs/PhoneNumberLookupApi.md +12 -3
- data/docs/RbmActionBase.md +1 -1
- data/docs/RbmSuggestionResponse.md +1 -1
- 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 +71 -27
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +41 -78
- data/lib/bandwidth-sdk/models/{multi_channel_channel_list_object.rb → multi_channel_channel_list_mms_object.rb} +60 -80
- data/lib/bandwidth-sdk/models/{multi_channel_message_response_data_channel_list_inner.rb → multi_channel_channel_list_mms_response_object.rb} +65 -81
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +238 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +163 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +271 -0
- data/lib/bandwidth-sdk/models/{multi_channel_channel_list_object_content.rb → multi_channel_channel_list_rbm_object_all_of_content.rb} +5 -8
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +299 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +103 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +103 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +271 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +299 -0
- 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 +22 -79
- data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +42 -79
- 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 +13 -4
- 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 +128 -25
- data/spec/smoke/phone_number_lookup_api_spec.rb +7 -5
- 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/api/multi_channel_api_spec.rb +13 -2
- data/spec/unit/models/verify_code_request_spec.rb +1 -1
- metadata +27 -8
|
@@ -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 CreateCallResponse
|
|
17
|
+
class CreateCallResponse < ApiModelBase
|
|
18
18
|
# The id of the application associated with the `from` number.
|
|
19
19
|
attr_accessor :application_id
|
|
20
20
|
|
|
@@ -124,9 +124,14 @@ module Bandwidth
|
|
|
124
124
|
}
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
+
# Returns attribute mapping this model knows about
|
|
128
|
+
def self.acceptable_attribute_map
|
|
129
|
+
attribute_map
|
|
130
|
+
end
|
|
131
|
+
|
|
127
132
|
# Returns all the JSON keys this model knows about
|
|
128
133
|
def self.acceptable_attributes
|
|
129
|
-
|
|
134
|
+
acceptable_attribute_map.values
|
|
130
135
|
end
|
|
131
136
|
|
|
132
137
|
# Attribute type mapping.
|
|
@@ -182,9 +187,10 @@ module Bandwidth
|
|
|
182
187
|
end
|
|
183
188
|
|
|
184
189
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
190
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
185
191
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
186
|
-
if (!
|
|
187
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateCallResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
192
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
193
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateCallResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
188
194
|
end
|
|
189
195
|
h[k.to_sym] = v
|
|
190
196
|
}
|
|
@@ -364,6 +370,76 @@ module Bandwidth
|
|
|
364
370
|
true
|
|
365
371
|
end
|
|
366
372
|
|
|
373
|
+
# Custom attribute writer method with validation
|
|
374
|
+
# @param [Object] application_id Value to be assigned
|
|
375
|
+
def application_id=(application_id)
|
|
376
|
+
if application_id.nil?
|
|
377
|
+
fail ArgumentError, 'application_id cannot be nil'
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
@application_id = application_id
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Custom attribute writer method with validation
|
|
384
|
+
# @param [Object] account_id Value to be assigned
|
|
385
|
+
def account_id=(account_id)
|
|
386
|
+
if account_id.nil?
|
|
387
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
@account_id = account_id
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Custom attribute writer method with validation
|
|
394
|
+
# @param [Object] call_id Value to be assigned
|
|
395
|
+
def call_id=(call_id)
|
|
396
|
+
if call_id.nil?
|
|
397
|
+
fail ArgumentError, 'call_id cannot be nil'
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
@call_id = call_id
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Custom attribute writer method with validation
|
|
404
|
+
# @param [Object] to Value to be assigned
|
|
405
|
+
def to=(to)
|
|
406
|
+
if to.nil?
|
|
407
|
+
fail ArgumentError, 'to cannot be nil'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
@to = to
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Custom attribute writer method with validation
|
|
414
|
+
# @param [Object] from Value to be assigned
|
|
415
|
+
def from=(from)
|
|
416
|
+
if from.nil?
|
|
417
|
+
fail ArgumentError, 'from cannot be nil'
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
@from = from
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Custom attribute writer method with validation
|
|
424
|
+
# @param [Object] call_url Value to be assigned
|
|
425
|
+
def call_url=(call_url)
|
|
426
|
+
if call_url.nil?
|
|
427
|
+
fail ArgumentError, 'call_url cannot be nil'
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
@call_url = call_url
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Custom attribute writer method with validation
|
|
434
|
+
# @param [Object] answer_url Value to be assigned
|
|
435
|
+
def answer_url=(answer_url)
|
|
436
|
+
if answer_url.nil?
|
|
437
|
+
fail ArgumentError, 'answer_url cannot be nil'
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
@answer_url = answer_url
|
|
441
|
+
end
|
|
442
|
+
|
|
367
443
|
# Custom attribute writer method with validation
|
|
368
444
|
# @param [Object] username Value to be assigned
|
|
369
445
|
def username=(username)
|
|
@@ -467,61 +543,6 @@ module Bandwidth
|
|
|
467
543
|
new(transformed_hash)
|
|
468
544
|
end
|
|
469
545
|
|
|
470
|
-
# Deserializes the data based on type
|
|
471
|
-
# @param string type Data type
|
|
472
|
-
# @param string value Value to be deserialized
|
|
473
|
-
# @return [Object] Deserialized data
|
|
474
|
-
def self._deserialize(type, value)
|
|
475
|
-
case type.to_sym
|
|
476
|
-
when :Time
|
|
477
|
-
Time.parse(value)
|
|
478
|
-
when :Date
|
|
479
|
-
Date.parse(value)
|
|
480
|
-
when :String
|
|
481
|
-
value.to_s
|
|
482
|
-
when :Integer
|
|
483
|
-
value.to_i
|
|
484
|
-
when :Float
|
|
485
|
-
value.to_f
|
|
486
|
-
when :Boolean
|
|
487
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
488
|
-
true
|
|
489
|
-
else
|
|
490
|
-
false
|
|
491
|
-
end
|
|
492
|
-
when :Object
|
|
493
|
-
# generic object (usually a Hash), return directly
|
|
494
|
-
value
|
|
495
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
496
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
497
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
498
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
499
|
-
k_type = Regexp.last_match[:k_type]
|
|
500
|
-
v_type = Regexp.last_match[:v_type]
|
|
501
|
-
{}.tap do |hash|
|
|
502
|
-
value.each do |k, v|
|
|
503
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
504
|
-
end
|
|
505
|
-
end
|
|
506
|
-
else # model
|
|
507
|
-
# models (e.g. Pet) or oneOf
|
|
508
|
-
klass = Bandwidth.const_get(type)
|
|
509
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
510
|
-
end
|
|
511
|
-
end
|
|
512
|
-
|
|
513
|
-
# Returns the string representation of the object
|
|
514
|
-
# @return [String] String presentation of the object
|
|
515
|
-
def to_s
|
|
516
|
-
to_hash.to_s
|
|
517
|
-
end
|
|
518
|
-
|
|
519
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
520
|
-
# @return [Hash] Returns the object in the form of hash
|
|
521
|
-
def to_body
|
|
522
|
-
to_hash
|
|
523
|
-
end
|
|
524
|
-
|
|
525
546
|
# Returns the object in the form of hash
|
|
526
547
|
# @return [Hash] Returns the object in the form of hash
|
|
527
548
|
def to_hash
|
|
@@ -537,23 +558,5 @@ module Bandwidth
|
|
|
537
558
|
end
|
|
538
559
|
hash
|
|
539
560
|
end
|
|
540
|
-
|
|
541
|
-
# Outputs non-array value in the form of hash
|
|
542
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
543
|
-
# @param [Object] value Any valid value
|
|
544
|
-
# @return [Hash] Returns the value in the form of hash
|
|
545
|
-
def _to_hash(value)
|
|
546
|
-
if value.is_a?(Array)
|
|
547
|
-
value.compact.map { |v| _to_hash(v) }
|
|
548
|
-
elsif value.is_a?(Hash)
|
|
549
|
-
{}.tap do |hash|
|
|
550
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
551
|
-
end
|
|
552
|
-
elsif value.respond_to? :to_hash
|
|
553
|
-
value.to_hash
|
|
554
|
-
else
|
|
555
|
-
value
|
|
556
|
-
end
|
|
557
|
-
end
|
|
558
561
|
end
|
|
559
562
|
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 CreateMessageRequestError
|
|
17
|
+
class CreateMessageRequestError < ApiModelBase
|
|
18
18
|
attr_accessor :type
|
|
19
19
|
|
|
20
20
|
attr_accessor :description
|
|
@@ -30,9 +30,14 @@ module Bandwidth
|
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Returns all the JSON keys this model knows about
|
|
34
39
|
def self.acceptable_attributes
|
|
35
|
-
|
|
40
|
+
acceptable_attribute_map.values
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# Attribute type mapping.
|
|
@@ -58,9 +63,10 @@ module Bandwidth
|
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
-
if (!
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateMessageRequestError`. Please check the name to make sure it's valid. List of attributes: " +
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateMessageRequestError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
70
|
end
|
|
65
71
|
h[k.to_sym] = v
|
|
66
72
|
}
|
|
@@ -109,6 +115,26 @@ module Bandwidth
|
|
|
109
115
|
true
|
|
110
116
|
end
|
|
111
117
|
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] type Value to be assigned
|
|
120
|
+
def type=(type)
|
|
121
|
+
if type.nil?
|
|
122
|
+
fail ArgumentError, 'type cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@type = type
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] description Value to be assigned
|
|
130
|
+
def description=(description)
|
|
131
|
+
if description.nil?
|
|
132
|
+
fail ArgumentError, 'description cannot be nil'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@description = description
|
|
136
|
+
end
|
|
137
|
+
|
|
112
138
|
# Checks equality by comparing each attribute.
|
|
113
139
|
# @param [Object] Object to be compared
|
|
114
140
|
def ==(o)
|
|
@@ -154,61 +180,6 @@ module Bandwidth
|
|
|
154
180
|
new(transformed_hash)
|
|
155
181
|
end
|
|
156
182
|
|
|
157
|
-
# Deserializes the data based on type
|
|
158
|
-
# @param string type Data type
|
|
159
|
-
# @param string value Value to be deserialized
|
|
160
|
-
# @return [Object] Deserialized data
|
|
161
|
-
def self._deserialize(type, value)
|
|
162
|
-
case type.to_sym
|
|
163
|
-
when :Time
|
|
164
|
-
Time.parse(value)
|
|
165
|
-
when :Date
|
|
166
|
-
Date.parse(value)
|
|
167
|
-
when :String
|
|
168
|
-
value.to_s
|
|
169
|
-
when :Integer
|
|
170
|
-
value.to_i
|
|
171
|
-
when :Float
|
|
172
|
-
value.to_f
|
|
173
|
-
when :Boolean
|
|
174
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
175
|
-
true
|
|
176
|
-
else
|
|
177
|
-
false
|
|
178
|
-
end
|
|
179
|
-
when :Object
|
|
180
|
-
# generic object (usually a Hash), return directly
|
|
181
|
-
value
|
|
182
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
183
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
184
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
185
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
186
|
-
k_type = Regexp.last_match[:k_type]
|
|
187
|
-
v_type = Regexp.last_match[:v_type]
|
|
188
|
-
{}.tap do |hash|
|
|
189
|
-
value.each do |k, v|
|
|
190
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
191
|
-
end
|
|
192
|
-
end
|
|
193
|
-
else # model
|
|
194
|
-
# models (e.g. Pet) or oneOf
|
|
195
|
-
klass = Bandwidth.const_get(type)
|
|
196
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
197
|
-
end
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
# Returns the string representation of the object
|
|
201
|
-
# @return [String] String presentation of the object
|
|
202
|
-
def to_s
|
|
203
|
-
to_hash.to_s
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
207
|
-
# @return [Hash] Returns the object in the form of hash
|
|
208
|
-
def to_body
|
|
209
|
-
to_hash
|
|
210
|
-
end
|
|
211
|
-
|
|
212
183
|
# Returns the object in the form of hash
|
|
213
184
|
# @return [Hash] Returns the object in the form of hash
|
|
214
185
|
def to_hash
|
|
@@ -224,23 +195,5 @@ module Bandwidth
|
|
|
224
195
|
end
|
|
225
196
|
hash
|
|
226
197
|
end
|
|
227
|
-
|
|
228
|
-
# Outputs non-array value in the form of hash
|
|
229
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
230
|
-
# @param [Object] value Any valid value
|
|
231
|
-
# @return [Hash] Returns the value in the form of hash
|
|
232
|
-
def _to_hash(value)
|
|
233
|
-
if value.is_a?(Array)
|
|
234
|
-
value.compact.map { |v| _to_hash(v) }
|
|
235
|
-
elsif value.is_a?(Hash)
|
|
236
|
-
{}.tap do |hash|
|
|
237
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
238
|
-
end
|
|
239
|
-
elsif value.respond_to? :to_hash
|
|
240
|
-
value.to_hash
|
|
241
|
-
else
|
|
242
|
-
value
|
|
243
|
-
end
|
|
244
|
-
end
|
|
245
198
|
end
|
|
246
199
|
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 CreateMultiChannelMessageResponse
|
|
17
|
+
class CreateMultiChannelMessageResponse < ApiModelBase
|
|
18
18
|
attr_accessor :links
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -30,9 +30,14 @@ module Bandwidth
|
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Returns all the JSON keys this model knows about
|
|
34
39
|
def self.acceptable_attributes
|
|
35
|
-
|
|
40
|
+
acceptable_attribute_map.values
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# Attribute type mapping.
|
|
@@ -58,9 +63,10 @@ module Bandwidth
|
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
-
if (!
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateMultiChannelMessageResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateMultiChannelMessageResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
70
|
end
|
|
65
71
|
h[k.to_sym] = v
|
|
66
72
|
}
|
|
@@ -142,61 +148,6 @@ module Bandwidth
|
|
|
142
148
|
new(transformed_hash)
|
|
143
149
|
end
|
|
144
150
|
|
|
145
|
-
# Deserializes the data based on type
|
|
146
|
-
# @param string type Data type
|
|
147
|
-
# @param string value Value to be deserialized
|
|
148
|
-
# @return [Object] Deserialized data
|
|
149
|
-
def self._deserialize(type, value)
|
|
150
|
-
case type.to_sym
|
|
151
|
-
when :Time
|
|
152
|
-
Time.parse(value)
|
|
153
|
-
when :Date
|
|
154
|
-
Date.parse(value)
|
|
155
|
-
when :String
|
|
156
|
-
value.to_s
|
|
157
|
-
when :Integer
|
|
158
|
-
value.to_i
|
|
159
|
-
when :Float
|
|
160
|
-
value.to_f
|
|
161
|
-
when :Boolean
|
|
162
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
163
|
-
true
|
|
164
|
-
else
|
|
165
|
-
false
|
|
166
|
-
end
|
|
167
|
-
when :Object
|
|
168
|
-
# generic object (usually a Hash), return directly
|
|
169
|
-
value
|
|
170
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
171
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
172
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
173
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
174
|
-
k_type = Regexp.last_match[:k_type]
|
|
175
|
-
v_type = Regexp.last_match[:v_type]
|
|
176
|
-
{}.tap do |hash|
|
|
177
|
-
value.each do |k, v|
|
|
178
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
else # model
|
|
182
|
-
# models (e.g. Pet) or oneOf
|
|
183
|
-
klass = Bandwidth.const_get(type)
|
|
184
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
185
|
-
end
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# Returns the string representation of the object
|
|
189
|
-
# @return [String] String presentation of the object
|
|
190
|
-
def to_s
|
|
191
|
-
to_hash.to_s
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
-
# @return [Hash] Returns the object in the form of hash
|
|
196
|
-
def to_body
|
|
197
|
-
to_hash
|
|
198
|
-
end
|
|
199
|
-
|
|
200
151
|
# Returns the object in the form of hash
|
|
201
152
|
# @return [Hash] Returns the object in the form of hash
|
|
202
153
|
def to_hash
|
|
@@ -212,23 +163,5 @@ module Bandwidth
|
|
|
212
163
|
end
|
|
213
164
|
hash
|
|
214
165
|
end
|
|
215
|
-
|
|
216
|
-
# Outputs non-array value in the form of hash
|
|
217
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
218
|
-
# @param [Object] value Any valid value
|
|
219
|
-
# @return [Hash] Returns the value in the form of hash
|
|
220
|
-
def _to_hash(value)
|
|
221
|
-
if value.is_a?(Array)
|
|
222
|
-
value.compact.map { |v| _to_hash(v) }
|
|
223
|
-
elsif value.is_a?(Hash)
|
|
224
|
-
{}.tap do |hash|
|
|
225
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
226
|
-
end
|
|
227
|
-
elsif value.respond_to? :to_hash
|
|
228
|
-
value.to_hash
|
|
229
|
-
else
|
|
230
|
-
value
|
|
231
|
-
end
|
|
232
|
-
end
|
|
233
166
|
end
|
|
234
167
|
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 CreateSyncLookupResponse
|
|
17
|
+
class CreateSyncLookupResponse < ApiModelBase
|
|
18
18
|
attr_accessor :links
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -30,9 +30,14 @@ module Bandwidth
|
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Returns all the JSON keys this model knows about
|
|
34
39
|
def self.acceptable_attributes
|
|
35
|
-
|
|
40
|
+
acceptable_attribute_map.values
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# Attribute type mapping.
|
|
@@ -58,9 +63,10 @@ module Bandwidth
|
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
-
if (!
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateSyncLookupResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateSyncLookupResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
70
|
end
|
|
65
71
|
h[k.to_sym] = v
|
|
66
72
|
}
|
|
@@ -142,61 +148,6 @@ module Bandwidth
|
|
|
142
148
|
new(transformed_hash)
|
|
143
149
|
end
|
|
144
150
|
|
|
145
|
-
# Deserializes the data based on type
|
|
146
|
-
# @param string type Data type
|
|
147
|
-
# @param string value Value to be deserialized
|
|
148
|
-
# @return [Object] Deserialized data
|
|
149
|
-
def self._deserialize(type, value)
|
|
150
|
-
case type.to_sym
|
|
151
|
-
when :Time
|
|
152
|
-
Time.parse(value)
|
|
153
|
-
when :Date
|
|
154
|
-
Date.parse(value)
|
|
155
|
-
when :String
|
|
156
|
-
value.to_s
|
|
157
|
-
when :Integer
|
|
158
|
-
value.to_i
|
|
159
|
-
when :Float
|
|
160
|
-
value.to_f
|
|
161
|
-
when :Boolean
|
|
162
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
163
|
-
true
|
|
164
|
-
else
|
|
165
|
-
false
|
|
166
|
-
end
|
|
167
|
-
when :Object
|
|
168
|
-
# generic object (usually a Hash), return directly
|
|
169
|
-
value
|
|
170
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
171
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
172
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
173
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
174
|
-
k_type = Regexp.last_match[:k_type]
|
|
175
|
-
v_type = Regexp.last_match[:v_type]
|
|
176
|
-
{}.tap do |hash|
|
|
177
|
-
value.each do |k, v|
|
|
178
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
else # model
|
|
182
|
-
# models (e.g. Pet) or oneOf
|
|
183
|
-
klass = Bandwidth.const_get(type)
|
|
184
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
185
|
-
end
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# Returns the string representation of the object
|
|
189
|
-
# @return [String] String presentation of the object
|
|
190
|
-
def to_s
|
|
191
|
-
to_hash.to_s
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
-
# @return [Hash] Returns the object in the form of hash
|
|
196
|
-
def to_body
|
|
197
|
-
to_hash
|
|
198
|
-
end
|
|
199
|
-
|
|
200
151
|
# Returns the object in the form of hash
|
|
201
152
|
# @return [Hash] Returns the object in the form of hash
|
|
202
153
|
def to_hash
|
|
@@ -212,23 +163,5 @@ module Bandwidth
|
|
|
212
163
|
end
|
|
213
164
|
hash
|
|
214
165
|
end
|
|
215
|
-
|
|
216
|
-
# Outputs non-array value in the form of hash
|
|
217
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
218
|
-
# @param [Object] value Any valid value
|
|
219
|
-
# @return [Hash] Returns the value in the form of hash
|
|
220
|
-
def _to_hash(value)
|
|
221
|
-
if value.is_a?(Array)
|
|
222
|
-
value.compact.map { |v| _to_hash(v) }
|
|
223
|
-
elsif value.is_a?(Hash)
|
|
224
|
-
{}.tap do |hash|
|
|
225
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
226
|
-
end
|
|
227
|
-
elsif value.respond_to? :to_hash
|
|
228
|
-
value.to_hash
|
|
229
|
-
else
|
|
230
|
-
value
|
|
231
|
-
end
|
|
232
|
-
end
|
|
233
166
|
end
|
|
234
167
|
end
|