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.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +18 -0
  4. data/bandwidth-sdk.gemspec +1 -2
  5. data/bandwidth.yml +7 -0
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +198 -387
  8. data/coverage/index.html +5842 -7703
  9. data/custom_templates/README.mustache +4 -1
  10. data/custom_templates/api_client.mustache +254 -0
  11. data/custom_templates/configuration.mustache +545 -0
  12. data/custom_templates/gem.mustache +2 -0
  13. data/docs/CallsApi.md +20 -5
  14. data/docs/ConferencesApi.md +36 -9
  15. data/docs/MFAApi.md +12 -3
  16. data/docs/MediaApi.md +16 -4
  17. data/docs/MessagesApi.md +8 -2
  18. data/docs/MultiChannelApi.md +4 -1
  19. data/docs/PhoneNumberLookupApi.md +12 -3
  20. data/docs/RecordingsApi.md +40 -10
  21. data/docs/StatisticsApi.md +4 -1
  22. data/docs/TollFreeVerificationApi.md +36 -9
  23. data/docs/TranscriptionsApi.md +12 -3
  24. data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
  25. data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
  26. data/lib/bandwidth-sdk/api/media_api.rb +5 -5
  27. data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
  28. data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
  29. data/lib/bandwidth-sdk/api/multi_channel_api.rb +2 -2
  30. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +4 -4
  31. data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
  32. data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
  33. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +13 -13
  34. data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
  35. data/lib/bandwidth-sdk/api_client.rb +9 -5
  36. data/lib/bandwidth-sdk/api_error.rb +1 -1
  37. data/lib/bandwidth-sdk/api_model_base.rb +88 -0
  38. data/lib/bandwidth-sdk/configuration.rb +50 -1
  39. data/lib/bandwidth-sdk/models/account_statistics.rb +11 -78
  40. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +41 -78
  41. data/lib/bandwidth-sdk/models/address.rb +23 -90
  42. data/lib/bandwidth-sdk/models/answer_callback.rb +11 -78
  43. data/lib/bandwidth-sdk/models/async_lookup_request.rb +11 -78
  44. data/lib/bandwidth-sdk/models/blocked_webhook.rb +13 -80
  45. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +11 -78
  46. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +11 -78
  47. data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +1 -1
  48. data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +1 -1
  49. data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
  50. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +11 -78
  51. data/lib/bandwidth-sdk/models/call_state.rb +11 -78
  52. data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
  53. data/lib/bandwidth-sdk/models/call_transcription.rb +11 -78
  54. data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
  55. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +11 -78
  56. data/lib/bandwidth-sdk/models/call_transcription_response.rb +11 -78
  57. data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
  58. data/lib/bandwidth-sdk/models/callback.rb +1 -1
  59. data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
  60. data/lib/bandwidth-sdk/models/card_width_enum.rb +1 -1
  61. data/lib/bandwidth-sdk/models/code_request.rb +11 -78
  62. data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +1 -1
  63. data/lib/bandwidth-sdk/models/conference.rb +11 -78
  64. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +11 -78
  65. data/lib/bandwidth-sdk/models/conference_created_callback.rb +11 -78
  66. data/lib/bandwidth-sdk/models/conference_member.rb +11 -78
  67. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +11 -78
  68. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +11 -78
  69. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +11 -78
  70. data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +11 -78
  71. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +11 -78
  72. data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
  73. data/lib/bandwidth-sdk/models/contact.rb +19 -86
  74. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +11 -78
  75. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb +11 -78
  76. data/lib/bandwidth-sdk/models/create_call.rb +41 -78
  77. data/lib/bandwidth-sdk/models/create_call_response.rb +81 -78
  78. data/lib/bandwidth-sdk/models/create_message_request_error.rb +31 -78
  79. data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +11 -78
  80. data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +11 -78
  81. data/lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb +11 -78
  82. data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +1 -1
  83. data/lib/bandwidth-sdk/models/disconnect_callback.rb +11 -78
  84. data/lib/bandwidth-sdk/models/diversion.rb +11 -78
  85. data/lib/bandwidth-sdk/models/dtmf_callback.rb +11 -78
  86. data/lib/bandwidth-sdk/models/error.rb +11 -78
  87. data/lib/bandwidth-sdk/models/error_object.rb +41 -78
  88. data/lib/bandwidth-sdk/models/error_source.rb +11 -78
  89. data/lib/bandwidth-sdk/models/failure_webhook.rb +13 -80
  90. data/lib/bandwidth-sdk/models/field_error.rb +11 -78
  91. data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
  92. data/lib/bandwidth-sdk/models/gather_callback.rb +11 -78
  93. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +11 -78
  94. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +11 -78
  95. data/lib/bandwidth-sdk/models/in_progress_lookup_status_enum.rb +1 -1
  96. data/lib/bandwidth-sdk/models/inbound_callback.rb +61 -78
  97. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +81 -78
  98. data/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +1 -1
  99. data/lib/bandwidth-sdk/models/initiate_callback.rb +11 -78
  100. data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +1 -1
  101. data/lib/bandwidth-sdk/models/line_type_enum.rb +1 -1
  102. data/lib/bandwidth-sdk/models/link.rb +11 -78
  103. data/lib/bandwidth-sdk/models/link_schema.rb +11 -78
  104. data/lib/bandwidth-sdk/models/links_object.rb +11 -78
  105. data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
  106. data/lib/bandwidth-sdk/models/list_message_item.rb +11 -78
  107. data/lib/bandwidth-sdk/models/lookup_error_response.rb +11 -78
  108. data/lib/bandwidth-sdk/models/lookup_error_schema.rb +11 -78
  109. data/lib/bandwidth-sdk/models/lookup_error_schema_meta.rb +11 -78
  110. data/lib/bandwidth-sdk/models/lookup_result.rb +11 -78
  111. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +11 -78
  112. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +11 -78
  113. data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
  114. data/lib/bandwidth-sdk/models/machine_detection_result.rb +11 -78
  115. data/lib/bandwidth-sdk/models/media.rb +11 -78
  116. data/lib/bandwidth-sdk/models/message.rb +11 -78
  117. data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
  118. data/lib/bandwidth-sdk/models/message_request.rb +31 -78
  119. data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
  120. data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
  121. data/lib/bandwidth-sdk/models/messages_list.rb +11 -78
  122. data/lib/bandwidth-sdk/models/messaging_code_response.rb +11 -78
  123. data/lib/bandwidth-sdk/models/messaging_request_error.rb +31 -78
  124. data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +11 -78
  125. data/lib/bandwidth-sdk/models/mfa_request_error.rb +11 -78
  126. data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +11 -78
  127. data/lib/bandwidth-sdk/models/mms_message_content.rb +11 -78
  128. data/lib/bandwidth-sdk/models/mms_message_content_file.rb +11 -78
  129. data/lib/bandwidth-sdk/models/multi_channel_action.rb +3 -4
  130. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +41 -78
  131. data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_object.rb +51 -78
  132. data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_response_object.rb +61 -78
  133. data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +41 -78
  134. data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +21 -78
  135. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +51 -78
  136. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object_all_of_content.rb +3 -4
  137. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +61 -78
  138. data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +3 -4
  139. data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +3 -4
  140. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +51 -78
  141. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +61 -78
  142. data/lib/bandwidth-sdk/models/multi_channel_error.rb +11 -78
  143. data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +1 -1
  144. data/lib/bandwidth-sdk/models/multi_channel_message_content.rb +11 -78
  145. data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +21 -78
  146. data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +41 -78
  147. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +25 -82
  148. data/lib/bandwidth-sdk/models/page_info.rb +11 -78
  149. data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
  150. data/lib/bandwidth-sdk/models/product_type_enum.rb +1 -1
  151. data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -78
  152. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +31 -78
  153. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -78
  154. data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +1 -1
  155. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +41 -78
  156. data/lib/bandwidth-sdk/models/rbm_card_content.rb +11 -78
  157. data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +21 -78
  158. data/lib/bandwidth-sdk/models/rbm_location_response.rb +11 -78
  159. data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +1 -1
  160. data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +21 -78
  161. data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +11 -78
  162. data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +3 -4
  163. data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +11 -78
  164. data/lib/bandwidth-sdk/models/rbm_message_media.rb +21 -78
  165. data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +41 -78
  166. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +11 -78
  167. data/lib/bandwidth-sdk/models/recording_available_callback.rb +11 -78
  168. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +11 -78
  169. data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
  170. data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +11 -78
  171. data/lib/bandwidth-sdk/models/recording_transcriptions.rb +11 -78
  172. data/lib/bandwidth-sdk/models/redirect_callback.rb +11 -78
  173. data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
  174. data/lib/bandwidth-sdk/models/sms_message_content.rb +11 -78
  175. data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +1 -1
  176. data/lib/bandwidth-sdk/models/status_callback.rb +61 -78
  177. data/lib/bandwidth-sdk/models/status_callback_message.rb +81 -78
  178. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +6 -6
  179. data/lib/bandwidth-sdk/models/stir_shaken.rb +11 -78
  180. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +11 -78
  181. data/lib/bandwidth-sdk/models/telephone_number.rb +11 -78
  182. data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +11 -78
  183. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +1 -1
  184. data/lib/bandwidth-sdk/models/tfv_error.rb +11 -78
  185. data/lib/bandwidth-sdk/models/tfv_status.rb +13 -80
  186. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -1
  187. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +21 -88
  188. data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +11 -78
  189. data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +1 -1
  190. data/lib/bandwidth-sdk/models/transcribe_recording.rb +11 -78
  191. data/lib/bandwidth-sdk/models/transcription.rb +11 -78
  192. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +11 -78
  193. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +11 -78
  194. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +11 -78
  195. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +11 -78
  196. data/lib/bandwidth-sdk/models/update_call.rb +11 -78
  197. data/lib/bandwidth-sdk/models/update_call_recording.rb +21 -78
  198. data/lib/bandwidth-sdk/models/update_conference.rb +11 -78
  199. data/lib/bandwidth-sdk/models/update_conference_member.rb +11 -78
  200. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +13 -80
  201. data/lib/bandwidth-sdk/models/verification_request.rb +51 -88
  202. data/lib/bandwidth-sdk/models/verification_update_request.rb +51 -88
  203. data/lib/bandwidth-sdk/models/verification_webhook.rb +13 -80
  204. data/lib/bandwidth-sdk/models/verify_code_request.rb +13 -80
  205. data/lib/bandwidth-sdk/models/verify_code_response.rb +11 -78
  206. data/lib/bandwidth-sdk/models/voice_api_error.rb +11 -78
  207. data/lib/bandwidth-sdk/models/voice_code_response.rb +11 -78
  208. data/lib/bandwidth-sdk/models/webhook_subscription.rb +13 -80
  209. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +11 -78
  210. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +15 -82
  211. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +1 -1
  212. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +21 -78
  213. data/lib/bandwidth-sdk/version.rb +2 -2
  214. data/lib/bandwidth-sdk.rb +2 -1
  215. data/openapitools.json +1 -1
  216. data/spec/smoke/calls_api_spec.rb +50 -76
  217. data/spec/smoke/conferences_api_spec.rb +7 -5
  218. data/spec/smoke/media_api_spec.rb +4 -2
  219. data/spec/smoke/messages_api_spec.rb +9 -4
  220. data/spec/smoke/mfa_api_spec.rb +9 -4
  221. data/spec/smoke/multi_channel_api_spec.rb +4 -2
  222. data/spec/smoke/phone_number_lookup_api_spec.rb +6 -4
  223. data/spec/smoke/recordings_api_spec.rb +7 -33
  224. data/spec/smoke/statistics_api_spec.rb +16 -8
  225. data/spec/smoke/toll_free_verification_api_spec.rb +6 -4
  226. data/spec/smoke/transcriptions_api_spec.rb +7 -5
  227. data/spec/spec_helper.rb +2 -0
  228. data/spec/unit/models/verify_code_request_spec.rb +1 -1
  229. 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.8.0
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 RbmMessageMedia
17
+ class RbmMessageMedia < ApiModelBase
18
18
  attr_accessor :media
