twilio-ruby 7.0.2 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +43 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v2/content.rb +259 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +252 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content_base.rb +6 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +8 -1
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +444 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +215 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +196 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +357 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +9 -8
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +18 -18
- data/lib/twilio-ruby/rest/intelligence/v2.rb +112 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +86 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +126 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +148 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +167 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +160 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +29 -32
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +33 -4
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +4 -1
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +7 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +14 -9
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -230
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -252
- data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +0 -164
- data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +0 -235
- data/lib/twilio-ruby/rest/preview_messaging/v1.rb +0 -46
- data/lib/twilio-ruby/rest/preview_messaging.rb +0 -12
- data/lib/twilio-ruby/rest/preview_messaging_base.rb +0 -38
@@ -0,0 +1,160 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Numbers
|
8
|
+
# This is the public Twilio REST API.
|
9
|
+
#
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
11
|
+
# https://openapi-generator.tech
|
12
|
+
# Do not edit the class manually.
|
13
|
+
#
|
14
|
+
|
15
|
+
|
16
|
+
module Twilio
|
17
|
+
module REST
|
18
|
+
class Numbers < NumbersBase
|
19
|
+
class V1 < Version
|
20
|
+
class PortingWebhookConfigurationFetchList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the PortingWebhookConfigurationFetchList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [PortingWebhookConfigurationFetchList] PortingWebhookConfigurationFetchList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Porting/Configuration/Webhook"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Fetch the PortingWebhookConfigurationFetchInstance
|
35
|
+
# @return [PortingWebhookConfigurationFetchInstance] Fetched PortingWebhookConfigurationFetchInstance
|
36
|
+
def fetch
|
37
|
+
|
38
|
+
|
39
|
+
payload = @version.fetch('GET', @uri)
|
40
|
+
PortingWebhookConfigurationFetchInstance.new(
|
41
|
+
@version,
|
42
|
+
payload,
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
# Provide a user friendly representation
|
50
|
+
def to_s
|
51
|
+
'#<Twilio.Numbers.V1.PortingWebhookConfigurationFetchList>'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class PortingWebhookConfigurationFetchPage < Page
|
56
|
+
##
|
57
|
+
# Initialize the PortingWebhookConfigurationFetchPage
|
58
|
+
# @param [Version] version Version that contains the resource
|
59
|
+
# @param [Response] response Response from the API
|
60
|
+
# @param [Hash] solution Path solution for the resource
|
61
|
+
# @return [PortingWebhookConfigurationFetchPage] PortingWebhookConfigurationFetchPage
|
62
|
+
def initialize(version, response, solution)
|
63
|
+
super(version, response)
|
64
|
+
|
65
|
+
# Path Solution
|
66
|
+
@solution = solution
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Build an instance of PortingWebhookConfigurationFetchInstance
|
71
|
+
# @param [Hash] payload Payload response from the API
|
72
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
73
|
+
def get_instance(payload)
|
74
|
+
PortingWebhookConfigurationFetchInstance.new(@version, payload)
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Provide a user friendly representation
|
79
|
+
def to_s
|
80
|
+
'<Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage>'
|
81
|
+
end
|
82
|
+
end
|
83
|
+
class PortingWebhookConfigurationFetchInstance < InstanceResource
|
84
|
+
##
|
85
|
+
# Initialize the PortingWebhookConfigurationFetchInstance
|
86
|
+
# @param [Version] version Version that contains the resource
|
87
|
+
# @param [Hash] payload payload that contains response from Twilio
|
88
|
+
# @param [String] account_sid The SID of the
|
89
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfigurationFetch
|
90
|
+
# resource.
|
91
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
92
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
93
|
+
def initialize(version, payload )
|
94
|
+
super(version)
|
95
|
+
|
96
|
+
# Marshaled Properties
|
97
|
+
@properties = {
|
98
|
+
'url' => payload['url'],
|
99
|
+
'port_in_target_url' => payload['port_in_target_url'],
|
100
|
+
'port_out_target_url' => payload['port_out_target_url'],
|
101
|
+
'notifications_of' => payload['notifications_of'],
|
102
|
+
'port_in_target_date_created' => Twilio.deserialize_iso8601_datetime(payload['port_in_target_date_created']),
|
103
|
+
'port_out_target_date_created' => Twilio.deserialize_iso8601_datetime(payload['port_out_target_date_created']),
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] The URL of the webhook configuration request
|
110
|
+
def url
|
111
|
+
@properties['url']
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# @return [String] Webhook URL to send a request when a port in request or port in phone number event happens
|
116
|
+
def port_in_target_url
|
117
|
+
@properties['port_in_target_url']
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [String] Webhook URL to send a request when a port out phone number event happens
|
122
|
+
def port_out_target_url
|
123
|
+
@properties['port_out_target_url']
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# @return [Array<String>] List of notification events to send a request to the webhook URL
|
128
|
+
def notifications_of
|
129
|
+
@properties['notifications_of']
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# @return [Time] Creation date for the port in webhook configuration
|
134
|
+
def port_in_target_date_created
|
135
|
+
@properties['port_in_target_date_created']
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# @return [Time] Creation date for the port out webhook configuration
|
140
|
+
def port_out_target_date_created
|
141
|
+
@properties['port_out_target_date_created']
|
142
|
+
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# Provide a user friendly representation
|
146
|
+
def to_s
|
147
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Provide a detailed, user friendly representation
|
152
|
+
def inspect
|
153
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
@@ -23,11 +23,12 @@ module Twilio
|
|
23
23
|
@version = 'v1'
|
24
24
|
@bulk_eligibilities = nil
|
25
25
|
@eligibilities = nil
|
26
|
-
@porting_bulk_portabilities = nil
|
27
26
|
@porting_port_ins = nil
|
28
|
-
@porting_port_ins_fetch = nil
|
29
27
|
@porting_port_in_phone_number = nil
|
30
28
|
@porting_portabilities = nil
|
29
|
+
@porting_webhook_configurations = nil
|
30
|
+
@porting_webhook_configurations_delete = nil
|
31
|
+
@porting_webhook_configuration_fetch = nil
|
31
32
|
end
|
32
33
|
|
33
34
|
##
|
@@ -50,20 +51,6 @@ module Twilio
|
|
50
51
|
@eligibilities ||= EligibilityList.new self
|
51
52
|
end
|
52
53
|
##
|
53
|
-
# @param [String] sid A 34 character string that uniquely identifies the Portability check.
|
54
|
-
# @return [Twilio::REST::Numbers::V1::PortingBulkPortabilityContext] if sid was passed.
|
55
|
-
# @return [Twilio::REST::Numbers::V1::PortingBulkPortabilityList]
|
56
|
-
def porting_bulk_portabilities(sid=:unset)
|
57
|
-
if sid.nil?
|
58
|
-
raise ArgumentError, 'sid cannot be nil'
|
59
|
-
end
|
60
|
-
if sid == :unset
|
61
|
-
@porting_bulk_portabilities ||= PortingBulkPortabilityList.new self
|
62
|
-
else
|
63
|
-
PortingBulkPortabilityContext.new(self, sid)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
##
|
67
54
|
# @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
|
68
55
|
# @return [Twilio::REST::Numbers::V1::PortingPortInContext] if portInRequestSid was passed.
|
69
56
|
# @return [Twilio::REST::Numbers::V1::PortingPortInList]
|
@@ -79,21 +66,7 @@ module Twilio
|
|
79
66
|
end
|
80
67
|
##
|
81
68
|
# @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
|
82
|
-
# @
|
83
|
-
# @return [Twilio::REST::Numbers::V1::PortingPortInFetchList]
|
84
|
-
def porting_port_ins_fetch(port_in_request_sid=:unset)
|
85
|
-
if port_in_request_sid.nil?
|
86
|
-
raise ArgumentError, 'port_in_request_sid cannot be nil'
|
87
|
-
end
|
88
|
-
if port_in_request_sid == :unset
|
89
|
-
@porting_port_ins_fetch ||= PortingPortInFetchList.new self
|
90
|
-
else
|
91
|
-
PortingPortInFetchContext.new(self, port_in_request_sid)
|
92
|
-
end
|
93
|
-
end
|
94
|
-
##
|
95
|
-
# @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
|
96
|
-
# @param [String] phone_number_sid The SID of the Port In request phone number. This is a unique identifier of the phone number.
|
69
|
+
# @param [String] phone_number_sid The SID of the Phone number. This is a unique identifier of the phone number.
|
97
70
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext] if portInRequestSid was passed.
|
98
71
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList]
|
99
72
|
def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
|
@@ -111,7 +84,7 @@ module Twilio
|
|
111
84
|
end
|
112
85
|
##
|
113
86
|
# @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
|
114
|
-
# @param [String] phone_number_sid The SID of the
|
87
|
+
# @param [String] phone_number_sid The SID of the Phone number. This is a unique identifier of the phone number.
|
115
88
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext] if phoneNumberSid was passed.
|
116
89
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList]
|
117
90
|
def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
|
@@ -142,6 +115,30 @@ module Twilio
|
|
142
115
|
end
|
143
116
|
end
|
144
117
|
##
|
118
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationList]
|
119
|
+
def porting_webhook_configurations
|
120
|
+
@porting_webhook_configurations ||= PortingWebhookConfigurationList.new self
|
121
|
+
end
|
122
|
+
##
|
123
|
+
# @param [String] webhook_type The of the webhook type of the configuration to be deleted
|
124
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteContext] if webhookType was passed.
|
125
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteList]
|
126
|
+
def porting_webhook_configurations_delete(webhook_type=:unset)
|
127
|
+
if webhook_type.nil?
|
128
|
+
raise ArgumentError, 'webhook_type cannot be nil'
|
129
|
+
end
|
130
|
+
if webhook_type == :unset
|
131
|
+
@porting_webhook_configurations_delete ||= PortingWebhookConfigurationDeleteList.new self
|
132
|
+
else
|
133
|
+
PortingWebhookConfigurationDeleteContext.new(self, webhook_type)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
##
|
137
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
|
138
|
+
def porting_webhook_configuration_fetch
|
139
|
+
@porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
|
140
|
+
end
|
141
|
+
##
|
145
142
|
# Provide a user friendly representation
|
146
143
|
def to_s
|
147
144
|
'<Twilio::REST::Numbers::V1>';
|
@@ -203,7 +203,7 @@ module Twilio
|
|
203
203
|
|
204
204
|
unless @sync_list_permissions
|
205
205
|
@sync_list_permissions = SyncListPermissionList.new(
|
206
|
-
@version,
|
206
|
+
@version, )
|
207
207
|
end
|
208
208
|
|
209
209
|
@sync_list_permissions
|
@@ -222,7 +222,7 @@ module Twilio
|
|
222
222
|
|
223
223
|
unless @sync_list_items
|
224
224
|
@sync_list_items = SyncListItemList.new(
|
225
|
-
@version,
|
225
|
+
@version, )
|
226
226
|
end
|
227
227
|
|
228
228
|
@sync_list_items
|
@@ -203,7 +203,7 @@ module Twilio
|
|
203
203
|
|
204
204
|
unless @sync_map_items
|
205
205
|
@sync_map_items = SyncMapItemList.new(
|
206
|
-
@version,
|
206
|
+
@version, )
|
207
207
|
end
|
208
208
|
|
209
209
|
@sync_map_items
|
@@ -222,7 +222,7 @@ module Twilio
|
|
222
222
|
|
223
223
|
unless @sync_map_permissions
|
224
224
|
@sync_map_permissions = SyncMapPermissionList.new(
|
225
|
-
@version,
|
225
|
+
@version, )
|
226
226
|
end
|
227
227
|
|
228
228
|
@sync_map_permissions
|
@@ -238,7 +238,7 @@ module Twilio
|
|
238
238
|
|
239
239
|
unless @sync_maps
|
240
240
|
@sync_maps = SyncMapList.new(
|
241
|
-
@version,
|
241
|
+
@version, )
|
242
242
|
end
|
243
243
|
|
244
244
|
@sync_maps
|
@@ -276,7 +276,7 @@ module Twilio
|
|
276
276
|
|
277
277
|
unless @sync_lists
|
278
278
|
@sync_lists = SyncListList.new(
|
279
|
-
@version,
|
279
|
+
@version, )
|
280
280
|
end
|
281
281
|
|
282
282
|
@sync_lists
|
@@ -234,7 +234,7 @@ module Twilio
|
|
234
234
|
|
235
235
|
unless @sync_list_permissions
|
236
236
|
@sync_list_permissions = SyncListPermissionList.new(
|
237
|
-
@version,
|
237
|
+
@version, )
|
238
238
|
end
|
239
239
|
|
240
240
|
@sync_list_permissions
|
@@ -253,7 +253,7 @@ module Twilio
|
|
253
253
|
|
254
254
|
unless @sync_list_items
|
255
255
|
@sync_list_items = SyncListItemList.new(
|
256
|
-
@version,
|
256
|
+
@version, )
|
257
257
|
end
|
258
258
|
|
259
259
|
@sync_list_items
|
@@ -234,7 +234,7 @@ module Twilio
|
|
234
234
|
|
235
235
|
unless @sync_map_items
|
236
236
|
@sync_map_items = SyncMapItemList.new(
|
237
|
-
@version,
|
237
|
+
@version, )
|
238
238
|
end
|
239
239
|
|
240
240
|
@sync_map_items
|
@@ -253,7 +253,7 @@ module Twilio
|
|
253
253
|
|
254
254
|
unless @sync_map_permissions
|
255
255
|
@sync_map_permissions = SyncMapPermissionList.new(
|
256
|
-
@version,
|
256
|
+
@version, )
|
257
257
|
end
|
258
258
|
|
259
259
|
@sync_map_permissions
|
@@ -257,7 +257,7 @@ module Twilio
|
|
257
257
|
|
258
258
|
unless @sync_streams
|
259
259
|
@sync_streams = SyncStreamList.new(
|
260
|
-
@version,
|
260
|
+
@version, )
|
261
261
|
end
|
262
262
|
|
263
263
|
@sync_streams
|
@@ -276,7 +276,7 @@ module Twilio
|
|
276
276
|
|
277
277
|
unless @sync_lists
|
278
278
|
@sync_lists = SyncListList.new(
|
279
|
-
@version,
|
279
|
+
@version, )
|
280
280
|
end
|
281
281
|
|
282
282
|
@sync_lists
|
@@ -295,7 +295,7 @@ module Twilio
|
|
295
295
|
|
296
296
|
unless @sync_maps
|
297
297
|
@sync_maps = SyncMapList.new(
|
298
|
-
@version,
|
298
|
+
@version, )
|
299
299
|
end
|
300
300
|
|
301
301
|
@sync_maps
|
@@ -40,6 +40,9 @@ module Twilio
|
|
40
40
|
# @param [String] workflow_sid The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
|
41
41
|
# @param [String] attributes A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
|
42
42
|
# @param [Time] virtual_start_time The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future.
|
43
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
44
|
+
# @param [String] ignore_capacity A boolean indicating if a new task should respect a worker's capacity during assignment
|
45
|
+
# @param [String] task_queue_sid The SID of the TaskQueue in which the Task belongs
|
43
46
|
# @return [TaskInstance] Created TaskInstance
|
44
47
|
def create(
|
45
48
|
timeout: :unset,
|
@@ -47,7 +50,10 @@ module Twilio
|
|
47
50
|
task_channel: :unset,
|
48
51
|
workflow_sid: :unset,
|
49
52
|
attributes: :unset,
|
50
|
-
virtual_start_time: :unset
|
53
|
+
virtual_start_time: :unset,
|
54
|
+
routing_target: :unset,
|
55
|
+
ignore_capacity: :unset,
|
56
|
+
task_queue_sid: :unset
|
51
57
|
)
|
52
58
|
|
53
59
|
data = Twilio::Values.of({
|
@@ -57,6 +63,9 @@ module Twilio
|
|
57
63
|
'WorkflowSid' => workflow_sid,
|
58
64
|
'Attributes' => attributes,
|
59
65
|
'VirtualStartTime' => Twilio.serialize_iso8601_datetime(virtual_start_time),
|
66
|
+
'RoutingTarget' => routing_target,
|
67
|
+
'IgnoreCapacity' => ignore_capacity,
|
68
|
+
'TaskQueueSid' => task_queue_sid,
|
60
69
|
})
|
61
70
|
|
62
71
|
|
@@ -80,6 +89,7 @@ module Twilio
|
|
80
89
|
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
|
81
90
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
|
82
91
|
# @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
|
92
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
83
93
|
# @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
|
84
94
|
# @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
|
85
95
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -89,7 +99,7 @@ module Twilio
|
|
89
99
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
90
100
|
# efficient page size, i.e. min(limit, 1000)
|
91
101
|
# @return [Array] Array of up to limit results
|
92
|
-
def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
102
|
+
def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
93
103
|
self.stream(
|
94
104
|
priority: priority,
|
95
105
|
assignment_status: assignment_status,
|
@@ -98,6 +108,7 @@ module Twilio
|
|
98
108
|
task_queue_sid: task_queue_sid,
|
99
109
|
task_queue_name: task_queue_name,
|
100
110
|
evaluate_task_attributes: evaluate_task_attributes,
|
111
|
+
routing_target: routing_target,
|
101
112
|
ordering: ordering,
|
102
113
|
has_addons: has_addons,
|
103
114
|
limit: limit,
|
@@ -116,6 +127,7 @@ module Twilio
|
|
116
127
|
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
|
117
128
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
|
118
129
|
# @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
|
130
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
119
131
|
# @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
|
120
132
|
# @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
|
121
133
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -125,7 +137,7 @@ module Twilio
|
|
125
137
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
126
138
|
# efficient page size, i.e. min(limit, 1000)
|
127
139
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
128
|
-
def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
140
|
+
def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
129
141
|
limits = @version.read_limits(limit, page_size)
|
130
142
|
|
131
143
|
page = self.page(
|
@@ -136,6 +148,7 @@ module Twilio
|
|
136
148
|
task_queue_sid: task_queue_sid,
|
137
149
|
task_queue_name: task_queue_name,
|
138
150
|
evaluate_task_attributes: evaluate_task_attributes,
|
151
|
+
routing_target: routing_target,
|
139
152
|
ordering: ordering,
|
140
153
|
has_addons: has_addons,
|
141
154
|
page_size: limits[:page_size], )
|
@@ -167,13 +180,14 @@ module Twilio
|
|
167
180
|
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
|
168
181
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
|
169
182
|
# @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
|
183
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
170
184
|
# @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
|
171
185
|
# @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
|
172
186
|
# @param [String] page_token PageToken provided by the API
|
173
187
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
174
188
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
175
189
|
# @return [Page] Page of TaskInstance
|
176
|
-
def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
190
|
+
def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
177
191
|
params = Twilio::Values.of({
|
178
192
|
'Priority' => priority,
|
179
193
|
|
@@ -183,6 +197,7 @@ module Twilio
|
|
183
197
|
'TaskQueueSid' => task_queue_sid,
|
184
198
|
'TaskQueueName' => task_queue_name,
|
185
199
|
'EvaluateTaskAttributes' => evaluate_task_attributes,
|
200
|
+
'RoutingTarget' => routing_target,
|
186
201
|
'Ordering' => ordering,
|
187
202
|
'HasAddons' => has_addons,
|
188
203
|
'PageToken' => page_token,
|
@@ -402,6 +417,8 @@ module Twilio
|
|
402
417
|
'url' => payload['url'],
|
403
418
|
'links' => payload['links'],
|
404
419
|
'virtual_start_time' => Twilio.deserialize_iso8601_datetime(payload['virtual_start_time']),
|
420
|
+
'ignore_capacity' => payload['ignore_capacity'],
|
421
|
+
'routing_target' => payload['routing_target'],
|
405
422
|
}
|
406
423
|
|
407
424
|
# Context
|
@@ -552,6 +569,18 @@ module Twilio
|
|
552
569
|
@properties['virtual_start_time']
|
553
570
|
end
|
554
571
|
|
572
|
+
##
|
573
|
+
# @return [Boolean] A boolean indicating if a new task should respect a worker's capacity during assignment
|
574
|
+
def ignore_capacity
|
575
|
+
@properties['ignore_capacity']
|
576
|
+
end
|
577
|
+
|
578
|
+
##
|
579
|
+
# @return [String] A SID of a Worker, Queue, or Workflow to route a Task to
|
580
|
+
def routing_target
|
581
|
+
@properties['routing_target']
|
582
|
+
end
|
583
|
+
|
555
584
|
##
|
556
585
|
# Delete the TaskInstance
|
557
586
|
# @param [String] if_match If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
|
@@ -53,6 +53,7 @@ module Twilio
|
|
53
53
|
# @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
|
54
54
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
55
55
|
# @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
|
56
|
+
# @param [String] theme_set_id Theme id for styling the inquiry form.
|
56
57
|
# @return [ComplianceTollfreeInquiriesInstance] Created ComplianceTollfreeInquiriesInstance
|
57
58
|
def create(
|
58
59
|
tollfree_phone_number: nil,
|
@@ -75,7 +76,8 @@ module Twilio
|
|
75
76
|
business_contact_first_name: :unset,
|
76
77
|
business_contact_last_name: :unset,
|
77
78
|
business_contact_email: :unset,
|
78
|
-
business_contact_phone: :unset
|
79
|
+
business_contact_phone: :unset,
|
80
|
+
theme_set_id: :unset
|
79
81
|
)
|
80
82
|
|
81
83
|
data = Twilio::Values.of({
|
@@ -100,6 +102,7 @@ module Twilio
|
|
100
102
|
'BusinessContactLastName' => business_contact_last_name,
|
101
103
|
'BusinessContactEmail' => business_contact_email,
|
102
104
|
'BusinessContactPhone' => business_contact_phone,
|
105
|
+
'ThemeSetId' => theme_set_id,
|
103
106
|
})
|
104
107
|
|
105
108
|
|
@@ -370,6 +370,7 @@ module Twilio
|
|
370
370
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
371
371
|
'url' => payload['url'],
|
372
372
|
'links' => payload['links'],
|
373
|
+
'errors' => payload['errors'],
|
373
374
|
}
|
374
375
|
|
375
376
|
# Context
|
@@ -460,6 +461,12 @@ module Twilio
|
|
460
461
|
@properties['links']
|
461
462
|
end
|
462
463
|
|
464
|
+
##
|
465
|
+
# @return [Array<Hash>] The error codes associated with the rejection of the Customer-Profile.
|
466
|
+
def errors
|
467
|
+
@properties['errors']
|
468
|
+
end
|
469
|
+
|
463
470
|
##
|
464
471
|
# Delete the CustomerProfilesInstance
|
465
472
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -370,6 +370,7 @@ module Twilio
|
|
370
370
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
371
371
|
'url' => payload['url'],
|
372
372
|
'links' => payload['links'],
|
373
|
+
'errors' => payload['errors'],
|
373
374
|
}
|
374
375
|
|
375
376
|
# Context
|
@@ -460,6 +461,12 @@ module Twilio
|
|
460
461
|
@properties['links']
|
461
462
|
end
|
462
463
|
|
464
|
+
##
|
465
|
+
# @return [Array<Hash>] The error codes associated with the rejection of the Trust Product.
|
466
|
+
def errors
|
467
|
+
@properties['errors']
|
468
|
+
end
|
469
|
+
|
463
470
|
##
|
464
471
|
# Delete the TrustProductsInstance
|
465
472
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -287,7 +287,7 @@ module Twilio
|
|
287
287
|
end
|
288
288
|
|
289
289
|
##
|
290
|
-
# @return [String] The status of the verification.
|
290
|
+
# @return [String] The status of the verification. Can be: `pending`, `approved`, `canceled`, `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
291
291
|
def status
|
292
292
|
@properties['status']
|
293
293
|
end
|
@@ -164,7 +164,7 @@ module Twilio
|
|
164
164
|
end
|
165
165
|
|
166
166
|
##
|
167
|
-
# @return [String] The status of the verification. Can be: `pending`, `approved`, or `
|
167
|
+
# @return [String] The status of the verification. Can be: `pending`, `approved`, `canceled`, `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
168
168
|
def status
|
169
169
|
@properties['status']
|
170
170
|
end
|
@@ -559,7 +559,7 @@ module Twilio
|
|
559
559
|
end
|
560
560
|
|
561
561
|
##
|
562
|
-
# @return [String] The
|
562
|
+
# @return [String] The name that appears in the body of your verification messages. It can be up to 30 characters long and can include letters, numbers, spaces, dashes, underscores. Phone numbers, special characters or links are NOT allowed. **This value should not contain PII.**
|
563
563
|
def friendly_name
|
564
564
|
@properties['friendly_name']
|
565
565
|
end
|