twilio-ruby 5.58.1 → 5.58.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22891108a10e24af4975960e154bc78ba330d7094eef18a7850db14d1b19f55c
4
- data.tar.gz: 84157f208866fec1713f624928ac607f29d69e69efb60fbe7778bddce4b0e768
3
+ metadata.gz: b68be613ab026b175153631f08f947c1ee6562598403db4342b6491f0bcf0129
4
+ data.tar.gz: 64c3f0611af7b5f1081bd8f3223ddc6e2b8943ec9c9a4dcec29b9c90f8e44733
5
5
  SHA512:
6
- metadata.gz: c93a2f24c7a14a6f594fca8c3425510763a5ddf3d47edcda7bf24dc7d2a3bd8b39c8e8d5ca07fae9ef92194d44d36f93060f56022c83ecca6dbd91ef2d7688e8
7
- data.tar.gz: d3547e481e40e1802f78377797f44ff38401b0e4026c049590dfc9e94a611af79def1bdd5c1b130197e1057a78bccee386dc211f00af3f73bb7ce058bb7cfdfc
6
+ metadata.gz: 4a81512308a0ad242a0ce4b5d2f5757a6992d77ac2bca32c1d55ac5d77f6b333e0dd570335bf1103d899c02f323892d18222ba985f81716e7b064d30adedd36c
7
+ data.tar.gz: cdf6e05cb8d5aa9556e1adb3390e80f2a31e464fd3ad55895c47ae44d7b8b22ae917ca8fa83345ab5c7597cac09d6ba40b058eb7150b113e274d66d7b137eebb
data/CHANGES.md CHANGED
@@ -1,6 +1,24 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2021-09-08] Version 5.58.2
5
+ ---------------------------
6
+ **Library - Fix**
7
+ - [PR #568](https://github.com/twilio/twilio-ruby/pull/568): deprecation warning on Faraday. Thanks to [@ngouy](https://github.com/ngouy)!
8
+
9
+ **Api**
10
+ - Revert adding `siprec` resource
11
+ - Add `siprec` resource
12
+
13
+ **Messaging**
14
+ - Add 'mock' as an optional field to brand_registration api
15
+ - Add 'mock' as an optional field to us_app_to_person api
16
+ - Adds more Use Cases in us_app_to_person_usecase api transaction and updates us_app_to_person_usecase docs
17
+
18
+ **Verify**
19
+ - Verify List Templates API endpoint added.
20
+
21
+
4
22
  [2021-08-25] Version 5.58.1
5
23
  ---------------------------
6
24
  **Api**
data/README.md CHANGED
@@ -35,13 +35,13 @@ This library supports the following Ruby implementations:
35
35
  To install using [Bundler][bundler] grab the latest stable version:
36
36
 
37
37
  ```ruby
38
- gem 'twilio-ruby', '~> 5.58.1'
38
+ gem 'twilio-ruby', '~> 5.58.2'
39
39
  ```
40
40
 
41
41
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
42
42
 
43
43
  ```bash
44
- gem install twilio-ruby -v 5.58.1
44
+ gem install twilio-ruby -v 5.58.2
45
45
  ```
46
46
 
47
47
  To build and install the development branch yourself from the latest source:
@@ -31,7 +31,7 @@ module Twilio
31
31
  f.options.params_encoder = Faraday::FlatParamsEncoder
32
32
  f.request :url_encoded
33
33
  f.headers = request.headers
34
- f.basic_auth(request.auth[0], request.auth[1])
34
+ f.request(:basic_auth, request.auth[0], request.auth[1])
35
35
  f.proxy = "#{@proxy_prot}://#{@proxy_auth}#{@proxy_path}" if @proxy_prot && @proxy_path
36
36
  f.options.open_timeout = request.timeout || @timeout
37
37
  f.options.timeout = request.timeout || @timeout
@@ -38,9 +38,9 @@ module Twilio
38
38
  # @param [Boolean] has_tag The has_tag
39
39
  # @param [String] start_time The start_time
40
40
  # @param [String] end_time The end_time
41
- # @param [Array[String]] call_type The call_type
42
- # @param [Array[String]] call_state The call_state
43
- # @param [call_summaries.CallDirection] direction The direction
41
+ # @param [Array[call_summaries.CallType]] call_type The call_type
42
+ # @param [Array[call_summaries.CallState]] call_state The call_state
43
+ # @param [Array[call_summaries.CallDirection]] direction The direction
44
44
  # @param [call_summaries.ProcessingStateRequest] processing_state The
45
45
  # processing_state
46
46
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -93,9 +93,9 @@ module Twilio
93
93
  # @param [Boolean] has_tag The has_tag
94
94
  # @param [String] start_time The start_time
95
95
  # @param [String] end_time The end_time
96
- # @param [Array[String]] call_type The call_type
97
- # @param [Array[String]] call_state The call_state
98
- # @param [call_summaries.CallDirection] direction The direction
96
+ # @param [Array[call_summaries.CallType]] call_type The call_type
97
+ # @param [Array[call_summaries.CallState]] call_state The call_state
98
+ # @param [Array[call_summaries.CallDirection]] direction The direction
99
99
  # @param [call_summaries.ProcessingStateRequest] processing_state The
100
100
  # processing_state
101
101
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -164,9 +164,9 @@ module Twilio
164
164
  # @param [Boolean] has_tag The has_tag
165
165
  # @param [String] start_time The start_time
166
166
  # @param [String] end_time The end_time
167
- # @param [Array[String]] call_type The call_type
168
- # @param [Array[String]] call_state The call_state
169
- # @param [call_summaries.CallDirection] direction The direction
167
+ # @param [Array[call_summaries.CallType]] call_type The call_type
168
+ # @param [Array[call_summaries.CallState]] call_state The call_state
169
+ # @param [Array[call_summaries.CallDirection]] direction The direction
170
170
  # @param [call_summaries.ProcessingStateRequest] processing_state The
171
171
  # processing_state
172
172
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -191,7 +191,7 @@ module Twilio
191
191
  'EndTime' => end_time,
192
192
  'CallType' => Twilio.serialize_list(call_type) { |e| e },
193
193
  'CallState' => Twilio.serialize_list(call_state) { |e| e },
194
- 'Direction' => direction,
194
+ 'Direction' => Twilio.serialize_list(direction) { |e| e },
195
195
  'ProcessingState' => processing_state,
196
196
  'SortBy' => sort_by,
197
197
  'Subaccount' => subaccount,
@@ -112,12 +112,16 @@ module Twilio
112
112
  # @param [String] brand_type Type of brand being created. One of: "STANDARD",
113
113
  # "STARTER". STARTER is for low volume, starter use cases. STANDARD is for all
114
114
  # other use cases.
115
+ # @param [Boolean] mock A boolean that specifies whether brand should be a mock or
116
+ # not. If true, brand will be registered as a mock brand. Defaults to false if no
117
+ # value is provided.
115
118
  # @return [BrandRegistrationInstance] Created BrandRegistrationInstance
116
- def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset)
119
+ def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset, mock: :unset)
117
120
  data = Twilio::Values.of({
118
121
  'CustomerProfileBundleSid' => customer_profile_bundle_sid,
119
122
  'A2PProfileBundleSid' => a2p_profile_bundle_sid,
120
123
  'BrandType' => brand_type,
124
+ 'Mock' => mock,
121
125
  })
