Skip to content

Commit 29a4b0b

Browse files
committed
[Librarian] Regenerated @ fdad267944635962308083659322c23f28226702
1 parent 3ccb4dc commit 29a4b0b

File tree

20 files changed

+1182
-102
lines changed

20 files changed

+1182
-102
lines changed

CHANGES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
twilio-ruby changelog
22
=====================
33

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+
422
[2021-08-25] Version 5.58.1
523
---------------------------
624
**Api**

lib/twilio-ruby/rest/insights/v1/call_summaries.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def initialize(version)
3838
# @param [Boolean] has_tag The has_tag
3939
# @param [String] start_time The start_time
4040
# @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
4444
# @param [call_summaries.ProcessingStateRequest] processing_state The
4545
# processing_state
4646
# @param [call_summaries.SortBy] sort_by The sort_by
@@ -93,9 +93,9 @@ def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, fro
9393
# @param [Boolean] has_tag The has_tag
9494
# @param [String] start_time The start_time
9595
# @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
9999
# @param [call_summaries.ProcessingStateRequest] processing_state The
100100
# processing_state
101101
# @param [call_summaries.SortBy] sort_by The sort_by
@@ -164,9 +164,9 @@ def each
164164
# @param [Boolean] has_tag The has_tag
165165
# @param [String] start_time The start_time
166166
# @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
170170
# @param [call_summaries.ProcessingStateRequest] processing_state The
171171
# processing_state
172172
# @param [call_summaries.SortBy] sort_by The sort_by
@@ -191,7 +191,7 @@ def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, fro
191191
'EndTime' => end_time,
192192
'CallType' => Twilio.serialize_list(call_type) { |e| e },
193193
'CallState' => Twilio.serialize_list(call_state) { |e| e },
194-
'Direction' => direction,
194+
'Direction' => Twilio.serialize_list(direction) { |e| e },
195195
'ProcessingState' => processing_state,
196196
'SortBy' => sort_by,
197197
'Subaccount' => subaccount,

lib/twilio-ruby/rest/messaging/v1/brand_registration.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,16 @@ def get_page(target_url)
112112
# @param [String] brand_type Type of brand being created. One of: "STANDARD",
113113
# "STARTER". STARTER is for low volume, starter use cases. STANDARD is for all
114114
# 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.
115118
# @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)
117120
data = Twilio::Values.of({
118121
'CustomerProfileBundleSid' => customer_profile_bundle_sid,
119122
'A2PProfileBundleSid' => a2p_profile_bundle_sid,
120123
'BrandType' => brand_type,
124+
'Mock' => mock,
121125
})
122126

123127
payload = @version.create('POST', @uri, data: data)
@@ -229,6 +233,7 @@ def initialize(version, payload, sid: nil)
229233
'failure_reason' => payload['failure_reason'],
230234
'url' => payload['url'],
231235
'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
236+
'mock' => payload['mock'],
232237
}
233238

234239
# Context
@@ -319,6 +324,12 @@ def brand_score
319324
@properties['brand_score']
320325
end
321326

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+
322333
##
323334
# Fetch the BrandRegistrationInstance
324335
# @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance

lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def initialize(version, messaging_service_sid: nil)
3333
# Create the UsAppToPersonInstance
3434
# @param [String] brand_registration_sid A2P Brand Registration SID
3535
# @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.
3838
# @param [String] us_app_to_person_usecase A2P Campaign Use Case. Examples: [ 2FA,
3939
# EMERGENCY, MARKETING..]
4040
# @param [Boolean] has_embedded_links Indicates that this SMS campaign will send
@@ -273,6 +273,7 @@ def initialize(version, payload, messaging_service_sid: nil, sid: nil)
273273
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
274274
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
275275
'url' => payload['url'],
276+
'mock' => payload['mock'],
276277
}
277278

278279
# Context
@@ -391,6 +392,12 @@ def url
391392
@properties['url']
392393
end
393394

395+
##
396+
# @return [Boolean] A boolean that specifies whether campaign is a mock or not.
397+
def mock
398+
@properties['mock']
399+
end
400+
394401
##
395402
# Delete the UsAppToPersonInstance
396403
# @return [Boolean] true if delete succeeds, false otherwise