19
19
 
20
20
  # An array of suggested actions for the recipient.
@@ -28,9 +28,14 @@ module Bandwidth
28
28
  }
29
29
  end
30
30
 
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
31
36
  # Returns all the JSON keys this model knows about
32
37
  def self.acceptable_attributes
33
- attribute_map.values
38
+ acceptable_attribute_map.values
34
39
  end
35
40
 
36
41
  # Attribute type mapping.
@@ -55,9 +60,10 @@ module Bandwidth
55
60
  end
56
61
 
57
62
  # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
58
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmMessageMedia`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmMessageMedia`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
67
  end
62
68
  h[k.to_sym] = v
63
69
  }
@@ -100,6 +106,16 @@ module Bandwidth
100
106
  true
101
107
  end
102
108
 
109
+ # Custom attribute writer method with validation
110
+ # @param [Object] media Value to be assigned
111
+ def media=(media)
112
+ if media.nil?
113
+ fail ArgumentError, 'media cannot be nil'
114
+ end
115
+
116
+ @media = media
117
+ end
118
+
103
119
  # Custom attribute writer method with validation
104
120
  # @param [Object] suggestions Value to be assigned
105
121
  def suggestions=(suggestions)
@@ -158,61 +174,6 @@ module Bandwidth
158
174
  new(transformed_hash)
