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
@@ -21,7 +21,7 @@ module Bandwidth
21
21
  attr_accessor :text
22
22
 
23
23
  # Base64 payload the customer receives when the reply is clicked.
24
- attr_accessor :post_back_data
24
+ attr_accessor :postback_data
25
25
 
26
26
  # The phone number to dial. Must be E164 format.
27
27
  attr_accessor :phone_number
@@ -53,7 +53,7 @@ module Bandwidth
53
53
  {
54
54
  :'type' => :'type',
55
55
  :'text' => :'text',
56
- :'post_back_data' => :'postBackData',
56
+ :'postback_data' => :'postbackData',
57
57
  :'phone_number' => :'phoneNumber'
58
58
  }
59
59
  end
@@ -68,7 +68,7 @@ module Bandwidth
68
68
  {
69
69
  :'type' => :'RbmActionTypeEnum',
70
70
  :'text' => :'String',
71
- :'post_back_data' => :'String',
71
+ :'postback_data' => :'String',
72
72
  :'phone_number' => :'String'
73
73
  }
74
74
  end
@@ -113,10 +113,10 @@ module Bandwidth
113
113
  self.text = nil
114
114
  end
115
115
 
116
- if attributes.key?(:'post_back_data')
117
- self.post_back_data = attributes[:'post_back_data']
116
+ if attributes.key?(:'postback_data')
117
+ self.postback_data = attributes[:'postback_data']
118
118
  else
119
- self.post_back_data = nil
119
+ self.postback_data = nil
120
120
  end
121
121
 
122
122
  if attributes.key?(:'phone_number')
@@ -143,12 +143,12 @@ module Bandwidth
143
143
  invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 25.')
144
144
  end
145
145
 
146
- if @post_back_data.nil?
147
- invalid_properties.push('invalid value for "post_back_data", post_back_data cannot be nil.')
146
+ if @postback_data.nil?
147
+ invalid_properties.push('invalid value for "postback_data", postback_data cannot be nil.')
148
148
  end
149
149
 
150
- if @post_back_data.to_s.length > 2048
151
- invalid_properties.push('invalid value for "post_back_data", the character length must be smaller than or equal to 2048.')
150
+ if @postback_data.to_s.length > 2048
151
+ invalid_properties.push('invalid value for "postback_data", the character length must be smaller than or equal to 2048.')
152
152
  end
153
153
 
154
154
  if @phone_number.nil?
@@ -165,8 +165,8 @@ module Bandwidth
165
165
  return false if @type.nil?
166
166
  return false if @text.nil?
167
167
  return false if @text.to_s.length > 25
168
- return false if @post_back_data.nil?
169
- return false if @post_back_data.to_s.length > 2048
168
+ return false if @postback_data.nil?
169
+ return false if @postback_data.to_s.length > 2048
170
170
  return false if @phone_number.nil?
171
171
  true
172
172
  end
@@ -186,17 +186,17 @@ module Bandwidth
186
186
  end
187
187
 
188
188
  # Custom attribute writer method with validation
189
- # @param [Object] post_back_data Value to be assigned
190
- def post_back_data=(post_back_data)
191
- if post_back_data.nil?
192
- fail ArgumentError, 'post_back_data cannot be nil'
189
+ # @param [Object] postback_data Value to be assigned
190
+ def postback_data=(postback_data)
191
+ if postback_data.nil?
192
+ fail ArgumentError, 'postback_data cannot be nil'
193
193
  end
194
194
 
195
- if post_back_data.to_s.length > 2048
196
- fail ArgumentError, 'invalid value for "post_back_data", the character length must be smaller than or equal to 2048.'
195
+ if postback_data.to_s.length > 2048
196
+ fail ArgumentError, 'invalid value for "postback_data", the character length must be smaller than or equal to 2048.'
197
197
  end
198
198
 
199
- @post_back_data = post_back_data
199
+ @postback_data = postback_data
200
200
  end
201
201
 
202
202
  # Checks equality by comparing each attribute.
@@ -206,7 +206,7 @@ module Bandwidth
206
206
  self.class == o.class &&
207
207
  type == o.type &&
208
208
  text == o.text &&
209
- post_back_data == o.post_back_data &&
209
+ postback_data == o.postback_data &&
210
210
  phone_number == o.phone_number
211
211
  end
212
212
 
@@ -219,7 +219,7 @@ module Bandwidth
219
219
  # Calculates hash code according to all attributes.