lib/twilio-ruby/rest/taskrouter/v1/workspace.rb

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,14 @@ def get_page(target_url)
124124
# worker.activity.update`, then TaskRouter will call event_callback_url only when
125125
# a task is created, canceled, or a Worker activity is updated.
126126
# @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].
133135
# @param [String] template An available template name. Can be: `NONE` or `FIFO`
134136
# and the default is `NONE`. Pre-configures the Workspace with the Workflow and
135137
# Activities specified in the template. `NONE` will create a Workspace with only a
@@ -243,17 +245,21 @@ def fetch
243245
# the Workspace resource. For example: `Sales Call Center` or `Customer Support
244246
# Team`.
245247
# @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].
252258
# @param [String] timeout_activity_sid The SID of the Activity that will be
253259
# assigned to a Worker when a Task reservation times out without a response.
254260
# @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
255261
# 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
257263
# Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
258264
# @return [WorkspaceInstance] Updated WorkspaceInstance
259265
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 @@ def fetch
602608
# the Workspace resource. For example: `Sales Call Center` or `Customer Support
603609
# Team`.
604610
# @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].
611621
# @param [String] timeout_activity_sid The SID of the Activity that will be
612622
# assigned to a Worker when a Task reservation times out without a response.
613623
# @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
614624
# 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
616626
# Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
617627
# @return [WorkspaceInstance] Updated WorkspaceInstance
618628
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)

lib/twilio-ruby/rest/verify.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ def verification_attempts(sid=:unset)
5555
self.v2.verification_attempts(sid)
5656
end
5757

58+
##
59+
# @return [Twilio::REST::Verify::V2::VerificationTemplateInstance]
60+
def verification_templates
61+
self.v2.verification_templates()
62+
end
63+
5864
##
5965
# Provide a user friendly representation
6066
def to_s

lib/twilio-ruby/rest/verify/v2.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def initialize(domain)
1818
@forms = nil
1919
@services = nil
2020
@verification_attempts = nil
21+
@verification_templates = nil
2122
end
2223

2324
##
@@ -67,6 +68,12 @@ def verification_attempts(sid=:unset)
6768
end
6869
end
6970

71+
##
72+
# @return [Twilio::REST::Verify::V2::VerificationTemplateContext]
73+
def verification_templates
74+
@verification_templates ||= VerificationTemplateList.new self
75+
end
76+
7077
##
7178
# Provide a user friendly representation
7279
def to_s

lib/twilio-ruby/rest/verify/v2/service/entity.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def initialize(version, service_sid: nil)
3232
# @param [String] identity The unique external identifier for the Entity of the
3333
# Service. This identifier should be immutable, not PII, length between 8 and 64
3434
# 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.
3636
# @return [EntityInstance] Created EntityInstance
3737
def create(identity: nil)
3838
data = Twilio::Values.of({'Identity' => identity, })
@@ -168,7 +168,9 @@ class EntityContext < InstanceContext
168168
# @param [Version] version Version that contains the resource
169169
# @param [String] service_sid The unique SID identifier of the Service.
170170
# @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.
172174
# @return [EntityContext] EntityContext
173175
def initialize(version, service_sid, identity)
174176
super(version)
@@ -288,7 +290,9 @@ class EntityInstance < InstanceResource
288290
# @param [Hash] payload payload that contains response from Twilio
289291
# @param [String] service_sid The unique SID identifier of the Service.
290292
# @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.
292296
# @return [EntityInstance] EntityInstance
293297
def initialize(version, payload, service_sid: nil, identity: nil)
294298
super(version)

lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ class ChallengeList < ListResource
2020
# @param [Version] version Version that contains the resource
2121
# @param [String] service_sid The unique SID identifier of the Service.
2222
# @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.
2426
# @return [ChallengeList] ChallengeList
2527
def initialize(version, service_sid: nil, identity: nil)
2628
super(version)
@@ -236,10 +238,10 @@ class ChallengeContext < InstanceContext
236238
# Initialize the ChallengeContext
237239
# @param [Version] version Version that contains the resource
238240
# @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.
243245
# @param [String] sid A 34 character string that uniquely identifies this
244246
# Challenge.
245247
# @return [ChallengeContext] ChallengeContext
@@ -331,7 +333,9 @@ class ChallengeInstance < InstanceResource
331333
# @param [Hash] payload payload that contains response from Twilio
332334
# @param [String] service_sid The unique SID identifier of the Service.
333335
# @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.
335339
# @param [String] sid A 34 character string that uniquely identifies this
336340
# Challenge.
337341
# @return [ChallengeInstance] ChallengeInstance

0 commit comments

Comments
 (0)