twilio-ruby 5.73.0 → 5.73.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 +20 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +10 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +4 -45
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +4 -2
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdb1f38ca1c9845c134c63e773b2b4ca0c0a92ca
|
4
|
+
data.tar.gz: '06295d094a8aaf33db0854c726930fcc02f869ec'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e54d51bd992ece7215d43ea5cab42e618166c87173283d8b300ca0c161ded07028720ec5e5492d2b30e3664b304c620569704d15749891e364acd8f5b800df7c
|
7
|
+
data.tar.gz: 80faf14855805d87f599a222284d3be8782b0620d3c3fe55377ee66c98cc486e17074a0e74daaa5db025b13a8b9da50ebb6e6546c5bf50fa898bfbcc3287e6ff
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-10-31] Version 5.73.1
|
5
|
+
---------------------------
|
6
|
+
**Api**
|
7
|
+
- Added `contentSid` and `contentVariables` to Message resource with public visibility as Beta
|
8
|
+
- Add `UserDefinedMessageSubscription` and `UserDefinedMessage` resource
|
9
|
+
|
10
|
+
**Proxy**
|
11
|
+
- Remove FailOnParticipantConflict param from Proxy Session create and update and Proxy Participant create
|
12
|
+
|
13
|
+
**Supersim**
|
14
|
+
- Update SettingsUpdates resource to remove PackageSid
|
15
|
+
|
16
|
+
**Taskrouter**
|
17
|
+
- Add `Ordering` query parameter to Workers and TaskQueues for sorting by
|
18
|
+
- Add `worker_sid` query param for list reservations endpoint
|
19
|
+
|
20
|
+
**Twiml**
|
21
|
+
- Add `url` and `method` attributes to `<Conversation>`
|
22
|
+
|
23
|
+
|
4
24
|
[2022-10-19] Version 5.73.0
|
5
25
|
---------------------------
|
6
26
|
**Library - Feature**
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.73.
|
37
|
+
gem 'twilio-ruby', '~> 5.73.1'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.73.
|
43
|
+
gem install twilio-ruby -v 5.73.1
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -0,0 +1,160 @@
|
|
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 Api < Domain
|
12
|
+
class V2010 < Version
|
13
|
+
class AccountContext < InstanceContext
|
14
|
+
class CallContext < InstanceContext
|
15
|
+
class UserDefinedMessageList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the UserDefinedMessageList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @param [String] account_sid The SID of the
|
20
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created User Defined
|
21
|
+
# Message.
|
22
|
+
# @param [String] call_sid The SID of the
|
23
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
24
|
+
# Message is associated with.
|
25
|
+
# @return [UserDefinedMessageList] UserDefinedMessageList
|
26
|
+
def initialize(version, account_sid: nil, call_sid: nil)
|
27
|
+
super(version)
|
28
|
+
|
29
|
+
# Path Solution
|
30
|
+
@solution = {account_sid: account_sid, call_sid: call_sid}
|
31
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessages.json"
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Create the UserDefinedMessageInstance
|
36
|
+
# @param [String] content A unique string value to identify API call. This should
|
37
|
+
# be a unique string value per API call and can be a randomly generated.
|
38
|
+
# @param [String] idempotency_key A unique string value to identify API call. This
|
39
|
+
# should be a unique string value per API call and can be a randomly generated.
|
40
|
+
# @return [UserDefinedMessageInstance] Created UserDefinedMessageInstance
|
41
|
+
def create(content: nil, idempotency_key: :unset)
|
42
|
+
data = Twilio::Values.of({'Content' => content, 'IdempotencyKey' => idempotency_key, })
|
43
|
+
|
44
|
+
payload = @version.create('POST', @uri, data: data)
|
45
|
+
|
46
|
+
UserDefinedMessageInstance.new(
|
47
|
+
@version,
|
48
|
+
payload,
|
49
|
+
account_sid: @solution[:account_sid],
|
50
|
+
call_sid: @solution[:call_sid],
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'#<Twilio.Api.V2010.UserDefinedMessageList>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class UserDefinedMessagePage < Page
|
62
|
+
##
|
63
|
+
# Initialize the UserDefinedMessagePage
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [Response] response Response from the API
|
66
|
+
# @param [Hash] solution Path solution for the resource
|
67
|
+
# @return [UserDefinedMessagePage] UserDefinedMessagePage
|
68
|
+
def initialize(version, response, solution)
|
69
|
+
super(version, response)
|
70
|
+
|
71
|
+
# Path Solution
|
72
|
+
@solution = solution
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Build an instance of UserDefinedMessageInstance
|
77
|
+
# @param [Hash] payload Payload response from the API
|
78
|
+
# @return [UserDefinedMessageInstance] UserDefinedMessageInstance
|
79
|
+
def get_instance(payload)
|
80
|
+
UserDefinedMessageInstance.new(
|
81
|
+
@version,
|
82
|
+
payload,
|
83
|
+
account_sid: @solution[:account_sid],
|
84
|
+
call_sid: @solution[:call_sid],
|
85
|
+
)
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Provide a user friendly representation
|
90
|
+
def to_s
|
91
|
+
'<Twilio.Api.V2010.UserDefinedMessagePage>'
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
class UserDefinedMessageInstance < InstanceResource
|
96
|
+
##
|
97
|
+
# Initialize the UserDefinedMessageInstance
|
98
|
+
# @param [Version] version Version that contains the resource
|
99
|
+
# @param [Hash] payload payload that contains response from Twilio
|
100
|
+
# @param [String] account_sid The SID of the
|
101
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created User Defined
|
102
|
+
# Message.
|
103
|
+
# @param [String] call_sid The SID of the
|
104
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
105
|
+
# Message is associated with.
|
106
|
+
# @return [UserDefinedMessageInstance] UserDefinedMessageInstance
|
107
|
+
def initialize(version, payload, account_sid: nil, call_sid: nil)
|
108
|
+
super(version)
|
109
|
+
|
110
|
+
# Marshaled Properties
|
111
|
+
@properties = {
|
112
|
+
'account_sid' => payload['account_sid'],
|
113
|
+
'call_sid' => payload['call_sid'],
|
114
|
+
'sid' => payload['sid'],
|
115
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
116
|
+
}
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# @return [String] Account Sid.
|
121
|
+
def account_sid
|
122
|
+
@properties['account_sid']
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# @return [String] Call Sid.
|
127
|
+
def call_sid
|
128
|
+
@properties['call_sid']
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# @return [String] A string that uniquely identifies this User Defined Message.
|
133
|
+
def sid
|
134
|
+
@properties['sid']
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# @return [Time] The date this User Defined Message was created
|
139
|
+
def date_created
|
140
|
+
@properties['date_created']
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# Provide a user friendly representation
|
145
|
+
def to_s
|
146
|
+
"<Twilio.Api.V2010.UserDefinedMessageInstance>"
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Provide a detailed, user friendly representation
|
151
|
+
def inspect
|
152
|
+
"<Twilio.Api.V2010.UserDefinedMessageInstance>"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
@@ -0,0 +1,251 @@
|
|
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 Api < Domain
|
12
|
+
class V2010 < Version
|
13
|
+
class AccountContext < InstanceContext
|
14
|
+
class CallContext < InstanceContext
|
15
|
+
class UserDefinedMessageSubscriptionList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the UserDefinedMessageSubscriptionList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @param [String] account_sid The SID of the
|
20
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
21
|
+
# User Defined Messages.
|
22
|
+
# @param [String] call_sid The SID of the
|
23
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
24
|
+
# Messages subscription is associated with. This refers to the call sid that is
|
25
|
+
# producing the user defined messages.
|
26
|
+
# @return [UserDefinedMessageSubscriptionList] UserDefinedMessageSubscriptionList
|
27
|
+
def initialize(version, account_sid: nil, call_sid: nil)
|
28
|
+
super(version)
|
29
|
+
|
30
|
+
# Path Solution
|
31
|
+
@solution = {account_sid: account_sid, call_sid: call_sid}
|
32
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions.json"
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Create the UserDefinedMessageSubscriptionInstance
|
37
|
+
# @param [String] callback The URL we should call using the `method` to send user
|
38
|
+
# defined events to your application. URLs must contain a valid hostname
|
39
|
+
# (underscores are not permitted).
|
40
|
+
# @param [String] method The HTTP method Twilio will use when requesting the above
|
41
|
+
# `Url`. Either `GET` or `POST`.
|
42
|
+
# @param [String] idempotency_key A unique string value to identify API call. This
|
43
|
+
# should be a unique string value per API call and can be a randomly generated.
|
44
|
+
# @return [UserDefinedMessageSubscriptionInstance] Created UserDefinedMessageSubscriptionInstance
|
45
|
+
def create(callback: nil, method: nil, idempotency_key: :unset)
|
46
|
+
data = Twilio::Values.of({
|
47
|
+
'Callback' => callback,
|
48
|
+
'Method' => method,
|
49
|
+
'IdempotencyKey' => idempotency_key,
|
50
|
+
})
|
51
|
+
|
52
|
+
payload = @version.create('POST', @uri, data: data)
|
53
|
+
|
54
|
+
UserDefinedMessageSubscriptionInstance.new(
|
55
|
+
@version,
|
56
|
+
payload,
|
57
|
+
account_sid: @solution[:account_sid],
|
58
|
+
call_sid: @solution[:call_sid],
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Provide a user friendly representation
|
64
|
+
def to_s
|
65
|
+
'#<Twilio.Api.V2010.UserDefinedMessageSubscriptionList>'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class UserDefinedMessageSubscriptionPage < Page
|
70
|
+
##
|
71
|
+
# Initialize the UserDefinedMessageSubscriptionPage
|
72
|
+
# @param [Version] version Version that contains the resource
|
73
|
+
# @param [Response] response Response from the API
|
74
|
+
# @param [Hash] solution Path solution for the resource
|
75
|
+
# @return [UserDefinedMessageSubscriptionPage] UserDefinedMessageSubscriptionPage
|
76
|
+
def initialize(version, response, solution)
|
77
|
+
super(version, response)
|
78
|
+
|
79
|
+
# Path Solution
|
80
|
+
@solution = solution
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Build an instance of UserDefinedMessageSubscriptionInstance
|
85
|
+
# @param [Hash] payload Payload response from the API
|
86
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
87
|
+
def get_instance(payload)
|
88
|
+
UserDefinedMessageSubscriptionInstance.new(
|
89
|
+
@version,
|
90
|
+
payload,
|
91
|
+
account_sid: @solution[:account_sid],
|
92
|
+
call_sid: @solution[:call_sid],
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Provide a user friendly representation
|
98
|
+
def to_s
|
99
|
+
'<Twilio.Api.V2010.UserDefinedMessageSubscriptionPage>'
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class UserDefinedMessageSubscriptionContext < InstanceContext
|
104
|
+
##
|
105
|
+
# Initialize the UserDefinedMessageSubscriptionContext
|
106
|
+
# @param [Version] version Version that contains the resource
|
107
|
+
# @param [String] account_sid The SID of the
|
108
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
109
|
+
# User Defined Messages.
|
110
|
+
# @param [String] call_sid The SID of the
|
111
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
112
|
+
# Messages subscription is associated with. This refers to the call sid that is
|
113
|
+
# producing the user defined messages.
|
114
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
115
|
+
# Subscription.
|
116
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext
|
117
|
+
def initialize(version, account_sid, call_sid, sid)
|
118
|
+
super(version)
|
119
|
+
|
120
|
+
# Path Solution
|
121
|
+
@solution = {account_sid: account_sid, call_sid: call_sid, sid: sid, }
|
122
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions/#{@solution[:sid]}.json"
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
127
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
128
|
+
def delete
|
129
|
+
@version.delete('DELETE', @uri)
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# Provide a user friendly representation
|
134
|
+
def to_s
|
135
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
136
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Provide a detailed, user friendly representation
|
141
|
+
def inspect
|
142
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
143
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
class UserDefinedMessageSubscriptionInstance < InstanceResource
|
148
|
+
##
|
149
|
+
# Initialize the UserDefinedMessageSubscriptionInstance
|
150
|
+
# @param [Version] version Version that contains the resource
|
151
|
+
# @param [Hash] payload payload that contains response from Twilio
|
152
|
+
# @param [String] account_sid The SID of the
|
153
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
154
|
+
# User Defined Messages.
|
155
|
+
# @param [String] call_sid The SID of the
|
156
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
157
|
+
# Messages subscription is associated with. This refers to the call sid that is
|
158
|
+
# producing the user defined messages.
|
159
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
160
|
+
# Subscription.
|
161
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
162
|
+
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
163
|
+
super(version)
|
164
|
+
|
165
|
+
# Marshaled Properties
|
166
|
+
@properties = {
|
167
|
+
'account_sid' => payload['account_sid'],
|
168
|
+
'call_sid' => payload['call_sid'],
|
169
|
+
'sid' => payload['sid'],
|
170
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
171
|
+
'uri' => payload['uri'],
|
172
|
+
}
|
173
|
+
|
174
|
+
# Context
|
175
|
+
@instance_context = nil
|
176
|
+
@params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'], }
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Generate an instance context for the instance, the context is capable of
|
181
|
+
# performing various actions. All instance actions are proxied to the context
|
182
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext for this UserDefinedMessageSubscriptionInstance
|
183
|
+
def context
|
184
|
+
unless @instance_context
|
185
|
+
@instance_context = UserDefinedMessageSubscriptionContext.new(
|
186
|
+
@version,
|
187
|
+
@params['account_sid'],
|
188
|
+
@params['call_sid'],
|
189
|
+
@params['sid'],
|
190
|
+
)
|
191
|
+
end
|
192
|
+
@instance_context
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [String] Account Sid.
|
197
|
+
def account_sid
|
198
|
+
@properties['account_sid']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [String] Call Sid.
|
203
|
+
def call_sid
|
204
|
+
@properties['call_sid']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# @return [String] User Defined Message Subscription Sid
|
209
|
+
def sid
|
210
|
+
@properties['sid']
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# @return [Time] The date this User Defined Message Subscription was created
|
215
|
+
def date_created
|
216
|
+
@properties['date_created']
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`.
|
221
|
+
def uri
|
222
|
+
@properties['uri']
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
227
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
228
|
+
def delete
|
229
|
+
context.delete
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# Provide a user friendly representation
|
234
|
+
def to_s
|
235
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
236
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Provide a detailed, user friendly representation
|
241
|
+
def inspect
|
242
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
243
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
@@ -444,6 +444,8 @@ module Twilio
|
|
444
444
|
@payments = nil
|
445
445
|
@siprec = nil
|
446
446
|
@streams = nil
|
447
|
+
@user_defined_message_subscriptions = nil
|
448
|
+
@user_defined_messages = nil
|
447
449
|
end
|
448
450
|
|
449
451
|
##
|
@@ -636,6 +638,49 @@ module Twilio
|
|
636
638
|
@streams
|
637
639
|
end
|
638
640
|
|
641
|
+
##
|
642
|
+
# Access the user_defined_message_subscriptions
|
643
|
+
# @return [UserDefinedMessageSubscriptionList]
|
644
|
+
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
|
645
|
+
def user_defined_message_subscriptions(sid=:unset)
|
646
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
647
|
+
|
648
|
+
if sid != :unset
|
649
|
+
return UserDefinedMessageSubscriptionContext.new(
|
650
|
+
@version,
|
651
|
+
@solution[:account_sid],
|
652
|
+
@solution[:sid],
|
653
|
+
sid,
|
654
|
+
)
|
655
|
+
end
|
656
|
+
|
657
|
+
unless @user_defined_message_subscriptions
|
658
|
+
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
659
|
+
@version,
|
660
|
+
account_sid: @solution[:account_sid],
|
661
|
+
call_sid: @solution[:sid],
|
662
|
+
)
|
663
|
+
end
|
664
|
+
|
665
|
+
@user_defined_message_subscriptions
|
666
|
+
end
|
667
|
+
|
668
|
+
##
|
669
|
+
# Access the user_defined_messages
|
670
|
+
# @return [UserDefinedMessageList]
|
671
|
+
# @return [UserDefinedMessageContext]
|
672
|
+
def user_defined_messages
|
673
|
+
unless @user_defined_messages
|
674
|
+
@user_defined_messages = UserDefinedMessageList.new(
|
675
|
+
@version,
|
676
|
+
account_sid: @solution[:account_sid],
|
677
|
+
call_sid: @solution[:sid],
|
678
|
+
)
|
679
|
+
end
|
680
|
+
|
681
|
+
@user_defined_messages
|
682
|
+
end
|
683
|
+
|
639
684
|
##
|
640
685
|
# Provide a user friendly representation
|
641
686
|
def to_s
|
@@ -977,6 +1022,20 @@ module Twilio
|
|
977
1022
|
context.streams
|
978
1023
|
end
|
979
1024
|
|
1025
|
+
##
|
1026
|
+
# Access the user_defined_message_subscriptions
|
1027
|
+
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
|
1028
|
+
def user_defined_message_subscriptions
|
1029
|
+
context.user_defined_message_subscriptions
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
##
|
1033
|
+
# Access the user_defined_messages
|
1034
|
+
# @return [user_defined_messages] user_defined_messages
|
1035
|
+
def user_defined_messages
|
1036
|
+
context.user_defined_messages
|
1037
|
+
end
|
1038
|
+
|
980
1039
|
##
|
981
1040
|
# Provide a user friendly representation
|
982
1041
|
def to_s
|
@@ -90,6 +90,13 @@ module Twilio
|
|
90
90
|
# 8601 format.
|
91
91
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
92
92
|
# a single MMS message, regardless of the presence of media.
|
93
|
+
# @param [String] content_sid The SID of the Content object returned at Content
|
94
|
+
# API content create time
|
95
|
+
# (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template).
|
96
|
+
# If this parameter is not specified, then the Content API will not be utilized.
|
97
|
+
# @param [String] content_variables Key-value pairs of variable names to
|
98
|
+
# substitution values, used alongside a content_sid. If not specified, Content API
|
99
|
+
# will default to the default variables defined at create time.
|
93
100
|
# @param [String] from A Twilio phone number in
|
94
101
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
|
95
102
|
# sender
|
@@ -120,7 +127,7 @@ module Twilio
|
|
120
127
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
121
128
|
# per message. You can send images in an SMS message in only the US and Canada.
|
122
129
|
# @return [MessageInstance] Created MessageInstance
|
123
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
130
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, content_sid: :unset, content_variables: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
124
131
|
data = Twilio::Values.of({
|
125
132
|
'To' => to,
|
126
133
|
'From' => from,
|
@@ -142,6 +149,8 @@ module Twilio
|
|
142
149
|
'ScheduleType' => schedule_type,
|
143
150
|
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
144
151
|
'SendAsMms' => send_as_mms,
|
152
|
+
'ContentSid' => content_sid,
|
153
|
+
'ContentVariables' => content_variables,
|
145
154
|
})
|
146
155
|
|
147
156
|
payload = @version.create('POST', @uri, data: data)
|
@@ -121,26 +121,13 @@ module Twilio
|
|
121
121
|
# Participant. If not specified, Proxy will select a number from the pool.
|
122
122
|
# @param [String] proxy_identifier_sid The SID of the Proxy Identifier to assign
|
123
123
|
# to the Participant.
|
124
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
125
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
126
|
-
# per-request opt-in to allowing Proxy to reject a Participant create request that
|
127
|
-
# could cause the same Identifier/ProxyIdentifier pair to be active in multiple
|
128
|
-
# Sessions. Depending on the context, this could be a 409 error (Twilio error code
|
129
|
-
# 80623) or a 400 error (Twilio error code 80604). If not provided, requests will
|
130
|
-
# be allowed to succeed and a Debugger notification (80802) will be emitted.
|
131
|
-
# Having multiple, active Participants with the same Identifier/ProxyIdentifier
|
132
|
-
# pair causes calls and messages from affected Participants to be routed
|
133
|
-
# incorrectly. Please note, the default behavior for accounts without the
|
134
|
-
# ProxyAllowParticipantConflict flag is to reject the request as described. This
|
135
|
-
# will eventually be the default for all accounts.
|
136
124
|
# @return [ParticipantInstance] Created ParticipantInstance
|
137
|
-
def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset
|
125
|
+
def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset)
|
138
126
|
data = Twilio::Values.of({
|
139
127
|
'Identifier' => identifier,
|
140
128
|
'FriendlyName' => friendly_name,
|
141
129
|
'ProxyIdentifier' => proxy_identifier,
|
142
130
|
'ProxyIdentifierSid' => proxy_identifier_sid,
|
143
|
-
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
144
131
|
})
|
145
132
|
|
146
133
|
payload = @version.create('POST', @uri, data: data)
|
@@ -127,20 +127,8 @@ module Twilio
|
|
127
127
|
# on create.
|
128
128
|
# @param [Array[Hash]] participants The Participant objects to include in the new
|
129
129
|
# session.
|
130
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
131
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
132
|
-
# per-request opt-in to allowing Proxy to reject a Session create (with
|
133
|
-
# Participants) request that could cause the same Identifier/ProxyIdentifier pair
|
134
|
-
# to be active in multiple Sessions. Depending on the context, this could be a 409
|
135
|
-
# error (Twilio error code 80623) or a 400 error (Twilio error code 80604). If not
|
136
|
-
# provided, requests will be allowed to succeed and a Debugger notification
|
137
|
-
# (80802) will be emitted. Having multiple, active Participants with the same
|
138
|
-
# Identifier/ProxyIdentifier pair causes calls and messages from affected
|
139
|
-
# Participants to be routed incorrectly. Please note, the default behavior for
|
140
|
-
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
141
|
-
# as described. This will eventually be the default for all accounts.
|
142
130
|
# @return [SessionInstance] Created SessionInstance
|
143
|
-
def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset
|
131
|
+
def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
|
144
132
|
data = Twilio::Values.of({
|
145
133
|
'UniqueName' => unique_name,
|
146
134
|
'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
|
@@ -148,7 +136,6 @@ module Twilio
|
|
148
136
|
'Mode' => mode,
|
149
137
|
'Status' => status,
|
150
138
|
'Participants' => Twilio.serialize_list(participants) { |e| Twilio.serialize_object(e) },
|
151
|
-
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
152
139
|
})
|
153
140
|
|
154
141
|
payload = @version.create('POST', @uri, data: data)
|
@@ -243,24 +230,12 @@ module Twilio
|
|
243
230
|
# is measured from the last Session create or the Session's last Interaction.
|
244
231
|
# @param [session.Status] status The new status of the resource. Can be:
|
245
232
|
# `in-progress` to re-open a session or `closed` to close a session.
|
246
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
247
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
248
|
-
# per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
|
249
|
-
# 80604) when a request to set a Session to in-progress would cause Participants
|
250
|
-
# with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
251
|
-
# If not provided, requests will be allowed to succeed, and a Debugger
|
252
|
-
# notification (80801) will be emitted. Having multiple, active Participants with
|
253
|
-
# the same Identifier/ProxyIdentifier pair causes calls and messages from affected
|
254
|
-
# Participants to be routed incorrectly. Please note, the default behavior for
|
255
|
-
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
256
|
-
# as described. This will eventually be the default for all accounts.
|
257
233
|
# @return [SessionInstance] Updated SessionInstance
|
258
|
-
def update(date_expiry: :unset, ttl: :unset, status: :unset
|
234
|
+
def update(date_expiry: :unset, ttl: :unset, status: :unset)
|
259
235
|
data = Twilio::Values.of({
|
260
236
|
'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
|
261
237
|
'Ttl' => ttl,
|
262
238
|
'Status' => status,
|
263
|
-
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
264
239
|
})
|
265
240
|
|
266
241
|
payload = @version.update('POST', @uri, data: data)
|
@@ -498,25 +473,9 @@ module Twilio
|
|
498
473
|
# is measured from the last Session create or the Session's last Interaction.
|
499
474
|
# @param [session.Status] status The new status of the resource. Can be:
|
500
475
|
# `in-progress` to re-open a session or `closed` to close a session.
|
501
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
502
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
503
|
-
# per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
|
504
|
-
# 80604) when a request to set a Session to in-progress would cause Participants
|
505
|
-
# with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
506
|
-
# If not provided, requests will be allowed to succeed, and a Debugger
|
507
|
-
# notification (80801) will be emitted. Having multiple, active Participants with
|
508
|
-
# the same Identifier/ProxyIdentifier pair causes calls and messages from affected
|
509
|
-
# Participants to be routed incorrectly. Please note, the default behavior for
|
510
|
-
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
511
|
-
# as described. This will eventually be the default for all accounts.
|
512
476
|
# @return [SessionInstance] Updated SessionInstance
|
513
|
-
def update(date_expiry: :unset, ttl: :unset, status: :unset
|
514
|
-
context.update(
|
515
|
-
date_expiry: date_expiry,
|
516
|
-
ttl: ttl,
|
517
|
-
status: status,
|
518
|
-
fail_on_participant_conflict: fail_on_participant_conflict,
|
519
|
-
)
|
477
|
+
def update(date_expiry: :unset, ttl: :unset, status: :unset)
|
478
|
+
context.update(date_expiry: date_expiry, ttl: ttl, status: status, )
|
520
479
|
end
|
521
480
|
|
522
481
|
##
|
@@ -35,6 +35,7 @@ module Twilio
|
|
35
35
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
36
36
|
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
37
37
|
# `rejected`, or `timeout`.
|
38
|
+
# @param [String] worker_sid The SID of the reserved Worker resource to read.
|
38
39
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
39
40
|
# guarantees to never return more than limit. Default is no limit
|
40
41
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -42,8 +43,13 @@ module Twilio
|
|
42
43
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
43
44
|
# efficient page size, i.e. min(limit, 1000)
|
44
45
|
# @return [Array] Array of up to limit results
|
45
|
-
def list(reservation_status: :unset, limit: nil, page_size: nil)
|
46
|
-
self.stream(
|
46
|
+
def list(reservation_status: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
47
|
+
self.stream(
|
48
|
+
reservation_status: reservation_status,
|
49
|
+
worker_sid: worker_sid,
|
50
|
+
limit: limit,
|
51
|
+
page_size: page_size
|
52
|
+
).entries
|
47
53
|
end
|
48
54
|
|
49
55
|
##
|
@@ -53,6 +59,7 @@ module Twilio
|
|
53
59
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
54
60
|
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
55
61
|
# `rejected`, or `timeout`.
|
62
|
+
# @param [String] worker_sid The SID of the reserved Worker resource to read.
|
56
63
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
64
|
# guarantees to never return more than limit. Default is no limit.
|
58
65
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -60,10 +67,14 @@ module Twilio
|
|
60
67
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
61
68
|
# efficient page size, i.e. min(limit, 1000)
|
62
69
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
63
|
-
def stream(reservation_status: :unset, limit: nil, page_size: nil)
|
70
|
+
def stream(reservation_status: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
64
71
|
limits = @version.read_limits(limit, page_size)
|
65
72
|
|
66
|
-
page = self.page(
|
73
|
+
page = self.page(
|
74
|
+
reservation_status: reservation_status,
|
75
|
+
worker_sid: worker_sid,
|
76
|
+
page_size: limits[:page_size],
|
77
|
+
)
|
67
78
|
|
68
79
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
69
80
|
end
|
@@ -88,13 +99,15 @@ module Twilio
|
|
88
99
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
89
100
|
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
90
101
|
# `rejected`, or `timeout`.
|
102
|
+
# @param [String] worker_sid The SID of the reserved Worker resource to read.
|
91
103
|
# @param [String] page_token PageToken provided by the API
|
92
104
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
93
105
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
94
106
|
# @return [Page] Page of ReservationInstance
|
95
|
-
def page(reservation_status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
107
|
+
def page(reservation_status: :unset, worker_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
96
108
|
params = Twilio::Values.of({
|
97
109
|
'ReservationStatus' => reservation_status,
|
110
|
+
'WorkerSid' => worker_sid,
|
98
111
|
'PageToken' => page_token,
|
99
112
|
'Page' => page_number,
|
100
113
|
'PageSize' => page_size,
|
@@ -40,6 +40,7 @@ module Twilio
|
|
40
40
|
# this parameter.
|
41
41
|
# @param [String] worker_sid The SID of the Worker with the TaskQueue resources to
|
42
42
|
# read.
|
43
|
+
# @param [String] ordering Sorting parameter for TaskQueues
|
43
44
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
44
45
|
# guarantees to never return more than limit. Default is no limit
|
45
46
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -47,11 +48,12 @@ module Twilio
|
|
47
48
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
48
49
|
# efficient page size, i.e. min(limit, 1000)
|
49
50
|
# @return [Array] Array of up to limit results
|
50
|
-
def list(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
51
|
+
def list(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, ordering: :unset, limit: nil, page_size: nil)
|
51
52
|
self.stream(
|
52
53
|
friendly_name: friendly_name,
|
53
54
|
evaluate_worker_attributes: evaluate_worker_attributes,
|
54
55
|
worker_sid: worker_sid,
|
56
|
+
ordering: ordering,
|
55
57
|
limit: limit,
|
56
58
|
page_size: page_size
|
57
59
|
).entries
|
@@ -68,6 +70,7 @@ module Twilio
|
|
68
70
|
# this parameter.
|
69
71
|
# @param [String] worker_sid The SID of the Worker with the TaskQueue resources to
|
70
72
|
# read.
|
73
|
+
# @param [String] ordering Sorting parameter for TaskQueues
|
71
74
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
72
75
|
# guarantees to never return more than limit. Default is no limit.
|
73
76
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -75,13 +78,14 @@ module Twilio
|
|
75
78
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
76
79
|
# efficient page size, i.e. min(limit, 1000)
|
77
80
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
78
|
-
def stream(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
81
|
+
def stream(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, ordering: :unset, limit: nil, page_size: nil)
|
79
82
|
limits = @version.read_limits(limit, page_size)
|
80
83
|
|
81
84
|
page = self.page(
|
82
85
|
friendly_name: friendly_name,
|
83
86
|
evaluate_worker_attributes: evaluate_worker_attributes,
|
84
87
|
worker_sid: worker_sid,
|
88
|
+
ordering: ordering,
|
85
89
|
page_size: limits[:page_size],
|
86
90
|
)
|
87
91
|
|
@@ -112,15 +116,17 @@ module Twilio
|
|
112
116
|
# this parameter.
|
113
117
|
# @param [String] worker_sid The SID of the Worker with the TaskQueue resources to
|
114
118
|
# read.
|
119
|
+
# @param [String] ordering Sorting parameter for TaskQueues
|
115
120
|
# @param [String] page_token PageToken provided by the API
|
116
121
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
117
122
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
118
123
|
# @return [Page] Page of TaskQueueInstance
|
119
|
-
def page(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
124
|
+
def page(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, ordering: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
120
125
|
params = Twilio::Values.of({
|
121
126
|
'FriendlyName' => friendly_name,
|
122
127
|
'EvaluateWorkerAttributes' => evaluate_worker_attributes,
|
123
128
|
'WorkerSid' => worker_sid,
|
129
|
+
'Ordering' => ordering,
|
124
130
|
'PageToken' => page_token,
|
125
131
|
'Page' => page_number,
|
126
132
|
'PageSize' => page_size,
|
@@ -48,6 +48,7 @@ module Twilio
|
|
48
48
|
# Workers to read are eligible for.
|
49
49
|
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read
|
50
50
|
# are eligible for.
|
51
|
+
# @param [String] ordering Sorting parameter for Workers
|
51
52
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
52
53
|
# guarantees to never return more than limit. Default is no limit
|
53
54
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -55,7 +56,7 @@ module Twilio
|
|
55
56
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
56
57
|
# efficient page size, i.e. min(limit, 1000)
|
57
58
|
# @return [Array] Array of up to limit results
|
58
|
-
def list(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, limit: nil, page_size: nil)
|
59
|
+
def list(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, ordering: :unset, limit: nil, page_size: nil)
|
59
60
|
self.stream(
|
60
61
|
activity_name: activity_name,
|
61
62
|
activity_sid: activity_sid,
|
@@ -64,6 +65,7 @@ module Twilio
|
|
64
65
|
target_workers_expression: target_workers_expression,
|
65
66
|
task_queue_name: task_queue_name,
|
66
67
|
task_queue_sid: task_queue_sid,
|
68
|
+
ordering: ordering,
|
67
69
|
limit: limit,
|
68
70
|
page_size: page_size
|
69
71
|
).entries
|
@@ -89,6 +91,7 @@ module Twilio
|
|
89
91
|
# Workers to read are eligible for.
|
90
92
|
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read
|
91
93
|
# are eligible for.
|
94
|
+
# @param [String] ordering Sorting parameter for Workers
|
92
95
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
93
96
|
# guarantees to never return more than limit. Default is no limit.
|
94
97
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -96,7 +99,7 @@ module Twilio
|
|
96
99
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
97
100
|
# efficient page size, i.e. min(limit, 1000)
|
98
101
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
99
|
-
def stream(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, limit: nil, page_size: nil)
|
102
|
+
def stream(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, ordering: :unset, limit: nil, page_size: nil)
|
100
103
|
limits = @version.read_limits(limit, page_size)
|
101
104
|
|
102
105
|
page = self.page(
|
@@ -107,6 +110,7 @@ module Twilio
|
|
107
110
|
target_workers_expression: target_workers_expression,
|
108
111
|
task_queue_name: task_queue_name,
|
109
112
|
task_queue_sid: task_queue_sid,
|
113
|
+
ordering: ordering,
|
110
114
|
page_size: limits[:page_size],
|
111
115
|
)
|
112
116
|
|
@@ -146,11 +150,12 @@ module Twilio
|
|
146
150
|
# Workers to read are eligible for.
|
147
151
|
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read
|
148
152
|
# are eligible for.
|
153
|
+
# @param [String] ordering Sorting parameter for Workers
|
149
154
|
# @param [String] page_token PageToken provided by the API
|
150
155
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
151
156
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
152
157
|
# @return [Page] Page of WorkerInstance
|
153
|
-
def page(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
158
|
+
def page(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, ordering: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
154
159
|
params = Twilio::Values.of({
|
155
160
|
'ActivityName' => activity_name,
|
156
161
|
'ActivitySid' => activity_sid,
|
@@ -159,6 +164,7 @@ module Twilio
|
|
159
164
|
'TargetWorkersExpression' => target_workers_expression,
|
160
165
|
'TaskQueueName' => task_queue_name,
|
161
166
|
'TaskQueueSid' => task_queue_sid,
|
167
|
+
'Ordering' => ordering,
|
162
168
|
'PageToken' => page_token,
|
163
169
|
'Page' => page_number,
|
164
170
|
'PageSize' => page_size,
|
@@ -46,7 +46,7 @@ module Twilio
|
|
46
46
|
# @param [String] locale Locale will automatically resolve based on phone number
|
47
47
|
# country code for SMS, WhatsApp and call channel verifications. This parameter
|
48
48
|
# will override the automatic locale. {See supported languages and more
|
49
|
-
# information here
|
49
|
+
# information here}[https://www.twilio.com/docs/verify/supported-languages].
|
50
50
|
# @param [String] custom_code A pre-generated code to use for verification. The
|
51
51
|
# code can be between 4 and 10 characters, inclusive.
|
52
52
|
# @param [String] amount The amount of the associated PSD2 compliant transaction.
|
@@ -68,7 +68,7 @@ module Twilio
|
|
68
68
|
# Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
|
69
69
|
# @param [String] template_sid The message
|
70
70
|
# {template}[https://www.twilio.com/docs/verify/api/templates]. If provided, will
|
71
|
-
# override the default template for the Service. SMS
|
71
|
+
# override the default template for the Service. SMS and Voice channels only.
|
72
72
|
# @param [String] template_custom_substitutions A stringified JSON object in which
|
73
73
|
# the keys are the template's special variables and the values are the variables
|
74
74
|
# substitutions.
|
@@ -1775,6 +1775,8 @@ module Twilio
|
|
1775
1775
|
# inbound_autocreation:: Inbound autocreation
|
1776
1776
|
# routing_assignment_timeout:: Routing assignment timeout
|
1777
1777
|
# inbound_timeout:: Inbound timeout
|
1778
|
+
# url:: TwiML URL
|
1779
|
+
# method:: TwiML URL method
|
1778
1780
|
# record:: Record
|
1779
1781
|
# trim:: Trim
|
1780
1782
|
# recording_status_callback:: Recording status callback URL
|
@@ -1784,8 +1786,8 @@ module Twilio
|
|
1784
1786
|
# status_callback_method:: Status callback URL method
|
1785
1787
|
# status_callback_event:: Events to call status callback URL
|
1786
1788
|
# keyword_args:: additional attributes
|
1787
|
-
def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args)
|
1788
|
-
append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args))
|
1789
|
+
def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args)
|
1790
|
+
append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, url: url, method: method, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args))
|
1789
1791
|
end
|
1790
1792
|
end
|
1791
1793
|
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.73.
|
4
|
+
version: 5.73.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -274,6 +274,8 @@ files:
|
|
274
274
|
- lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
|
275
275
|
- lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb
|
276
276
|
- lib/twilio-ruby/rest/api/v2010/account/call/stream.rb
|
277
|
+
- lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb
|
278
|
+
- lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb
|
277
279
|
- lib/twilio-ruby/rest/api/v2010/account/conference.rb
|
278
280
|
- lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb
|
279
281
|
- lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb
|