220
220
  # @return [Integer] Hash code
221
221
  def hash
222
- [type, text, post_back_data, phone_number].hash
222
+ [type, text, postback_data, phone_number].hash
223
223
  end
224
224
 
225
225
  # Builds the object from hash
@@ -21,7 +21,7 @@ module Bandwidth
21
21
  attr_accessor :text
22
22
 
23
23
  # Base64 payload the customer receives when the reply is clicked.
24
- attr_accessor :post_back_data
24
+ attr_accessor :postback_data
25
25
 
26
26
  # The URL to open in browser.
27
27
  attr_accessor :url
@@ -53,7 +53,7 @@ module Bandwidth
53
53
  {
54
54
  :'type' => :'type',
55
55
  :'text' => :'text',
56
- :'post_back_data' => :'postBackData',
56
+ :'postback_data' => :'postbackData',
57
57
  :'url' => :'url'
58
58
  }
59
59
  end
@@ -68,7 +68,7 @@ module Bandwidth
68
68
  {
69
69
  :'type' => :'RbmActionTypeEnum',
70
70
  :'text' => :'String',
71
- :'post_back_data' => :'String',
71
+ :'postback_data' => :'String',
72
72
  :'url' => :'String'
73
73
  }
74
74
  end
@@ -113,10 +113,10 @@ module Bandwidth
113
113
  self.text = nil
114
114
  end
115
115
 
116
- if attributes.key?(:'post_back_data')
117
- self.post_back_data = attributes[:'post_back_data']
116
+ if attributes.key?(:'postback_data')
117
+ self.postback_data = attributes[:'postback_data']
118
118
  else
119
- self.post_back_data = nil
119
+ self.postback_data = nil
120
120
  end
121
121
 
122
122
  if attributes.key?(:'url')
@@ -143,12 +143,12 @@ module Bandwidth
143
143
  invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 25.')
144
144
  end
145
145
 
146
- if @post_back_data.nil?
147
- invalid_properties.push('invalid value for "post_back_data", post_back_data cannot be nil.')
146
+ if @postback_data.nil?
147
+ invalid_properties.push('invalid value for "postback_data", postback_data cannot be nil.')
148
148
  end
149
149
 
150
- if @post_back_data.to_s.length > 2048
151
- invalid_properties.push('invalid value for "post_back_data", the character length must be smaller than or equal to 2048.')
150
+ if @postback_data.to_s.length > 2048
151
+ invalid_properties.push('invalid value for "postback_data", the character length must be smaller than or equal to 2048.')
152
152
  end
153
153
 
154
154
  if @url.nil?
@@ -169,8 +169,8 @@ module Bandwidth
169
169
  return false if @type.nil?
170
170
  return false if @text.nil?
171
171
  return false if @text.to_s.length > 25
172
- return false if @post_back_data.nil?
173
- return false if @post_back_data.to_s.length > 2048
172
+ return false if @postback_data.nil?
173
+ return false if @postback_data.to_s.length > 2048
174
174
  return false if @url.nil?
175
175
  return false if @url.to_s.length > 2048
176
176
  true
@@ -191,17 +191,17 @@ module Bandwidth
191
191
  end
192
192
 
193
193
  # Custom attribute writer method with validation
194
- # @param [Object] post_back_data Value to be assigned
195
- def post_back_data=(post_back_data)
196
- if post_back_data.nil?
197
- fail ArgumentError, 'post_back_data cannot be nil'
194
+ # @param [Object] postback_data Value to be assigned
195
+ def postback_data=(postback_data)
196
+ if postback_data.nil?
197
+ fail ArgumentError, 'postback_data cannot be nil'
198
198
  end
199
199
 
200
- if post_back_data.to_s.length > 2048
201
- fail ArgumentError, 'invalid value for "post_back_data", the character length must be smaller than or equal to 2048.'
200
+ if postback_data.to_s.length > 2048
201
+ fail ArgumentError, 'invalid value for "postback_data", the character length must be smaller than or equal to 2048.'
202
202
  end
203
203
 
204
- @post_back_data = post_back_data
204
+ @postback_data = postback_data
205
205
  end
206
206
 
207
207
  # Custom attribute writer method with validation
@@ -225,7 +225,7 @@ module Bandwidth
225
225
  self.class == o.class &&
226
226
  type == o.type &&
227
227
  text == o.text &&
228
- post_back_data == o.post_back_data &&
228
+ postback_data == o.postback_data &&
229
229
  url == o.url