122
126
 
123
127
  payload = @version.create('POST', @uri, data: data)
@@ -229,6 +233,7 @@ module Twilio
229
233
  'failure_reason' => payload['failure_reason'],
230
234
  'url' => payload['url'],
231
235
  'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
236
+ 'mock' => payload['mock'],
232
237
  }
233
238
 
234
239
  # Context
@@ -319,6 +324,12 @@ module Twilio
319
324
  @properties['brand_score']
320
325
  end
321
326
 
327
+ ##
328
+ # @return [Boolean] A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
329
+ def mock
330
+ @properties['mock']
331
+ end
332
+
322
333
  ##
323
334
  # Fetch the BrandRegistrationInstance
324
335
  # @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
@@ -33,8 +33,8 @@ module Twilio
33
33
  # Create the UsAppToPersonInstance
34
34
  # @param [String] brand_registration_sid A2P Brand Registration SID
35
35
  # @param [String] description A short description of what this SMS campaign does.
36
- # @param [Array[String]] message_samples Message samples, up to 5 sample messages,
37
- # <=1024 chars each.
36
+ # @param [Array[String]] message_samples Message samples, at least 2 and up to 5
37
+ # sample messages, <=1024 chars each.
38
38
  # @param [String] us_app_to_person_usecase A2P Campaign Use Case. Examples: [ 2FA,
