twilio-ruby 5.71.0 → 5.72.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/CHANGES.md +19 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +559 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +16 -0
- data/lib/twilio-ruby/rest/messaging.rb +8 -0
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f39c64decfb1c150e5fd70c820f4355efb4517ec
|
4
|
+
data.tar.gz: cf1c9cd3f5c7b5974f05db919c3e03b155037e81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a451b15d66f86d78688b38fe8de87d9a6783a0dbdf6fe2e7aa98952193d90035b87401cb61ae099be49af3d476eb2c4395681e49300f7bfc33cc949c23540c27
|
7
|
+
data.tar.gz: 17cb4efb42d41d2a5ffc741c508037d574c3a98a3761d45f5e58f3b4f8e1db954398815edbc8b680fd059e5567c9c8ac5c18994f5b387e8f7c06a70e5401a09a
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,25 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-09-07] Version 5.72.0
|
5
|
+
---------------------------
|
6
|
+
**Flex**
|
7
|
+
- Removed redundant `close` status from Flex Interactions flow **(breaking change)**
|
8
|
+
- Adding `debugger_integration` and `flex_ui_status_report` to Flex Configuration
|
9
|
+
|
10
|
+
**Messaging**
|
11
|
+
- Add create, list and get tollfree verification API
|
12
|
+
|
13
|
+
**Verify**
|
14
|
+
- Verify SafeList API endpoints added.
|
15
|
+
|
16
|
+
**Video**
|
17
|
+
- Add `Anonymize` API
|
18
|
+
|
19
|
+
**Twiml**
|
20
|
+
- Update `event` value `call-in-progress` to `call-answered`
|
21
|
+
|
22
|
+
|
4
23
|
[2022-08-24] Version 5.71.0
|
5
24
|
---------------------------
|
6
25
|
**Library - Test**
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.
|
37
|
+
gem 'twilio-ruby', '~> 5.72.0'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.
|
43
|
+
gem install twilio-ruby -v 5.72.0
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -171,6 +171,8 @@ module Twilio
|
|
171
171
|
'flex_insights_drilldown' => payload['flex_insights_drilldown'],
|
172
172
|
'flex_url' => payload['flex_url'],
|
173
173
|
'channel_configs' => payload['channel_configs'],
|
174
|
+
'debugger_integration' => payload['debugger_integration'],
|
175
|
+
'flex_ui_status_report' => payload['flex_ui_status_report'],
|
174
176
|
}
|
175
177
|
|
176
178
|
# Context
|
@@ -447,6 +449,18 @@ module Twilio
|
|
447
449
|
@properties['channel_configs']
|
448
450
|
end
|
449
451
|
|
452
|
+
##
|
453
|
+
# @return [Hash] Configurable parameters for Debugger Integration
|
454
|
+
def debugger_integration
|
455
|
+
@properties['debugger_integration']
|
456
|
+
end
|
457
|
+
|
458
|
+
##
|
459
|
+
# @return [Hash] Configurable parameters for Flex UI Status report
|
460
|
+
def flex_ui_status_report
|
461
|
+
@properties['flex_ui_status_report']
|
462
|
+
end
|
463
|
+
|
450
464
|
##
|
451
465
|
# Fetch the ConfigurationInstance
|
452
466
|
# @param [String] ui_version The Pinned UI version of the Configuration resource
|
@@ -0,0 +1,559 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class TollfreeVerificationList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the TollfreeVerificationList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [TollfreeVerificationList] TollfreeVerificationList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Tollfree/Verifications"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists TollfreeVerificationInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [String] tollfree_phone_number_sid The SID of the Phone Number associated
|
33
|
+
# with the Tollfree Verification.
|
34
|
+
# @param [tollfree_verification.Status] status The compliance status of the
|
35
|
+
# Tollfree Verification record.
|
36
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
37
|
+
# guarantees to never return more than limit. Default is no limit
|
38
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
39
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
40
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
41
|
+
# efficient page size, i.e. min(limit, 1000)
|
42
|
+
# @return [Array] Array of up to limit results
|
43
|
+
def list(tollfree_phone_number_sid: :unset, status: :unset, limit: nil, page_size: nil)
|
44
|
+
self.stream(
|
45
|
+
tollfree_phone_number_sid: tollfree_phone_number_sid,
|
46
|
+
status: status,
|
47
|
+
limit: limit,
|
48
|
+
page_size: page_size
|
49
|
+
).entries
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Streams TollfreeVerificationInstance records from the API as an Enumerable.
|
54
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
55
|
+
# is reached.
|
56
|
+
# @param [String] tollfree_phone_number_sid The SID of the Phone Number associated
|
57
|
+
# with the Tollfree Verification.
|
58
|
+
# @param [tollfree_verification.Status] status The compliance status of the
|
59
|
+
# Tollfree Verification record.
|
60
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
61
|
+
# guarantees to never return more than limit. Default is no limit.
|
62
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
63
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
64
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
65
|
+
# efficient page size, i.e. min(limit, 1000)
|
66
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
67
|
+
def stream(tollfree_phone_number_sid: :unset, status: :unset, limit: nil, page_size: nil)
|
68
|
+
limits = @version.read_limits(limit, page_size)
|
69
|
+
|
70
|
+
page = self.page(
|
71
|
+
tollfree_phone_number_sid: tollfree_phone_number_sid,
|
72
|
+
status: status,
|
73
|
+
page_size: limits[:page_size],
|
74
|
+
)
|
75
|
+
|
76
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# When passed a block, yields TollfreeVerificationInstance records from the API.
|
81
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
82
|
+
# is reached.
|
83
|
+
def each
|
84
|
+
limits = @version.read_limits
|
85
|
+
|
86
|
+
page = self.page(page_size: limits[:page_size], )
|
87
|
+
|
88
|
+
@version.stream(page,
|
89
|
+
limit: limits[:limit],
|
90
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Retrieve a single page of TollfreeVerificationInstance records from the API.
|
95
|
+
# Request is executed immediately.
|
96
|
+
# @param [String] tollfree_phone_number_sid The SID of the Phone Number associated
|
97
|
+
# with the Tollfree Verification.
|
98
|
+
# @param [tollfree_verification.Status] status The compliance status of the
|
99
|
+
# Tollfree Verification record.
|
100
|
+
# @param [String] page_token PageToken provided by the API
|
101
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
102
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
103
|
+
# @return [Page] Page of TollfreeVerificationInstance
|
104
|
+
def page(tollfree_phone_number_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
105
|
+
params = Twilio::Values.of({
|
106
|
+
'TollfreePhoneNumberSid' => tollfree_phone_number_sid,
|
107
|
+
'Status' => status,
|
108
|
+
'PageToken' => page_token,
|
109
|
+
'Page' => page_number,
|
110
|
+
'PageSize' => page_size,
|
111
|
+
})
|
112
|
+
|
113
|
+
response = @version.page('GET', @uri, params: params)
|
114
|
+
|
115
|
+
TollfreeVerificationPage.new(@version, response, @solution)
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# Retrieve a single page of TollfreeVerificationInstance records from the API.
|
120
|
+
# Request is executed immediately.
|
121
|
+
# @param [String] target_url API-generated URL for the requested results page
|
122
|
+
# @return [Page] Page of TollfreeVerificationInstance
|
123
|
+
def get_page(target_url)
|
124
|
+
response = @version.domain.request(
|
125
|
+
'GET',
|
126
|
+
target_url
|
127
|
+
)
|
128
|
+
TollfreeVerificationPage.new(@version, response, @solution)
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Create the TollfreeVerificationInstance
|
133
|
+
# @param [String] business_name The name of the business or organization using the
|
134
|
+
# Tollfree number.
|
135
|
+
# @param [String] business_website The website of the business or organization
|
136
|
+
# using the Tollfree number.
|
137
|
+
# @param [String] notification_email The email address to receive the notification
|
138
|
+
# about the verification result. .
|
139
|
+
# @param [Array[String]] use_case_categories The category of the use case for the
|
140
|
+
# Tollfree Number. List as many are applicable..
|
141
|
+
# @param [String] use_case_summary Use this to further explain how messaging is
|
142
|
+
# used by the business or organization.
|
143
|
+
# @param [String] production_message_sample An example of message content, i.e. a
|
144
|
+
# sample message.
|
145
|
+
# @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in
|
146
|
+
# workflow. Multiple images allowed and must be a publicly hosted URL.
|
147
|
+
# @param [tollfree_verification.OptInType] opt_in_type Describe how a user opts-in
|
148
|
+
# to text messages.
|
149
|
+
# @param [String] message_volume Estimate monthly volume of messages from the
|
150
|
+
# Tollfree Number.
|
151
|
+
# @param [String] tollfree_phone_number_sid The SID of the Phone Number associated
|
152
|
+
# with the Tollfree Verification.
|
153
|
+
# @param [String] customer_profile_sid Customer's Profile Bundle BundleSid.
|
154
|
+
# @param [String] business_street_address The address of the business or
|
155
|
+
# organization using the Tollfree number.
|
156
|
+
# @param [String] business_street_address2 The address of the business or
|
157
|
+
# organization using the Tollfree number.
|
158
|
+
# @param [String] business_city The city of the business or organization using the
|
159
|
+
# Tollfree number.
|
160
|
+
# @param [String] business_state_province_region The state/province/region of the
|
161
|
+
# business or organization using the Tollfree number.
|
162
|
+
# @param [String] business_postal_code The postal code of the business or
|
163
|
+
# organization using the Tollfree number.
|
164
|
+
# @param [String] business_country The country of the business or organization
|
165
|
+
# using the Tollfree number.
|
166
|
+
# @param [String] additional_information Additional information to be provided for
|
167
|
+
# verification.
|
168
|
+
# @param [String] business_contact_first_name The first name of the contact for
|
169
|
+
# the business or organization using the Tollfree number.
|
170
|
+
# @param [String] business_contact_last_name The last name of the contact for the
|
171
|
+
# business or organization using the Tollfree number.
|
172
|
+
# @param [String] business_contact_email The email address of the contact for the
|
173
|
+
# business or organization using the Tollfree number.
|
174
|
+
# @param [String] business_contact_phone The phone number of the contact for the
|
175
|
+
# business or organization using the Tollfree number.
|
176
|
+
# @return [TollfreeVerificationInstance] Created TollfreeVerificationInstance
|
177
|
+
def create(business_name: nil, business_website: nil, notification_email: nil, use_case_categories: nil, use_case_summary: nil, production_message_sample: nil, opt_in_image_urls: nil, opt_in_type: nil, message_volume: nil, tollfree_phone_number_sid: nil, customer_profile_sid: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
|
178
|
+
data = Twilio::Values.of({
|
179
|
+
'BusinessName' => business_name,
|
180
|
+
'BusinessWebsite' => business_website,
|
181
|
+
'NotificationEmail' => notification_email,
|
182
|
+
'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
|
183
|
+
'UseCaseSummary' => use_case_summary,
|
184
|
+
'ProductionMessageSample' => production_message_sample,
|
185
|
+
'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
|
186
|
+
'OptInType' => opt_in_type,
|
187
|
+
'MessageVolume' => message_volume,
|
188
|
+
'TollfreePhoneNumberSid' => tollfree_phone_number_sid,
|
189
|
+
'CustomerProfileSid' => customer_profile_sid,
|
190
|
+
'BusinessStreetAddress' => business_street_address,
|
191
|
+
'BusinessStreetAddress2' => business_street_address2,
|
192
|
+
'BusinessCity' => business_city,
|
193
|
+
'BusinessStateProvinceRegion' => business_state_province_region,
|
194
|
+
'BusinessPostalCode' => business_postal_code,
|
195
|
+
'BusinessCountry' => business_country,
|
196
|
+
'AdditionalInformation' => additional_information,
|
197
|
+
'BusinessContactFirstName' => business_contact_first_name,
|
198
|
+
'BusinessContactLastName' => business_contact_last_name,
|
199
|
+
'BusinessContactEmail' => business_contact_email,
|
200
|
+
'BusinessContactPhone' => business_contact_phone,
|
201
|
+
})
|
202
|
+
|
203
|
+
payload = @version.create('POST', @uri, data: data)
|
204
|
+
|
205
|
+
TollfreeVerificationInstance.new(@version, payload, )
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# Provide a user friendly representation
|
210
|
+
def to_s
|
211
|
+
'#<Twilio.Messaging.V1.TollfreeVerificationList>'
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
217
|
+
class TollfreeVerificationPage < Page
|
218
|
+
##
|
219
|
+
# Initialize the TollfreeVerificationPage
|
220
|
+
# @param [Version] version Version that contains the resource
|
221
|
+
# @param [Response] response Response from the API
|
222
|
+
# @param [Hash] solution Path solution for the resource
|
223
|
+
# @return [TollfreeVerificationPage] TollfreeVerificationPage
|
224
|
+
def initialize(version, response, solution)
|
225
|
+
super(version, response)
|
226
|
+
|
227
|
+
# Path Solution
|
228
|
+
@solution = solution
|
229
|
+
end
|
230
|
+
|
231
|
+
##
|
232
|
+
# Build an instance of TollfreeVerificationInstance
|
233
|
+
# @param [Hash] payload Payload response from the API
|
234
|
+
# @return [TollfreeVerificationInstance] TollfreeVerificationInstance
|
235
|
+
def get_instance(payload)
|
236
|
+
TollfreeVerificationInstance.new(@version, payload, )
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Provide a user friendly representation
|
241
|
+
def to_s
|
242
|
+
'<Twilio.Messaging.V1.TollfreeVerificationPage>'
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
##
|
247
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
248
|
+
class TollfreeVerificationContext < InstanceContext
|
249
|
+
##
|
250
|
+
# Initialize the TollfreeVerificationContext
|
251
|
+
# @param [Version] version Version that contains the resource
|
252
|
+
# @param [String] sid The unique string to identify Tollfree Verification.
|
253
|
+
# @return [TollfreeVerificationContext] TollfreeVerificationContext
|
254
|
+
def initialize(version, sid)
|
255
|
+
super(version)
|
256
|
+
|
257
|
+
# Path Solution
|
258
|
+
@solution = {sid: sid, }
|
259
|
+
@uri = "/Tollfree/Verifications/#{@solution[:sid]}"
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
# Fetch the TollfreeVerificationInstance
|
264
|
+
# @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
|
265
|
+
def fetch
|
266
|
+
payload = @version.fetch('GET', @uri)
|
267
|
+
|
268
|
+
TollfreeVerificationInstance.new(@version, payload, sid: @solution[:sid], )
|
269
|
+
end
|
270
|
+
|
271
|
+
##
|
272
|
+
# Provide a user friendly representation
|
273
|
+
def to_s
|
274
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
275
|
+
"#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>"
|
276
|
+
end
|
277
|
+
|
278
|
+
##
|
279
|
+
# Provide a detailed, user friendly representation
|
280
|
+
def inspect
|
281
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
282
|
+
"#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>"
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
##
|
287
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
288
|
+
class TollfreeVerificationInstance < InstanceResource
|
289
|
+
##
|
290
|
+
# Initialize the TollfreeVerificationInstance
|
291
|
+
# @param [Version] version Version that contains the resource
|
292
|
+
# @param [Hash] payload payload that contains response from Twilio
|
293
|
+
# @param [String] sid The unique string to identify Tollfree Verification.
|
294
|
+
# @return [TollfreeVerificationInstance] TollfreeVerificationInstance
|
295
|
+
def initialize(version, payload, sid: nil)
|
296
|
+
super(version)
|
297
|
+
|
298
|
+
# Marshaled Properties
|
299
|
+
@properties = {
|
300
|
+
'sid' => payload['sid'],
|
301
|
+
'account_sid' => payload['account_sid'],
|
302
|
+
'customer_profile_sid' => payload['customer_profile_sid'],
|
303
|
+
'trust_product_sid' => payload['trust_product_sid'],
|
304
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
305
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
306
|
+
'regulated_item_sid' => payload['regulated_item_sid'],
|
307
|
+
'business_name' => payload['business_name'],
|
308
|
+
'business_street_address' => payload['business_street_address'],
|
309
|
+
'business_street_address2' => payload['business_street_address2'],
|
310
|
+
'business_city' => payload['business_city'],
|
311
|
+
'business_state_province_region' => payload['business_state_province_region'],
|
312
|
+
'business_postal_code' => payload['business_postal_code'],
|
313
|
+
'business_country' => payload['business_country'],
|
314
|
+
'business_website' => payload['business_website'],
|
315
|
+
'business_contact_first_name' => payload['business_contact_first_name'],
|
316
|
+
'business_contact_last_name' => payload['business_contact_last_name'],
|
317
|
+
'business_contact_email' => payload['business_contact_email'],
|
318
|
+
'business_contact_phone' => payload['business_contact_phone'],
|
319
|
+
'notification_email' => payload['notification_email'],
|
320
|
+
'use_case_categories' => payload['use_case_categories'],
|
321
|
+
'use_case_summary' => payload['use_case_summary'],
|
322
|
+
'production_message_sample' => payload['production_message_sample'],
|
323
|
+
'opt_in_image_urls' => payload['opt_in_image_urls'],
|
324
|
+
'opt_in_type' => payload['opt_in_type'],
|
325
|
+
'message_volume' => payload['message_volume'],
|
326
|
+
'additional_information' => payload['additional_information'],
|
327
|
+
'tollfree_phone_number_sid' => payload['tollfree_phone_number_sid'],
|
328
|
+
'status' => payload['status'],
|
329
|
+
'url' => payload['url'],
|
330
|
+
'resource_links' => payload['resource_links'],
|
331
|
+
}
|
332
|
+
|
333
|
+
# Context
|
334
|
+
@instance_context = nil
|
335
|
+
@params = {'sid' => sid || @properties['sid'], }
|
336
|
+
end
|
337
|
+
|
338
|
+
##
|
339
|
+
# Generate an instance context for the instance, the context is capable of
|
340
|
+
# performing various actions. All instance actions are proxied to the context
|
341
|
+
# @return [TollfreeVerificationContext] TollfreeVerificationContext for this TollfreeVerificationInstance
|
342
|
+
def context
|
343
|
+
unless @instance_context
|
344
|
+
@instance_context = TollfreeVerificationContext.new(@version, @params['sid'], )
|
345
|
+
end
|
346
|
+
@instance_context
|
347
|
+
end
|
348
|
+
|
349
|
+
##
|
350
|
+
# @return [String] Tollfree Verification Sid
|
351
|
+
def sid
|
352
|
+
@properties['sid']
|
353
|
+
end
|
354
|
+
|
355
|
+
##
|
356
|
+
# @return [String] The SID of the Account that created the resource
|
357
|
+
def account_sid
|
358
|
+
@properties['account_sid']
|
359
|
+
end
|
360
|
+
|
361
|
+
##
|
362
|
+
# @return [String] Customer's Profile Bundle BundleSid
|
363
|
+
def customer_profile_sid
|
364
|
+
@properties['customer_profile_sid']
|
365
|
+
end
|
366
|
+
|
367
|
+
##
|
368
|
+
# @return [String] Tollfree TrustProduct Bundle BundleSid
|
369
|
+
def trust_product_sid
|
370
|
+
@properties['trust_product_sid']
|
371
|
+
end
|
372
|
+
|
373
|
+
##
|
374
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
375
|
+
def date_created
|
376
|
+
@properties['date_created']
|
377
|
+
end
|
378
|
+
|
379
|
+
##
|
380
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
381
|
+
def date_updated
|
382
|
+
@properties['date_updated']
|
383
|
+
end
|
384
|
+
|
385
|
+
##
|
386
|
+
# @return [String] The SID of the Regulated Item
|
387
|
+
def regulated_item_sid
|
388
|
+
@properties['regulated_item_sid']
|
389
|
+
end
|
390
|
+
|
391
|
+
##
|
392
|
+
# @return [String] The name of the business or organization using the Tollfree number
|
393
|
+
def business_name
|
394
|
+
@properties['business_name']
|
395
|
+
end
|
396
|
+
|
397
|
+
##
|
398
|
+
# @return [String] The address of the business or organization using the Tollfree number
|
399
|
+
def business_street_address
|
400
|
+
@properties['business_street_address']
|
401
|
+
end
|
402
|
+
|
403
|
+
##
|
404
|
+
# @return [String] The address of the business or organization using the Tollfree number
|
405
|
+
def business_street_address2
|
406
|
+
@properties['business_street_address2']
|
407
|
+
end
|
408
|
+
|
409
|
+
##
|
410
|
+
# @return [String] The city of the business or organization using the Tollfree number
|
411
|
+
def business_city
|
412
|
+
@properties['business_city']
|
413
|
+
end
|
414
|
+
|
415
|
+
##
|
416
|
+
# @return [String] The state/province/region of the business or organization using the Tollfree number
|
417
|
+
def business_state_province_region
|
418
|
+
@properties['business_state_province_region']
|
419
|
+
end
|
420
|
+
|
421
|
+
##
|
422
|
+
# @return [String] The postal code of the business or organization using the Tollfree number
|
423
|
+
def business_postal_code
|
424
|
+
@properties['business_postal_code']
|
425
|
+
end
|
426
|
+
|
427
|
+
##
|
428
|
+
# @return [String] The country of the business or organization using the Tollfree number
|
429
|
+
def business_country
|
430
|
+
@properties['business_country']
|
431
|
+
end
|
432
|
+
|
433
|
+
##
|
434
|
+
# @return [String] The website of the business or organization using the Tollfree number
|
435
|
+
def business_website
|
436
|
+
@properties['business_website']
|
437
|
+
end
|
438
|
+
|
439
|
+
##
|
440
|
+
# @return [String] The first name of the contact for the business or organization using the Tollfree number
|
441
|
+
def business_contact_first_name
|
442
|
+
@properties['business_contact_first_name']
|
443
|
+
end
|
444
|
+
|
445
|
+
##
|
446
|
+
# @return [String] The last name of the contact for the business or organization using the Tollfree number
|
447
|
+
def business_contact_last_name
|
448
|
+
@properties['business_contact_last_name']
|
449
|
+
end
|
450
|
+
|
451
|
+
##
|
452
|
+
# @return [String] The email address of the contact for the business or organization using the Tollfree number
|
453
|
+
def business_contact_email
|
454
|
+
@properties['business_contact_email']
|
455
|
+
end
|
456
|
+
|
457
|
+
##
|
458
|
+
# @return [String] The phone number of the contact for the business or organization using the Tollfree number
|
459
|
+
def business_contact_phone
|
460
|
+
@properties['business_contact_phone']
|
461
|
+
end
|
462
|
+
|
463
|
+
##
|
464
|
+
# @return [String] The email address to receive the notification about the verification result.
|
465
|
+
def notification_email
|
466
|
+
@properties['notification_email']
|
467
|
+
end
|
468
|
+
|
469
|
+
##
|
470
|
+
# @return [Array[String]] The category of the use case for the Tollfree Number. List as many are applicable.
|
471
|
+
def use_case_categories
|
472
|
+
@properties['use_case_categories']
|
473
|
+
end
|
474
|
+
|
475
|
+
##
|
476
|
+
# @return [String] Further explaination on how messaging is used by the business or organization
|
477
|
+
def use_case_summary
|
478
|
+
@properties['use_case_summary']
|
479
|
+
end
|
480
|
+
|
481
|
+
##
|
482
|
+
# @return [String] An example of message content, i.e. a sample message
|
483
|
+
def production_message_sample
|
484
|
+
@properties['production_message_sample']
|
485
|
+
end
|
486
|
+
|
487
|
+
##
|
488
|
+
# @return [Array[String]] Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
|
489
|
+
def opt_in_image_urls
|
490
|
+
@properties['opt_in_image_urls']
|
491
|
+
end
|
492
|
+
|
493
|
+
##
|
494
|
+
# @return [tollfree_verification.OptInType] Describe how a user opts-in to text messages
|
495
|
+
def opt_in_type
|
496
|
+
@properties['opt_in_type']
|
497
|
+
end
|
498
|
+
|
499
|
+
##
|
500
|
+
# @return [String] Estimate monthly volume of messages from the Tollfree Number
|
501
|
+
def message_volume
|
502
|
+
@properties['message_volume']
|
503
|
+
end
|
504
|
+
|
505
|
+
##
|
506
|
+
# @return [String] Additional information to be provided for verification
|
507
|
+
def additional_information
|
508
|
+
@properties['additional_information']
|
509
|
+
end
|
510
|
+
|
511
|
+
##
|
512
|
+
# @return [String] The SID of the Phone Number associated with the Tollfree Verification
|
513
|
+
def tollfree_phone_number_sid
|
514
|
+
@properties['tollfree_phone_number_sid']
|
515
|
+
end
|
516
|
+
|
517
|
+
##
|
518
|
+
# @return [tollfree_verification.Status] The compliance status of the Tollfree Verification record.
|
519
|
+
def status
|
520
|
+
@properties['status']
|
521
|
+
end
|
522
|
+
|
523
|
+
##
|
524
|
+
# @return [String] The absolute URL of the Tollfree Verification
|
525
|
+
def url
|
526
|
+
@properties['url']
|
527
|
+
end
|
528
|
+
|
529
|
+
##
|
530
|
+
# @return [Hash] The URLs of the documents associated with the Tollfree Verification resource
|
531
|
+
def resource_links
|
532
|
+
@properties['resource_links']
|
533
|
+
end
|
534
|
+
|
535
|
+
##
|
536
|
+
# Fetch the TollfreeVerificationInstance
|
537
|
+
# @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
|
538
|
+
def fetch
|
539
|
+
context.fetch
|
540
|
+
end
|
541
|
+
|
542
|
+
##
|
543
|
+
# Provide a user friendly representation
|
544
|
+
def to_s
|
545
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
546
|
+
"<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
|
547
|
+
end
|
548
|
+
|
549
|
+
##
|
550
|
+
# Provide a detailed, user friendly representation
|
551
|
+
def inspect
|
552
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
553
|
+
"<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
|
554
|
+
end
|
555
|
+
end
|
556
|
+
end
|
557
|
+
end
|
558
|
+
end
|
559
|
+
end
|
@@ -19,6 +19,7 @@ module Twilio
|
|
19
19
|
@deactivations = nil
|
20
20
|
@external_campaign = nil
|
21
21
|
@services = nil
|
22
|
+
@tollfree_verifications = nil
|
22
23
|
@usecases = nil
|
23
24
|
end
|
24
25
|
|
@@ -64,6 +65,21 @@ module Twilio
|
|
64
65
|
end
|
65
66
|
end
|
66
67
|
|
68
|
+
##
|
69
|
+
# @param [String] sid The unique string to identify Tollfree Verification.
|
70
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationContext] if sid was passed.
|
71
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationList]
|
72
|
+
def tollfree_verifications(sid=:unset)
|
73
|
+
if sid.nil?
|
74
|
+
raise ArgumentError, 'sid cannot be nil'
|
75
|
+
end
|
76
|
+
if sid == :unset
|
77
|
+
@tollfree_verifications ||= TollfreeVerificationList.new self
|
78
|
+
else
|
79
|
+
TollfreeVerificationContext.new(self, sid)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
67
83
|
##
|
68
84
|
# @return [Twilio::REST::Messaging::V1::UsecaseContext]
|
69
85
|
def usecases
|
@@ -57,6 +57,14 @@ module Twilio
|
|
57
57
|
self.v1.services(sid)
|
58
58
|
end
|
59
59
|
|
60
|
+
##
|
61
|
+
# @param [String] sid The unique string to identify Tollfree Verification.
|
62
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationInstance] if sid was passed.
|
63
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationList]
|
64
|
+
def tollfree_verifications(sid=:unset)
|
65
|
+
self.v1.tollfree_verifications(sid)
|
66
|
+
end
|
67
|
+
|
60
68
|
##
|
61
69
|
# @return [Twilio::REST::Messaging::V1::UsecaseInstance]
|
62
70
|
def usecases
|
@@ -0,0 +1,215 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Verify < Domain
|
12
|
+
class V2 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class SafelistList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the SafelistList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [SafelistList] SafelistList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/SafeList/Numbers"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Create the SafelistInstance
|
30
|
+
# @param [String] phone_number The phone number to be added in SafeList. Phone
|
31
|
+
# numbers must be in {E.164
|
32
|
+
# format}[https://www.twilio.com/docs/glossary/what-e164].
|
33
|
+
# @return [SafelistInstance] Created SafelistInstance
|
34
|
+
def create(phone_number: nil)
|
35
|
+
data = Twilio::Values.of({'PhoneNumber' => phone_number, })
|
36
|
+
|
37
|
+
payload = @version.create('POST', @uri, data: data)
|
38
|
+
|
39
|
+
SafelistInstance.new(@version, payload, )
|
40
|
+
end
|
41
|
+
|
42
|
+
##
|
43
|
+
# Provide a user friendly representation
|
44
|
+
def to_s
|
45
|
+
'#<Twilio.Verify.V2.SafelistList>'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
51
|
+
class SafelistPage < Page
|
52
|
+
##
|
53
|
+
# Initialize the SafelistPage
|
54
|
+
# @param [Version] version Version that contains the resource
|
55
|
+
# @param [Response] response Response from the API
|
56
|
+
# @param [Hash] solution Path solution for the resource
|
57
|
+
# @return [SafelistPage] SafelistPage
|
58
|
+
def initialize(version, response, solution)
|
59
|
+
super(version, response)
|
60
|
+
|
61
|
+
# Path Solution
|
62
|
+
@solution = solution
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Build an instance of SafelistInstance
|
67
|
+
# @param [Hash] payload Payload response from the API
|
68
|
+
# @return [SafelistInstance] SafelistInstance
|
69
|
+
def get_instance(payload)
|
70
|
+
SafelistInstance.new(@version, payload, )
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# Provide a user friendly representation
|
75
|
+
def to_s
|
76
|
+
'<Twilio.Verify.V2.SafelistPage>'
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
82
|
+
class SafelistContext < InstanceContext
|
83
|
+
##
|
84
|
+
# Initialize the SafelistContext
|
85
|
+
# @param [Version] version Version that contains the resource
|
86
|
+
# @param [String] phone_number The phone number to be fetched from SafeList. Phone
|
87
|
+
# numbers must be in {E.164
|
88
|
+
# format}[https://www.twilio.com/docs/glossary/what-e164].
|
89
|
+
# @return [SafelistContext] SafelistContext
|
90
|
+
def initialize(version, phone_number)
|
91
|
+
super(version)
|
92
|
+
|
93
|
+
# Path Solution
|
94
|
+
@solution = {phone_number: phone_number, }
|
95
|
+
@uri = "/SafeList/Numbers/#{@solution[:phone_number]}"
|
96
|
+
end
|
97
|
+
|
98
|
+
##
|
99
|
+
# Fetch the SafelistInstance
|
100
|
+
# @return [SafelistInstance] Fetched SafelistInstance
|
101
|
+
def fetch
|
102
|
+
payload = @version.fetch('GET', @uri)
|
103
|
+
|
104
|
+
SafelistInstance.new(@version, payload, phone_number: @solution[:phone_number], )
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# Delete the SafelistInstance
|
109
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
110
|
+
def delete
|
111
|
+
@version.delete('DELETE', @uri)
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Provide a user friendly representation
|
116
|
+
def to_s
|
117
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
118
|
+
"#<Twilio.Verify.V2.SafelistContext #{context}>"
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Provide a detailed, user friendly representation
|
123
|
+
def inspect
|
124
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
125
|
+
"#<Twilio.Verify.V2.SafelistContext #{context}>"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
131
|
+
class SafelistInstance < InstanceResource
|
132
|
+
##
|
133
|
+
# Initialize the SafelistInstance
|
134
|
+
# @param [Version] version Version that contains the resource
|
135
|
+
# @param [Hash] payload payload that contains response from Twilio
|
136
|
+
# @param [String] phone_number The phone number to be fetched from SafeList. Phone
|
137
|
+
# numbers must be in {E.164
|
138
|
+
# format}[https://www.twilio.com/docs/glossary/what-e164].
|
139
|
+
# @return [SafelistInstance] SafelistInstance
|
140
|
+
def initialize(version, payload, phone_number: nil)
|
141
|
+
super(version)
|
142
|
+
|
143
|
+
# Marshaled Properties
|
144
|
+
@properties = {
|
145
|
+
'sid' => payload['sid'],
|
146
|
+
'phone_number' => payload['phone_number'],
|
147
|
+
'url' => payload['url'],
|
148
|
+
}
|
149
|
+
|
150
|
+
# Context
|
151
|
+
@instance_context = nil
|
152
|
+
@params = {'phone_number' => phone_number || @properties['phone_number'], }
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# Generate an instance context for the instance, the context is capable of
|
157
|
+
# performing various actions. All instance actions are proxied to the context
|
158
|
+
# @return [SafelistContext] SafelistContext for this SafelistInstance
|
159
|
+
def context
|
160
|
+
unless @instance_context
|
161
|
+
@instance_context = SafelistContext.new(@version, @params['phone_number'], )
|
162
|
+
end
|
163
|
+
@instance_context
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [String] The unique string that identifies the resource.
|
168
|
+
def sid
|
169
|
+
@properties['sid']
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [String] The phone number in SafeList.
|
174
|
+
def phone_number
|
175
|
+
@properties['phone_number']
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [String] The absolute URL of the SafeList resource.
|
180
|
+
def url
|
181
|
+
@properties['url']
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# Fetch the SafelistInstance
|
186
|
+
# @return [SafelistInstance] Fetched SafelistInstance
|
187
|
+
def fetch
|
188
|
+
context.fetch
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# Delete the SafelistInstance
|
193
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
194
|
+
def delete
|
195
|
+
context.delete
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Provide a user friendly representation
|
200
|
+
def to_s
|
201
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
202
|
+
"<Twilio.Verify.V2.SafelistInstance #{values}>"
|
203
|
+
end
|
204
|
+
|
205
|
+
##
|
206
|
+
# Provide a detailed, user friendly representation
|
207
|
+
def inspect
|
208
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
209
|
+
"<Twilio.Verify.V2.SafelistInstance #{values}>"
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
@@ -16,6 +16,7 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'v2'
|
18
18
|
@forms = nil
|
19
|
+
@safelist = nil
|
19
20
|
@services = nil
|
20
21
|
@verification_attempts = nil
|
21
22
|
@verification_attempts_summary = nil
|
@@ -38,6 +39,23 @@ module Twilio
|
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
42
|
+
##
|
43
|
+
# @param [String] phone_number The phone number to be fetched from SafeList. Phone
|
44
|
+
# numbers must be in {E.164
|
45
|
+
# format}[https://www.twilio.com/docs/glossary/what-e164].
|
46
|
+
# @return [Twilio::REST::Verify::V2::SafelistContext] if phone_number was passed.
|
47
|
+
# @return [Twilio::REST::Verify::V2::SafelistList]
|
48
|
+
def safelist(phone_number=:unset)
|
49
|
+
if phone_number.nil?
|
50
|
+
raise ArgumentError, 'phone_number cannot be nil'
|
51
|
+
end
|
52
|
+
if phone_number == :unset
|
53
|
+
@safelist ||= SafelistList.new self
|
54
|
+
else
|
55
|
+
SafelistContext.new(self, phone_number)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
41
59
|
##
|
42
60
|
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
43
61
|
# Verification Service resource to fetch.
|
@@ -37,6 +37,14 @@ module Twilio
|
|
37
37
|
self.v2.forms(form_type)
|
38
38
|
end
|
39
39
|
|
40
|
+
##
|
41
|
+
# @param [String] phone_number The phone number in SafeList.
|
42
|
+
# @return [Twilio::REST::Verify::V2::SafelistInstance] if phone_number was passed.
|
43
|
+
# @return [Twilio::REST::Verify::V2::SafelistList]
|
44
|
+
def safelist(phone_number=:unset)
|
45
|
+
self.v2.safelist(phone_number)
|
46
|
+
end
|
47
|
+
|
40
48
|
##
|
41
49
|
# @param [String] sid The unique string that we created to identify the Service
|
42
50
|
# resource.
|
@@ -0,0 +1,240 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Video < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class RoomContext < InstanceContext
|
14
|
+
class ParticipantContext < InstanceContext
|
15
|
+
class AnonymizeList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the AnonymizeList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @param [String] room_sid The SID of the participant's room.
|
20
|
+
# @param [String] sid The unique string that we created to identify the
|
21
|
+
# RoomParticipant resource.
|
22
|
+
# @return [AnonymizeList] AnonymizeList
|
23
|
+
def initialize(version, room_sid: nil, sid: nil)
|
24
|
+
super(version)
|
25
|
+
|
26
|
+
# Path Solution
|
27
|
+
@solution = {room_sid: room_sid, sid: sid}
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Provide a user friendly representation
|
32
|
+
def to_s
|
33
|
+
'#<Twilio.Video.V1.AnonymizeList>'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class AnonymizePage < Page
|
38
|
+
##
|
39
|
+
# Initialize the AnonymizePage
|
40
|
+
# @param [Version] version Version that contains the resource
|
41
|
+
# @param [Response] response Response from the API
|
42
|
+
# @param [Hash] solution Path solution for the resource
|
43
|
+
# @return [AnonymizePage] AnonymizePage
|
44
|
+
def initialize(version, response, solution)
|
45
|
+
super(version, response)
|
46
|
+
|
47
|
+
# Path Solution
|
48
|
+
@solution = solution
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Build an instance of AnonymizeInstance
|
53
|
+
# @param [Hash] payload Payload response from the API
|
54
|
+
# @return [AnonymizeInstance] AnonymizeInstance
|
55
|
+
def get_instance(payload)
|
56
|
+
AnonymizeInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# Provide a user friendly representation
|
61
|
+
def to_s
|
62
|
+
'<Twilio.Video.V1.AnonymizePage>'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
class AnonymizeContext < InstanceContext
|
67
|
+
##
|
68
|
+
# Initialize the AnonymizeContext
|
69
|
+
# @param [Version] version Version that contains the resource
|
70
|
+
# @param [String] room_sid The SID of the room with the participant to update.
|
71
|
+
# @param [String] sid The SID of the RoomParticipant resource to update.
|
72
|
+
# @return [AnonymizeContext] AnonymizeContext
|
73
|
+
def initialize(version, room_sid, sid)
|
74
|
+
super(version)
|
75
|
+
|
76
|
+
# Path Solution
|
77
|
+
@solution = {room_sid: room_sid, sid: sid, }
|
78
|
+
@uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:sid]}/Anonymize"
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Update the AnonymizeInstance
|
83
|
+
# @return [AnonymizeInstance] Updated AnonymizeInstance
|
84
|
+
def update
|
85
|
+
payload = @version.update('POST', @uri)
|
86
|
+
|
87
|
+
AnonymizeInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Provide a user friendly representation
|
92
|
+
def to_s
|
93
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
94
|
+
"#<Twilio.Video.V1.AnonymizeContext #{context}>"
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Provide a detailed, user friendly representation
|
99
|
+
def inspect
|
100
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
101
|
+
"#<Twilio.Video.V1.AnonymizeContext #{context}>"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
class AnonymizeInstance < InstanceResource
|
106
|
+
##
|
107
|
+
# Initialize the AnonymizeInstance
|
108
|
+
# @param [Version] version Version that contains the resource
|
109
|
+
# @param [Hash] payload payload that contains response from Twilio
|
110
|
+
# @param [String] room_sid The SID of the participant's room.
|
111
|
+
# @param [String] sid The unique string that we created to identify the
|
112
|
+
# RoomParticipant resource.
|
113
|
+
# @return [AnonymizeInstance] AnonymizeInstance
|
114
|
+
def initialize(version, payload, room_sid: nil, sid: nil)
|
115
|
+
super(version)
|
116
|
+
|
117
|
+
# Marshaled Properties
|
118
|
+
@properties = {
|
119
|
+
'sid' => payload['sid'],
|
120
|
+
'room_sid' => payload['room_sid'],
|
121
|
+
'account_sid' => payload['account_sid'],
|
122
|
+
'status' => payload['status'],
|
123
|
+
'identity' => payload['identity'],
|
124
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
125
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
126
|
+
'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
|
127
|
+
'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
|
128
|
+
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
129
|
+
'url' => payload['url'],
|
130
|
+
}
|
131
|
+
|
132
|
+
# Context
|
133
|
+
@instance_context = nil
|
134
|
+
@params = {'room_sid' => room_sid, 'sid' => sid, }
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# Generate an instance context for the instance, the context is capable of
|
139
|
+
# performing various actions. All instance actions are proxied to the context
|
140
|
+
# @return [AnonymizeContext] AnonymizeContext for this AnonymizeInstance
|
141
|
+
def context
|
142
|
+
unless @instance_context
|
143
|
+
@instance_context = AnonymizeContext.new(@version, @params['room_sid'], @params['sid'], )
|
144
|
+
end
|
145
|
+
@instance_context
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [String] The unique string that identifies the resource
|
150
|
+
def sid
|
151
|
+
@properties['sid']
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String] The SID of the participant's room
|
156
|
+
def room_sid
|
157
|
+
@properties['room_sid']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [String] The SID of the Account that created the resource
|
162
|
+
def account_sid
|
163
|
+
@properties['account_sid']
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [anonymize.Status] The status of the Participant
|
168
|
+
def status
|
169
|
+
@properties['status']
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [String] The SID of the participant
|
174
|
+
def identity
|
175
|
+
@properties['identity']
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
180
|
+
def date_created
|
181
|
+
@properties['date_created']
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
186
|
+
def date_updated
|
187
|
+
@properties['date_updated']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [Time] The time of participant connected to the room in ISO 8601 format
|
192
|
+
def start_time
|
193
|
+
@properties['start_time']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [Time] The time when the participant disconnected from the room in ISO 8601 format
|
198
|
+
def end_time
|
199
|
+
@properties['end_time']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [String] Duration of time in seconds the participant was connected
|
204
|
+
def duration
|
205
|
+
@properties['duration']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [String] The absolute URL of the resource
|
210
|
+
def url
|
211
|
+
@properties['url']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# Update the AnonymizeInstance
|
216
|
+
# @return [AnonymizeInstance] Updated AnonymizeInstance
|
217
|
+
def update
|
218
|
+
context.update
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# Provide a user friendly representation
|
223
|
+
def to_s
|
224
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
225
|
+
"<Twilio.Video.V1.AnonymizeInstance #{values}>"
|
226
|
+
end
|
227
|
+
|
228
|
+
##
|
229
|
+
# Provide a detailed, user friendly representation
|
230
|
+
def inspect
|
231
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
232
|
+
"<Twilio.Video.V1.AnonymizeInstance #{values}>"
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -207,6 +207,7 @@ module Twilio
|
|
207
207
|
@published_tracks = nil
|
208
208
|
@subscribed_tracks = nil
|
209
209
|
@subscribe_rules = nil
|
210
|
+
@anonymize = nil
|
210
211
|
end
|
211
212
|
|
212
213
|
##
|
@@ -293,6 +294,14 @@ module Twilio
|
|
293
294
|
@subscribe_rules
|
294
295
|
end
|
295
296
|
|
297
|
+
##
|
298
|
+
# Access the anonymize
|
299
|
+
# @return [AnonymizeList]
|
300
|
+
# @return [AnonymizeContext]
|
301
|
+
def anonymize
|
302
|
+
AnonymizeContext.new(@version, @solution[:room_sid], @solution[:sid], )
|
303
|
+
end
|
304
|
+
|
296
305
|
##
|
297
306
|
# Provide a user friendly representation
|
298
307
|
def to_s
|
@@ -462,6 +471,13 @@ module Twilio
|
|
462
471
|
context.subscribe_rules
|
463
472
|
end
|
464
473
|
|
474
|
+
##
|
475
|
+
# Access the anonymize
|
476
|
+
# @return [anonymize] anonymize
|
477
|
+
def anonymize
|
478
|
+
context.anonymize
|
479
|
+
end
|
480
|
+
|
465
481
|
##
|
466
482
|
# Provide a user friendly representation
|
467
483
|
def to_s
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.72.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -491,6 +491,7 @@ files:
|
|
491
491
|
- lib/twilio-ruby/rest/messaging/v1/service/short_code.rb
|
492
492
|
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
|
493
493
|
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb
|
494
|
+
- lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb
|
494
495
|
- lib/twilio-ruby/rest/messaging/v1/usecase.rb
|
495
496
|
- lib/twilio-ruby/rest/microvisor.rb
|
496
497
|
- lib/twilio-ruby/rest/microvisor/v1.rb
|
@@ -713,6 +714,7 @@ files:
|
|
713
714
|
- lib/twilio-ruby/rest/verify.rb
|
714
715
|
- lib/twilio-ruby/rest/verify/v2.rb
|
715
716
|
- lib/twilio-ruby/rest/verify/v2/form.rb
|
717
|
+
- lib/twilio-ruby/rest/verify/v2/safelist.rb
|
716
718
|
- lib/twilio-ruby/rest/verify/v2/service.rb
|
717
719
|
- lib/twilio-ruby/rest/verify/v2/service/access_token.rb
|
718
720
|
- lib/twilio-ruby/rest/verify/v2/service/entity.rb
|
@@ -739,6 +741,7 @@ files:
|
|
739
741
|
- lib/twilio-ruby/rest/video/v1/room.rb
|
740
742
|
- lib/twilio-ruby/rest/video/v1/room/recording.rb
|
741
743
|
- lib/twilio-ruby/rest/video/v1/room/room_participant.rb
|
744
|
+
- lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb
|
742
745
|
- lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
|
743
746
|
- lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb
|
744
747
|
- lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb
|