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
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Bandwidth
|
|
3
|
+
|
|
4
|
+
#Bandwidth's Communication APIs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: letstalk@bandwidth.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Bandwidth
|
|
17
|
+
class MultiChannelChannelListRBMObject < ApiModelBase
|
|
18
|
+
# The sender ID of the message. This could be an alphanumeric sender ID.
|
|
19
|
+
attr_accessor :from
|
|
20
|
+
|
|
21
|
+
# The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.
|
|
22
|
+
attr_accessor :application_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :channel
|
|
25
|
+
|
|
26
|
+
attr_accessor :content
|
|
27
|
+
|
|
28
|
+
class EnumAttributeValidator
|
|
29
|
+
attr_reader :datatype
|
|
30
|
+
attr_reader :allowable_values
|
|
31
|
+
|
|
32
|
+
def initialize(datatype, allowable_values)
|
|
33
|
+
@allowable_values = allowable_values.map do |value|
|
|
34
|
+
case datatype.to_s
|
|
35
|
+
when /Integer/i
|
|
36
|
+
value.to_i
|
|
37
|
+
when /Float/i
|
|
38
|
+
value.to_f
|
|
39
|
+
else
|
|
40
|
+
value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def valid?(value)
|
|
46
|
+
!value || allowable_values.include?(value)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
|
+
def self.attribute_map
|
|
52
|
+
{
|
|
53
|
+
:'from' => :'from',
|
|
54
|
+
:'application_id' => :'applicationId',
|
|
55
|
+
:'channel' => :'channel',
|
|
56
|
+
:'content' => :'content'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute mapping this model knows about
|
|
61
|
+
def self.acceptable_attribute_map
|
|
62
|
+
attribute_map
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
acceptable_attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
def self.openapi_types
|
|
72
|
+
{
|
|
73
|
+
:'from' => :'String',
|
|
74
|
+
:'application_id' => :'String',
|
|
75
|
+
:'channel' => :'MultiChannelMessageChannelEnum',
|
|
76
|
+
:'content' => :'MultiChannelChannelListRBMObjectAllOfContent'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List of attributes with nullable: true
|
|
81
|
+
def self.openapi_nullable
|
|
82
|
+
Set.new([
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
87
|
+
def self.openapi_all_of
|
|
88
|
+
[
|
|
89
|
+
:'MultiChannelChannelListObjectBase'
|
|
90
|
+
]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Initializes the object
|
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
|
+
def initialize(attributes = {})
|
|
96
|
+
if (!attributes.is_a?(Hash))
|
|
97
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MultiChannelChannelListRBMObject` initialize method'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
101
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
103
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MultiChannelChannelListRBMObject`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
105
|
+
end
|
|
106
|
+
h[k.to_sym] = v
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'from')
|
|
110
|
+
self.from = attributes[:'from']
|
|
111
|
+
else
|
|
112
|
+
self.from = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'application_id')
|
|
116
|
+
self.application_id = attributes[:'application_id']
|
|
117
|
+
else
|
|
118
|
+
self.application_id = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'channel')
|
|
122
|
+
self.channel = attributes[:'channel']
|
|
123
|
+
else
|
|
124
|
+
self.channel = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'content')
|
|
128
|
+
self.content = attributes[:'content']
|
|
129
|
+
else
|
|
130
|
+
self.content = nil
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
135
|
+
# @return Array for valid properties with the reasons
|
|
136
|
+
def list_invalid_properties
|
|
137
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
138
|
+
invalid_properties = Array.new
|
|
139
|
+
if @from.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @application_id.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @channel.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "channel", channel cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @content.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
invalid_properties
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Check to see if the all the properties in the model are valid
|
|
159
|
+
# @return true if the model is valid
|
|
160
|
+
def valid?
|
|
161
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
162
|
+
return false if @from.nil?
|
|
163
|
+
return false if @application_id.nil?
|
|
164
|
+
return false if @channel.nil?
|
|
165
|
+
return false if @content.nil?
|
|
166
|
+
true
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] from Value to be assigned
|
|
171
|
+
def from=(from)
|
|
172
|
+
if from.nil?
|
|
173
|
+
fail ArgumentError, 'from cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@from = from
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Custom attribute writer method with validation
|
|
180
|
+
# @param [Object] application_id Value to be assigned
|
|
181
|
+
def application_id=(application_id)
|
|
182
|
+
if application_id.nil?
|
|
183
|
+
fail ArgumentError, 'application_id cannot be nil'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@application_id = application_id
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Custom attribute writer method with validation
|
|
190
|
+
# @param [Object] channel Value to be assigned
|
|
191
|
+
def channel=(channel)
|
|
192
|
+
if channel.nil?
|
|
193
|
+
fail ArgumentError, 'channel cannot be nil'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
@channel = channel
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Custom attribute writer method with validation
|
|
200
|
+
# @param [Object] content Value to be assigned
|
|
201
|
+
def content=(content)
|
|
202
|
+
if content.nil?
|
|
203
|
+
fail ArgumentError, 'content cannot be nil'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
@content = content
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Checks equality by comparing each attribute.
|
|
210
|
+
# @param [Object] Object to be compared
|
|
211
|
+
def ==(o)
|
|
212
|
+
return true if self.equal?(o)
|
|
213
|
+
self.class == o.class &&
|
|
214
|
+
from == o.from &&
|
|
215
|
+
application_id == o.application_id &&
|
|
216
|
+
channel == o.channel &&
|
|
217
|
+
content == o.content
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# @see the `==` method
|
|
221
|
+
# @param [Object] Object to be compared
|
|
222
|
+
def eql?(o)
|
|
223
|
+
self == o
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Calculates hash code according to all attributes.
|
|
227
|
+
# @return [Integer] Hash code
|
|
228
|
+
def hash
|
|
229
|
+
[from, application_id, channel, content].hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Builds the object from hash
|
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
234
|
+
# @return [Object] Returns the model itself
|
|
235
|
+
def self.build_from_hash(attributes)
|
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
|
237
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
238
|
+
transformed_hash = {}
|
|
239
|
+
openapi_types.each_pair do |key, type|
|
|
240
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
241
|
+
transformed_hash["#{key}"] = nil
|
|
242
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
243
|
+
# check to ensure the input is an array given that the attribute
|
|
244
|
+
# is documented as an array but the input is not
|
|
245
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
246
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
247
|
+
end
|
|
248
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
249
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
new(transformed_hash)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Returns the object in the form of hash
|
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
|
257
|
+
def to_hash
|
|
258
|
+
hash = {}
|
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
260
|
+
value = self.send(attr)
|
|
261
|
+
if value.nil?
|
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
hash[param] = _to_hash(value)
|
|
267
|
+
end
|
|
268
|
+
hash
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
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,16 +15,14 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Bandwidth
|
|
17
17
|
# The content of the message.
|
|
18
|
-
module
|
|
18
|
+
module MultiChannelChannelListRBMObjectAllOfContent
|
|
19
19
|
class << self
|
|
20
20
|
# List of class defined in oneOf (OpenAPI v3)
|
|
21
21
|
def openapi_one_of
|
|
22
22
|
[
|
|
23
|
-
:'MmsMessageContent',
|
|
24
23
|
:'RbmMessageContentRichCard',
|
|
25
24
|
:'RbmMessageContentText',
|
|
26
|
-
:'RbmMessageMedia'
|
|
27
|
-
:'SmsMessageContent'
|
|
25
|
+
:'RbmMessageMedia'
|
|
28
26
|
]
|
|
29
27
|
end
|
|
30
28
|
|
|
@@ -42,8 +40,7 @@ module Bandwidth
|
|
|
42
40
|
openapi_one_of.each do |klass|
|
|
43
41
|
begin
|
|
44
42
|
next if klass == :AnyType # "nullable: true"
|
|
45
|
-
|
|
46
|
-
return typed_data if typed_data
|
|
43
|
+
return find_and_cast_into_type(klass, data)
|
|
47
44
|
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
48
45
|
end
|
|
49
46
|
end
|
|
@@ -69,7 +66,7 @@ module Bandwidth
|
|
|
69
66
|
when 'Time'
|
|
70
67
|
return Time.parse(data)
|
|
71
68
|
when 'Date'
|
|
72
|
-
return Date.
|
|
69
|
+
return Date.iso8601(data)
|
|
73
70
|
when 'String'
|
|
74
71
|
return data if data.instance_of?(String)
|
|
75
72
|
when 'Object' # "type: object"
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Bandwidth
|
|
3
|
+
|
|
4
|
+
#Bandwidth's Communication APIs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: letstalk@bandwidth.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Bandwidth
|
|
17
|
+
class MultiChannelChannelListRBMResponseObject < ApiModelBase
|
|
18
|
+
# The sender ID of the message. This could be an alphanumeric sender ID.
|
|
19
|
+
attr_accessor :from
|
|
20
|
+
|
|
21
|
+
# The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.
|
|
22
|
+
attr_accessor :application_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :channel
|
|
25
|
+
|
|
26
|
+
attr_accessor :content
|
|
27
|
+
|
|
28
|
+
# The Bandwidth senderId associated with the message. Identical to 'from'.
|
|
29
|
+
attr_accessor :owner
|
|
30
|
+
|
|
31
|
+
class EnumAttributeValidator
|
|
32
|
+
attr_reader :datatype
|
|
33
|
+
attr_reader :allowable_values
|
|
34
|
+
|
|
35
|
+
def initialize(datatype, allowable_values)
|
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
|
37
|
+
case datatype.to_s
|
|
38
|
+
when /Integer/i
|
|
39
|
+
value.to_i
|
|
40
|
+
when /Float/i
|
|
41
|
+
value.to_f
|
|
42
|
+
else
|
|
43
|
+
value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def valid?(value)
|
|
49
|
+
!value || allowable_values.include?(value)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
:'from' => :'from',
|
|
57
|
+
:'application_id' => :'applicationId',
|
|
58
|
+
:'channel' => :'channel',
|
|
59
|
+
:'content' => :'content',
|
|
60
|
+
:'owner' => :'owner'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Returns attribute mapping this model knows about
|
|
65
|
+
def self.acceptable_attribute_map
|
|
66
|
+
attribute_map
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns all the JSON keys this model knows about
|
|
70
|
+
def self.acceptable_attributes
|
|
71
|
+
acceptable_attribute_map.values
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute type mapping.
|
|
75
|
+
def self.openapi_types
|
|
76
|
+
{
|
|
77
|
+
:'from' => :'String',
|
|
78
|
+
:'application_id' => :'String',
|
|
79
|
+
:'channel' => :'MultiChannelMessageChannelEnum',
|
|
80
|
+
:'content' => :'MultiChannelChannelListRBMObjectAllOfContent',
|
|
81
|
+
:'owner' => :'String'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# List of attributes with nullable: true
|
|
86
|
+
def self.openapi_nullable
|
|
87
|
+
Set.new([
|
|
88
|
+
])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
92
|
+
def self.openapi_all_of
|
|
93
|
+
[
|
|
94
|
+
:'MultiChannelChannelListOwnerObject',
|
|
95
|
+
:'MultiChannelChannelListRBMObject'
|
|
96
|
+
]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Initializes the object
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
def initialize(attributes = {})
|
|
102
|
+
if (!attributes.is_a?(Hash))
|
|
103
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MultiChannelChannelListRBMResponseObject` initialize method'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
107
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
109
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MultiChannelChannelListRBMResponseObject`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
111
|
+
end
|
|
112
|
+
h[k.to_sym] = v
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'from')
|
|
116
|
+
self.from = attributes[:'from']
|
|
117
|
+
else
|
|
118
|
+
self.from = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'application_id')
|
|
122
|
+
self.application_id = attributes[:'application_id']
|
|
123
|
+
else
|
|
124
|
+
self.application_id = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'channel')
|
|
128
|
+
self.channel = attributes[:'channel']
|
|
129
|
+
else
|
|
130
|
+
self.channel = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'content')
|
|
134
|
+
self.content = attributes[:'content']
|
|
135
|
+
else
|
|
136
|
+
self.content = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'owner')
|
|
140
|
+
self.owner = attributes[:'owner']
|
|
141
|
+
else
|
|
142
|
+
self.owner = nil
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
147
|
+
# @return Array for valid properties with the reasons
|
|
148
|
+
def list_invalid_properties
|
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
150
|
+
invalid_properties = Array.new
|
|
151
|
+
if @from.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @application_id.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @channel.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "channel", channel cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @content.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @owner.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
invalid_properties
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Check to see if the all the properties in the model are valid
|
|
175
|
+
# @return true if the model is valid
|
|
176
|
+
def valid?
|
|
177
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
178
|
+
return false if @from.nil?
|
|
179
|
+
return false if @application_id.nil?
|
|
180
|
+
return false if @channel.nil?
|
|
181
|
+
return false if @content.nil?
|
|
182
|
+
return false if @owner.nil?
|
|
183
|
+
true
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] from Value to be assigned
|
|
188
|
+
def from=(from)
|
|
189
|
+
if from.nil?
|
|
190
|
+
fail ArgumentError, 'from cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@from = from
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] application_id Value to be assigned
|
|
198
|
+
def application_id=(application_id)
|
|
199
|
+
if application_id.nil?
|
|
200
|
+
fail ArgumentError, 'application_id cannot be nil'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@application_id = application_id
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] channel Value to be assigned
|
|
208
|
+
def channel=(channel)
|
|
209
|
+
if channel.nil?
|
|
210
|
+
fail ArgumentError, 'channel cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
@channel = channel
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Custom attribute writer method with validation
|
|
217
|
+
# @param [Object] content Value to be assigned
|
|
218
|
+
def content=(content)
|
|
219
|
+
if content.nil?
|
|
220
|
+
fail ArgumentError, 'content cannot be nil'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
@content = content
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Custom attribute writer method with validation
|
|
227
|
+
# @param [Object] owner Value to be assigned
|
|
228
|
+
def owner=(owner)
|
|
229
|
+
if owner.nil?
|
|
230
|
+
fail ArgumentError, 'owner cannot be nil'
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
@owner = owner
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Checks equality by comparing each attribute.
|
|
237
|
+
# @param [Object] Object to be compared
|
|
238
|
+
def ==(o)
|
|
239
|
+
return true if self.equal?(o)
|
|
240
|
+
self.class == o.class &&
|
|
241
|
+
from == o.from &&
|
|
242
|
+
application_id == o.application_id &&
|
|
243
|
+
channel == o.channel &&
|
|
244
|
+
content == o.content &&
|
|
245
|
+
owner == o.owner
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# @see the `==` method
|
|
249
|
+
# @param [Object] Object to be compared
|
|
250
|
+
def eql?(o)
|
|
251
|
+
self == o
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Calculates hash code according to all attributes.
|
|
255
|
+
# @return [Integer] Hash code
|
|
256
|
+
def hash
|
|
257
|
+
[from, application_id, channel, content, owner].hash
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Builds the object from hash
|
|
261
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
262
|
+
# @return [Object] Returns the model itself
|
|
263
|
+
def self.build_from_hash(attributes)
|
|
264
|
+
return nil unless attributes.is_a?(Hash)
|
|
265
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
266
|
+
transformed_hash = {}
|
|
267
|
+
openapi_types.each_pair do |key, type|
|
|
268
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
269
|
+
transformed_hash["#{key}"] = nil
|
|
270
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
271
|
+
# check to ensure the input is an array given that the attribute
|
|
272
|
+
# is documented as an array but the input is not
|
|
273
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
274
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
275
|
+
end
|
|
276
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
277
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
new(transformed_hash)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Returns the object in the form of hash
|
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
|
285
|
+
def to_hash
|
|
286
|
+
hash = {}
|
|
287
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
288
|
+
value = self.send(attr)
|
|
289
|
+
if value.nil?
|
|
290
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
291
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
hash[param] = _to_hash(value)
|
|
295
|
+
end
|
|
296
|
+
hash
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
end
|