twilio-ruby 7.8.2 → 7.8.4
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/CHANGES.md +22 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/http/client_token_manager.rb +5 -2
- data/lib/twilio-ruby/http/org_token_manager.rb +5 -2
- data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +161 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -6
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +3 -3
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +13 -13
- data/lib/twilio-ruby/rest/lookups/v2/query.rb +15 -209
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +202 -3
- data/lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb +270 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +14 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -0
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +1 -171
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +267 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +12 -12
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +5 -2
|
@@ -19,87 +19,6 @@ module Twilio
|
|
|
19
19
|
class V2 < Version
|
|
20
20
|
class QueryList < ListResource
|
|
21
21
|
|
|
22
|
-
class CallForwarding
|
|
23
|
-
# @param [call_forwarding_enabled]: [Boolean]
|
|
24
|
-
# @param [error_code]: [Integer]
|
|
25
|
-
attr_accessor :call_forwarding_enabled, :error_code
|
|
26
|
-
def initialize(payload)
|
|
27
|
-
@call_forwarding_enabled = payload["call_forwarding_enabled"]
|
|
28
|
-
@error_code = payload["error_code"]
|
|
29
|
-
end
|
|
30
|
-
def to_json(options = {})
|
|
31
|
-
{
|
|
32
|
-
"call_forwarding_enabled": @call_forwarding_enabled,
|
|
33
|
-
"error_code": @error_code,
|
|
34
|
-
}.to_json(options)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
class CallerName
|
|
39
|
-
# @param [caller_name]: [String]
|
|
40
|
-
# @param [caller_type]: [String]
|
|
41
|
-
# @param [error_code]: [Integer]
|
|
42
|
-
attr_accessor :caller_name, :caller_type, :error_code
|
|
43
|
-
def initialize(payload)
|
|
44
|
-
@caller_name = payload["caller_name"]
|
|
45
|
-
@caller_type = payload["caller_type"]
|
|
46
|
-
@error_code = payload["error_code"]
|
|
47
|
-
end
|
|
48
|
-
def to_json(options = {})
|
|
49
|
-
{
|
|
50
|
-
"caller_name": @caller_name,
|
|
51
|
-
"caller_type": @caller_type,
|
|
52
|
-
"error_code": @error_code,
|
|
53
|
-
}.to_json(options)
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
class IdentityMatch
|
|
58
|
-
# @param [first_name_match]: [String]
|
|
59
|
-
# @param [last_name_match]: [String]
|
|
60
|
-
# @param [address_line_match]: [String]
|
|
61
|
-
# @param [city_match]: [String]
|
|
62
|
-
# @param [state_match]: [String]
|
|
63
|
-
# @param [postal_code_match]: [String]
|
|
64
|
-
# @param [country_code_match]: [String]
|
|
65
|
-
# @param [national_id_match]: [String]
|
|
66
|
-
# @param [date_of_birth_match]: [String]
|
|
67
|
-
# @param [summary_score]: [Integer]
|
|
68
|
-
# @param [error_code]: [Integer]
|
|
69
|
-
# @param [error_message]: [String]
|
|
70
|
-
attr_accessor :first_name_match, :last_name_match, :address_line_match, :city_match, :state_match, :postal_code_match, :country_code_match, :national_id_match, :date_of_birth_match, :summary_score, :error_code, :error_message
|
|
71
|
-
def initialize(payload)
|
|
72
|
-
@first_name_match = payload["first_name_match"]
|
|
73
|
-
@last_name_match = payload["last_name_match"]
|
|
74
|
-
@address_line_match = payload["address_line_match"]
|
|
75
|
-
@city_match = payload["city_match"]
|
|
76
|
-
@state_match = payload["state_match"]
|
|
77
|
-
@postal_code_match = payload["postal_code_match"]
|
|
78
|
-
@country_code_match = payload["country_code_match"]
|
|
79
|
-
@national_id_match = payload["national_id_match"]
|
|
80
|
-
@date_of_birth_match = payload["date_of_birth_match"]
|
|
81
|
-
@summary_score = payload["summary_score"]
|
|
82
|
-
@error_code = payload["error_code"]
|
|
83
|
-
@error_message = payload["error_message"]
|
|
84
|
-
end
|
|
85
|
-
def to_json(options = {})
|
|
86
|
-
{
|
|
87
|
-
"first_name_match": @first_name_match,
|
|
88
|
-
"last_name_match": @last_name_match,
|
|
89
|
-
"address_line_match": @address_line_match,
|
|
90
|
-
"city_match": @city_match,
|
|
91
|
-
"state_match": @state_match,
|
|
92
|
-
"postal_code_match": @postal_code_match,
|
|
93
|
-
"country_code_match": @country_code_match,
|
|
94
|
-
"national_id_match": @national_id_match,
|
|
95
|
-
"date_of_birth_match": @date_of_birth_match,
|
|
96
|
-
"summary_score": @summary_score,
|
|
97
|
-
"error_code": @error_code,
|
|
98
|
-
"error_message": @error_message,
|
|
99
|
-
}.to_json(options)
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
|
|
103
22
|
class IdentityMatchParameters
|
|
104
23
|
# @param [first_name]: [String]
|
|
105
24
|
# @param [last_name]: [String]
|
|
@@ -159,68 +78,14 @@ module Twilio
|
|
|
159
78
|
end
|
|
160
79
|
end
|
|
161
80
|
|
|
162
|
-
class
|
|
163
|
-
# @param [status]: [String]
|
|
164
|
-
# @param [error_code]: [Integer]
|
|
165
|
-
attr_accessor :status, :error_code
|
|
166
|
-
def initialize(payload)
|
|
167
|
-
@status = payload["status"]
|
|
168
|
-
@error_code = payload["error_code"]
|
|
169
|
-
end
|
|
170
|
-
def to_json(options = {})
|
|
171
|
-
{
|
|
172
|
-
"status": @status,
|
|
173
|
-
"error_code": @error_code,
|
|
174
|
-
}.to_json(options)
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
class LineTypeIntelligence
|
|
179
|
-
# @param [type]: [String]
|
|
180
|
-
# @param [carrier_name]: [String]
|
|
181
|
-
# @param [mobile_country_code]: [String]
|
|
182
|
-
# @param [mobile_network_code]: [String]
|
|
183
|
-
# @param [error_code]: [Integer]
|
|
184
|
-
attr_accessor :type, :carrier_name, :mobile_country_code, :mobile_network_code, :error_code
|
|
185
|
-
def initialize(payload)
|
|
186
|
-
@type = payload["type"]
|
|
187
|
-
@carrier_name = payload["carrier_name"]
|
|
188
|
-
@mobile_country_code = payload["mobile_country_code"]
|
|
189
|
-
@mobile_network_code = payload["mobile_network_code"]
|
|
190
|
-
@error_code = payload["error_code"]
|
|
191
|
-
end
|
|
192
|
-
def to_json(options = {})
|
|
193
|
-
{
|
|
194
|
-
"type": @type,
|
|
195
|
-
"carrier_name": @carrier_name,
|
|
196
|
-
"mobile_country_code": @mobile_country_code,
|
|
197
|
-
"mobile_network_code": @mobile_network_code,
|
|
198
|
-
"error_code": @error_code,
|
|
199
|
-
}.to_json(options)
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
class LookupRequest1
|
|
204
|
-
# @param [phone_numbers]: [Array<QueryList.LookupRequestWithCorId>]
|
|
205
|
-
attr_accessor :phone_numbers
|
|
206
|
-
def initialize(payload)
|
|
207
|
-
@phone_numbers = payload["phone_numbers"]
|
|
208
|
-
end
|
|
209
|
-
def to_json(options = {})
|
|
210
|
-
{
|
|
211
|
-
"phone_numbers": @phone_numbers,
|
|
212
|
-
}.to_json(options)
|
|
213
|
-
end
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
class LookupRequestWithCorId
|
|
81
|
+
class LookupBatchRequest
|
|
217
82
|
# @param [correlation_id]: [String] Unique identifier used to match request with response
|
|
218
83
|
# @param [phone_number]: [String]
|
|
219
84
|
# @param [fields]: [Array<String>]
|
|
220
85
|
# @param [country_code]: [String]
|
|
221
86
|
# @param [identity_match]: [QueryList.IdentityMatchParameters]
|
|
222
|
-
# @param [reassigned_number]: [QueryList.
|
|
223
|
-
# @param [sms_pumping_risk]: [QueryList.
|
|
87
|
+
# @param [reassigned_number]: [QueryList.ReassignedNumberParameters]
|
|
88
|
+
# @param [sms_pumping_risk]: [QueryList.RiskParameters]
|
|
224
89
|
attr_accessor :correlation_id, :phone_number, :fields, :country_code, :identity_match, :reassigned_number, :sms_pumping_risk
|
|
225
90
|
def initialize(payload)
|
|
226
91
|
@correlation_id = payload["correlation_id"]
|
|
@@ -244,92 +109,33 @@ module Twilio
|
|
|
244
109
|
end
|
|
245
110
|
end
|
|
246
111
|
|
|
247
|
-
class
|
|
248
|
-
# @param [
|
|
249
|
-
attr_accessor :
|
|
112
|
+
class LookupRequest
|
|
113
|
+
# @param [phone_numbers]: [Array<QueryList.LookupBatchRequest>]
|
|
114
|
+
attr_accessor :phone_numbers
|
|
250
115
|
def initialize(payload)
|
|
251
|
-
@
|
|
116
|
+
@phone_numbers = payload["phone_numbers"]
|
|
252
117
|
end
|
|
253
118
|
def to_json(options = {})
|
|
254
119
|
{
|
|
255
|
-
"
|
|
120
|
+
"phone_numbers": @phone_numbers,
|
|
256
121
|
}.to_json(options)
|
|
257
122
|
end
|
|
258
123
|
end
|
|
259
124
|
|
|
260
|
-
class
|
|
125
|
+
class ReassignedNumberParameters
|
|
261
126
|
# @param [last_verified_date]: [String]
|
|
262
|
-
|
|
263
|
-
# @param [error_code]: [String]
|
|
264
|
-
attr_accessor :last_verified_date, :is_number_reassigned, :error_code
|
|
127
|
+
attr_accessor :last_verified_date
|
|
265
128
|
def initialize(payload)
|
|
266
129
|
@last_verified_date = payload["last_verified_date"]
|
|
267
|
-
@is_number_reassigned = payload["is_number_reassigned"]
|
|
268
|
-
@error_code = payload["error_code"]
|
|
269
130
|
end
|
|
270
131
|
def to_json(options = {})
|
|
271
132
|
{
|
|
272
133
|
"last_verified_date": @last_verified_date,
|
|
273
|
-
"is_number_reassigned": @is_number_reassigned,
|
|
274
|
-
"error_code": @error_code,
|
|
275
|
-
}.to_json(options)
|
|
276
|
-
end
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
class SimSwap
|
|
280
|
-
# @param [last_sim_swap]: [LastSimSwap]
|
|
281
|
-
# @param [carrier_name]: [String]
|
|
282
|
-
# @param [mobile_country_code]: [String]
|
|
283
|
-
# @param [mobile_network_code]: [String]
|
|
284
|
-
# @param [error_code]: [Integer]
|
|
285
|
-
attr_accessor :last_sim_swap, :carrier_name, :mobile_country_code, :mobile_network_code, :error_code
|
|
286
|
-
def initialize(payload)
|
|
287
|
-
@last_sim_swap = payload["last_sim_swap"]
|
|
288
|
-
@carrier_name = payload["carrier_name"]
|
|
289
|
-
@mobile_country_code = payload["mobile_country_code"]
|
|
290
|
-
@mobile_network_code = payload["mobile_network_code"]
|
|
291
|
-
@error_code = payload["error_code"]
|
|
292
|
-
end
|
|
293
|
-
def to_json(options = {})
|
|
294
|
-
{
|
|
295
|
-
"last_sim_swap": @last_sim_swap,
|
|
296
|
-
"carrier_name": @carrier_name,
|
|
297
|
-
"mobile_country_code": @mobile_country_code,
|
|
298
|
-
"mobile_network_code": @mobile_network_code,
|
|
299
|
-
"error_code": @error_code,
|
|
300
|
-
}.to_json(options)
|
|
301
|
-
end
|
|
302
|
-
end
|
|
303
|
-
|
|
304
|
-
class SmsPumpingRisk
|
|
305
|
-
# @param [carrier_risk_category]: [String]
|
|
306
|
-
# @param [number_blocked]: [Boolean]
|
|
307
|
-
# @param [number_blocked_date]: [Time]
|
|
308
|
-
# @param [number_blocked_last_3_months]: [Boolean]
|
|
309
|
-
# @param [sms_pumping_risk_score]: [Integer]
|
|
310
|
-
# @param [error_code]: [Integer]
|
|
311
|
-
attr_accessor :carrier_risk_category, :number_blocked, :number_blocked_date, :number_blocked_last_3_months, :sms_pumping_risk_score, :error_code
|
|
312
|
-
def initialize(payload)
|
|
313
|
-
@carrier_risk_category = payload["carrier_risk_category"]
|
|
314
|
-
@number_blocked = payload["number_blocked"]
|
|
315
|
-
@number_blocked_date = payload["number_blocked_date"]
|
|
316
|
-
@number_blocked_last_3_months = payload["number_blocked_last_3_months"]
|
|
317
|
-
@sms_pumping_risk_score = payload["sms_pumping_risk_score"]
|
|
318
|
-
@error_code = payload["error_code"]
|
|
319
|
-
end
|
|
320
|
-
def to_json(options = {})
|
|
321
|
-
{
|
|
322
|
-
"carrier_risk_category": @carrier_risk_category,
|
|
323
|
-
"number_blocked": @number_blocked,
|
|
324
|
-
"number_blocked_date": @number_blocked_date,
|
|
325
|
-
"number_blocked_last_3_months": @number_blocked_last_3_months,
|
|
326
|
-
"sms_pumping_risk_score": @sms_pumping_risk_score,
|
|
327
|
-
"error_code": @error_code,
|
|
328
134
|
}.to_json(options)
|
|
329
135
|
end
|
|
330
136
|
end
|
|
331
137
|
|
|
332
|
-
class
|
|
138
|
+
class RiskParameters
|
|
333
139
|
# @param [partner_sub_id]: [String]
|
|
334
140
|
attr_accessor :partner_sub_id
|
|
335
141
|
def initialize(payload)
|
|
@@ -356,9 +162,9 @@ module Twilio
|
|
|
356
162
|
end
|
|
357
163
|
##
|
|
358
164
|
# Create the QueryInstance
|
|
359
|
-
# @param [
|
|
165
|
+
# @param [LookupRequest] lookup_request
|
|
360
166
|
# @return [QueryInstance] Created QueryInstance
|
|
361
|
-
def create(
|
|
167
|
+
def create(lookup_request: :unset
|
|
362
168
|
)
|
|
363
169
|
|
|
364
170
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -367,7 +173,7 @@ module Twilio
|
|
|
367
173
|
|
|
368
174
|
|
|
369
175
|
|
|
370
|
-
payload = @version.create('POST', @uri, headers: headers, data:
|
|
176
|
+
payload = @version.create('POST', @uri, headers: headers, data: lookup_request.to_json)
|
|
371
177
|
QueryInstance.new(
|
|
372
178
|
@version,
|
|
373
179
|
payload,
|
|
@@ -432,7 +238,7 @@ module Twilio
|
|
|
432
238
|
|
|
433
239
|
|
|
434
240
|
##
|
|
435
|
-
# @return [Array<
|
|
241
|
+
# @return [Array<LookupBatchResponse>]
|
|
436
242
|
def phone_numbers
|
|
437
243
|
@properties['phone_numbers']
|
|
438
244
|
end
|
|
@@ -55,6 +55,18 @@ module Twilio
|
|
|
55
55
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
|
56
56
|
# @param [String] business_contact_phone The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
|
|
57
57
|
# @param [String] external_reference_id An optional external reference ID supplied by customer and echoed back on status retrieval.
|
|
58
|
+
# @param [String] business_registration_number A legally recognized business registration number
|
|
59
|
+
# @param [String] business_registration_authority The organizational authority for business registrations
|
|
60
|
+
# @param [String] business_registration_country Country business is registered in
|
|
61
|
+
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
62
|
+
# @param [String] business_registration_phone_number The E.164 formatted number associated with the business.
|
|
63
|
+
# @param [String] doing_business_as Trade name, sub entity, or downstream business name of business being submitted for verification
|
|
64
|
+
# @param [String] opt_in_confirmation_message The confirmation message sent to users when they opt in to receive messages.
|
|
65
|
+
# @param [String] help_message_sample A sample help message provided to users.
|
|
66
|
+
# @param [String] privacy_policy_url The URL to the privacy policy for the business or organization.
|
|
67
|
+
# @param [String] terms_and_conditions_url The URL to the terms and conditions for the business or organization.
|
|
68
|
+
# @param [Boolean] age_gated_content Indicates if the content is age gated.
|
|
69
|
+
# @param [Array[String]] opt_in_keywords List of keywords that users can text in to opt in to receive messages.
|
|
58
70
|
# @return [TollfreeVerificationInstance] Created TollfreeVerificationInstance
|
|
59
71
|
def create(
|
|
60
72
|
business_name: nil,
|
|
@@ -79,7 +91,19 @@ module Twilio
|
|
|
79
91
|
business_contact_last_name: :unset,
|
|
80
92
|
business_contact_email: :unset,
|
|
81
93
|
business_contact_phone: :unset,
|
|
82
|
-
external_reference_id: :unset
|
|
94
|
+
external_reference_id: :unset,
|
|
95
|
+
business_registration_number: :unset,
|
|
96
|
+
business_registration_authority: :unset,
|
|
97
|
+
business_registration_country: :unset,
|
|
98
|
+
business_type: :unset,
|
|
99
|
+
business_registration_phone_number: :unset,
|
|
100
|
+
doing_business_as: :unset,
|
|
101
|
+
opt_in_confirmation_message: :unset,
|
|
102
|
+
help_message_sample: :unset,
|
|
103
|
+
privacy_policy_url: :unset,
|
|
104
|
+
terms_and_conditions_url: :unset,
|
|
105
|
+
age_gated_content: :unset,
|
|
106
|
+
opt_in_keywords: :unset
|
|
83
107
|
)
|
|
84
108
|
|
|
85
109
|
data = Twilio::Values.of({
|
|
@@ -106,6 +130,18 @@ module Twilio
|
|
|
106
130
|
'BusinessContactEmail' => business_contact_email,
|
|
107
131
|
'BusinessContactPhone' => business_contact_phone,
|
|
108
132
|
'ExternalReferenceId' => external_reference_id,
|
|
133
|
+
'BusinessRegistrationNumber' => business_registration_number,
|
|
134
|
+
'BusinessRegistrationAuthority' => business_registration_authority,
|
|
135
|
+
'BusinessRegistrationCountry' => business_registration_country,
|
|
136
|
+
'BusinessType' => business_type,
|
|
137
|
+
'BusinessRegistrationPhoneNumber' => business_registration_phone_number,
|
|
138
|
+
'DoingBusinessAs' => doing_business_as,
|
|
139
|
+
'OptInConfirmationMessage' => opt_in_confirmation_message,
|
|
140
|
+
'HelpMessageSample' => help_message_sample,
|
|
141
|
+
'PrivacyPolicyUrl' => privacy_policy_url,
|
|
142
|
+
'TermsAndConditionsUrl' => terms_and_conditions_url,
|
|
143
|
+
'AgeGatedContent' => age_gated_content,
|
|
144
|
+
'OptInKeywords' => Twilio.serialize_list(opt_in_keywords) { |e| e },
|
|
109
145
|
})
|
|
110
146
|
|
|
111
147
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -311,6 +347,18 @@ module Twilio
|
|
|
311
347
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
|
312
348
|
# @param [String] business_contact_phone The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
|
|
313
349
|
# @param [String] edit_reason Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
|
|
350
|
+
# @param [String] business_registration_number A legaly recognized business registration number
|
|
351
|
+
# @param [String] business_registration_authority The organizational authority for business registrations
|
|
352
|
+
# @param [String] business_registration_country Country business is registered in
|
|
353
|
+
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
354
|
+
# @param [String] business_registration_phone_number The E.164 formatted number associated with the business.
|
|
355
|
+
# @param [String] doing_business_as Trade name, sub entity, or downstream business name of business being submitted for verification
|
|
356
|
+
# @param [String] opt_in_confirmation_message The confirmation message sent to users when they opt in to receive messages.
|
|
357
|
+
# @param [String] help_message_sample A sample help message provided to users.
|
|
358
|
+
# @param [String] privacy_policy_url The URL to the privacy policy for the business or organization.
|
|
359
|
+
# @param [String] terms_and_conditions_url The URL to the terms and conditions for the business or organization.
|
|
360
|
+
# @param [Boolean] age_gated_content Indicates if the content is age gated.
|
|
361
|
+
# @param [Array[String]] opt_in_keywords List of keywords that users can text in to opt in to receive messages.
|
|
314
362
|
# @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
|
|
315
363
|
def update(
|
|
316
364
|
business_name: :unset,
|
|
@@ -333,7 +381,19 @@ module Twilio
|
|
|
333
381
|
business_contact_last_name: :unset,
|
|
334
382
|
business_contact_email: :unset,
|
|
335
383
|
business_contact_phone: :unset,
|
|
336
|
-
edit_reason: :unset
|
|
384
|
+
edit_reason: :unset,
|
|
385
|
+
business_registration_number: :unset,
|
|
386
|
+
business_registration_authority: :unset,
|
|
387
|
+
business_registration_country: :unset,
|
|
388
|
+
business_type: :unset,
|
|
389
|
+
business_registration_phone_number: :unset,
|
|
390
|
+
doing_business_as: :unset,
|
|
391
|
+
opt_in_confirmation_message: :unset,
|
|
392
|
+
help_message_sample: :unset,
|
|
393
|
+
privacy_policy_url: :unset,
|
|
394
|
+
terms_and_conditions_url: :unset,
|
|
395
|
+
age_gated_content: :unset,
|
|
396
|
+
opt_in_keywords: :unset
|
|
337
397
|
)
|
|
338
398
|
|
|
339
399
|
data = Twilio::Values.of({
|
|
@@ -358,6 +418,18 @@ module Twilio
|
|
|
358
418
|
'BusinessContactEmail' => business_contact_email,
|
|
359
419
|
'BusinessContactPhone' => business_contact_phone,
|
|
360
420
|
'EditReason' => edit_reason,
|
|
421
|
+
'BusinessRegistrationNumber' => business_registration_number,
|
|
422
|
+
'BusinessRegistrationAuthority' => business_registration_authority,
|
|
423
|
+
'BusinessRegistrationCountry' => business_registration_country,
|
|
424
|
+
'BusinessType' => business_type,
|
|
425
|
+
'BusinessRegistrationPhoneNumber' => business_registration_phone_number,
|
|
426
|
+
'DoingBusinessAs' => doing_business_as,
|
|
427
|
+
'OptInConfirmationMessage' => opt_in_confirmation_message,
|
|
428
|
+
'HelpMessageSample' => help_message_sample,
|
|
429
|
+
'PrivacyPolicyUrl' => privacy_policy_url,
|
|
430
|
+
'TermsAndConditionsUrl' => terms_and_conditions_url,
|
|
431
|
+
'AgeGatedContent' => age_gated_content,
|
|
432
|
+
'OptInKeywords' => Twilio.serialize_list(opt_in_keywords) { |e| e },
|
|
361
433
|
})
|
|
362
434
|
|
|
363
435
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -461,12 +533,25 @@ module Twilio
|
|
|
461
533
|
'message_volume' => payload['message_volume'],
|
|
462
534
|
'additional_information' => payload['additional_information'],
|
|
463
535
|
'tollfree_phone_number_sid' => payload['tollfree_phone_number_sid'],
|
|
536
|
+
'tollfree_phone_number' => payload['tollfree_phone_number'],
|
|
464
537
|
'status' => payload['status'],
|
|
465
538
|
'url' => payload['url'],
|
|
466
539
|
'rejection_reason' => payload['rejection_reason'],
|
|
467
540
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
468
541
|
'edit_expiration' => Twilio.deserialize_iso8601_datetime(payload['edit_expiration']),
|
|
469
542
|
'edit_allowed' => payload['edit_allowed'],
|
|
543
|
+
'business_registration_number' => payload['business_registration_number'],
|
|
544
|
+
'business_registration_authority' => payload['business_registration_authority'],
|
|
545
|
+
'business_registration_country' => payload['business_registration_country'],
|
|
546
|
+
'business_type' => payload['business_type'],
|
|
547
|
+
'business_registration_phone_number' => payload['business_registration_phone_number'],
|
|
548
|
+
'doing_business_as' => payload['doing_business_as'],
|
|
549
|
+
'opt_in_confirmation_message' => payload['opt_in_confirmation_message'],
|
|
550
|
+
'help_message_sample' => payload['help_message_sample'],
|
|
551
|
+
'privacy_policy_url' => payload['privacy_policy_url'],
|
|
552
|
+
'terms_and_conditions_url' => payload['terms_and_conditions_url'],
|
|
553
|
+
'age_gated_content' => payload['age_gated_content'],
|
|
554
|
+
'opt_in_keywords' => payload['opt_in_keywords'],
|
|
470
555
|
'rejection_reasons' => payload['rejection_reasons'],
|
|
471
556
|
'resource_links' => payload['resource_links'],
|
|
472
557
|
'external_reference_id' => payload['external_reference_id'],
|
|
@@ -656,6 +741,12 @@ module Twilio
|
|
|
656
741
|
@properties['tollfree_phone_number_sid']
|
|
657
742
|
end
|
|
658
743
|
|
|
744
|
+
##
|
|
745
|
+
# @return [String] The E.164 formatted toll-free phone number associated with the verification.
|
|
746
|
+
def tollfree_phone_number
|
|
747
|
+
@properties['tollfree_phone_number']
|
|
748
|
+
end
|
|
749
|
+
|
|
659
750
|
##
|
|
660
751
|
# @return [Status]
|
|
661
752
|
def status
|
|
@@ -692,6 +783,78 @@ module Twilio
|
|
|
692
783
|
@properties['edit_allowed']
|
|
693
784
|
end
|
|
694
785
|
|
|
786
|
+
##
|
|
787
|
+
# @return [String] A legally recognized business registration number
|
|
788
|
+
def business_registration_number
|
|
789
|
+
@properties['business_registration_number']
|
|
790
|
+
end
|
|
791
|
+
|
|
792
|
+
##
|
|
793
|
+
# @return [String] The organizational authority for business registrations
|
|
794
|
+
def business_registration_authority
|
|
795
|
+
@properties['business_registration_authority']
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
##
|
|
799
|
+
# @return [String] Country business is registered in
|
|
800
|
+
def business_registration_country
|
|
801
|
+
@properties['business_registration_country']
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
##
|
|
805
|
+
# @return [String] The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
806
|
+
def business_type
|
|
807
|
+
@properties['business_type']
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
##
|
|
811
|
+
# @return [String] The E.164 formatted number associated with the business.
|
|
812
|
+
def business_registration_phone_number
|
|
813
|
+
@properties['business_registration_phone_number']
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
##
|
|
817
|
+
# @return [String] Trade name, sub entity, or downstream business name of business being submitted for verification
|
|
818
|
+
def doing_business_as
|
|
819
|
+
@properties['doing_business_as']
|
|
820
|
+
end
|
|
821
|
+
|
|
822
|
+
##
|
|
823
|
+
# @return [String] The confirmation message sent to users when they opt in to receive messages.
|
|
824
|
+
def opt_in_confirmation_message
|
|
825
|
+
@properties['opt_in_confirmation_message']
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
##
|
|
829
|
+
# @return [String] A sample help message provided to users.
|
|
830
|
+
def help_message_sample
|
|
831
|
+
@properties['help_message_sample']
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
##
|
|
835
|
+
# @return [String] The URL to the privacy policy for the business or organization.
|
|
836
|
+
def privacy_policy_url
|
|
837
|
+
@properties['privacy_policy_url']
|
|
838
|
+
end
|
|
839
|
+
|
|
840
|
+
##
|
|
841
|
+
# @return [String] The URL of the terms and conditions for the business or organization.
|
|
842
|
+
def terms_and_conditions_url
|
|
843
|
+
@properties['terms_and_conditions_url']
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
##
|
|
847
|
+
# @return [Boolean] Indicates if the content is age gated.
|
|
848
|
+
def age_gated_content
|
|
849
|
+
@properties['age_gated_content']
|
|
850
|
+
end
|
|
851
|
+
|
|
852
|
+
##
|
|
853
|
+
# @return [Array<String>] List of keywords that users can send to opt in or out of messages.
|
|
854
|
+
def opt_in_keywords
|
|
855
|
+
@properties['opt_in_keywords']
|
|
856
|
+
end
|
|
857
|
+
|
|
695
858
|
##
|
|
696
859
|
# @return [Array<Hash>] A list of rejection reasons and codes describing why a Tollfree Verification has been rejected.
|
|
697
860
|
def rejection_reasons
|
|
@@ -749,6 +912,18 @@ module Twilio
|
|
|
749
912
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
|
750
913
|
# @param [String] business_contact_phone The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
|
|
751
914
|
# @param [String] edit_reason Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
|
|
915
|
+
# @param [String] business_registration_number A legaly recognized business registration number
|
|
916
|
+
# @param [String] business_registration_authority The organizational authority for business registrations
|
|
917
|
+
# @param [String] business_registration_country Country business is registered in
|
|
918
|
+
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
919
|
+
# @param [String] business_registration_phone_number The E.164 formatted number associated with the business.
|
|
920
|
+
# @param [String] doing_business_as Trade name, sub entity, or downstream business name of business being submitted for verification
|
|
921
|
+
# @param [String] opt_in_confirmation_message The confirmation message sent to users when they opt in to receive messages.
|
|
922
|
+
# @param [String] help_message_sample A sample help message provided to users.
|
|
923
|
+
# @param [String] privacy_policy_url The URL to the privacy policy for the business or organization.
|
|
924
|
+
# @param [String] terms_and_conditions_url The URL to the terms and conditions for the business or organization.
|
|
925
|
+
# @param [Boolean] age_gated_content Indicates if the content is age gated.
|
|
926
|
+
# @param [Array[String]] opt_in_keywords List of keywords that users can text in to opt in to receive messages.
|
|
752
927
|
# @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
|
|
753
928
|
def update(
|
|
754
929
|
business_name: :unset,
|
|
@@ -771,7 +946,19 @@ module Twilio
|
|
|
771
946
|
business_contact_last_name: :unset,
|
|
772
947
|
business_contact_email: :unset,
|
|
773
948
|
business_contact_phone: :unset,
|
|
774
|
-
edit_reason: :unset
|
|
949
|
+
edit_reason: :unset,
|
|
950
|
+
business_registration_number: :unset,
|
|
951
|
+
business_registration_authority: :unset,
|
|
952
|
+
business_registration_country: :unset,
|
|
953
|
+
business_type: :unset,
|
|
954
|
+
business_registration_phone_number: :unset,
|
|
955
|
+
doing_business_as: :unset,
|
|
956
|
+
opt_in_confirmation_message: :unset,
|
|
957
|
+
help_message_sample: :unset,
|
|
958
|
+
privacy_policy_url: :unset,
|
|
959
|
+
terms_and_conditions_url: :unset,
|
|
960
|
+
age_gated_content: :unset,
|
|
961
|
+
opt_in_keywords: :unset
|
|
775
962
|
)
|
|
776
963
|
|
|
777
964
|
context.update(
|
|
@@ -796,6 +983,18 @@ module Twilio
|
|
|
796
983
|
business_contact_email: business_contact_email,
|
|
797
984
|
business_contact_phone: business_contact_phone,
|
|
798
985
|
edit_reason: edit_reason,
|
|
986
|
+
business_registration_number: business_registration_number,
|
|
987
|
+
business_registration_authority: business_registration_authority,
|
|
988
|
+
business_registration_country: business_registration_country,
|
|
989
|
+
business_type: business_type,
|
|
990
|
+
business_registration_phone_number: business_registration_phone_number,
|
|
991
|
+
doing_business_as: doing_business_as,
|
|
992
|
+
opt_in_confirmation_message: opt_in_confirmation_message,
|
|
993
|
+
help_message_sample: help_message_sample,
|
|
994
|
+
privacy_policy_url: privacy_policy_url,
|
|
995
|
+
terms_and_conditions_url: terms_and_conditions_url,
|
|
996
|
+
age_gated_content: age_gated_content,
|
|
997
|
+
opt_in_keywords: opt_in_keywords,
|
|
799
998
|
)
|
|
800
999
|
end
|
|
801
1000
|
|