39
39
  # EMERGENCY, MARKETING..]
40
40
  # @param [Boolean] has_embedded_links Indicates that this SMS campaign will send
@@ -273,6 +273,7 @@ module Twilio
273
273
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
274
274
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
275
275
  'url' => payload['url'],
276
+ 'mock' => payload['mock'],
276
277
  }
277
278
 
278
279
  # Context
@@ -391,6 +392,12 @@ module Twilio
391
392
  @properties['url']
392
393
  end
393
394
 
395
+ ##
396
+ # @return [Boolean] A boolean that specifies whether campaign is a mock or not.
397
+ def mock
398
+ @properties['mock']
399
+ end
400
+
394
401
  ##
395
402
  # Delete the UsAppToPersonInstance
396
403
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -124,12 +124,14 @@ module Twilio
124
124
  # worker.activity.update`, then TaskRouter will call event_callback_url only when
125
125
  # a task is created, canceled, or a Worker activity is updated.
126
126
  # @param [Boolean] multi_task_enabled Whether to enable multi-tasking. Can be:
127
- # `true` to enable multi-tasking, or `false` to disable it. The default is
128
- # `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously.
129
- # When enabled (`true`), each Worker can receive parallel reservations up to the
130
- # per-channel maximums defined in the Workers section. Otherwise, each Worker will
131
- # only receive a new reservation when the previous task is completed. Learn more
132
- # at {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
127
+ # `true` to enable multi-tasking, or `false` to disable it. However, all
128
+ # workspaces should be created as multi-tasking. The default is `true`.
129
+ # Multi-tasking allows Workers to handle multiple Tasks simultaneously. When
130
+ # enabled (`true`), each Worker can receive parallel reservations up to the
131
+ # per-channel maximums defined in the Workers section. In single-tasking mode
132
+ # (legacy mode), each Worker will only receive a new reservation when the previous
133
+ # task is completed. Learn more at
134
+ # {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
133
135
  # @param [String] template An available template name. Can be: `NONE` or `FIFO`
134
136
  # and the default is `NONE`. Pre-configures the Workspace with the Workflow and
135
137
  # Activities specified in the template. `NONE` will create a Workspace with only a
@@ -243,17 +245,21 @@ module Twilio
243
245
  # the Workspace resource. For example: `Sales Call Center` or `Customer Support
244
246
  # Team`.
245
247
  # @param [Boolean] multi_task_enabled Whether to enable multi-tasking. Can be:
246
- # `true` to enable multi-tasking, or `false` to disable it. The default is
247
- # `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously.
248
- # When enabled (`true`), each Worker can receive parallel reservations up to the
249
- # per-channel maximums defined in the Workers section. Otherwise, each Worker will
250
- # only receive a new reservation when the previous task is completed. Learn more
251
- # at {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
248
+ # `true` to enable multi-tasking, or `false` to disable it. However, all
249
+ # workspaces should be maintained as multi-tasking. There is no default when
250
+ # omitting this parameter. A multi-tasking Workspace can't be updated to
251
+ # single-tasking unless it is not a Flex Project and another (legacy)
252
+ # single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple
253
+ # Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel
254
+ # reservations up to the per-channel maximums defined in the Workers section. In
255
+ # single-tasking mode (legacy mode), each Worker will only receive a new
256
+ # reservation when the previous task is completed. Learn more at
257
+ # {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
252
258
  # @param [String] timeout_activity_sid The SID of the Activity that will be
253
259
  # assigned to a Worker when a Task reservation times out without a response.