159
175
  end
160
176
 
161
- # Deserializes the data based on type
162
- # @param string type Data type
163
- # @param string value Value to be deserialized
164
- # @return [Object] Deserialized data
165
- def self._deserialize(type, value)
166
- case type.to_sym
167
- when :Time
168
- Time.parse(value)
169
- when :Date
170
- Date.parse(value)
171
- when :String
172
- value.to_s
173
- when :Integer
174
- value.to_i
175
- when :Float
176
- value.to_f
177
- when :Boolean
178
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
- true
180
- else
181
- false
182
- end
183
- when :Object
184
- # generic object (usually a Hash), return directly
185
- value
186
- when /\AArray<(?<inner_type>.+)>\z/
187
- inner_type = Regexp.last_match[:inner_type]
188
- value.map { |v| _deserialize(inner_type, v) }
189
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
- k_type = Regexp.last_match[:k_type]
191
- v_type = Regexp.last_match[:v_type]
192
- {}.tap do |hash|
193
- value.each do |k, v|
194
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
- end
196
- end
197
- else # model
198
- # models (e.g. Pet) or oneOf
199
- klass = Bandwidth.const_get(type)
200
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
- end
202
- end
203
-
204
- # Returns the string representation of the object
205
- # @return [String] String presentation of the object
206
- def to_s
207
- to_hash.to_s
208
- end
209
-
210
- # to_body is an alias to to_hash (backward compatibility)
211
- # @return [Hash] Returns the object in the form of hash
212
- def to_body
213
- to_hash
214
- end
215
-
216
177
  # Returns the object in the form of hash
