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 RbmLocationResponse
17
+ class RbmLocationResponse < ApiModelBase
18
18
  # The latitude of the client's location.
19
19
  attr_accessor :latitude
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::RbmLocationResponse`. 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::RbmLocationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
68
  end
63
69
  h[k.to_sym] = v
64
70
  }
@@ -131,61 +137,6 @@ module Bandwidth
131
137
  new(transformed_hash)
132
138
  end
133
139
 
134
- # Deserializes the data based on type
135
- # @param string type Data type
136
- # @param string value Value to be deserialized
137
- # @return [Object] Deserialized data
138
- def self._deserialize(type, value)
139
- case type.to_sym
140
- when :Time
141
- Time.parse(value)
142
- when :Date
143
- Date.parse(value)
144
- when :String
145
- value.to_s
146
- when :Integer
147
- value.to_i
148
- when :Float
149
- value.to_f
150
- when :Boolean
151
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
- true
153
- else
154
- false
155
- end
156
- when :Object
157
- # generic object (usually a Hash), return directly
158
- value
159
- when /\AArray<(?<inner_type>.+)>\z/
160
- inner_type = Regexp.last_match[:inner_type]
161
- value.map { |v| _deserialize(inner_type, v) }
162
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
- k_type = Regexp.last_match[:k_type]
164
- v_type = Regexp.last_match[:v_type]
165
- {}.tap do |hash|
166
- value.each do |k, v|
167
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
- end
169
- end
170
- else # model
171
- # models (e.g. Pet) or oneOf
172
- klass = Bandwidth.const_get(type)
173
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
- end
175
- end
176
-
177
- # Returns the string representation of the object
178
- # @return [String] String presentation of the object
179
- def to_s
180
- to_hash.to_s
181
- end
182
-
183
- # to_body is an alias to to_hash (backward compatibility)
184
- # @return [Hash] Returns the object in the form of hash
185
- def to_body
186
- to_hash
187
- end
188
-
189
140
  # Returns the object in the form of hash
190
141
  # @return [Hash] Returns the object in the form of hash
191
142
  def to_hash
@@ -201,23 +152,5 @@ module Bandwidth
201
152
  end
202
153
  hash
203
154
  end
204
-
205
- # Outputs non-array value in the form of hash
206
- # For object, use to_hash. Otherwise, just return the value
207
- # @param [Object] value Any valid value
208
- # @return [Hash] Returns the value in the form of hash
209
- def _to_hash(value)
210
- if value.is_a?(Array)
211
- value.compact.map { |v| _to_hash(v) }
212
- elsif value.is_a?(Hash)
213
- {}.tap do |hash|
214
- value.each { |k, v| hash[k] = _to_hash(v) }
215
- end
216
- elsif value.respond_to? :to_hash
217
- value.to_hash
218
- else
219
- value
220
- end
221
- end
222
155
  end
223
156
  end
@@ -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
 
@@ -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 RbmMessageCarouselCard
17
+ class RbmMessageCarouselCard < ApiModelBase
18
18
  attr_accessor :card_width
19
19
 
20
20
  attr_accessor :card_contents
@@ -53,9 +53,14 @@ module Bandwidth
53
53
  }
54
54
  end
55
55
 
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
56
61
  # Returns all the JSON keys this model knows about
57
62
  def self.acceptable_attributes
58
- attribute_map.values
63
+ acceptable_attribute_map.values
59
64
  end
60
65
 
61
66
  # Attribute type mapping.
@@ -81,9 +86,10 @@ module Bandwidth
81
86
  end
82
87
 
83
88
  # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
90
  attributes = attributes.each_with_object({}) { |(k, v), h|
85
- if (!self.class.attribute_map.key?(k.to_sym))
86
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmMessageCarouselCard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmMessageCarouselCard`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
93
  end
88
94
  h[k.to_sym] = v
89
95
  }
@@ -144,6 +150,16 @@ module Bandwidth
144
150
  true
145
151
  end
146
152
 
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] card_width Value to be assigned
155
+ def card_width=(card_width)
156
+ if card_width.nil?
157
+ fail ArgumentError, 'card_width cannot be nil'
158
+ end
159
+
160
+ @card_width = card_width
161
+ end
162
+
147
163
  # Custom attribute writer method with validation
148
164
  # @param [Object] card_contents Value to be assigned
149
165
  def card_contents=(card_contents)
@@ -217,61 +233,6 @@ module Bandwidth
217
233
  new(transformed_hash)