254
260
  # @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
255
261
  # prioritize when Workers are receiving Tasks from both types of TaskQueues. Can
256
- # be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see {Queue
262
+ # be: `LIFO` or `FIFO`. For more information, see {Queue
257
263
  # Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
258
264
  # @return [WorkspaceInstance] Updated WorkspaceInstance
259
265
  def update(default_activity_sid: :unset, event_callback_url: :unset, events_filter: :unset, friendly_name: :unset, multi_task_enabled: :unset, timeout_activity_sid: :unset, prioritize_queue_order: :unset)
@@ -602,17 +608,21 @@ module Twilio
602
608
  # the Workspace resource. For example: `Sales Call Center` or `Customer Support
603
609
  # Team`.
604
610
  # @param [Boolean] multi_task_enabled Whether to enable multi-tasking. Can be:
605
- # `true` to enable multi-tasking, or `false` to disable it. The default is
606
- # `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously.
607
- # When enabled (`true`), each Worker can receive parallel reservations up to the
608
- # per-channel maximums defined in the Workers section. Otherwise, each Worker will
609
- # only receive a new reservation when the previous task is completed. Learn more
610
- # at {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
611
+ # `true` to enable multi-tasking, or `false` to disable it. However, all
612
+ # workspaces should be maintained as multi-tasking. There is no default when
613
+ # omitting this parameter. A multi-tasking Workspace can't be updated to
614
+ # single-tasking unless it is not a Flex Project and another (legacy)
615
+ # single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple
616
+ # Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel
617
+ # reservations up to the per-channel maximums defined in the Workers section. In
618
+ # single-tasking mode (legacy mode), each Worker will only receive a new
619
+ # reservation when the previous task is completed. Learn more at
620
+ # {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
611
621
  # @param [String] timeout_activity_sid The SID of the Activity that will be
612
622
  # assigned to a Worker when a Task reservation times out without a response.
613
623
  # @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
614
624
  # prioritize when Workers are receiving Tasks from both types of TaskQueues. Can
615
- # be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see {Queue
625
+ # be: `LIFO` or `FIFO`. For more information, see {Queue
616
626
  # Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
617
627
  # @return [WorkspaceInstance] Updated WorkspaceInstance
618
628
  def update(default_activity_sid: :unset, event_callback_url: :unset, events_filter: :unset, friendly_name: :unset, multi_task_enabled: :unset, timeout_activity_sid: :unset, prioritize_queue_order: :unset)
@@ -21,7 +21,9 @@ module Twilio
21
21
  # @param [Version] version Version that contains the resource
22
22
  # @param [String] service_sid The unique SID identifier of the Service.
23
23
  # @param [String] identity Customer unique identity for the Entity owner of the
24
- # Challenge. This value must be between 8 and 64 characters long.
24
+ # Challenge. This identifier should be immutable, not PII, length between 8 and 64
25
+ # characters, and generated by your external system, such as your user's UUID,
26
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
25
27
  # @param [String] challenge_sid The unique SID identifier of the Challenge.
26
28
  # @return [NotificationList] NotificationList
27
29
  def initialize(version, service_sid: nil, identity: nil, challenge_sid: nil)
@@ -106,7 +108,9 @@ module Twilio
106
108
  # @param [Hash] payload payload that contains response from Twilio
107
109
  # @param [String] service_sid The unique SID identifier of the Service.
108
110
  # @param [String] identity Customer unique identity for the Entity owner of the
109
- # Challenge. This value must be between 8 and 64 characters long.
111
+ # Challenge. This identifier should be immutable, not PII, length between 8 and 64
112
+ # characters, and generated by your external system, such as your user's UUID,
113
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
110
114
  # @param [String] challenge_sid The unique SID identifier of the Challenge.
111
115
  # @return [NotificationInstance] NotificationInstance
112
116
  def initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil)
@@ -20,7 +20,9 @@ module Twilio
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The unique SID identifier of the Service.
22
22
  # @param [String] identity Customer unique identity for the Entity owner of the