217
178
  # @return [Hash] Returns the object in the form of hash
218
179
  def to_hash
@@ -228,23 +189,5 @@ module Bandwidth
228
189
  end
229
190
  hash
230
191
  end
231
-
232
- # Outputs non-array value in the form of hash
233
- # For object, use to_hash. Otherwise, just return the value
234
- # @param [Object] value Any valid value
235
- # @return [Hash] Returns the value in the form of hash
236
- def _to_hash(value)
237
- if value.is_a?(Array)
238
- value.compact.map { |v| _to_hash(v) }
239
- elsif value.is_a?(Hash)
240
- {}.tap do |hash|
241
- value.each { |k, v| hash[k] = _to_hash(v) }
242
- end
243
- elsif value.respond_to? :to_hash
244
- value.to_hash
245
- else
246
- value
247
- end
248
- end
249
192
  end
250
193
  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.8.0
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 RbmStandaloneCard
17
+ class RbmStandaloneCard < ApiModelBase
18
18
  attr_accessor :orientation
19
19
 
20
20
  attr_accessor :thumbnail_image_alignment
@@ -56,9 +56,14 @@ module Bandwidth
56
56
  }
57
57
  end
58
58
 
59
+ # Returns attribute mapping this model knows about
60
+ def self.acceptable_attribute_map
61
+ attribute_map
62
+ end
63
+
59
64
  # Returns all the JSON keys this model knows about