218
234
  end
219
235
 
220
- # Deserializes the data based on type
221
- # @param string type Data type
222
- # @param string value Value to be deserialized
223
- # @return [Object] Deserialized data
224
- def self._deserialize(type, value)
225
- case type.to_sym
226
- when :Time
227
- Time.parse(value)
228
- when :Date
229
- Date.parse(value)
230
- when :String
231
- value.to_s
232
- when :Integer
233
- value.to_i
234
- when :Float
235
- value.to_f
236
- when :Boolean
237
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
238
- true
239
- else
240
- false
241
- end
242
- when :Object
243
- # generic object (usually a Hash), return directly
244
- value
245
- when /\AArray<(?<inner_type>.+)>\z/
246
- inner_type = Regexp.last_match[:inner_type]
247
- value.map { |v| _deserialize(inner_type, v) }
248
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
249
- k_type = Regexp.last_match[:k_type]
250
- v_type = Regexp.last_match[:v_type]
251
- {}.tap do |hash|
252
- value.each do |k, v|
253
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
254
- end
255
- end
256
- else # model
257
- # models (e.g. Pet) or oneOf
258
- klass = Bandwidth.const_get(type)
259
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
260
- end
261
- end
262
-
263
- # Returns the string representation of the object
264
- # @return [String] String presentation of the object
265
- def to_s
266
- to_hash.to_s
267
- end
268
-
269
- # to_body is an alias to to_hash (backward compatibility)
270
- # @return [Hash] Returns the object in the form of hash
271
- def to_body
272
- to_hash
273
- end
274
-
275
236
  # Returns the object in the form of hash
276
237
  # @return [Hash] Returns the object in the form of hash
277
238
  def to_hash
@@ -287,23 +248,5 @@ module Bandwidth
287
248
  end
288
249
  hash
289
250
  end
290
-
291
- # Outputs non-array value in the form of hash
292
- # For object, use to_hash. Otherwise, just return the value
293
- # @param [Object] value Any valid value
294
- # @return [Hash] Returns the value in the form of hash
295
- def _to_hash(value)
296
- if value.is_a?(Array)
297
- value.compact.map { |v| _to_hash(v) }
298
- elsif value.is_a?(Hash)
299
- {}.tap do |hash|
300
- value.each { |k, v| hash[k] = _to_hash(v) }
301
- end
302
- elsif value.respond_to? :to_hash
303
- value.to_hash
304
- else
305
- value
306
- end
307
- end
308
251
  end
309
252
  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 RbmMessageContentFile
17
+ class RbmMessageContentFile < ApiModelBase
18
18
  # The URL of the media file. 100MB is the maximum file size.
19
19
  attr_accessor :file_url
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::RbmMessageContentFile`. 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::RbmMessageContentFile`. 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
  }
@@ -176,61 +182,6 @@ module Bandwidth
176
182
  new(transformed_hash)
177
183
  end
178
184
 
179
- # Deserializes the data based on type
180
- # @param string type Data type
181
- # @param string value Value to be deserialized
182
- # @return [Object] Deserialized data
183
- def self._deserialize(type, value)
184
- case type.to_sym
185
- when :Time
186
- Time.parse(value)
187
- when :Date
188
- Date.parse(value)
189
- when :String
190
- value.to_s
191
- when :Integer
192
- value.to_i
193
- when :Float
194
- value.to_f
195
- when :Boolean
196
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
- true
198
- else
199
- false
200
- end
201
- when :Object
202
- # generic object (usually a Hash), return directly
203
- value
204
- when /\AArray<(?<inner_type>.+)>\z/
205
- inner_type = Regexp.last_match[:inner_type]
206
- value.map { |v| _deserialize(inner_type, v) }
207
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
- k_type = Regexp.last_match[:k_type]
209
- v_type = Regexp.last_match[:v_type]
210
- {}.tap do |hash|
211
- value.each do |k, v|
212
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
- end
214
- end
215
- else # model
216
- # models (e.g. Pet) or oneOf
217
- klass = Bandwidth.const_get(type)
218
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
- end
220
- end
221
-
222
- # Returns the string representation of the object
223
- # @return [String] String presentation of the object
224
- def to_s
225
- to_hash.to_s
226
- end
227
-
228
- # to_body is an alias to to_hash (backward compatibility)
229
- # @return [Hash] Returns the object in the form of hash
230
- def to_body
231
- to_hash
232
- end
233
-
234
185
  # Returns the object in the form of hash