23
- # Challenge. This value must be between 8 and 64 characters long.
23
+ # Challenge. This identifier should be immutable, not PII, length between 8 and 64
24
+ # characters, and generated by your external system, such as your user's UUID,
25
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
24
26
  # @return [ChallengeList] ChallengeList
25
27
  def initialize(version, service_sid: nil, identity: nil)
26
28
  super(version)
@@ -236,10 +238,10 @@ module Twilio
236
238
  # Initialize the ChallengeContext
237
239
  # @param [Version] version Version that contains the resource
238
240
  # @param [String] service_sid The unique SID identifier of the Service.
239
- # @param [String] identity The unique external identifier for the Entity of the
240
- # Service. This identifier should be immutable, not PII, and generated by your
241
- # external system, such as your user's UUID, GUID, or SID. This value must be
242
- # between 8 and 64 characters long.
241
+ # @param [String] identity Customer unique identity for the Entity owner of the
242
+ # Challenges. This identifier should be immutable, not PII, length between 8 and
243
+ # 64 characters, and generated by your external system, such as your user's UUID,
244
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
243
245
  # @param [String] sid A 34 character string that uniquely identifies this
244
246
  # Challenge.
245
247
  # @return [ChallengeContext] ChallengeContext
@@ -331,7 +333,9 @@ module Twilio
331
333
  # @param [Hash] payload payload that contains response from Twilio
332
334
  # @param [String] service_sid The unique SID identifier of the Service.
333
335
  # @param [String] identity Customer unique identity for the Entity owner of the
334
- # Challenge. This value must be between 8 and 64 characters long.
336
+ # Challenge. This identifier should be immutable, not PII, length between 8 and 64
337
+ # characters, and generated by your external system, such as your user's UUID,
338
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
335
339
  # @param [String] sid A 34 character string that uniquely identifies this
336
340
  # Challenge.
337
341
  # @return [ChallengeInstance] ChallengeInstance
@@ -19,10 +19,10 @@ module Twilio
19
19
  # Initialize the FactorList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The unique SID identifier of the Service.
22
- # @param [String] identity The unique external identifier for the Entity of the
23
- # Service. This identifier should be immutable, not PII, and generated by your
24
- # external system, such as your user's UUID, GUID, or SID. This value must be
25
- # between 8 and 64 characters long.
22
+ # @param [String] identity Customer unique identity for the Entity owner of the
23
+ # Factor. This identifier should be immutable, not PII, length between 8 and 64
24
+ # characters, and generated by your external system, such as your user's UUID,
25
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
26
26
  # @return [FactorList] FactorList
27
27
  def initialize(version, service_sid: nil, identity: nil)
28
28
  super(version)
@@ -163,7 +163,9 @@ module Twilio
163
163
  # @param [Version] version Version that contains the resource
164
164
  # @param [String] service_sid The unique SID identifier of the Service.
165
165
  # @param [String] identity Customer unique identity for the Entity owner of the
166
- # Factor. This value must be between 8 and 64 characters long.
166
+ # Factor. This identifier should be immutable, not PII, length between 8 and 64
167
+ # characters, and generated by your external system, such as your user's UUID,
168
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
167
169
  # @param [String] sid A 34 character string that uniquely identifies this Factor.
168
170
  # @return [FactorContext] FactorContext
169
171
  def initialize(version, service_sid, identity, sid)
@@ -264,10 +266,10 @@ module Twilio
264
266
  # @param [Version] version Version that contains the resource
265
267
  # @param [Hash] payload payload that contains response from Twilio
266
268
  # @param [String] service_sid The unique SID identifier of the Service.
267
- # @param [String] identity The unique external identifier for the Entity of the
268
- # Service. This identifier should be immutable, not PII, and generated by your
269
- # external system, such as your user's UUID, GUID, or SID. This value must be
270
- # between 8 and 64 characters long.
269
+ # @param [String] identity Customer unique identity for the Entity owner of the
270
+ # Factor. This identifier should be immutable, not PII, length between 8 and 64
271
+ # characters, and generated by your external system, such as your user's UUID,
272
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
271
273
  # @param [String] sid A 34 character string that uniquely identifies this Factor.