60
65
  def self.acceptable_attributes
61
- attribute_map.values
66
+ acceptable_attribute_map.values
62
67
  end
63
68
 
64
69
  # Attribute type mapping.
@@ -85,9 +90,10 @@ module Bandwidth
85
90
  end
86
91
 
87
92
  # check to see if the attribute exists and convert string to symbol for hash key
93
+ acceptable_attribute_map = self.class.acceptable_attribute_map
88
94
  attributes = attributes.each_with_object({}) { |(k, v), h|
89
- if (!self.class.attribute_map.key?(k.to_sym))
90
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmStandaloneCard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
+ if (!acceptable_attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmStandaloneCard`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
97
  end
92
98
  h[k.to_sym] = v
93
99
  }
@@ -152,6 +158,36 @@ module Bandwidth
152
158
  true
153
159
  end
154
160
 
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] orientation Value to be assigned
163
+ def orientation=(orientation)
164
+ if orientation.nil?
165
+ fail ArgumentError, 'orientation cannot be nil'
166
+ end
167
+
168
+ @orientation = orientation
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] thumbnail_image_alignment Value to be assigned
173
+ def thumbnail_image_alignment=(thumbnail_image_alignment)
174
+ if thumbnail_image_alignment.nil?
175
+ fail ArgumentError, 'thumbnail_image_alignment cannot be nil'
176
+ end
177
+
178
+ @thumbnail_image_alignment = thumbnail_image_alignment
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] card_content Value to be assigned
183
+ def card_content=(card_content)
184
+ if card_content.nil?
185
+ fail ArgumentError, 'card_content cannot be nil'
186
+ end
187
+
188
+ @card_content = card_content
189
+ end
190
+
155
191
  # Custom attribute writer method with validation
156
192
  # @param [Object] suggestions Value to be assigned
157
193
  def suggestions=(suggestions)
@@ -212,61 +248,6 @@ module Bandwidth
212
248
  new(transformed_hash)
213
249
  end
214
250
 
215
- # Deserializes the data based on type
216
- # @param string type Data type
217
- # @param string value Value to be deserialized
218
- # @return [Object] Deserialized data
219
- def self._deserialize(type, value)
220
- case type.to_sym
221
- when :Time
222
- Time.parse(value)
223
- when :Date
224
- Date.parse(value)
225
- when :String
226
- value.to_s
227
- when :Integer
228
- value.to_i
229
- when :Float
230
- value.to_f
231
- when :Boolean
232
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
233
- true
234
- else
235
- false
236
- end
237
- when :Object
238
- # generic object (usually a Hash), return directly
239
- value
240
- when /\AArray<(?<inner_type>.+)>\z/
241
- inner_type = Regexp.last_match[:inner_type]
242
- value.map { |v| _deserialize(inner_type, v) }
243
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
244
- k_type = Regexp.last_match[:k_type]
245
- v_type = Regexp.last_match[:v_type]
246
- {}.tap do |hash|
247
- value.each do |k, v|
248
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
249
- end
250
- end
251
- else # model
252
- # models (e.g. Pet) or oneOf
253
- klass = Bandwidth.const_get(type)
254
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
255
- end
256
- end
257
-
258
- # Returns the string representation of the object
259
- # @return [String] String presentation of the object
260
- def to_s
261
- to_hash.to_s
262
- end
263
-
264
- # to_body is an alias to to_hash (backward compatibility)
265
- # @return [Hash] Returns the object in the form of hash
266
- def to_body
267
- to_hash
268
- end
269
-
270
251
  # Returns the object in the form of hash
271
252
  # @return [Hash] Returns the object in the form of hash
272
253
  def to_hash
@@ -282,23 +263,5 @@ module Bandwidth
282
263
  end
283
264
  hash
284
265
  end
285
-
286
- # Outputs non-array value in the form of hash
287
- # For object, use to_hash. Otherwise, just return the value
288
- # @param [Object] value Any valid value
289
- # @return [Hash] Returns the value in the form of hash
290
- def _to_hash(value)
291
- if value.is_a?(Array)
292
- value.compact.map { |v| _to_hash(v) }
293
- elsif value.is_a?(Hash)
294
- {}.tap do |hash|
295
- value.each { |k, v| hash[k] = _to_hash(v) }
296
- end
297
- elsif value.respond_to? :to_hash
298
- value.to_hash
299
- else
300
- value
301
- end
302
- end
303
266
  end
304
267
  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.8.0
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 RbmSuggestionResponse
17
+ class RbmSuggestionResponse < ApiModelBase
18
18
  # The text associated with the suggestion response.
19
19
  attr_accessor :text
20
20
 
@@ -29,9 +29,14 @@ module Bandwidth
29
29
  }
30
30
  end
31
31
 
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
32
37
  # Returns all the JSON keys this model knows about
33
38
  def self.acceptable_attributes
34
- attribute_map.values
39
+ acceptable_attribute_map.values
35
40
  end
36
41
 
37
42
  # Attribute type mapping.
@@ -56,9 +61,10 @@ module Bandwidth
56
61
  end
57
62
 
58
63
  # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmSuggestionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmSuggestionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
68
  end
63
69
  h[k.to_sym] = v
64
70
  }
@@ -150,61 +156,6 @@ module Bandwidth
150
156
  new(transformed_hash)
151
157
  end
152
158
 
153
- # Deserializes the data based on type
154
- # @param string type Data type
155
- # @param string value Value to be deserialized
156
- # @return [Object] Deserialized data
157
- def self._deserialize(type, value)
158
- case type.to_sym
159
- when :Time
160
- Time.parse(value)
161
- when :Date
162
- Date.parse(value)
163
- when :String
164
- value.to_s
165
- when :Integer
166
- value.to_i
167
- when :Float
168
- value.to_f
169
- when :Boolean
170
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
- true
172
- else
173
- false
174
- end
175
- when :Object
176
- # generic object (usually a Hash), return directly
177
- value
178
- when /\AArray<(?<inner_type>.+)>\z/
179
- inner_type = Regexp.last_match[:inner_type]
180
- value.map { |v| _deserialize(inner_type, v) }
181
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
- k_type = Regexp.last_match[:k_type]
183
- v_type = Regexp.last_match[:v_type]
184
- {}.tap do |hash|
185
- value.each do |k, v|
186
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
- end
188
- end
189
- else # model
190
- # models (e.g. Pet) or oneOf
191
- klass = Bandwidth.const_get(type)
192
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
- end
194
- end
195
-
196
- # Returns the string representation of the object
197
- # @return [String] String presentation of the object
198
- def to_s
199
- to_hash.to_s
200
- end
201
-
202
- # to_body is an alias to to_hash (backward compatibility)
203
- # @return [Hash] Returns the object in the form of hash
204
- def to_body
205
- to_hash
206
- end
207
-
208
159
  # Returns the object in the form of hash
209
160
  # @return [Hash] Returns the object in the form of hash
210
161
  def to_hash
@@ -220,23 +171,5 @@ module Bandwidth
220
171
  end
221
172
  hash
222
173
  end
223
-
224
- # Outputs non-array value in the form of hash
225
- # For object, use to_hash. Otherwise, just return the value
226
- # @param [Object] value Any valid value
227
- # @return [Hash] Returns the value in the form of hash
228
- def _to_hash(value)
229
- if value.is_a?(Array)
230
- value.compact.map { |v| _to_hash(v) }
231
- elsif value.is_a?(Hash)
232
- {}.tap do |hash|
233
- value.each { |k, v| hash[k] = _to_hash(v) }
234
- end
235
- elsif value.respond_to? :to_hash
236
- value.to_hash
237
- else
238
- value
239
- end
240
- end
241
174
  end
242
175
  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.8.0
9
+ Generator version: 7.17.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  # The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download.
18
- class RecordingAvailableCallback
18
+ class RecordingAvailableCallback < ApiModelBase
19
19
  # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
20
20
  attr_accessor :event_type
21
21
 
@@ -130,9 +130,14 @@ module Bandwidth
130
130
  }
131
131
  end
132
132
 
133
+ # Returns attribute mapping this model knows about
134
+ def self.acceptable_attribute_map
135
+ attribute_map
136
+ end
137
+
133
138
  # Returns all the JSON keys this model knows about
134
139
  def self.acceptable_attributes
135
- attribute_map.values
140
+ acceptable_attribute_map.values
136
141
  end
137
142
 
138
143
  # Attribute type mapping.
@@ -180,9 +185,10 @@ module Bandwidth
180
185
  end
181
186
 
182
187
  # check to see if the attribute exists and convert string to symbol for hash key
188
+ acceptable_attribute_map = self.class.acceptable_attribute_map
183
189
  attributes = attributes.each_with_object({}) { |(k, v), h|
184
- if (!self.class.attribute_map.key?(k.to_sym))
185
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RecordingAvailableCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
190
+ if (!acceptable_attribute_map.key?(k.to_sym))
191
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RecordingAvailableCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
186
192
  end
187
193
  h[k.to_sym] = v
188
194
  }
@@ -355,61 +361,6 @@ module Bandwidth
355
361
  new(transformed_hash)
356
362
  end
357
363
 
358
- # Deserializes the data based on type
359
- # @param string type Data type
360
- # @param string value Value to be deserialized
361
- # @return [Object] Deserialized data
362
- def self._deserialize(type, value)
363
- case type.to_sym
364
- when :Time
365
- Time.parse(value)
366
- when :Date
367
- Date.parse(value)
368
- when :String
369
- value.to_s
370
- when :Integer
371
- value.to_i
372
- when :Float
373
- value.to_f
374
- when :Boolean
375
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
376
- true
377
- else
378
- false
379
- end
380
- when :Object
381
- # generic object (usually a Hash), return directly
382
- value
383
- when /\AArray<(?<inner_type>.+)>\z/
384
- inner_type = Regexp.last_match[:inner_type]
385
- value.map { |v| _deserialize(inner_type, v) }
386
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
387
- k_type = Regexp.last_match[:k_type]
388
- v_type = Regexp.last_match[:v_type]
389
- {}.tap do |hash|
390
- value.each do |k, v|
391
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
392
- end
393
- end
394
- else # model
395
- # models (e.g. Pet) or oneOf
396
- klass = Bandwidth.const_get(type)
397
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
398
- end
399
- end
400
-
401
- # Returns the string representation of the object
402
- # @return [String] String presentation of the object
403
- def to_s
404
- to_hash.to_s
405
- end
406
-
407
- # to_body is an alias to to_hash (backward compatibility)
408
- # @return [Hash] Returns the object in the form of hash
409
- def to_body
410
- to_hash
411
- end
412
-
413
364
  # Returns the object in the form of hash
414
365
  # @return [Hash] Returns the object in the form of hash
415
366
  def to_hash
@@ -425,23 +376,5 @@ module Bandwidth
425
376
  end
426
377
  hash
427
378
  end
428
-
429
- # Outputs non-array value in the form of hash
430
- # For object, use to_hash. Otherwise, just return the value
431
- # @param [Object] value Any valid value
432
- # @return [Hash] Returns the value in the form of hash
433
- def _to_hash(value)
434
- if value.is_a?(Array)
435
- value.compact.map { |v| _to_hash(v) }
436
- elsif value.is_a?(Hash)
437
- {}.tap do |hash|
438
- value.each { |k, v| hash[k] = _to_hash(v) }
439
- end
440
- elsif value.respond_to? :to_hash
441
- value.to_hash
442
- else
443
- value
444
- end
445
- end
446
379
  end
447
380
  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.8.0
9
+ Generator version: 7.17.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  # The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent.
18
- class RecordingCompleteCallback
18
+ class RecordingCompleteCallback < ApiModelBase
19
19
  # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
20
20
  attr_accessor :event_type
21
21
 
@@ -130,9 +130,14 @@ module Bandwidth
130
130
  }
131
131
  end
132
132
 
133
+ # Returns attribute mapping this model knows about
134
+ def self.acceptable_attribute_map
135
+ attribute_map
136
+ end
137
+
133
138
  # Returns all the JSON keys this model knows about
134
139
  def self.acceptable_attributes
135
- attribute_map.values
140
+ acceptable_attribute_map.values
136
141
  end
137
142
 
138
143
  # Attribute type mapping.
@@ -181,9 +186,10 @@ module Bandwidth
181
186
  end
182
187
 
183
188
  # check to see if the attribute exists and convert string to symbol for hash key
189
+ acceptable_attribute_map = self.class.acceptable_attribute_map
184
190
  attributes = attributes.each_with_object({}) { |(k, v), h|
185
- if (!self.class.attribute_map.key?(k.to_sym))
186
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RecordingCompleteCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
191
+ if (!acceptable_attribute_map.key?(k.to_sym))
192
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RecordingCompleteCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
187
193
  end
188
194
  h[k.to_sym] = v
189
195
  }
@@ -356,61 +362,6 @@ module Bandwidth
356
362
  new(transformed_hash)
357
363
  end
358
364
 
359
- # Deserializes the data based on type
360
- # @param string type Data type
361
- # @param string value Value to be deserialized
362
- # @return [Object] Deserialized data
363
- def self._deserialize(type, value)
364
- case type.to_sym
365
- when :Time
366
- Time.parse(value)
367
- when :Date
368
- Date.parse(value)
369
- when :String
370
- value.to_s
371
- when :Integer
372
- value.to_i
373
- when :Float
374
- value.to_f
375
- when :Boolean
376
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
377
- true
378
- else
379
- false
380
- end
381
- when :Object
382
- # generic object (usually a Hash), return directly
383
- value
384
- when /\AArray<(?<inner_type>.+)>\z/
385
- inner_type = Regexp.last_match[:inner_type]
386
- value.map { |v| _deserialize(inner_type, v) }
387
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
388
- k_type = Regexp.last_match[:k_type]
389
- v_type = Regexp.last_match[:v_type]
390
- {}.tap do |hash|
391
- value.each do |k, v|
392
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
393
- end
394
- end
395
- else # model
396
- # models (e.g. Pet) or oneOf
397
- klass = Bandwidth.const_get(type)
398
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
399
- end
400
- end
401
-
402
- # Returns the string representation of the object
403
- # @return [String] String presentation of the object
404
- def to_s
405
- to_hash.to_s
406
- end
407
-
408
- # to_body is an alias to to_hash (backward compatibility)
409
- # @return [Hash] Returns the object in the form of hash
410
- def to_body
411
- to_hash
412
- end
413
-
414
365
  # Returns the object in the form of hash
415
366
  # @return [Hash] Returns the object in the form of hash
416
367
  def to_hash
@@ -426,23 +377,5 @@ module Bandwidth
426
377
  end
427
378
  hash
428
379
  end
429
-
430
- # Outputs non-array value in the form of hash
431
- # For object, use to_hash. Otherwise, just return the value
432
- # @param [Object] value Any valid value
433
- # @return [Hash] Returns the value in the form of hash
434
- def _to_hash(value)
435
- if value.is_a?(Array)
436
- value.compact.map { |v| _to_hash(v) }
437
- elsif value.is_a?(Hash)
438
- {}.tap do |hash|
439
- value.each { |k, v| hash[k] = _to_hash(v) }
440
- end
441
- elsif value.respond_to? :to_hash
442
- value.to_hash
443
- else
444
- value
445
- end
446
- end
447
380
  end
448
381
  end