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.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -11
- data/README.md +17 -10
- data/bandwidth.yml +523 -184
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +321 -366
- data/coverage/index.html +10047 -10501
- data/custom_templates/README.mustache +1 -1
- data/docs/BlockedWebhook.md +2 -2
- data/docs/Callback.md +84 -0
- data/docs/CreateMultiChannelMessageResponse.md +3 -3
- data/docs/ErrorObject.md +6 -4
- data/docs/ErrorSource.md +24 -0
- data/docs/FailureWebhook.md +2 -2
- data/docs/InboundCallback.md +28 -0
- data/docs/InboundCallbackMessage.md +48 -0
- data/docs/{MultiChannelStatusEnum.md → InboundCallbackTypeEnum.md} +2 -2
- data/docs/ListMessageItem.md +1 -1
- data/docs/Message.md +5 -5
- data/docs/MessageRequest.md +1 -1
- data/docs/MmsMessageContent.md +2 -2
- data/docs/MmsMessageContentFile.md +18 -0
- data/docs/MultiChannelActionCalendarEvent.md +2 -2
- data/docs/MultiChannelError.md +22 -0
- data/docs/MultiChannelMessageContent.md +20 -0
- data/docs/MultiChannelMessageResponseData.md +32 -0
- data/docs/MultiChannelMessageResponseDataChannelListInner.md +26 -0
- data/docs/RbmActionBase.md +2 -2
- data/docs/RbmActionDial.md +2 -2
- data/docs/RbmActionOpenUrl.md +2 -2
- data/docs/RbmActionViewLocation.md +2 -2
- data/docs/RbmLocationResponse.md +20 -0
- data/docs/RbmSuggestionResponse.md +20 -0
- data/docs/StatusCallback.md +32 -0
- data/docs/StatusCallbackMessage.md +42 -0
- data/docs/{CallbackTypeEnum.md → StatusCallbackTypeEnum.md} +2 -2
- data/docs/TfvStatus.md +2 -2
- data/docs/TfvSubmissionInfo.md +3 -3
- data/docs/TollFreeVerificationApi.md +72 -0
- data/docs/VerificationDenialWebhook.md +2 -2
- data/docs/VerificationRequest.md +3 -3
- data/docs/VerificationUpdateRequest.md +3 -3
- data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +82 -0
- data/lib/bandwidth-sdk/configuration.rb +6 -0
- data/lib/bandwidth-sdk/models/blocked_webhook.rb +2 -2
- data/lib/bandwidth-sdk/models/callback.rb +60 -0
- data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +1 -1
- data/lib/bandwidth-sdk/models/error_object.rb +45 -13
- data/lib/bandwidth-sdk/models/error_source.rb +244 -0
- data/lib/bandwidth-sdk/models/failure_webhook.rb +7 -7
- data/lib/bandwidth-sdk/models/{message_callback.rb → inbound_callback.rb} +9 -20
- data/lib/bandwidth-sdk/models/inbound_callback_message.rb +454 -0
- data/lib/bandwidth-sdk/models/{multi_channel_message_direction_enum.rb → inbound_callback_type_enum.rb} +7 -6
- data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
- data/lib/bandwidth-sdk/models/message.rb +3 -3
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/mms_message_content.rb +1 -2
- data/lib/bandwidth-sdk/models/{multi_channel_message_callback_data.rb → mms_message_content_file.rb} +37 -100
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +21 -21
- data/lib/bandwidth-sdk/models/multi_channel_error.rb +235 -0
- data/lib/bandwidth-sdk/models/{deferred_result.rb → multi_channel_message_content.rb} +17 -16
- data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +372 -0
- data/lib/bandwidth-sdk/models/{multi_channel_message_data.rb → multi_channel_message_response_data_channel_list_inner.rb} +62 -59
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -21
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +21 -21
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -21
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +21 -21
- data/lib/bandwidth-sdk/models/{tag.rb → rbm_location_response.rb} +18 -16
- data/lib/bandwidth-sdk/models/{multi_channel_callback_data.rb → rbm_suggestion_response.rb} +37 -67
- data/lib/bandwidth-sdk/models/status_callback.rb +338 -0
- data/lib/bandwidth-sdk/models/{message_callback_message.rb → status_callback_message.rb} +25 -17
- data/lib/bandwidth-sdk/models/{callback_type_enum.rb → status_callback_type_enum.rb} +5 -5
- data/lib/bandwidth-sdk/models/tfv_status.rb +2 -2
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +3 -3
- data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +2 -2
- data/lib/bandwidth-sdk/models/verification_request.rb +3 -3
- data/lib/bandwidth-sdk/models/verification_update_request.rb +3 -3
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +15 -9
- data/spec/smoke/multi_channel_api_spec.rb +18 -20
- data/spec/smoke/toll_free_verification_api_spec.rb +7 -0
- data/spec/unit/api/toll_free_verification_api_spec.rb +8 -0
- data/spec/unit/client/api_client_spec.rb +4 -4
- data/spec/unit/models/tfv_error_spec.rb +78 -0
- data/spec/unit/models/verify_code_response_spec.rb +70 -0
- metadata +112 -100
- data/docs/DeferredResult.md +0 -20
- data/docs/MessageCallback.md +0 -30
- data/docs/MessageCallbackMessage.md +0 -40
- data/docs/MultiChannelCallbackData.md +0 -26
- data/docs/MultiChannelMessageCallbackData.md +0 -32
- data/docs/MultiChannelMessageData.md +0 -34
- data/docs/MultiChannelMessageDirectionEnum.md +0 -15
- data/docs/Tag.md +0 -20
- data/lib/bandwidth-sdk/models/multi_channel_status_enum.rb +0 -42
- data/spec/unit/models/deferred_result_spec.rb +0 -74
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_asc.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_both.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_desc.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/application.css +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/application.js +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/border.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/controls.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/loading.gif +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/loading_background.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_green.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_red.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_yellow.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_222222_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_2e83ff_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_454545_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_888888_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_cd0a0a_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/loading.gif +0 -0
- /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 :
|
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
|
-
:'
|
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
|
-
:'
|
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?(:'
|
117
|
-
self.
|
116
|
+
if attributes.key?(:'postback_data')
|
117
|
+
self.postback_data = attributes[:'postback_data']
|
118
118
|
else
|
119
|
-
self.
|
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 @
|
147
|
-
invalid_properties.push('invalid value for "
|
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 @
|
151
|
-
invalid_properties.push('invalid value for "
|
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 @
|
169
|
-
return false if @
|
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]
|
190
|
-
def
|
191
|
-
if
|
192
|
-
fail ArgumentError, '
|
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
|
196
|
-
fail ArgumentError, 'invalid value for "
|
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
|
-
@
|
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
|
-
|
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,
|
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 :
|
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
|
-
:'
|
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
|
-
:'
|
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?(:'
|
117
|
-
self.
|
116
|
+
if attributes.key?(:'postback_data')
|
117
|
+
self.postback_data = attributes[:'postback_data']
|
118
118
|
else
|
119
|
-
self.
|
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 @
|
147
|
-
invalid_properties.push('invalid value for "
|
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 @
|
151
|
-
invalid_properties.push('invalid value for "
|
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 @
|
173
|
-
return false if @
|
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]
|
195
|
-
def
|
196
|
-
if
|
197
|
-
fail ArgumentError, '
|
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
|
201
|
-
fail ArgumentError, 'invalid value for "
|
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
|
-
@
|
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
|
-
|
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,
|
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 :
|
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
|
-
:'
|
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
|
-
:'
|
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?(:'
|
127
|
-
self.
|
126
|
+
if attributes.key?(:'postback_data')
|
127
|
+
self.postback_data = attributes[:'postback_data']
|
128
128
|
else
|
129
|
-
self.
|
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 @
|
167
|
-
invalid_properties.push('invalid value for "
|
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 @
|
171
|
-
invalid_properties.push('invalid value for "
|
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 @
|
197
|
-
return false if @
|
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]
|
220
|
-
def
|
221
|
-
if
|
222
|
-
fail ArgumentError, '
|
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
|
226
|
-
fail ArgumentError, 'invalid value for "
|
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
|
-
@
|
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
|
-
|
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,
|
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
|
18
|
-
|
17
|
+
class RbmLocationResponse
|
18
|
+
# The latitude of the client's location.
|
19
|
+
attr_accessor :latitude
|
19
20
|
|
20
|
-
|
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
|
-
:'
|
26
|
-
:'
|
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
|
-
:'
|
39
|
-
:'
|
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::
|
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::
|
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?(:'
|
65
|
-
self.
|
66
|
+
if attributes.key?(:'latitude')
|
67
|
+
self.latitude = attributes[:'latitude']
|
66
68
|
end
|
67
69
|
|
68
|
-
if attributes.key?(:'
|
69
|
-
self.
|
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
|
-
|
94
|
-
|
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
|
-
[
|
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
|
18
|
-
# The
|
19
|
-
attr_accessor :
|
17
|
+
class RbmSuggestionResponse
|
18
|
+
# The text associated with the suggestion response.
|
19
|
+
attr_accessor :text
|
20
20
|
|
21
|
-
|
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
|
-
:'
|
56
|
-
:'
|
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
|
-
:'
|
72
|
-
:'
|
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::
|
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::
|
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?(:'
|
101
|
-
self.
|
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?(:'
|
109
|
-
self.
|
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
|
-
|
142
|
-
|
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
|
-
[
|
127
|
+
[text, postback_data].hash
|
158
128
|
end
|
159
129
|
|
160
130
|
# Builds the object from hash
|