272
274
  # @return [FactorInstance] FactorInstance
273
275
  def initialize(version, payload, service_sid: nil, identity: nil, sid: nil)
@@ -19,10 +19,10 @@ module Twilio
19
19
  # Initialize the NewFactorList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The unique SID identifier of the Service.
22
- # @param [String] identity The unique external identifier for the Entity of the
23
- # Service. This identifier should be immutable, not PII, and generated by your
24
- # external system, such as your user's UUID, GUID, or SID. This value must be
25
- # between 8 and 64 characters long.
22
+ # @param [String] identity Customer unique identity for the Entity owner of the
23
+ # Factor. This identifier should be immutable, not PII, length between 8 and 64
24
+ # characters, and generated by your external system, such as your user's UUID,
25
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
26
26
  # @return [NewFactorList] NewFactorList
27
27
  def initialize(version, service_sid: nil, identity: nil)
28
28
  super(version)
@@ -175,10 +175,10 @@ module Twilio
175
175
  # @param [Version] version Version that contains the resource
176
176
  # @param [Hash] payload payload that contains response from Twilio
177
177
  # @param [String] service_sid The unique SID identifier of the Service.
178
- # @param [String] identity The unique external identifier for the Entity of the
179
- # Service. This identifier should be immutable, not PII, and generated by your
180
- # external system, such as your user's UUID, GUID, or SID. This value must be
181
- # between 8 and 64 characters long.
178
+ # @param [String] identity Customer unique identity for the Entity owner of the
179
+ # Factor. This identifier should be immutable, not PII, length between 8 and 64
180
+ # characters, and generated by your external system, such as your user's UUID,
181
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
182
182
  # @return [NewFactorInstance] NewFactorInstance
183
183
  def initialize(version, payload, service_sid: nil, identity: nil)
184
184
  super(version)
@@ -32,7 +32,7 @@ module Twilio
32
32
  # @param [String] identity The unique external identifier for the Entity of the
33
33
  # Service. This identifier should be immutable, not PII, length between 8 and 64
34
34
  # characters, and generated by your external system, such as your user's UUID,
35
- # GUID, or SID.
35
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
36
36
  # @return [EntityInstance] Created EntityInstance
37
37
  def create(identity: nil)
38
38
  data = Twilio::Values.of({'Identity' => identity, })
@@ -168,7 +168,9 @@ module Twilio
168
168
  # @param [Version] version Version that contains the resource
169
169
  # @param [String] service_sid The unique SID identifier of the Service.
170
170
  # @param [String] identity The unique external identifier for the Entity of the
171
- # Service
171
+ # Service. This identifier should be immutable, not PII, length between 8 and 64
172
+ # characters, and generated by your external system, such as your user's UUID,
173
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
172
174
  # @return [EntityContext] EntityContext
173
175
  def initialize(version, service_sid, identity)
174
176
  super(version)
@@ -288,7 +290,9 @@ module Twilio
288
290
  # @param [Hash] payload payload that contains response from Twilio
289
291
  # @param [String] service_sid The unique SID identifier of the Service.
290
292
  # @param [String] identity The unique external identifier for the Entity of the
291
- # Service
293
+ # Service. This identifier should be immutable, not PII, length between 8 and 64
294
+ # characters, and generated by your external system, such as your user's UUID,
295
+ # GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
292
296
  # @return [EntityInstance] EntityInstance
293
297
  def initialize(version, payload, service_sid: nil, identity: nil)
294
298
  super(version)
