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 Media
|
|
17
|
+
class Media < ApiModelBase
|
|
18
18
|
attr_accessor :content
|
|
19
19
|
|
|
20
20
|
attr_accessor :content_length
|
|
@@ -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::Media`. 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::Media`. 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
|
}
|
|
@@ -138,61 +144,6 @@ module Bandwidth
|
|
|
138
144
|
new(transformed_hash)
|
|
139
145
|
end
|
|
140
146
|
|
|
141
|
-
# Deserializes the data based on type
|
|
142
|
-
# @param string type Data type
|
|
143
|
-
# @param string value Value to be deserialized
|
|
144
|
-
# @return [Object] Deserialized data
|
|
145
|
-
def self._deserialize(type, value)
|
|
146
|
-
case type.to_sym
|
|
147
|
-
when :Time
|
|
148
|
-
Time.parse(value)
|
|
149
|
-
when :Date
|
|
150
|
-
Date.parse(value)
|
|
151
|
-
when :String
|
|
152
|
-
value.to_s
|
|
153
|
-
when :Integer
|
|
154
|
-
value.to_i
|
|
155
|
-
when :Float
|
|
156
|
-
value.to_f
|
|
157
|
-
when :Boolean
|
|
158
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
159
|
-
true
|
|
160
|
-
else
|
|
161
|
-
false
|
|
162
|
-
end
|
|
163
|
-
when :Object
|
|
164
|
-
# generic object (usually a Hash), return directly
|
|
165
|
-
value
|
|
166
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
167
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
168
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
169
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
170
|
-
k_type = Regexp.last_match[:k_type]
|
|
171
|
-
v_type = Regexp.last_match[:v_type]
|
|
172
|
-
{}.tap do |hash|
|
|
173
|
-
value.each do |k, v|
|
|
174
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
else # model
|
|
178
|
-
# models (e.g. Pet) or oneOf
|
|
179
|
-
klass = Bandwidth.const_get(type)
|
|
180
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
181
|
-
end
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
# Returns the string representation of the object
|
|
185
|
-
# @return [String] String presentation of the object
|
|
186
|
-
def to_s
|
|
187
|
-
to_hash.to_s
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
191
|
-
# @return [Hash] Returns the object in the form of hash
|
|
192
|
-
def to_body
|
|
193
|
-
to_hash
|
|
194
|
-
end
|
|
195
|
-
|
|
196
147
|
# Returns the object in the form of hash
|
|
197
148
|
# @return [Hash] Returns the object in the form of hash
|
|
198
149
|
def to_hash
|
|
@@ -208,23 +159,5 @@ module Bandwidth
|
|
|
208
159
|
end
|
|
209
160
|
hash
|
|
210
161
|
end
|
|
211
|
-
|
|
212
|
-
# Outputs non-array value in the form of hash
|
|
213
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
-
# @param [Object] value Any valid value
|
|
215
|
-
# @return [Hash] Returns the value in the form of hash
|
|
216
|
-
def _to_hash(value)
|
|
217
|
-
if value.is_a?(Array)
|
|
218
|
-
value.compact.map { |v| _to_hash(v) }
|
|
219
|
-
elsif value.is_a?(Hash)
|
|
220
|
-
{}.tap do |hash|
|
|
221
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
-
end
|
|
223
|
-
elsif value.respond_to? :to_hash
|
|
224
|
-
value.to_hash
|
|
225
|
-
else
|
|
226
|
-
value
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
162
|
end
|
|
230
163
|
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 Message
|
|
17
|
+
class Message < ApiModelBase
|
|
18
18
|
# The id of the message.
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -93,9 +93,14 @@ module Bandwidth
|
|
|
93
93
|
}
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
# Returns attribute mapping this model knows about
|
|
97
|
+
def self.acceptable_attribute_map
|
|
98
|
+
attribute_map
|
|
99
|
+
end
|
|
100
|
+
|
|
96
101
|
# Returns all the JSON keys this model knows about
|
|
97
102
|
def self.acceptable_attributes
|
|
98
|
-
|
|
103
|
+
acceptable_attribute_map.values
|
|
99
104
|
end
|
|
100
105
|
|
|
101
106
|
# Attribute type mapping.
|
|
@@ -131,9 +136,10 @@ module Bandwidth
|
|
|
131
136
|
end
|
|
132
137
|
|
|
133
138
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
139
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
134
140
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
135
|
-
if (!
|
|
136
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Message`. Please check the name to make sure it's valid. List of attributes: " +
|
|
141
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
142
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Message`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
137
143
|
end
|
|
138
144
|
h[k.to_sym] = v
|
|
139
145
|
}
|
|
@@ -285,61 +291,6 @@ module Bandwidth
|
|
|
285
291
|
new(transformed_hash)
|
|
286
292
|
end
|
|
287
293
|
|
|
288
|
-
# Deserializes the data based on type
|
|
289
|
-
# @param string type Data type
|
|
290
|
-
# @param string value Value to be deserialized
|
|
291
|
-
# @return [Object] Deserialized data
|
|
292
|
-
def self._deserialize(type, value)
|
|
293
|
-
case type.to_sym
|
|
294
|
-
when :Time
|
|
295
|
-
Time.parse(value)
|
|
296
|
-
when :Date
|
|
297
|
-
Date.parse(value)
|
|
298
|
-
when :String
|
|
299
|
-
value.to_s
|
|
300
|
-
when :Integer
|
|
301
|
-
value.to_i
|
|
302
|
-
when :Float
|
|
303
|
-
value.to_f
|
|
304
|
-
when :Boolean
|
|
305
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
306
|
-
true
|
|
307
|
-
else
|
|
308
|
-
false
|
|
309
|
-
end
|
|
310
|
-
when :Object
|
|
311
|
-
# generic object (usually a Hash), return directly
|
|
312
|
-
value
|
|
313
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
314
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
315
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
316
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
317
|
-
k_type = Regexp.last_match[:k_type]
|
|
318
|
-
v_type = Regexp.last_match[:v_type]
|
|
319
|
-
{}.tap do |hash|
|
|
320
|
-
value.each do |k, v|
|
|
321
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
322
|
-
end
|
|
323
|
-
end
|
|
324
|
-
else # model
|
|
325
|
-
# models (e.g. Pet) or oneOf
|
|
326
|
-
klass = Bandwidth.const_get(type)
|
|
327
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
328
|
-
end
|
|
329
|
-
end
|
|
330
|
-
|
|
331
|
-
# Returns the string representation of the object
|
|
332
|
-
# @return [String] String presentation of the object
|
|
333
|
-
def to_s
|
|
334
|
-
to_hash.to_s
|
|
335
|
-
end
|
|
336
|
-
|
|
337
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
338
|
-
# @return [Hash] Returns the object in the form of hash
|
|
339
|
-
def to_body
|
|
340
|
-
to_hash
|
|
341
|
-
end
|
|
342
|
-
|
|
343
294
|
# Returns the object in the form of hash
|
|
344
295
|
# @return [Hash] Returns the object in the form of hash
|
|
345
296
|
def to_hash
|
|
@@ -355,23 +306,5 @@ module Bandwidth
|
|
|
355
306
|
end
|
|
356
307
|
hash
|
|
357
308
|
end
|
|
358
|
-
|
|
359
|
-
# Outputs non-array value in the form of hash
|
|
360
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
361
|
-
# @param [Object] value Any valid value
|
|
362
|
-
# @return [Hash] Returns the value in the form of hash
|
|
363
|
-
def _to_hash(value)
|
|
364
|
-
if value.is_a?(Array)
|
|
365
|
-
value.compact.map { |v| _to_hash(v) }
|
|
366
|
-
elsif value.is_a?(Hash)
|
|
367
|
-
{}.tap do |hash|
|
|
368
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
369
|
-
end
|
|
370
|
-
elsif value.respond_to? :to_hash
|
|
371
|
-
value.to_hash
|
|
372
|
-
else
|
|
373
|
-
value
|
|
374
|
-
end
|
|
375
|
-
end
|
|
376
309
|
end
|
|
377
310
|
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 MessageRequest
|
|
17
|
+
class MessageRequest < ApiModelBase
|
|
18
18
|
# The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.
|
|
19
19
|
attr_accessor :application_id
|
|
20
20
|
|
|
@@ -74,9 +74,14 @@ module Bandwidth
|
|
|
74
74
|
}
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
77
82
|
# Returns all the JSON keys this model knows about
|
|
78
83
|
def self.acceptable_attributes
|
|
79
|
-
|
|
84
|
+
acceptable_attribute_map.values
|
|
80
85
|
end
|
|
81
86
|
|
|
82
87
|
# Attribute type mapping.
|
|
@@ -107,9 +112,10 @@ module Bandwidth
|
|
|
107
112
|
end
|
|
108
113
|
|
|
109
114
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
110
116
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
111
|
-
if (!
|
|
112
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MessageRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
|
117
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MessageRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
113
119
|
end
|
|
114
120
|
h[k.to_sym] = v
|
|
115
121
|
}
|
|
@@ -192,6 +198,16 @@ module Bandwidth
|
|
|
192
198
|
true
|
|
193
199
|
end
|
|
194
200
|
|
|
201
|
+
# Custom attribute writer method with validation
|
|
202
|
+
# @param [Object] application_id Value to be assigned
|
|
203
|
+
def application_id=(application_id)
|
|
204
|
+
if application_id.nil?
|
|
205
|
+
fail ArgumentError, 'application_id cannot be nil'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
@application_id = application_id
|
|
209
|
+
end
|
|
210
|
+
|
|
195
211
|
# Custom attribute writer method with validation
|
|
196
212
|
# @param [Object] to Value to be assigned
|
|
197
213
|
def to=(to)
|
|
@@ -202,6 +218,16 @@ module Bandwidth
|
|
|
202
218
|
@to = to
|
|
203
219
|
end
|
|
204
220
|
|
|
221
|
+
# Custom attribute writer method with validation
|
|
222
|
+
# @param [Object] from Value to be assigned
|
|
223
|
+
def from=(from)
|
|
224
|
+
if from.nil?
|
|
225
|
+
fail ArgumentError, 'from cannot be nil'
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
@from = from
|
|
229
|
+
end
|
|
230
|
+
|
|
205
231
|
# Custom attribute writer method with validation
|
|
206
232
|
# @param [Object] text Value to be assigned
|
|
207
233
|
def text=(text)
|
|
@@ -266,61 +292,6 @@ module Bandwidth
|
|
|
266
292
|
new(transformed_hash)
|
|
267
293
|
end
|
|
268
294
|
|
|
269
|
-
# Deserializes the data based on type
|
|
270
|
-
# @param string type Data type
|
|
271
|
-
# @param string value Value to be deserialized
|
|
272
|
-
# @return [Object] Deserialized data
|
|
273
|
-
def self._deserialize(type, value)
|
|
274
|
-
case type.to_sym
|
|
275
|
-
when :Time
|
|
276
|
-
Time.parse(value)
|
|
277
|
-
when :Date
|
|
278
|
-
Date.parse(value)
|
|
279
|
-
when :String
|
|
280
|
-
value.to_s
|
|
281
|
-
when :Integer
|
|
282
|
-
value.to_i
|
|
283
|
-
when :Float
|
|
284
|
-
value.to_f
|
|
285
|
-
when :Boolean
|
|
286
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
287
|
-
true
|
|
288
|
-
else
|
|
289
|
-
false
|
|
290
|
-
end
|
|
291
|
-
when :Object
|
|
292
|
-
# generic object (usually a Hash), return directly
|
|
293
|
-
value
|
|
294
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
295
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
296
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
297
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
298
|
-
k_type = Regexp.last_match[:k_type]
|
|
299
|
-
v_type = Regexp.last_match[:v_type]
|
|
300
|
-
{}.tap do |hash|
|
|
301
|
-
value.each do |k, v|
|
|
302
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
303
|
-
end
|
|
304
|
-
end
|
|
305
|
-
else # model
|
|
306
|
-
# models (e.g. Pet) or oneOf
|
|
307
|
-
klass = Bandwidth.const_get(type)
|
|
308
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
309
|
-
end
|
|
310
|
-
end
|
|
311
|
-
|
|
312
|
-
# Returns the string representation of the object
|
|
313
|
-
# @return [String] String presentation of the object
|
|
314
|
-
def to_s
|
|
315
|
-
to_hash.to_s
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
319
|
-
# @return [Hash] Returns the object in the form of hash
|
|
320
|
-
def to_body
|
|
321
|
-
to_hash
|
|
322
|
-
end
|
|
323
|
-
|
|
324
295
|
# Returns the object in the form of hash
|
|
325
296
|
# @return [Hash] Returns the object in the form of hash
|
|
326
297
|
def to_hash
|
|
@@ -336,23 +307,5 @@ module Bandwidth
|
|
|
336
307
|
end
|
|
337
308
|
hash
|
|
338
309
|
end
|
|
339
|
-
|
|
340
|
-
# Outputs non-array value in the form of hash
|
|
341
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
342
|
-
# @param [Object] value Any valid value
|
|
343
|
-
# @return [Hash] Returns the value in the form of hash
|
|
344
|
-
def _to_hash(value)
|
|
345
|
-
if value.is_a?(Array)
|
|
346
|
-
value.compact.map { |v| _to_hash(v) }
|
|
347
|
-
elsif value.is_a?(Hash)
|
|
348
|
-
{}.tap do |hash|
|
|
349
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
350
|
-
end
|
|
351
|
-
elsif value.respond_to? :to_hash
|
|
352
|
-
value.to_hash
|
|
353
|
-
else
|
|
354
|
-
value
|
|
355
|
-
end
|
|
356
|
-
end
|
|
357
310
|
end
|
|
358
311
|
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 MessagesList
|
|
17
|
+
class MessagesList < ApiModelBase
|
|
18
18
|
# The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000.
|
|
19
19
|
attr_accessor :total_count
|
|
20
20
|
|
|
@@ -31,9 +31,14 @@ module Bandwidth
|
|
|
31
31
|
}
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
34
39
|
# Returns all the JSON keys this model knows about
|
|
35
40
|
def self.acceptable_attributes
|
|
36
|
-
|
|
41
|
+
acceptable_attribute_map.values
|
|
37
42
|
end
|
|
38
43
|
|
|
39
44
|
# Attribute type mapping.
|
|
@@ -59,9 +64,10 @@ module Bandwidth
|
|
|
59
64
|
end
|
|
60
65
|
|
|
61
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
62
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
|
-
if (!
|
|
64
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MessagesList`. Please check the name to make sure it's valid. List of attributes: " +
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MessagesList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
65
71
|
end
|
|
66
72
|
h[k.to_sym] = v
|
|
67
73
|
}
|
|
@@ -141,61 +147,6 @@ module Bandwidth
|
|
|
141
147
|
new(transformed_hash)
|
|
142
148
|
end
|
|
143
149
|
|
|
144
|
-
# Deserializes the data based on type
|
|
145
|
-
# @param string type Data type
|
|
146
|
-
# @param string value Value to be deserialized
|
|
147
|
-
# @return [Object] Deserialized data
|
|
148
|
-
def self._deserialize(type, value)
|
|
149
|
-
case type.to_sym
|
|
150
|
-
when :Time
|
|
151
|
-
Time.parse(value)
|
|
152
|
-
when :Date
|
|
153
|
-
Date.parse(value)
|
|
154
|
-
when :String
|
|
155
|
-
value.to_s
|
|
156
|
-
when :Integer
|
|
157
|
-
value.to_i
|
|
158
|
-
when :Float
|
|
159
|
-
value.to_f
|
|
160
|
-
when :Boolean
|
|
161
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
162
|
-
true
|
|
163
|
-
else
|
|
164
|
-
false
|
|
165
|
-
end
|
|
166
|
-
when :Object
|
|
167
|
-
# generic object (usually a Hash), return directly
|
|
168
|
-
value
|
|
169
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
170
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
171
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
172
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
173
|
-
k_type = Regexp.last_match[:k_type]
|
|
174
|
-
v_type = Regexp.last_match[:v_type]
|
|
175
|
-
{}.tap do |hash|
|
|
176
|
-
value.each do |k, v|
|
|
177
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
else # model
|
|
181
|
-
# models (e.g. Pet) or oneOf
|
|
182
|
-
klass = Bandwidth.const_get(type)
|
|
183
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
# Returns the string representation of the object
|
|
188
|
-
# @return [String] String presentation of the object
|
|
189
|
-
def to_s
|
|
190
|
-
to_hash.to_s
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
194
|
-
# @return [Hash] Returns the object in the form of hash
|
|
195
|
-
def to_body
|
|
196
|
-
to_hash
|
|
197
|
-
end
|
|
198
|
-
|
|
199
150
|
# Returns the object in the form of hash
|
|
200
151
|
# @return [Hash] Returns the object in the form of hash
|
|
201
152
|
def to_hash
|
|
@@ -211,23 +162,5 @@ module Bandwidth
|
|
|
211
162
|
end
|
|
212
163
|
hash
|
|
213
164
|
end
|
|
214
|
-
|
|
215
|
-
# Outputs non-array value in the form of hash
|
|
216
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
217
|
-
# @param [Object] value Any valid value
|
|
218
|
-
# @return [Hash] Returns the value in the form of hash
|
|
219
|
-
def _to_hash(value)
|
|
220
|
-
if value.is_a?(Array)
|
|
221
|
-
value.compact.map { |v| _to_hash(v) }
|
|
222
|
-
elsif value.is_a?(Hash)
|
|
223
|
-
{}.tap do |hash|
|
|
224
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
225
|
-
end
|
|
226
|
-
elsif value.respond_to? :to_hash
|
|
227
|
-
value.to_hash
|
|
228
|
-
else
|
|
229
|
-
value
|
|
230
|
-
end
|
|
231
|
-
end
|
|
232
165
|
end
|
|
233
166
|
end
|