twilio-ruby 7.8.2 → 7.8.3
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 +9 -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/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 +91 -0
- 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 +7 -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 +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bdacb2b1723f31e2bfcb808ce15b6b23e27a9ef
|
4
|
+
data.tar.gz: 2db4118751d3d2fc3e7a9a1d7e24d6415f0eb0e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 528b441db6a43dafaaf5188016a7349e2b3814308038851cd8c3248cf77861655065de4613704eb703925619f13c96883f156d5b582721237e0b7a979e237f80
|
7
|
+
data.tar.gz: 0d1274281e1b08e5ec16c7d8656f7e80cfbe9a4e3becaeb635bb854d562e3c93e87e35e801e38338d97e92aa0bde1516feed23ff1d8bba7203324da4a6ffa823
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2025-09-30] Version 7.8.3
|
5
|
+
--------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #762](https://github.com/twilio/twilio-ruby/pull/762): change oauth token endpoint. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
|
8
|
+
|
9
|
+
**Insights**
|
10
|
+
- Replace `field` with `key` in Request Filters and Response Metadata Filters and for Reports API
|
11
|
+
|
12
|
+
|
4
13
|
[2025-09-25] Version 7.8.2
|
5
14
|
--------------------------
|
6
15
|
**Api**
|
data/README.md
CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
gem 'twilio-ruby', '~> 7.8.
|
42
|
+
gem 'twilio-ruby', '~> 7.8.3'
|
43
43
|
```
|
44
44
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
46
46
|
|
47
47
|
```bash
|
48
|
-
gem install twilio-ruby -v 7.8.
|
48
|
+
gem install twilio-ruby -v 7.8.3
|
49
49
|
```
|
50
50
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
@@ -19,8 +19,11 @@ module Twilio
|
|
19
19
|
|
20
20
|
def fetch_access_token
|
21
21
|
client = Twilio::REST::Client.new
|
22
|
-
token_instance = client.
|
23
|
-
|
22
|
+
token_instance = client.oauth.v2.token.create(
|
23
|
+
grant_type: @grant_type,
|
24
|
+
client_id: @client_id,
|
25
|
+
client_secret: @client_secret
|
26
|
+
)
|
24
27
|
token_instance.access_token
|
25
28
|
end
|
26
29
|
end
|
@@ -19,8 +19,11 @@ module Twilio
|
|
19
19
|
|
20
20
|
def fetch_access_token
|
21
21
|
client = Twilio::REST::Client.new
|
22
|
-
token_instance = client.
|
23
|
-
|
22
|
+
token_instance = client.oauth.v2.token.create(
|
23
|
+
grant_type: @grant_type,
|
24
|
+
client_id: @client_id,
|
25
|
+
client_secret: @client_secret
|
26
|
+
)
|
24
27
|
token_instance.access_token
|
25
28
|
end
|
26
29
|
end
|
@@ -37,7 +37,7 @@ module Twilio
|
|
37
37
|
# Lists BindingInstance records from the API as a list.
|
38
38
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
39
39
|
# memory before returning.
|
40
|
-
# @param [Array[BindingType]] binding_type The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `
|
40
|
+
# @param [Array[BindingType]] binding_type The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, `fcm`, or `twilsock`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
|
41
41
|
# @param [Array[String]] identity The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details.
|
42
42
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
43
43
|
# guarantees to never return more than limit. Default is no limit
|
@@ -59,7 +59,7 @@ module Twilio
|
|
59
59
|
# Streams Instance records from the API as an Enumerable.
|
60
60
|
# This operation lazily loads records as efficiently as possible until the limit
|
61
61
|
# is reached.
|
62
|
-
# @param [Array[BindingType]] binding_type The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `
|
62
|
+
# @param [Array[BindingType]] binding_type The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, `fcm`, or `twilsock`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
|
63
63
|
# @param [Array[String]] identity The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details.
|
64
64
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
65
65
|
# guarantees to never return more than limit. Default is no limit
|
@@ -96,7 +96,7 @@ module Twilio
|
|
96
96
|
##
|
97
97
|
# Retrieve a single page of BindingInstance records from the API.
|
98
98
|
# Request is executed immediately.
|
99
|
-
# @param [Array[BindingType]] binding_type The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `
|
99
|
+
# @param [Array[BindingType]] binding_type The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, `fcm`, or `twilsock`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
|
100
100
|
# @param [Array[String]] identity The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details.
|
101
101
|
# @param [String] page_token PageToken provided by the API
|
102
102
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
@@ -190,8 +190,8 @@ module Twilio
|
|
190
190
|
'caller_name' => payload['caller_name'],
|
191
191
|
'sim_swap' => payload['sim_swap'],
|
192
192
|
'call_forwarding' => payload['call_forwarding'],
|
193
|
-
'line_status' => payload['line_status'],
|
194
193
|
'line_type_intelligence' => payload['line_type_intelligence'],
|
194
|
+
'line_status' => payload['line_status'],
|
195
195
|
'identity_match' => payload['identity_match'],
|
196
196
|
'reassigned_number' => payload['reassigned_number'],
|
197
197
|
'sms_pumping_risk' => payload['sms_pumping_risk'],
|
@@ -253,49 +253,49 @@ module Twilio
|
|
253
253
|
end
|
254
254
|
|
255
255
|
##
|
256
|
-
# @return [
|
256
|
+
# @return [CallerName]
|
257
257
|
def caller_name
|
258
258
|
@properties['caller_name']
|
259
259
|
end
|
260
260
|
|
261
261
|
##
|
262
|
-
# @return [
|
262
|
+
# @return [SimSwap]
|
263
263
|
def sim_swap
|
264
264
|
@properties['sim_swap']
|
265
265
|
end
|
266
266
|
|
267
267
|
##
|
268
|
-
# @return [
|
268
|
+
# @return [CallForwarding]
|
269
269
|
def call_forwarding
|
270
270
|
@properties['call_forwarding']
|
271
271
|
end
|
272
272
|
|
273
273
|
##
|
274
|
-
# @return [
|
275
|
-
def
|
276
|
-
@properties['
|
274
|
+
# @return [LineTypeIntelligence]
|
275
|
+
def line_type_intelligence
|
276
|
+
@properties['line_type_intelligence']
|
277
277
|
end
|
278
278
|
|
279
279
|
##
|
280
|
-
# @return [
|
281
|
-
def
|
282
|
-
@properties['
|
280
|
+
# @return [LineStatus]
|
281
|
+
def line_status
|
282
|
+
@properties['line_status']
|
283
283
|
end
|
284
284
|
|
285
285
|
##
|
286
|
-
# @return [
|
286
|
+
# @return [IdentityMatch]
|
287
287
|
def identity_match
|
288
288
|
@properties['identity_match']
|
289
289
|
end
|
290
290
|
|
291
291
|
##
|
292
|
-
# @return [
|
292
|
+
# @return [ReassignedNumber]
|
293
293
|
def reassigned_number
|
294
294
|
@properties['reassigned_number']
|
295
295
|
end
|
296
296
|
|
297
297
|
##
|
298
|
-
# @return [
|
298
|
+
# @return [SmsPumpingRisk]
|
299
299
|
def sms_pumping_risk
|
300
300
|
@properties['sms_pumping_risk']
|
301
301
|
end
|
@@ -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
|
@@ -461,12 +461,25 @@ module Twilio
|
|
461
461
|
'message_volume' => payload['message_volume'],
|
462
462
|
'additional_information' => payload['additional_information'],
|
463
463
|
'tollfree_phone_number_sid' => payload['tollfree_phone_number_sid'],
|
464
|
+
'tollfree_phone_number' => payload['tollfree_phone_number'],
|
464
465
|
'status' => payload['status'],
|
465
466
|
'url' => payload['url'],
|
466
467
|
'rejection_reason' => payload['rejection_reason'],
|
467
468
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
468
469
|
'edit_expiration' => Twilio.deserialize_iso8601_datetime(payload['edit_expiration']),
|
469
470
|
'edit_allowed' => payload['edit_allowed'],
|
471
|
+
'business_registration_number' => payload['business_registration_number'],
|
472
|
+
'business_registration_authority' => payload['business_registration_authority'],
|
473
|
+
'business_registration_country' => payload['business_registration_country'],
|
474
|
+
'business_type' => payload['business_type'],
|
475
|
+
'business_registration_phone_number' => payload['business_registration_phone_number'],
|
476
|
+
'doing_business_as' => payload['doing_business_as'],
|
477
|
+
'opt_in_confirmation_message' => payload['opt_in_confirmation_message'],
|
478
|
+
'help_message_sample' => payload['help_message_sample'],
|
479
|
+
'privacy_policy_url' => payload['privacy_policy_url'],
|
480
|
+
'terms_and_conditions_url' => payload['terms_and_conditions_url'],
|
481
|
+
'age_gated_content' => payload['age_gated_content'],
|
482
|
+
'opt_in_keywords' => payload['opt_in_keywords'],
|
470
483
|
'rejection_reasons' => payload['rejection_reasons'],
|
471
484
|
'resource_links' => payload['resource_links'],
|
472
485
|
'external_reference_id' => payload['external_reference_id'],
|
@@ -656,6 +669,12 @@ module Twilio
|
|
656
669
|
@properties['tollfree_phone_number_sid']
|
657
670
|
end
|
658
671
|
|
672
|
+
##
|
673
|
+
# @return [String] The E.164 formatted toll-free phone number associated with the verification.
|
674
|
+
def tollfree_phone_number
|
675
|
+
@properties['tollfree_phone_number']
|
676
|
+
end
|
677
|
+
|
659
678
|
##
|
660
679
|
# @return [Status]
|
661
680
|
def status
|
@@ -692,6 +711,78 @@ module Twilio
|
|
692
711
|
@properties['edit_allowed']
|
693
712
|
end
|
694
713
|
|
714
|
+
##
|
715
|
+
# @return [String] A legally recognized business registration number
|
716
|
+
def business_registration_number
|
717
|
+
@properties['business_registration_number']
|
718
|
+
end
|
719
|
+
|
720
|
+
##
|
721
|
+
# @return [String] The organizational authority for business registrations
|
722
|
+
def business_registration_authority
|
723
|
+
@properties['business_registration_authority']
|
724
|
+
end
|
725
|
+
|
726
|
+
##
|
727
|
+
# @return [String] Country business is registered in
|
728
|
+
def business_registration_country
|
729
|
+
@properties['business_registration_country']
|
730
|
+
end
|
731
|
+
|
732
|
+
##
|
733
|
+
# @return [String] The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
734
|
+
def business_type
|
735
|
+
@properties['business_type']
|
736
|
+
end
|
737
|
+
|
738
|
+
##
|
739
|
+
# @return [String] The E.164 formatted number associated with the business.
|
740
|
+
def business_registration_phone_number
|
741
|
+
@properties['business_registration_phone_number']
|
742
|
+
end
|
743
|
+
|
744
|
+
##
|
745
|
+
# @return [String] Trade name, sub entity, or downstream business name of business being submitted for verification
|
746
|
+
def doing_business_as
|
747
|
+
@properties['doing_business_as']
|
748
|
+
end
|
749
|
+
|
750
|
+
##
|
751
|
+
# @return [String] The confirmation message sent to users when they opt in to receive messages.
|
752
|
+
def opt_in_confirmation_message
|
753
|
+
@properties['opt_in_confirmation_message']
|
754
|
+
end
|
755
|
+
|
756
|
+
##
|
757
|
+
# @return [String] A sample help message provided to users.
|
758
|
+
def help_message_sample
|
759
|
+
@properties['help_message_sample']
|
760
|
+
end
|
761
|
+
|
762
|
+
##
|
763
|
+
# @return [String] The URL to the privacy policy for the business or organization.
|
764
|
+
def privacy_policy_url
|
765
|
+
@properties['privacy_policy_url']
|
766
|
+
end
|
767
|
+
|
768
|
+
##
|
769
|
+
# @return [String] The URL to the terms and conditions for the business or organization.
|
770
|
+
def terms_and_conditions_url
|
771
|
+
@properties['terms_and_conditions_url']
|
772
|
+
end
|
773
|
+
|
774
|
+
##
|
775
|
+
# @return [Boolean] Indicates if the content is age gated.
|
776
|
+
def age_gated_content
|
777
|
+
@properties['age_gated_content']
|
778
|
+
end
|
779
|
+
|
780
|
+
##
|
781
|
+
# @return [Array<String>] List of keywords that users can text in to opt in to receive messages.
|
782
|
+
def opt_in_keywords
|
783
|
+
@properties['opt_in_keywords']
|
784
|
+
end
|
785
|
+
|
695
786
|
##
|
696
787
|
# @return [Array<Hash>] A list of rejection reasons and codes describing why a Tollfree Verification has been rejected.
|
697
788
|
def rejection_reasons
|