@@ -0,0 +1,206 @@
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
+ class VerificationTemplateList < ListResource
14
+ ##
15
+ # Initialize the VerificationTemplateList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [VerificationTemplateList] VerificationTemplateList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ @uri = "/Templates"
24
+ end
25
+
26
+ ##
27
+ # Lists VerificationTemplateInstance records from the API as a list.
28
+ # Unlike stream(), this operation is eager and will load `limit` records into
29
+ # memory before returning.
30
+ # @param [String] friendly_name String filter used to query templates with a given
31
+ # friendly name
32
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
33
+ # guarantees to never return more than limit. Default is no limit
34
+ # @param [Integer] page_size Number of records to fetch per request, when
35
+ # not set will use the default value of 50 records. If no page_size is defined
36
+ # but a limit is defined, stream() will attempt to read the limit with the most
37
+ # efficient page size, i.e. min(limit, 1000)
38
+ # @return [Array] Array of up to limit results
39
+ def list(friendly_name: :unset, limit: nil, page_size: nil)
40
+ self.stream(friendly_name: friendly_name, limit: limit, page_size: page_size).entries
41
+ end
42
+
43
+ ##
44
+ # Streams VerificationTemplateInstance records from the API as an Enumerable.
45
+ # This operation lazily loads records as efficiently as possible until the limit
46
+ # is reached.
47
+ # @param [String] friendly_name String filter used to query templates with a given
48
+ # friendly name
49
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
50
+ # guarantees to never return more than limit. Default is no limit.
51
+ # @param [Integer] page_size Number of records to fetch per request, when
52
+ # not set will use the default value of 50 records. If no page_size is defined
53
+ # but a limit is defined, stream() will attempt to read the limit with the most
54
+ # efficient page size, i.e. min(limit, 1000)
55
+ # @return [Enumerable] Enumerable that will yield up to limit results
56
+ def stream(friendly_name: :unset, limit: nil, page_size: nil)
57
+ limits = @version.read_limits(limit, page_size)
58
+
59
+ page = self.page(friendly_name: friendly_name, page_size: limits[:page_size], )
60
+
61
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
62
+ end
63
+
64
+ ##
65
+ # When passed a block, yields VerificationTemplateInstance records from the API.
66
+ # This operation lazily loads records as efficiently as possible until the limit
67
+ # is reached.
68
+ def each
69
+ limits = @version.read_limits
70
+
71
+ page = self.page(page_size: limits[:page_size], )
72
+
73
+ @version.stream(page,
74
+ limit: limits[:limit],
75
+ page_limit: limits[:page_limit]).each {|x| yield x}
76
+ end
77
+
78
+ ##
79
+ # Retrieve a single page of VerificationTemplateInstance records from the API.
80
+ # Request is executed immediately.
81
+ # @param [String] friendly_name String filter used to query templates with a given
82
+ # friendly name
83
+ # @param [String] page_token PageToken provided by the API
84
+ # @param [Integer] page_number Page Number, this value is simply for client state
85
+ # @param [Integer] page_size Number of records to return, defaults to 50
86
+ # @return [Page] Page of VerificationTemplateInstance
87
+ def page(friendly_name: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
88
+ params = Twilio::Values.of({
89
+ 'FriendlyName' => friendly_name,
90
+ 'PageToken' => page_token,
91
+ 'Page' => page_number,
92
+ 'PageSize' => page_size,
93
+ })
94
+
95
+ response = @version.page('GET', @uri, params: params)
96
+
97
+ VerificationTemplatePage.new(@version, response, @solution)
98
+ end
99
+
100
+ ##
101
+ # Retrieve a single page of VerificationTemplateInstance records from the API.
102
+ # Request is executed immediately.
103
+ # @param [String] target_url API-generated URL for the requested results page
104
+ # @return [Page] Page of VerificationTemplateInstance
105
+ def get_page(target_url)
106
+ response = @version.domain.request(
107
+ 'GET',
108
+ target_url
109
+ )
110
+ VerificationTemplatePage.new(@version, response, @solution)
111
+ end
112
+
113
+ ##
114
+ # Provide a user friendly representation
115
+ def to_s
116
+ '#<Twilio.Verify.V2.VerificationTemplateList>'
117
+ end
118
+ end
119
+
120
+ class VerificationTemplatePage < Page
121
+ ##
122
+ # Initialize the VerificationTemplatePage
123
+ # @param [Version] version Version that contains the resource
124
+ # @param [Response] response Response from the API
125
+ # @param [Hash] solution Path solution for the resource
126
+ # @return [VerificationTemplatePage] VerificationTemplatePage
127
+ def initialize(version, response, solution)
128
+ super(version, response)
129
+
130
+ # Path Solution
131
+ @solution = solution
132
+ end
133
+
134
+ ##
135
+ # Build an instance of VerificationTemplateInstance
136
+ # @param [Hash] payload Payload response from the API
137
+ # @return [VerificationTemplateInstance] VerificationTemplateInstance
138
+ def get_instance(payload)
139
+ VerificationTemplateInstance.new(@version, payload, )
140
+ end
141
+
142
+ ##
143
+ # Provide a user friendly representation
144
+ def to_s
145
+ '<Twilio.Verify.V2.VerificationTemplatePage>'
146
+ end
147
+ end
148
+
149
+ class VerificationTemplateInstance < InstanceResource
150
+ ##
151
+ # Initialize the VerificationTemplateInstance
152
+ # @param [Version] version Version that contains the resource
153
+ # @param [Hash] payload payload that contains response from Twilio
154
+ # @return [VerificationTemplateInstance] VerificationTemplateInstance
155
+ def initialize(version, payload)
156
+ super(version)
157
+
158
+ # Marshaled Properties
159
+ @properties = {
160
+ 'sid' => payload['sid'],
161
+ 'account_sid' => payload['account_sid'],
162
+ 'friendly_name' => payload['friendly_name'],
163
+ 'translations' => payload['translations'],
164
+ }
165
+ end
166
+
167
+ ##
168
+ # @return [String] A string that uniquely identifies this Template
169
+ def sid
170
+ @properties['sid']
171
+ end
172
+
173
+ ##
174
+ # @return [String] Account Sid
175
+ def account_sid
176
+ @properties['account_sid']
177
+ end
178
+
179
+ ##
180
+ # @return [String] A string to describe the verification template
181
+ def friendly_name
182
+ @properties['friendly_name']
183
+ end
184
+
185
+ ##
186
+ # @return [Hash] Ojbect with the template translations.
187
+ def translations
188
+ @properties['translations']
189
+ end
190
+
191
+ ##
192
+ # Provide a user friendly representation
193
+ def to_s
194
+ "<Twilio.Verify.V2.VerificationTemplateInstance>"
195
+ end
196
+
197
+ ##
198
+ # Provide a detailed, user friendly representation
199
+ def inspect
200
+ "<Twilio.Verify.V2.VerificationTemplateInstance>"
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
206
+ end
@@ -18,6 +18,7 @@ module Twilio
18
18
  @forms = nil
19
19
  @services = nil
20
20
  @verification_attempts = nil
21
+ @verification_templates = nil
21
22
  end
22
23
 
23
24
  ##
@@ -67,6 +68,12 @@ module Twilio
67
68
  end
68
69
  end
69
70
 
71
+ ##
72
+ # @return [Twilio::REST::Verify::V2::VerificationTemplateContext]
73
+ def verification_templates
74
+ @verification_templates ||= VerificationTemplateList.new self
75
+ end
76
+
70
77
  ##
71
78
  # Provide a user friendly representation
72
79
  def to_s
@@ -55,6 +55,12 @@ module Twilio
55
55
  self.v2.verification_attempts(sid)
56
56
  end
57
57
 
58
+ ##
59
+ # @return [Twilio::REST::Verify::V2::VerificationTemplateInstance]
60
+ def verification_templates
61
+ self.v2.verification_templates()
62
+ end
63
+
58
64
  ##
59
65
  # Provide a user friendly representation
60
66
  def to_s
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.58.1'
2
+ VERSION = '5.58.2'
3
3
  end
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.58.1
4
+ version: 5.58.2
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: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2021-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -714,6 +714,7 @@ files:
714
714
  - lib/twilio-ruby/rest/verify/v2/service/verification_check.rb
715
715
  - lib/twilio-ruby/rest/verify/v2/service/webhook.rb
716
716
  - lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
717
+ - lib/twilio-ruby/rest/verify/v2/verification_template.rb
717
718
  - lib/twilio-ruby/rest/video.rb
718
719
  - lib/twilio-ruby/rest/video/v1.rb
719
720
  - lib/twilio-ruby/rest/video/v1/composition.rb