twilio-ruby 7.0.2 → 7.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +58 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -3
- data/lib/twilio-ruby/rest/client.rb +3 -3
- data/lib/twilio-ruby/rest/content/v2/content.rb +316 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +309 -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/marketplace/v1/available_add_on/available_add_on_extension.rb +308 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +335 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +350 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +169 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +461 -0
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +282 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +79 -0
- data/lib/twilio-ruby/rest/marketplace.rb +6 -0
- data/lib/twilio-ruby/rest/{preview_messaging_base.rb → marketplace_base.rb} +6 -6
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +15 -3
- data/lib/twilio-ruby/rest/messaging/v1.rb +1 -1
- 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/signing_request_configuration.rb +176 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +35 -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 +24 -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
@@ -0,0 +1,176 @@
|
|
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 SigningRequestConfigurationList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the SigningRequestConfigurationList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [SigningRequestConfigurationList] SigningRequestConfigurationList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/SigningRequest/Configuration"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Create the SigningRequestConfigurationInstance
|
35
|
+
# @param [Object] body
|
36
|
+
# @return [SigningRequestConfigurationInstance] Created SigningRequestConfigurationInstance
|
37
|
+
def create(body: :unset
|
38
|
+
)
|
39
|
+
|
40
|
+
headers = Twilio::Values.of({"Content-Type"=> "application/json"})
|
41
|
+
payload = @version.create('POST', @uri, data: body.to_json, headers: headers)
|
42
|
+
SigningRequestConfigurationInstance.new(
|
43
|
+
@version,
|
44
|
+
payload,
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
# Provide a user friendly representation
|
52
|
+
def to_s
|
53
|
+
'#<Twilio.Numbers.V1.SigningRequestConfigurationList>'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class SigningRequestConfigurationPage < Page
|
58
|
+
##
|
59
|
+
# Initialize the SigningRequestConfigurationPage
|
60
|
+
# @param [Version] version Version that contains the resource
|
61
|
+
# @param [Response] response Response from the API
|
62
|
+
# @param [Hash] solution Path solution for the resource
|
63
|
+
# @return [SigningRequestConfigurationPage] SigningRequestConfigurationPage
|
64
|
+
def initialize(version, response, solution)
|
65
|
+
super(version, response)
|
66
|
+
|
67
|
+
# Path Solution
|
68
|
+
@solution = solution
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Build an instance of SigningRequestConfigurationInstance
|
73
|
+
# @param [Hash] payload Payload response from the API
|
74
|
+
# @return [SigningRequestConfigurationInstance] SigningRequestConfigurationInstance
|
75
|
+
def get_instance(payload)
|
76
|
+
SigningRequestConfigurationInstance.new(@version, payload)
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Provide a user friendly representation
|
81
|
+
def to_s
|
82
|
+
'<Twilio.Numbers.V1.SigningRequestConfigurationPage>'
|
83
|
+
end
|
84
|
+
end
|
85
|
+
class SigningRequestConfigurationInstance < InstanceResource
|
86
|
+
##
|
87
|
+
# Initialize the SigningRequestConfigurationInstance
|
88
|
+
# @param [Version] version Version that contains the resource
|
89
|
+
# @param [Hash] payload payload that contains response from Twilio
|
90
|
+
# @param [String] account_sid The SID of the
|
91
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this SigningRequestConfiguration
|
92
|
+
# resource.
|
93
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
94
|
+
# @return [SigningRequestConfigurationInstance] SigningRequestConfigurationInstance
|
95
|
+
def initialize(version, payload )
|
96
|
+
super(version)
|
97
|
+
|
98
|
+
# Marshaled Properties
|
99
|
+
@properties = {
|
100
|
+
'logo_sid' => payload['logo_sid'],
|
101
|
+
'friendly_name' => payload['friendly_name'],
|
102
|
+
'product' => payload['product'],
|
103
|
+
'country' => payload['country'],
|
104
|
+
'email_subject' => payload['email_subject'],
|
105
|
+
'email_message' => payload['email_message'],
|
106
|
+
'url_redirection' => payload['url_redirection'],
|
107
|
+
'url' => payload['url'],
|
108
|
+
}
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
##
|
113
|
+
# @return [String] The SID of the document that includes the logo that will appear in the LOA. To upload documents follow the following guide: https://www.twilio.com/docs/phone-numbers/regulatory/getting-started/create-new-bundle-public-rest-apis#supporting-document-create
|
114
|
+
def logo_sid
|
115
|
+
@properties['logo_sid']
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# @return [String] This is the string that you assigned as a friendly name for describing the creation of the configuration.
|
120
|
+
def friendly_name
|
121
|
+
@properties['friendly_name']
|
122
|
+
end
|
123
|
+
|
124
|
+
##
|
125
|
+
# @return [String] The product or service for which is requesting the signature.
|
126
|
+
def product
|
127
|
+
@properties['product']
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# @return [String] The country ISO code to apply the configuration.
|
132
|
+
def country
|
133
|
+
@properties['country']
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# @return [String] Subject of the email that the end client will receive ex: “Twilio Hosting Request”, maximum length of 255 characters.
|
138
|
+
def email_subject
|
139
|
+
@properties['email_subject']
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# @return [String] Content of the email that the end client will receive ex: “This is a Hosting request from Twilio, please check the document and sign it”, maximum length of 5,000 characters.
|
144
|
+
def email_message
|
145
|
+
@properties['email_message']
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [String] Url the end client will be redirected after signing a document.
|
150
|
+
def url_redirection
|
151
|
+
@properties['url_redirection']
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String]
|
156
|
+
def url
|
157
|
+
@properties['url']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Provide a user friendly representation
|
162
|
+
def to_s
|
163
|
+
"<Twilio.Numbers.V1.SigningRequestConfigurationInstance>"
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Provide a detailed, user friendly representation
|
168
|
+
def inspect
|
169
|
+
"<Twilio.Numbers.V1.SigningRequestConfigurationInstance>"
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
@@ -23,11 +23,13 @@ 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
|
32
|
+
@signing_request_configurations = nil
|
31
33
|
end
|
32
34
|
|
33
35
|
##
|
@@ -50,20 +52,6 @@ module Twilio
|
|
50
52
|
@eligibilities ||= EligibilityList.new self
|
51
53
|
end
|
52
54
|
##
|
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
55
|
# @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
|
68
56
|
# @return [Twilio::REST::Numbers::V1::PortingPortInContext] if portInRequestSid was passed.
|
69
57
|
# @return [Twilio::REST::Numbers::V1::PortingPortInList]
|
@@ -79,21 +67,7 @@ module Twilio
|
|
79
67
|
end
|
80
68
|
##
|
81
69
|
# @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.
|
70
|
+
# @param [String] phone_number_sid The SID of the Phone number. This is a unique identifier of the phone number.
|
97
71
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext] if portInRequestSid was passed.
|
98
72
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList]
|
99
73
|
def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
|
@@ -111,7 +85,7 @@ module Twilio
|
|
111
85
|
end
|
112
86
|
##
|
113
87
|
# @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
|
88
|
+
# @param [String] phone_number_sid The SID of the Phone number. This is a unique identifier of the phone number.
|
115
89
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext] if phoneNumberSid was passed.
|
116
90
|
# @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList]
|
117
91
|
def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
|
@@ -142,6 +116,35 @@ module Twilio
|
|
142
116
|
end
|
143
117
|
end
|
144
118
|
##
|
119
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationList]
|
120
|
+
def porting_webhook_configurations
|
121
|
+
@porting_webhook_configurations ||= PortingWebhookConfigurationList.new self
|
122
|
+
end
|
123
|
+
##
|
124
|
+
# @param [String] webhook_type The of the webhook type of the configuration to be deleted
|
125
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteContext] if webhookType was passed.
|
126
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteList]
|
127
|
+
def porting_webhook_configurations_delete(webhook_type=:unset)
|
128
|
+
if webhook_type.nil?
|
129
|
+
raise ArgumentError, 'webhook_type cannot be nil'
|
130
|
+
end
|
131
|
+
if webhook_type == :unset
|
132
|
+
@porting_webhook_configurations_delete ||= PortingWebhookConfigurationDeleteList.new self
|
133
|
+
else
|
134
|
+
PortingWebhookConfigurationDeleteContext.new(self, webhook_type)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
##
|
138
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
|
139
|
+
def porting_webhook_configuration_fetch
|
140
|
+
@porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
|
141
|
+
end
|
142
|
+
##
|
143
|
+
# @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
|
144
|
+
def signing_request_configurations
|
145
|
+
@signing_request_configurations ||= SigningRequestConfigurationList.new self
|
146
|
+
end
|
147
|
+
##
|
145
148
|
# Provide a user friendly representation
|
146
149
|
def to_s
|
147
150
|
'<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
|