bandwidth-sdk 15.1.0 → 16.0.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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +11 -11
  3. data/README.md +17 -10
  4. data/bandwidth.yml +523 -184
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +321 -366
  7. data/coverage/index.html +10047 -10501
  8. data/custom_templates/README.mustache +1 -1
  9. data/docs/BlockedWebhook.md +2 -2
  10. data/docs/Callback.md +84 -0
  11. data/docs/CreateMultiChannelMessageResponse.md +3 -3
  12. data/docs/ErrorObject.md +6 -4
  13. data/docs/ErrorSource.md +24 -0
  14. data/docs/FailureWebhook.md +2 -2
  15. data/docs/InboundCallback.md +28 -0
  16. data/docs/InboundCallbackMessage.md +48 -0
  17. data/docs/{MultiChannelStatusEnum.md → InboundCallbackTypeEnum.md} +2 -2
  18. data/docs/ListMessageItem.md +1 -1
  19. data/docs/Message.md +5 -5
  20. data/docs/MessageRequest.md +1 -1
  21. data/docs/MmsMessageContent.md +2 -2
  22. data/docs/MmsMessageContentFile.md +18 -0
  23. data/docs/MultiChannelActionCalendarEvent.md +2 -2
  24. data/docs/MultiChannelError.md +22 -0
  25. data/docs/MultiChannelMessageContent.md +20 -0
  26. data/docs/MultiChannelMessageResponseData.md +32 -0
  27. data/docs/MultiChannelMessageResponseDataChannelListInner.md +26 -0
  28. data/docs/RbmActionBase.md +2 -2
  29. data/docs/RbmActionDial.md +2 -2
  30. data/docs/RbmActionOpenUrl.md +2 -2
  31. data/docs/RbmActionViewLocation.md +2 -2
  32. data/docs/RbmLocationResponse.md +20 -0
  33. data/docs/RbmSuggestionResponse.md +20 -0
  34. data/docs/StatusCallback.md +32 -0
  35. data/docs/StatusCallbackMessage.md +42 -0
  36. data/docs/{CallbackTypeEnum.md → StatusCallbackTypeEnum.md} +2 -2
  37. data/docs/TfvStatus.md +2 -2
  38. data/docs/TfvSubmissionInfo.md +3 -3
  39. data/docs/TollFreeVerificationApi.md +72 -0
  40. data/docs/VerificationDenialWebhook.md +2 -2
  41. data/docs/VerificationRequest.md +3 -3
  42. data/docs/VerificationUpdateRequest.md +3 -3
  43. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +82 -0
  44. data/lib/bandwidth-sdk/configuration.rb +6 -0
  45. data/lib/bandwidth-sdk/models/blocked_webhook.rb +2 -2
  46. data/lib/bandwidth-sdk/models/callback.rb +60 -0
  47. data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +1 -1
  48. data/lib/bandwidth-sdk/models/error_object.rb +45 -13
  49. data/lib/bandwidth-sdk/models/error_source.rb +244 -0
  50. data/lib/bandwidth-sdk/models/failure_webhook.rb +7 -7
  51. data/lib/bandwidth-sdk/models/{message_callback.rb → inbound_callback.rb} +9 -20
  52. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +454 -0
  53. data/lib/bandwidth-sdk/models/{multi_channel_message_direction_enum.rb → inbound_callback_type_enum.rb} +7 -6
  54. data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
  55. data/lib/bandwidth-sdk/models/message.rb +3 -3
  56. data/lib/bandwidth-sdk/models/message_request.rb +1 -1
  57. data/lib/bandwidth-sdk/models/mms_message_content.rb +1 -2
  58. data/lib/bandwidth-sdk/models/{multi_channel_message_callback_data.rb → mms_message_content_file.rb} +37 -100
  59. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +21 -21
  60. data/lib/bandwidth-sdk/models/multi_channel_error.rb +235 -0
  61. data/lib/bandwidth-sdk/models/{deferred_result.rb → multi_channel_message_content.rb} +17 -16
  62. data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +372 -0
  63. data/lib/bandwidth-sdk/models/{multi_channel_message_data.rb → multi_channel_message_response_data_channel_list_inner.rb} +62 -59
  64. data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -21
  65. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +21 -21
  66. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -21
  67. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +21 -21
  68. data/lib/bandwidth-sdk/models/{tag.rb → rbm_location_response.rb} +18 -16
  69. data/lib/bandwidth-sdk/models/{multi_channel_callback_data.rb → rbm_suggestion_response.rb} +37 -67
  70. data/lib/bandwidth-sdk/models/status_callback.rb +338 -0
  71. data/lib/bandwidth-sdk/models/{message_callback_message.rb → status_callback_message.rb} +25 -17
  72. data/lib/bandwidth-sdk/models/{callback_type_enum.rb → status_callback_type_enum.rb} +5 -5
  73. data/lib/bandwidth-sdk/models/tfv_status.rb +2 -2
  74. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +3 -3
  75. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +2 -2
  76. data/lib/bandwidth-sdk/models/verification_request.rb +3 -3
  77. data/lib/bandwidth-sdk/models/verification_update_request.rb +3 -3
  78. data/lib/bandwidth-sdk/version.rb +1 -1
  79. data/lib/bandwidth-sdk.rb +15 -9
  80. data/spec/smoke/multi_channel_api_spec.rb +18 -20
  81. data/spec/smoke/toll_free_verification_api_spec.rb +7 -0
  82. data/spec/unit/api/toll_free_verification_api_spec.rb +8 -0
  83. data/spec/unit/client/api_client_spec.rb +4 -4
  84. data/spec/unit/models/tfv_error_spec.rb +78 -0
  85. data/spec/unit/models/verify_code_response_spec.rb +70 -0
  86. metadata +112 -100
  87. data/docs/DeferredResult.md +0 -20
  88. data/docs/MessageCallback.md +0 -30
  89. data/docs/MessageCallbackMessage.md +0 -40
  90. data/docs/MultiChannelCallbackData.md +0 -26
  91. data/docs/MultiChannelMessageCallbackData.md +0 -32
  92. data/docs/MultiChannelMessageData.md +0 -34
  93. data/docs/MultiChannelMessageDirectionEnum.md +0 -15
  94. data/docs/Tag.md +0 -20
  95. data/lib/bandwidth-sdk/models/multi_channel_status_enum.rb +0 -42
  96. data/spec/unit/models/deferred_result_spec.rb +0 -74
  97. /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_asc.png +0 -0
  98. /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
  99. /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_both.png +0 -0
  100. /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_desc.png +0 -0
  101. /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
  102. /data/coverage/assets/{0.13.1 → 0.13.2}/application.css +0 -0
  103. /data/coverage/assets/{0.13.1 → 0.13.2}/application.js +0 -0
  104. /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/border.png +0 -0
  105. /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/controls.png +0 -0
  106. /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/loading.gif +0 -0
  107. /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/loading_background.png +0 -0
  108. /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_green.png +0 -0
  109. /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_red.png +0 -0
  110. /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_yellow.png +0 -0
  111. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  112. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  113. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  114. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  115. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  116. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  117. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  118. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  119. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_222222_256x240.png +0 -0
  120. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_2e83ff_256x240.png +0 -0
  121. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_454545_256x240.png +0 -0
  122. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_888888_256x240.png +0 -0
  123. /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_cd0a0a_256x240.png +0 -0
  124. /data/coverage/assets/{0.13.1 → 0.13.2}/loading.gif +0 -0
  125. /data/coverage/assets/{0.13.1 → 0.13.2}/magnify.png +0 -0
