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,244 @@
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
+ # Specifies relevant sources of the error, if any.
18
+ class ErrorSource
19
+ # The relevant URI query parameter causing the error
20
+ attr_accessor :parameter
21
+
22
+ # The request body field that led to the error
23
+ attr_accessor :field
24
+
25
+ # The header field that contributed to the error
26
+ attr_accessor :header
27
+
28
+ # A resource ID or path linked to the error
29
+ attr_accessor :reference
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'parameter' => :'parameter',
35
+ :'field' => :'field',
36
+ :'header' => :'header',
37
+ :'reference' => :'reference'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'parameter' => :'String',
50
+ :'field' => :'String',
51
+ :'header' => :'String',
52
+ :'reference' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::ErrorSource` initialize method'
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ErrorSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'parameter')
78
+ self.parameter = attributes[:'parameter']
79
+ end
80
+
81
+ if attributes.key?(:'field')
82
+ self.field = attributes[:'field']
83
+ end
84
+
85
+ if attributes.key?(:'header')
86
+ self.header = attributes[:'header']
87
+ end
88
+
89
+ if attributes.key?(:'reference')
90
+ self.reference = attributes[:'reference']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ parameter == o.parameter &&
115
+ field == o.field &&
116
+ header == o.header &&
117
+ reference == o.reference
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [parameter, field, header, reference].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def self._deserialize(type, value)
160
+ case type.to_sym
161
+ when :Time
162
+ Time.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ # models (e.g. Pet) or oneOf
193
+ klass = Bandwidth.const_get(type)
194
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+ end
244
+ end
@@ -25,7 +25,7 @@ module Bandwidth
25
25
  attr_accessor :error_code
26
26
 
27
27
  # A description of the error that was encountered.
28
- attr_accessor :error_description
28
+ attr_accessor :error_message
29
29
 
30
30
  # Details of the errors that were encountered when processing the request.
31
31
  attr_accessor :errors
@@ -39,7 +39,7 @@ module Bandwidth
39
39
  :'account_id' => :'accountId',
40
40
  :'phone_number' => :'phoneNumber',
41
41
  :'error_code' => :'errorCode',
42
- :'error_description' => :'errorDescription',
42
+ :'error_message' => :'errorMessage',
43
43
  :'errors' => :'errors',
44
44
  :'internal_ticket_number' => :'internalTicketNumber'
45
45
  }
@@ -56,7 +56,7 @@ module Bandwidth
56
56
  :'account_id' => :'String',
57
57
  :'phone_number' => :'String',
58
58
  :'error_code' => :'String',
59
- :'error_description' => :'String',
59
+ :'error_message' => :'String',
60
60
  :'errors' => :'Array<String>',
61
61
  :'internal_ticket_number' => :'String'
62
62
  }
@@ -95,8 +95,8 @@ module Bandwidth
95
95
  self.error_code = attributes[:'error_code']
96
96
  end
97
97
 
98
- if attributes.key?(:'error_description')
99
- self.error_description = attributes[:'error_description']
98
+ if attributes.key?(:'error_message')
99
+ self.error_message = attributes[:'error_message']
100
100
  end
101
101
 
102
102
  if attributes.key?(:'errors')
@@ -172,7 +172,7 @@ module Bandwidth
172
172
  account_id == o.account_id &&
173
173
  phone_number == o.phone_number &&
174
174
  error_code == o.error_code &&
175
- error_description == o.error_description &&
175
+ error_message == o.error_message &&
176
176
  errors == o.errors &&
177
177
  internal_ticket_number == o.internal_ticket_number
178
178
  end
@@ -186,7 +186,7 @@ module Bandwidth
186
186
  # Calculates hash code according to all attributes.
187
187
  # @return [Integer] Hash code
188
188
  def hash
189
- [account_id, phone_number, error_code, error_description, errors, internal_ticket_number].hash
189
+ [account_id, phone_number, error_code, error_message, errors, internal_ticket_number].hash
190
190
  end
191
191
 
192
192
  # Builds the object from hash
@@ -14,12 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- # Message Callback Schema
18
- class MessageCallback
17
+ # Represents an inbound callback.
18
+ class InboundCallback
19
19
  attr_accessor :time
20
20
 
21
21
  attr_accessor :type
22
22
 
23
+ # The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message.
23
24
  attr_accessor :to
24
25
 
25
26
  # A detailed description of the event described by the callback.
@@ -27,10 +28,7 @@ module Bandwidth
27
28
 
28
29
  attr_accessor :message
29
30
 
30
- # Optional error code, applicable only when type is `message-failed`.
31
- attr_accessor :error_code
32
-
33
- # 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.
31
+ # 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.
34
32
  attr_accessor :carrier_name
35
33
 
36
34
  class EnumAttributeValidator
@@ -63,7 +61,6 @@ module Bandwidth
63
61
  :'to' => :'to',
64
62
  :'description' => :'description',
65
63
  :'message' => :'message',
66
- :'error_code' => :'errorCode',
67
64
  :'carrier_name' => :'carrierName'
68
65
  }
69
66
  end
@@ -77,11 +74,10 @@ module Bandwidth
77
74
  def self.openapi_types
78
75
  {
79
76
  :'time' => :'Time',
80
- :'type' => :'CallbackTypeEnum',
77
+ :'type' => :'InboundCallbackTypeEnum',
81
78
  :'to' => :'String',
82
79
  :'description' => :'String',
83
- :'message' => :'MessageCallbackMessage',
84
- :'error_code' => :'Integer',
80
+ :'message' => :'InboundCallbackMessage',
85
81
  :'carrier_name' => :'String'
86
82
  }
87
83
  end
@@ -89,8 +85,6 @@ module Bandwidth
89
85
  # List of attributes with nullable: true
90
86
  def self.openapi_nullable
91
87
  Set.new([
92
- :'error_code',
93
- :'carrier_name'
94
88
  ])
95
89
  end
96
90
 
@@ -98,13 +92,13 @@ module Bandwidth
98
92
  # @param [Hash] attributes Model attributes in the form of hash
99
93
  def initialize(attributes = {})
100
94
  if (!attributes.is_a?(Hash))
101
- fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MessageCallback` initialize method'
95
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::InboundCallback` initialize method'
102
96
  end
103
97
 
104
98
  # check to see if the attribute exists and convert string to symbol for hash key
105
99
  attributes = attributes.each_with_object({}) { |(k, v), h|
106
100
  if (!self.class.attribute_map.key?(k.to_sym))
107
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MessageCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::InboundCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
108
102
  end
109
103
  h[k.to_sym] = v
110
104
  }
@@ -139,10 +133,6 @@ module Bandwidth
139
133
  self.message = nil
140
134
  end
141
135
 
142
- if attributes.key?(:'error_code')
143
- self.error_code = attributes[:'error_code']
144
- end
145
-
146
136
  if attributes.key?(:'carrier_name')
147
137
  self.carrier_name = attributes[:'carrier_name']
148
138
  end
@@ -198,7 +188,6 @@ module Bandwidth
198
188
  to == o.to &&
199
189
  description == o.description &&
200
190
  message == o.message &&
201
- error_code == o.error_code &&
202
191
  carrier_name == o.carrier_name
203
192
  end
204
193
 
@@ -211,7 +200,7 @@ module Bandwidth
211
200
  # Calculates hash code according to all attributes.
212
201
  # @return [Integer] Hash code
213
202
  def hash
214
- [time, type, to, description, message, error_code, carrier_name].hash
203
+ [time, type, to, description, message, carrier_name].hash
215
204
  end
216
205
 
217
206
  # Builds the object from hash