235
186
  # @return [Hash] Returns the object in the form of hash
236
187
  def to_hash
@@ -246,23 +197,5 @@ module Bandwidth
246
197
  end
247
198
  hash
248
199
  end
249
-
250
- # Outputs non-array value in the form of hash
251
- # For object, use to_hash. Otherwise, just return the value
252
- # @param [Object] value Any valid value
253
- # @return [Hash] Returns the value in the form of hash
254
- def _to_hash(value)
255
- if value.is_a?(Array)
256
- value.compact.map { |v| _to_hash(v) }
257
- elsif value.is_a?(Hash)
258
- {}.tap do |hash|
259
- value.each { |k, v| hash[k] = _to_hash(v) }
260
- end
261
- elsif value.respond_to? :to_hash
262
- value.to_hash
263
- else
264
- value
265
- end
266
- end
267
200
  end
268
201
  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
 
@@ -38,8 +38,7 @@ module Bandwidth
38
38
  openapi_one_of.each do |klass|
39
39
  begin
40
40
  next if klass == :AnyType # "nullable: true"
41
- typed_data = find_and_cast_into_type(klass, data)
42
- return typed_data if typed_data
41
+ return find_and_cast_into_type(klass, data)
43
42
  rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
43
  end
45
44
  end
@@ -65,7 +64,7 @@ module Bandwidth
65
64
  when 'Time'
66
65
  return Time.parse(data)
67
66
  when 'Date'
68
- return Date.parse(data)
67
+ return Date.iso8601(data)
69
68
  when 'String'
70
69
  return data if data.instance_of?(String)
71
70
  when 'Object' # "type: object"
@@ -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 RbmMessageContentText
17
+ class RbmMessageContentText < ApiModelBase
18
18
  # The text associated with the message. Must be 3270 characters or less
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::RbmMessageContentText`. 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::RbmMessageContentText`. 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
  }
@@ -178,61 +184,6 @@ module Bandwidth
178
184
  new(transformed_hash)
179
185
  end
180
186
 
181
- # Deserializes the data based on type
182
- # @param string type Data type
183
- # @param string value Value to be deserialized
184
- # @return [Object] Deserialized data
185
- def self._deserialize(type, value)
186
- case type.to_sym
187
- when :Time
188
- Time.parse(value)
189
- when :Date
190
- Date.parse(value)
191
- when :String
192
- value.to_s
193
- when :Integer
194
- value.to_i
195
- when :Float
196
- value.to_f
197
- when :Boolean
198
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
199
- true
200
- else
201
- false
202
- end
203
- when :Object
204
- # generic object (usually a Hash), return directly
205
- value
206
- when /\AArray<(?<inner_type>.+)>\z/
207
- inner_type = Regexp.last_match[:inner_type]
208
- value.map { |v| _deserialize(inner_type, v) }
209
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
210
- k_type = Regexp.last_match[:k_type]
211
- v_type = Regexp.last_match[:v_type]
212
- {}.tap do |hash|
213
- value.each do |k, v|
214
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
215
- end
216
- end
217
- else # model
218
- # models (e.g. Pet) or oneOf
219
- klass = Bandwidth.const_get(type)
220
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
221
- end
222
- end
223
-
224
- # Returns the string representation of the object
225
- # @return [String] String presentation of the object
226
- def to_s
227
- to_hash.to_s
228
- end
229
-
230
- # to_body is an alias to to_hash (backward compatibility)
231
- # @return [Hash] Returns the object in the form of hash
232
- def to_body
233
- to_hash
234
- end
235
-
236
187
  # Returns the object in the form of hash
237
188
  # @return [Hash] Returns the object in the form of hash
238
189
  def to_hash
@@ -248,23 +199,5 @@ module Bandwidth
248
199
  end
249
200
  hash
250
201
  end
251
-
252
- # Outputs non-array value in the form of hash
253
- # For object, use to_hash. Otherwise, just return the value
254
- # @param [Object] value Any valid value
255
- # @return [Hash] Returns the value in the form of hash
256
- def _to_hash(value)
257
- if value.is_a?(Array)
258
- value.compact.map { |v| _to_hash(v) }
259
- elsif value.is_a?(Hash)
260
- {}.tap do |hash|
261
- value.each { |k, v| hash[k] = _to_hash(v) }
262
- end
263
- elsif value.respond_to? :to_hash
264
- value.to_hash
265
- else
266
- value
267
- end
268
- end
269
202
  end
270
203
  end