@@ -0,0 +1,338 @@
1
+ =begin
2
+ #Bandwidth
3
+
4
+ #Bandwidth's Communication APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: letstalk@bandwidth.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Bandwidth
17
+ # Represents a status callback for an outbound MT SMS or MMS or RBM message.
18
+ class StatusCallback
19
+ attr_accessor :time
20
+
21
+ # Represents the time at which the message was read, for `message-read` callbacks.
22
+ attr_accessor :event_time
23
+
24
+ attr_accessor :type
25
+
26
+ # The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number.
27
+ attr_accessor :to
28
+
29
+ # A detailed description of the event described by the callback.
30
+ attr_accessor :description
31
+
32
+ attr_accessor :message
33
+
34
+ # Optional error code, applicable only when type is `message-failed`.
35
+ attr_accessor :error_code
36
+
37
+ # The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled.
38
+ attr_accessor :carrier_name
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ {
65
+ :'time' => :'time',
66
+ :'event_time' => :'eventTime',
67
+ :'type' => :'type',
68
+ :'to' => :'to',
69
+ :'description' => :'description',
70
+ :'message' => :'message',
71
+ :'error_code' => :'errorCode',
72
+ :'carrier_name' => :'carrierName'
73
+ }
74
+ end
75
+
76
+ # Returns all the JSON keys this model knows about
77
+ def self.acceptable_attributes
78
+ attribute_map.values
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.openapi_types
83
+ {
84
+ :'time' => :'Time',
85
+ :'event_time' => :'Time',
86
+ :'type' => :'StatusCallbackTypeEnum',
87
+ :'to' => :'String',
88
+ :'description' => :'String',
89
+ :'message' => :'StatusCallbackMessage',
90
+ :'error_code' => :'Integer',
91
+ :'carrier_name' => :'String'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::StatusCallback` initialize method'
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::StatusCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'time')
117
+ self.time = attributes[:'time']
118
+ else
119
+ self.time = nil
120
+ end
121
+
122
+ if attributes.key?(:'event_time')
123
+ self.event_time = attributes[:'event_time']
124
+ end
125
+
126
+ if attributes.key?(:'type')
127
+ self.type = attributes[:'type']
128
+ else
129
+ self.type = nil
130
+ end
131
+
132
+ if attributes.key?(:'to')
133
+ self.to = attributes[:'to']
134
+ else
135
+ self.to = nil
136
+ end
137
+
138
+ if attributes.key?(:'description')
139
+ self.description = attributes[:'description']
140
+ else
141
+ self.description = nil
142
+ end
143
+
144
+ if attributes.key?(:'message')
145
+ self.message = attributes[:'message']
146
+ else
147
+ self.message = nil
148
+ end
149
+
150
+ if attributes.key?(:'error_code')
151
+ self.error_code = attributes[:'error_code']
152
+ end
153
+
154
+ if attributes.key?(:'carrier_name')
155
+ self.carrier_name = attributes[:'carrier_name']
156
+ end
157
+ end
158
+
159
+ # Show invalid properties with the reasons. Usually used together with valid?
160
+ # @return Array for valid properties with the reasons
161
+ def list_invalid_properties
162
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
163
+ invalid_properties = Array.new
164
+ if @time.nil?
165
+ invalid_properties.push('invalid value for "time", time cannot be nil.')
166
+ end
167
+
168
+ if @type.nil?
169
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
170
+ end
171
+
172
+ if @to.nil?
173
+ invalid_properties.push('invalid value for "to", to cannot be nil.')
174
+ end
175
+
176
+ if @description.nil?
177
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
178
+ end
179
+
180
+ if @message.nil?
181
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
182
+ end
183
+
184
+ invalid_properties
185
+ end
186
+
187
+ # Check to see if the all the properties in the model are valid
188
+ # @return true if the model is valid
189
+ def valid?
190
+ warn '[DEPRECATED] the `valid?` method is obsolete'
191
+ return false if @time.nil?
192
+ return false if @type.nil?
193
+ return false if @to.nil?
194
+ return false if @description.nil?
195
+ return false if @message.nil?
196
+ true
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ time == o.time &&
205
+ event_time == o.event_time &&
206
+ type == o.type &&
207
+ to == o.to &&
208
+ description == o.description &&
209
+ message == o.message &&
210
+ error_code == o.error_code &&
211
+ carrier_name == o.carrier_name
212
+ end
213
+
214
+ # @see the `==` method
215
+ # @param [Object] Object to be compared
216
+ def eql?(o)
217
+ self == o
218
+ end
219
+
220
+ # Calculates hash code according to all attributes.
221
+ # @return [Integer] Hash code
222
+ def hash
223
+ [time, event_time, type, to, description, message, error_code, carrier_name].hash
224
+ end
225
+
226
+ # Builds the object from hash
227
+ # @param [Hash] attributes Model attributes in the form of hash
228
+ # @return [Object] Returns the model itself
229
+ def self.build_from_hash(attributes)
230
+ return nil unless attributes.is_a?(Hash)
231
+ attributes = attributes.transform_keys(&:to_sym)
232
+ transformed_hash = {}
233
+ openapi_types.each_pair do |key, type|
234
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = nil
236
+ elsif type =~ /\AArray<(.*)>/i
237
+ # check to ensure the input is an array given that the attribute
238
+ # is documented as an array but the input is not
239
+ if attributes[attribute_map[key]].is_a?(Array)
240
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
241
+ end
242
+ elsif !attributes[attribute_map[key]].nil?
243
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
244
+ end
245
+ end
246
+ new(transformed_hash)
247
+ end
248
+
249
+ # Deserializes the data based on type
250
+ # @param string type Data type
251
+ # @param string value Value to be deserialized
252
+ # @return [Object] Deserialized data
253
+ def self._deserialize(type, value)
254
+ case type.to_sym
255
+ when :Time
256
+ Time.parse(value)
257
+ when :Date
258
+ Date.parse(value)
259
+ when :String
260
+ value.to_s
261
+ when :Integer
262
+ value.to_i
263
+ when :Float
264
+ value.to_f
265
+ when :Boolean
266
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
267
+ true
268
+ else
269
+ false
270
+ end
271
+ when :Object
272
+ # generic object (usually a Hash), return directly
273
+ value
274
+ when /\AArray<(?<inner_type>.+)>\z/
275
+ inner_type = Regexp.last_match[:inner_type]
276
+ value.map { |v| _deserialize(inner_type, v) }
277
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
278
+ k_type = Regexp.last_match[:k_type]
279
+ v_type = Regexp.last_match[:v_type]
280
+ {}.tap do |hash|
281
+ value.each do |k, v|
282
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
283
+ end
284
+ end
285
+ else # model
286
+ # models (e.g. Pet) or oneOf
287
+ klass = Bandwidth.const_get(type)
288
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
289
+ end
290
+ end
291
+
292
+ # Returns the string representation of the object
293
+ # @return [String] String presentation of the object
294
+ def to_s
295
+ to_hash.to_s
296
+ end
297
+
298
+ # to_body is an alias to to_hash (backward compatibility)
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_body
301
+ to_hash
302
+ end
303
+
304
+ # Returns the object in the form of hash
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_hash
307
+ hash = {}
308
+ self.class.attribute_map.each_pair do |attr, param|
309
+ value = self.send(attr)
310
+ if value.nil?
311
+ is_nullable = self.class.openapi_nullable.include?(attr)
312
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
313
+ end
314
+
315
+ hash[param] = _to_hash(value)
316
+ end
317
+ hash
318
+ end
319
+
320
+ # Outputs non-array value in the form of hash
321
+ # For object, use to_hash. Otherwise, just return the value
322
+ # @param [Object] value Any valid value
323
+ # @return [Hash] Returns the value in the form of hash
324
+ def _to_hash(value)
325
+ if value.is_a?(Array)
326
+ value.compact.map { |v| _to_hash(v) }
327
+ elsif value.is_a?(Hash)
328
+ {}.tap do |hash|
329
+ value.each { |k, v| hash[k] = _to_hash(v) }
330
+ end
331
+ elsif value.respond_to? :to_hash
332
+ value.to_hash
333
+ else
334
+ value
335
+ end
336
+ end
337
+ end
338
+ end
@@ -14,33 +14,42 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- # Message payload schema within a MessageCallback
18
- class MessageCallbackMessage
17
+ # Message payload schema within a callback
18
+ class StatusCallbackMessage
19
+ # A unique identifier of the message.
19
20
  attr_accessor :id
20
21
 
22
+ # The Bandwidth phone number or alphanumeric identifier associated with the message.
21
23
  attr_accessor :owner
22
24
 
25
+ # The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.
23
26
  attr_accessor :application_id
24
27
 
25
28
  attr_accessor :time
26
29
 
30
+ # The number of segments the user's message is broken into before sending over carrier networks.
27
31
  attr_accessor :segment_count
28
32
 
29
33
  attr_accessor :direction
30
34
 
35
+ # The phone number recipients of the message.
31
36
  attr_accessor :to
32
37
 
38
+ # The Bandwidth phone number or alphanumeric identifier the message was sent from.
33
39
  attr_accessor :from
34
40
 
35
41
  attr_accessor :text
36
42
 
43
+ # A custom string that will be included in callback events of the message. Max 1024 characters.
37
44
  attr_accessor :tag
38
45
 
39
- # Optional media, applicable only for mms
46
+ # Optional media, not applicable for sms
40
47
  attr_accessor :media
41
48
 
42
49
  attr_accessor :priority
43
50
 
51
+ attr_accessor :channel
52
+
44
53
  class EnumAttributeValidator
45
54
  attr_reader :datatype
46
55
  attr_reader :allowable_values
@@ -77,7 +86,8 @@ module Bandwidth
77
86
  :'text' => :'text',
78
87
  :'tag' => :'tag',
79
88
  :'media' => :'media',
80
- :'priority' => :'priority'
89
+ :'priority' => :'priority',
90
+ :'channel' => :'channel'
81
91
  }
82
92
  end
83
93
 
@@ -100,14 +110,14 @@ module Bandwidth
100
110
  :'text' => :'String',
101
111
  :'tag' => :'String',
102
112
  :'media' => :'Array<String>',
103
- :'priority' => :'PriorityEnum'
113
+ :'priority' => :'PriorityEnum',
114
+ :'channel' => :'MultiChannelMessageChannelEnum'
104
115
  }
105
116
  end
106
117
 
107
118
  # List of attributes with nullable: true
108
119
  def self.openapi_nullable
109
120
  Set.new([
110
- :'media',
111
121
  ])
112
122
  end
113
123
 
@@ -115,13 +125,13 @@ module Bandwidth
115
125
  # @param [Hash] attributes Model attributes in the form of hash
116
126
  def initialize(attributes = {})
117
127
  if (!attributes.is_a?(Hash))
118
- fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MessageCallbackMessage` initialize method'
128
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::StatusCallbackMessage` initialize method'
119
129
  end
120
130
 
121
131
  # check to see if the attribute exists and convert string to symbol for hash key
122
132
  attributes = attributes.each_with_object({}) { |(k, v), h|
123
133
  if (!self.class.attribute_map.key?(k.to_sym))
124
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MessageCallbackMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
134
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::StatusCallbackMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
125
135
  end
126
136
  h[k.to_sym] = v
127
137
  }
@@ -178,8 +188,6 @@ module Bandwidth
178
188
 
179
189
  if attributes.key?(:'text')
180
190
  self.text = attributes[:'text']
181
- else
182
- self.text = nil
183
191
  end
184
192
 
185
193
  if attributes.key?(:'tag')
@@ -195,6 +203,10 @@ module Bandwidth
195
203
  if attributes.key?(:'priority')
196
204
  self.priority = attributes[:'priority']
197
205
  end
206
+
207
+ if attributes.key?(:'channel')
208
+ self.channel = attributes[:'channel']
209
+ end
198
210
  end
199
211
 
200
212
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -234,10 +246,6 @@ module Bandwidth
234
246
  invalid_properties.push('invalid value for "from", from cannot be nil.')
235
247
  end
236
248
 
237
- if @text.nil?
238
- invalid_properties.push('invalid value for "text", text cannot be nil.')
239
- end
240
-
241
249
  invalid_properties
242
250
  end
243
251
 
@@ -253,7 +261,6 @@ module Bandwidth
253
261
  return false if @direction.nil?
254
262
  return false if @to.nil?
255
263
  return false if @from.nil?
256
- return false if @text.nil?
257
264
  true
258
265
  end
259
266
 
@@ -283,7 +290,8 @@ module Bandwidth
283
290
  text == o.text &&
284
291
  tag == o.tag &&
285
292
  media == o.media &&
286
- priority == o.priority
293
+ priority == o.priority &&
294
+ channel == o.channel
287
295
  end
288
296
 
289
297
  # @see the `==` method
@@ -295,7 +303,7 @@ module Bandwidth
295
303
  # Calculates hash code according to all attributes.
296
304
  # @return [Integer] Hash code
297
305
  def hash
298
- [id, owner, application_id, time, segment_count, direction, to, from, text, tag, media, priority].hash
306
+ [id, owner, application_id, time, segment_count, direction, to, from, text, tag, media, priority, channel].hash
299
307
  end
300
308
 
301
309
  # Builds the object from hash
@@ -14,14 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class CallbackTypeEnum
18
- RECEIVED = 'message-received'.freeze
17
+ class StatusCallbackTypeEnum
19
18
  SENDING = 'message-sending'.freeze
20
19
  DELIVERED = 'message-delivered'.freeze
21
20
  FAILED = 'message-failed'.freeze
21
+ READ = 'message-read'.freeze
22
22
 
23
23
  def self.all_vars
24
- @all_vars ||= [RECEIVED, SENDING, DELIVERED, FAILED].freeze
24
+ @all_vars ||= [SENDING, DELIVERED, FAILED, READ].freeze
25
25
  end
26
26
 
27
27
  # Builds the enum from string
@@ -35,8 +35,8 @@ module Bandwidth
35
35
  # @param [String] The enum value in the form of the string
36
36
  # @return [String] The enum value
37
37
  def build_from_hash(value)
38
- return value if CallbackTypeEnum.all_vars.include?(value)
39
- raise "Invalid ENUM value #{value} for class #CallbackTypeEnum"
38
+ return value if StatusCallbackTypeEnum.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #StatusCallbackTypeEnum"
40
40
  end
41
41
  end
42
42
  end
@@ -37,10 +37,10 @@ module Bandwidth
37
37
 
38
38
  attr_accessor :submission
39
39
 
40
- # Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025)
40
+ # Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
41
41
  attr_accessor :blocked
42
42
 
43
- # The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025)
43
+ # The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
44
44
  attr_accessor :blocked_reason
45
45
 
46
46
  class EnumAttributeValidator
@@ -39,13 +39,13 @@ module Bandwidth
39
39
  # ISV name.
40
40
  attr_accessor :isv_reseller
41
41
 
42
- # The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)
42
+ # The Toll-Free Verification request privacy policy URL.
43
43
  attr_accessor :privacy_policy_url
44
44
 
45
- # The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)
45
+ # The Toll-Free Verification request terms and conditions policy URL.
46
46
  attr_accessor :terms_and_conditions_url
47
47
 
48
- # The company 'Doing Business As'. (Not Available Until 5/28/2025)
48
+ # The company 'Doing Business As'.
49
49
  attr_accessor :business_dba
50
50
 
51
51
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -38,10 +38,10 @@ module Bandwidth
38
38
 
39
39
  attr_accessor :status
40
40
 
41
- # Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025)
41
+ # Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
42
42
  attr_accessor :blocked
43
43
 
44
- # The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025)
44
+ # The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
45
45
  attr_accessor :blocked_reason
46
46
 
47
47
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -41,13 +41,13 @@ module Bandwidth
41
41
  # ISV name.
42
42
  attr_accessor :isv_reseller
43
43
 
44
- # The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)
44
+ # The Toll-Free Verification request privacy policy URL.
45
45
  attr_accessor :privacy_policy_url
46
46
 
47
- # The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)
47
+ # The Toll-Free Verification request terms and conditions policy URL.
48
48
  attr_accessor :terms_and_conditions_url
49
49
 
50
- # The company 'Doing Business As'. (Not Available Until 5/28/2025)
50
+ # The company 'Doing Business As'.
51
51
  attr_accessor :business_dba
52
52
 
53
53
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,13 +39,13 @@ module Bandwidth
39
39
  # ISV name.
40
40
  attr_accessor :isv_reseller
41
41
 
42
- # The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)
42
+ # The Toll-Free Verification request privacy policy URL.
43
43
  attr_accessor :privacy_policy_url
44
44
 
45
- # The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)
45
+ # The Toll-Free Verification request terms and conditions policy URL.
46
46
  attr_accessor :terms_and_conditions_url
47
47
 
48
- # The company 'Doing Business As'. (Not Available Until 5/28/2025)
48
+ # The company 'Doing Business As'.
49
49
  attr_accessor :business_dba
50
50
 
51
51
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -11,5 +11,5 @@ Generator version: 7.8.0
11
11
  =end
12
12
 
13
13
  module Bandwidth
14
- VERSION = '15.1.0'
14
+ VERSION = '16.0.0'
15
15
  end