230
230
  end
231
231
 
@@ -238,7 +238,7 @@ module Bandwidth
238
238
  # Calculates hash code according to all attributes.
239
239
  # @return [Integer] Hash code
240
240
  def hash
241
- [type, text, post_back_data, url].hash
241
+ [type, text, postback_data, url].hash
242
242
  end
243
243
 
244
244
  # Builds the object from hash
@@ -21,7 +21,7 @@ module Bandwidth
21
21
  attr_accessor :text
22
22
 
23
23
  # Base64 payload the customer receives when the reply is clicked.
24
- attr_accessor :post_back_data
24
+ attr_accessor :postback_data
25
25
 
26
26
  # The latitude of the location.
27
27
  attr_accessor :latitude
@@ -59,7 +59,7 @@ module Bandwidth
59
59
  {
60
60
  :'type' => :'type',
61
61
  :'text' => :'text',
62
- :'post_back_data' => :'postBackData',
62
+ :'postback_data' => :'postbackData',
63
63
  :'latitude' => :'latitude',
64
64
  :'longitude' => :'longitude',
65
65
  :'label' => :'label'
@@ -76,7 +76,7 @@ module Bandwidth
76
76
  {
77
77
  :'type' => :'RbmActionTypeEnum',
78
78
  :'text' => :'String',
79
- :'post_back_data' => :'String',
79
+ :'postback_data' => :'String',
80
80
  :'latitude' => :'Float',
81
81
  :'longitude' => :'Float',
82
82
  :'label' => :'String'
@@ -123,10 +123,10 @@ module Bandwidth
123
123
  self.text = nil
124
124
  end
125
125
 
126
- if attributes.key?(:'post_back_data')
127
- self.post_back_data = attributes[:'post_back_data']
126
+ if attributes.key?(:'postback_data')
127
+ self.postback_data = attributes[:'postback_data']
128
128
  else
129
- self.post_back_data = nil
129
+ self.postback_data = nil
130
130
  end
131
131
 
132
132
  if attributes.key?(:'latitude')
@@ -163,12 +163,12 @@ module Bandwidth
163
163
  invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 25.')
164
164
  end
165
165
 
166
- if @post_back_data.nil?
167
- invalid_properties.push('invalid value for "post_back_data", post_back_data cannot be nil.')
166
+ if @postback_data.nil?
167
+ invalid_properties.push('invalid value for "postback_data", postback_data cannot be nil.')
168
168
  end
169
169
 
170
- if @post_back_data.to_s.length > 2048
171
- invalid_properties.push('invalid value for "post_back_data", the character length must be smaller than or equal to 2048.')
170
+ if @postback_data.to_s.length > 2048
171
+ invalid_properties.push('invalid value for "postback_data", the character length must be smaller than or equal to 2048.')
172
172
  end
173
173
 
174
174
  if @latitude.nil?
@@ -193,8 +193,8 @@ module Bandwidth
193
193
  return false if @type.nil?
194
194
  return false if @text.nil?
195
195
  return false if @text.to_s.length > 25
196
- return false if @post_back_data.nil?
197
- return false if @post_back_data.to_s.length > 2048
196
+ return false if @postback_data.nil?
197
+ return false if @postback_data.to_s.length > 2048
198
198
  return false if @latitude.nil?
199
199
  return false if @longitude.nil?
200
200
  return false if !@label.nil? && @label.to_s.length > 100
@@ -216,17 +216,17 @@ module Bandwidth
216
216
  end
217
217
 
218
218
  # Custom attribute writer method with validation
219
- # @param [Object] post_back_data Value to be assigned
220
- def post_back_data=(post_back_data)
221
- if post_back_data.nil?
222
- fail ArgumentError, 'post_back_data cannot be nil'
219
+ # @param [Object] postback_data Value to be assigned
220
+ def postback_data=(postback_data)
221
+ if postback_data.nil?
222
+ fail ArgumentError, 'postback_data cannot be nil'
223
223
  end
224
224
 
225
- if post_back_data.to_s.length > 2048
226
- fail ArgumentError, 'invalid value for "post_back_data", the character length must be smaller than or equal to 2048.'
225
+ if postback_data.to_s.length > 2048
226
+ fail ArgumentError, 'invalid value for "postback_data", the character length must be smaller than or equal to 2048.'
227
227
  end
228
228
 
229
- @post_back_data = post_back_data
229
+ @postback_data = postback_data
230
230
  end
231
231
 
232
232
  # Custom attribute writer method with validation
@@ -250,7 +250,7 @@ module Bandwidth
250
250
  self.class == o.class &&
251
251
  type == o.type &&
252
252
  text == o.text &&
253
- post_back_data == o.post_back_data &&
253
+ postback_data == o.postback_data &&
254
254
  latitude == o.latitude &&
255
255
  longitude == o.longitude &&
256
256
  label == o.label
@@ -265,7 +265,7 @@ module Bandwidth
265
265
  # Calculates hash code according to all attributes.
266
266
  # @return [Integer] Hash code
267
267
  def hash
268
- [type, text, post_back_data, latitude, longitude, label].hash
268
+ [type, text, postback_data, latitude, longitude, label].hash
269
269
  end
270
270
 
271
271
  # Builds the object from hash
@@ -14,16 +14,18 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class Tag
18
- attr_accessor :key
17
+ class RbmLocationResponse
18
+ # The latitude of the client's location.
19
+ attr_accessor :latitude
19
20
 
20
- attr_accessor :value
21
+ # The longitude of the client's location.
22
+ attr_accessor :longitude
21
23
 
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
- :'key' => :'key',
26
- :'value' => :'value'
27
+ :'latitude' => :'latitude',
28
+ :'longitude' => :'longitude'
27
29
  }
28
30
  end
29
31
 
@@ -35,8 +37,8 @@ module Bandwidth
35
37
  # Attribute type mapping.
36
38
  def self.openapi_types
37
39
  {
38
- :'key' => :'String',
39
- :'value' => :'String'
40
+ :'latitude' => :'Float',
41
+ :'longitude' => :'Float'
40
42
  }
41
43
  end
42
44
 
@@ -50,23 +52,23 @@ module Bandwidth
50
52
  # @param [Hash] attributes Model attributes in the form of hash
51
53
  def initialize(attributes = {})
52
54
  if (!attributes.is_a?(Hash))
53
- fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Tag` initialize method'
55
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::RbmLocationResponse` initialize method'
54
56
  end
55
57
 
56
58
  # check to see if the attribute exists and convert string to symbol for hash key
57
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
60
  if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Tag`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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
60
62
  end
61
63
  h[k.to_sym] = v
62
64
  }
63
65
 
64
- if attributes.key?(:'key')
65
- self.key = attributes[:'key']
66
+ if attributes.key?(:'latitude')
67
+ self.latitude = attributes[:'latitude']
66
68
  end
67
69
 
68
- if attributes.key?(:'value')
69
- self.value = attributes[:'value']
70
+ if attributes.key?(:'longitude')
71
+ self.longitude = attributes[:'longitude']
70
72
  end
71
73
  end
72
74
 
@@ -90,8 +92,8 @@ module Bandwidth
90
92
  def ==(o)
91
93
  return true if self.equal?(o)
92
94
  self.class == o.class &&
93
- key == o.key &&
94
- value == o.value
95
+ latitude == o.latitude &&
96
+ longitude == o.longitude
95
97
  end
96
98
 
97
99
  # @see the `==` method
@@ -103,7 +105,7 @@ module Bandwidth
103
105
  # Calculates hash code according to all attributes.
104
106
  # @return [Integer] Hash code
105
107
  def hash
106
- [key, value].hash
108
+ [latitude, longitude].hash
107
109
  end
108
110
 
109
111
  # Builds the object from hash
@@ -14,49 +14,18 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class MultiChannelCallbackData
18
- # The time of the callback event.
19
- attr_accessor :time
17
+ class RbmSuggestionResponse
18
+ # The text associated with the suggestion response.
19
+ attr_accessor :text
20
20
 
21
- attr_accessor :type
22
-
23
- # The phone number the message should be sent to in E164 format.
24
- attr_accessor :to
25
-
26
- attr_accessor :description
27
-
28
- attr_accessor :message
29
-
30
- class EnumAttributeValidator
31
- attr_reader :datatype
32
- attr_reader :allowable_values
33
-
34
- def initialize(datatype, allowable_values)
35
- @allowable_values = allowable_values.map do |value|
36
- case datatype.to_s
37
- when /Integer/i
38
- value.to_i
39
- when /Float/i
40
- value.to_f
41
- else
42
- value
43
- end
44
- end
45
- end
46
-
47
- def valid?(value)
48
- !value || allowable_values.include?(value)
49
- end
50
- end
21
+ # Base64 payload the customer receives when the reply is clicked.
22
+ attr_accessor :postback_data
51
23
 
52
24
  # Attribute mapping from ruby-style variable name to JSON key.
53
25
  def self.attribute_map
54
26
  {
55
- :'time' => :'time',
56
- :'type' => :'type',
57
- :'to' => :'to',
58
- :'description' => :'description',
59
- :'message' => :'message'
27
+ :'text' => :'text',
28
+ :'postback_data' => :'postbackData'
60
29
  }
61
30
  end
62
31
 
@@ -68,11 +37,8 @@ module Bandwidth
68
37
  # Attribute type mapping.
69
38
  def self.openapi_types
70
39
  {
71
- :'time' => :'Time',
72
- :'type' => :'MultiChannelStatusEnum',
73
- :'to' => :'String',
74
- :'description' => :'String',
75
- :'message' => :'MultiChannelMessageCallbackData'
40
+ :'text' => :'String',
41
+ :'postback_data' => :'String'
76
42
  }
77
43
  end
78
44
 
@@ -86,35 +52,23 @@ module Bandwidth
86
52
  # @param [Hash] attributes Model attributes in the form of hash
87
53
  def initialize(attributes = {})
88
54
  if (!attributes.is_a?(Hash))
89
- fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MultiChannelCallbackData` initialize method'
55
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::RbmSuggestionResponse` initialize method'
90
56
  end
91
57
 
92
58
  # check to see if the attribute exists and convert string to symbol for hash key
93
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
94
60
  if (!self.class.attribute_map.key?(k.to_sym))
95
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MultiChannelCallbackData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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
96
62
  end
97
63
  h[k.to_sym] = v
98
64
  }
99
65
 
100
- if attributes.key?(:'time')
101
- self.time = attributes[:'time']
102
- end
103
-
104
- if attributes.key?(:'type')
105
- self.type = attributes[:'type']
66
+ if attributes.key?(:'text')
67
+ self.text = attributes[:'text']
106
68
  end
107
69
 
108
- if attributes.key?(:'to')
109
- self.to = attributes[:'to']
110
- end
111
-
112
- if attributes.key?(:'description')
113
- self.description = attributes[:'description']
114
- end
115
-
116
- if attributes.key?(:'message')
117
- self.message = attributes[:'message']
70
+ if attributes.key?(:'postback_data')
71
+ self.postback_data = attributes[:'postback_data']
118
72
  end
119
73
  end
120
74
 
@@ -123,6 +77,10 @@ module Bandwidth
123
77
  def list_invalid_properties
124
78
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
125
79
  invalid_properties = Array.new
80
+ if !@postback_data.nil? && @postback_data.to_s.length > 2048
81
+ invalid_properties.push('invalid value for "postback_data", the character length must be smaller than or equal to 2048.')
82
+ end
83
+
126
84
  invalid_properties
127
85
  end
128
86
 
@@ -130,19 +88,31 @@ module Bandwidth
130
88
  # @return true if the model is valid
131
89
  def valid?
132
90
  warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if !@postback_data.nil? && @postback_data.to_s.length > 2048
133
92
  true
134
93
  end
135
94
 
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] postback_data Value to be assigned
97
+ def postback_data=(postback_data)
98
+ if postback_data.nil?
99
+ fail ArgumentError, 'postback_data cannot be nil'
100
+ end
101
+
102
+ if postback_data.to_s.length > 2048
103
+ fail ArgumentError, 'invalid value for "postback_data", the character length must be smaller than or equal to 2048.'
104
+ end
105
+
106
+ @postback_data = postback_data
107
+ end
108
+
136
109
  # Checks equality by comparing each attribute.
137
110
  # @param [Object] Object to be compared
138
111
  def ==(o)
139
112
  return true if self.equal?(o)
140
113
  self.class == o.class &&
141
- time == o.time &&
142
- type == o.type &&
143
- to == o.to &&
144
- description == o.description &&
145
- message == o.message
114
+ text == o.text &&
115
+ postback_data == o.postback_data
146
116
  end
147
117
 
148
118
  # @see the `==` method
@@ -154,7 +124,7 @@ module Bandwidth
154
124
  # Calculates hash code according to all attributes.
155
125
  # @return [Integer] Hash code
156
126
  def hash
157
- [time, type, to, description, message].hash
127
+ [text, postback_data].hash
158
128
  end
159
129
 
160
130
  # Builds the object from hash