twilio-ruby 7.10.0 → 7.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/test-and-deploy.yml +2 -1
- data/CHANGES.md +77 -0
- data/Dockerfile +1 -1
- data/README.md +2 -2
- data/cluster/cluster_oauth_spec.rb +4 -4
- data/lib/twilio-ruby/base/client_base.rb +1 -28
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +14 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +12 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +24 -24
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb +382 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +6 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +12 -4
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +93 -19
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +25 -25
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +20 -4
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +7 -4
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +253 -0
- data/lib/twilio-ruby/rest/oauth/v2.rb +6 -0
- data/lib/twilio-ruby/rest/video/v1/room/transcriptions.rb +12 -3
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -9
|
@@ -24,8 +24,9 @@ module Twilio
|
|
|
24
24
|
# @param [Version] version Version that contains the resource
|
|
25
25
|
# @return [HostedNumberOrderList] HostedNumberOrderList
|
|
26
26
|
def initialize(version)
|
|
27
|
-
super(version)
|
|
28
27
|
|
|
28
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
29
|
+
super(apiV1Version)
|
|
29
30
|
# Path Solution
|
|
30
31
|
@solution = { }
|
|
31
32
|
@uri = "/HostedNumbers/HostedNumberOrders"
|
|
@@ -192,7 +193,7 @@ module Twilio
|
|
|
192
193
|
end
|
|
193
194
|
end
|
|
194
195
|
|
|
195
|
-
class HostedNumberOrderPage <
|
|
196
|
+
class HostedNumberOrderPage < TokenPage
|
|
196
197
|
##
|
|
197
198
|
# Initialize the HostedNumberOrderPage
|
|
198
199
|
# @param [Version] version Version that contains the resource
|
|
@@ -200,8 +201,9 @@ module Twilio
|
|
|
200
201
|
# @param [Hash] solution Path solution for the resource
|
|
201
202
|
# @return [HostedNumberOrderPage] HostedNumberOrderPage
|
|
202
203
|
def initialize(version, response, solution)
|
|
203
|
-
super(version, response)
|
|
204
204
|
|
|
205
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
206
|
+
super(apiV1Version, response)
|
|
205
207
|
|
|
206
208
|
# Path Solution
|
|
207
209
|
@solution = solution
|
|
@@ -292,8 +294,9 @@ module Twilio
|
|
|
292
294
|
# @param [String] sid The SID of the Call resource to fetch.
|
|
293
295
|
# @return [HostedNumberOrderInstance] HostedNumberOrderInstance
|
|
294
296
|
def initialize(version, payload )
|
|
295
|
-
super(version)
|
|
296
297
|
|
|
298
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
299
|
+
super(apiV1Version)
|
|
297
300
|
|
|
298
301
|
# Marshaled Properties
|
|
299
302
|
@properties = {
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# User OAuth API
|
|
8
|
+
# User OAuth 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 Oauth < OauthBase
|
|
19
|
+
class V2 < Version
|
|
20
|
+
class AuthorizeList < ListResource
|
|
21
|
+
|
|
22
|
+
##
|
|
23
|
+
# Initialize the AuthorizeList
|
|
24
|
+
# @param [Version] version Version that contains the resource
|
|
25
|
+
# @return [AuthorizeList] AuthorizeList
|
|
26
|
+
def initialize(version)
|
|
27
|
+
super(version)
|
|
28
|
+
|
|
29
|
+
# Path Solution
|
|
30
|
+
@solution = { }
|
|
31
|
+
@uri = "/authorize"
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
##
|
|
35
|
+
# Fetch the AuthorizeInstance
|
|
36
|
+
# @param [String] response_type
|
|
37
|
+
# @param [String] client_id
|
|
38
|
+
# @param [String] redirect_uri
|
|
39
|
+
# @param [String] scope
|
|
40
|
+
# @param [String] state
|
|
41
|
+
# @return [AuthorizeInstance] Fetched AuthorizeInstance
|
|
42
|
+
def fetch(
|
|
43
|
+
response_type: :unset,
|
|
44
|
+
client_id: :unset,
|
|
45
|
+
redirect_uri: :unset,
|
|
46
|
+
scope: :unset,
|
|
47
|
+
state: :unset
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
params = Twilio::Values.of({
|
|
51
|
+
'response_type' => response_type,
|
|
52
|
+
'client_id' => client_id,
|
|
53
|
+
'redirect_uri' => redirect_uri,
|
|
54
|
+
'scope' => scope,
|
|
55
|
+
'state' => state,
|
|
56
|
+
})
|
|
57
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
payload = @version.fetch('GET', @uri, params: params, headers: headers)
|
|
64
|
+
AuthorizeInstance.new(
|
|
65
|
+
@version,
|
|
66
|
+
payload,
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
##
|
|
71
|
+
# Fetch the AuthorizeInstanceMetadata
|
|
72
|
+
# @param [String] response_type
|
|
73
|
+
# @param [String] client_id
|
|
74
|
+
# @param [String] redirect_uri
|
|
75
|
+
# @param [String] scope
|
|
76
|
+
# @param [String] state
|
|
77
|
+
# @return [AuthorizeInstance] Fetched AuthorizeInstance
|
|
78
|
+
def fetch_with_metadata(
|
|
79
|
+
response_type: :unset,
|
|
80
|
+
client_id: :unset,
|
|
81
|
+
redirect_uri: :unset,
|
|
82
|
+
scope: :unset,
|
|
83
|
+
state: :unset
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
params = Twilio::Values.of({
|
|
87
|
+
'response_type' => response_type,
|
|
88
|
+
'client_id' => client_id,
|
|
89
|
+
'redirect_uri' => redirect_uri,
|
|
90
|
+
'scope' => scope,
|
|
91
|
+
'state' => state,
|
|
92
|
+
})
|
|
93
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
response = @version.fetch_with_metadata('GET', @uri, params: params, headers: headers)
|
|
100
|
+
authorize_instance = AuthorizeInstance.new(
|
|
101
|
+
@version,
|
|
102
|
+
response.body,
|
|
103
|
+
)
|
|
104
|
+
AuthorizeInstanceMetadata.new(
|
|
105
|
+
@version,
|
|
106
|
+
authorize_instance,
|
|
107
|
+
response.headers,
|
|
108
|
+
response.status_code
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Provide a user friendly representation
|
|
116
|
+
def to_s
|
|
117
|
+
'#<Twilio.Oauth.V2.AuthorizeList>'
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
class AuthorizePage < Page
|
|
122
|
+
##
|
|
123
|
+
# Initialize the AuthorizePage
|
|
124
|
+
# @param [Version] version Version that contains the resource
|
|
125
|
+
# @param [Response] response Response from the API
|
|
126
|
+
# @param [Hash] solution Path solution for the resource
|
|
127
|
+
# @return [AuthorizePage] AuthorizePage
|
|
128
|
+
def initialize(version, response, solution)
|
|
129
|
+
super(version, response)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
# Path Solution
|
|
133
|
+
@solution = solution
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
##
|
|
137
|
+
# Build an instance of AuthorizeInstance
|
|
138
|
+
# @param [Hash] payload Payload response from the API
|
|
139
|
+
# @return [AuthorizeInstance] AuthorizeInstance
|
|
140
|
+
def get_instance(payload)
|
|
141
|
+
AuthorizeInstance.new(@version, payload)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
##
|
|
145
|
+
# Provide a user friendly representation
|
|
146
|
+
def to_s
|
|
147
|
+
'<Twilio.Oauth.V2.AuthorizePage>'
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
class AuthorizePageMetadata < PageMetadata
|
|
152
|
+
attr_reader :authorize_page
|
|
153
|
+
|
|
154
|
+
def initialize(version, response, solution, limit)
|
|
155
|
+
super(version, response)
|
|
156
|
+
@authorize_page = []
|
|
157
|
+
@limit = limit
|
|
158
|
+
key = get_key(response.body)
|
|
159
|
+
records = 0
|
|
160
|
+
while( limit != :unset && records < limit )
|
|
161
|
+
@authorize_page << AuthorizeListResponse.new(version, @payload, key, limit - records)
|
|
162
|
+
@payload = self.next_page
|
|
163
|
+
break unless @payload
|
|
164
|
+
records += @payload.body[key].size
|
|
165
|
+
end
|
|
166
|
+
# Path Solution
|
|
167
|
+
@solution = solution
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def each
|
|
171
|
+
@authorize_page.each do |record|
|
|
172
|
+
yield record
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def to_s
|
|
177
|
+
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
class AuthorizeListResponse < InstanceListResource
|
|
181
|
+
|
|
182
|
+
# @param [Array<AuthorizeInstance>] instance
|
|
183
|
+
# @param [Hash{String => Object}] headers
|
|
184
|
+
# @param [Integer] status_code
|
|
185
|
+
def initialize(version, payload, key, limit = :unset)
|
|
186
|
+
data_list = payload.body[key]
|
|
187
|
+
if limit != :unset
|
|
188
|
+
data_list = data_list[0, limit]
|
|
189
|
+
end
|
|
190
|
+
@authorize = data_list.map do |data|
|
|
191
|
+
AuthorizeInstance.new(version, data)
|
|
192
|
+
end
|
|
193
|
+
@headers = payload.headers
|
|
194
|
+
@status_code = payload.status_code
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
def authorize
|
|
198
|
+
@authorize
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def headers
|
|
202
|
+
@headers
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
def status_code
|
|
206
|
+
@status_code
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
class AuthorizeInstance < InstanceResource
|
|
211
|
+
##
|
|
212
|
+
# Initialize the AuthorizeInstance
|
|
213
|
+
# @param [Version] version Version that contains the resource
|
|
214
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
215
|
+
# @param [String] account_sid The SID of the
|
|
216
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Authorize
|
|
217
|
+
# resource.
|
|
218
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
219
|
+
# @return [AuthorizeInstance] AuthorizeInstance
|
|
220
|
+
def initialize(version, payload )
|
|
221
|
+
super(version)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
# Marshaled Properties
|
|
225
|
+
@properties = {
|
|
226
|
+
'redirect_to' => payload['redirect_to'],
|
|
227
|
+
}
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
##
|
|
232
|
+
# @return [String] The callback URL
|
|
233
|
+
def redirect_to
|
|
234
|
+
@properties['redirect_to']
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
##
|
|
238
|
+
# Provide a user friendly representation
|
|
239
|
+
def to_s
|
|
240
|
+
"<Twilio.Oauth.V2.AuthorizeInstance>"
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
##
|
|
244
|
+
# Provide a detailed, user friendly representation
|
|
245
|
+
def inspect
|
|
246
|
+
"<Twilio.Oauth.V2.AuthorizeInstance>"
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
@@ -21,9 +21,15 @@ module Twilio
|
|
|
21
21
|
def initialize(domain)
|
|
22
22
|
super
|
|
23
23
|
@version = 'v2'
|
|
24
|
+
@authorize = nil
|
|
24
25
|
@token = nil
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
##
|
|
29
|
+
# @return [Twilio::REST::Oauth::V2::AuthorizeList]
|
|
30
|
+
def authorize
|
|
31
|
+
@authorize ||= AuthorizeList.new self
|
|
32
|
+
end
|
|
27
33
|
##
|
|
28
34
|
# @return [Twilio::REST::Oauth::V2::TokenList]
|
|
29
35
|
def token
|
|
@@ -276,13 +276,16 @@ module Twilio
|
|
|
276
276
|
##
|
|
277
277
|
# Update the TranscriptionsInstance
|
|
278
278
|
# @param [Status] status
|
|
279
|
+
# @param [Object] configuration A collection of properties that describe transcription behaviour.
|
|
279
280
|
# @return [TranscriptionsInstance] Updated TranscriptionsInstance
|
|
280
281
|
def update(
|
|
281
|
-
status: :unset
|
|
282
|
+
status: :unset,
|
|
283
|
+
configuration: :unset
|
|
282
284
|
)
|
|
283
285
|
|
|
284
286
|
data = Twilio::Values.of({
|
|
285
287
|
'Status' => status,
|
|
288
|
+
'Configuration' => Twilio.serialize_object(configuration),
|
|
286
289
|
})
|
|
287
290
|
|
|
288
291
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -303,13 +306,16 @@ module Twilio
|
|
|
303
306
|
##
|
|
304
307
|
# Update the TranscriptionsInstanceMetadata
|
|
305
308
|
# @param [Status] status
|
|
309
|
+
# @param [Object] configuration A collection of properties that describe transcription behaviour.
|
|
306
310
|
# @return [TranscriptionsInstance] Updated TranscriptionsInstance
|
|
307
311
|
def update_with_metadata(
|
|
308
|
-
status: :unset
|
|
312
|
+
status: :unset,
|
|
313
|
+
configuration: :unset
|
|
309
314
|
)
|
|
310
315
|
|
|
311
316
|
data = Twilio::Values.of({
|
|
312
317
|
'Status' => status,
|
|
318
|
+
'Configuration' => Twilio.serialize_object(configuration),
|
|
313
319
|
})
|
|
314
320
|
|
|
315
321
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -614,13 +620,16 @@ module Twilio
|
|
|
614
620
|
##
|
|
615
621
|
# Update the TranscriptionsInstance
|
|
616
622
|
# @param [Status] status
|
|
623
|
+
# @param [Object] configuration A collection of properties that describe transcription behaviour.
|
|
617
624
|
# @return [TranscriptionsInstance] Updated TranscriptionsInstance
|
|
618
625
|
def update(
|
|
619
|
-
status: :unset
|
|
626
|
+
status: :unset,
|
|
627
|
+
configuration: :unset
|
|
620
628
|
)
|
|
621
629
|
|
|
622
630
|
context.update(
|
|
623
631
|
status: status,
|
|
632
|
+
configuration: configuration,
|
|
624
633
|
)
|
|
625
634
|
end
|
|
626
635
|
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twilio-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.10.
|
|
4
|
+
version: 7.10.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Twilio API Team
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: jwt
|
|
@@ -190,12 +189,11 @@ dependencies:
|
|
|
190
189
|
version: 1.4.2
|
|
191
190
|
description: The official library for communicating with the Twilio REST API, building
|
|
192
191
|
TwiML, and generating Twilio JWT Capability Tokens
|
|
193
|
-
email:
|
|
194
192
|
executables: []
|
|
195
193
|
extensions: []
|
|
196
194
|
extra_rdoc_files:
|
|
197
|
-
- README.md
|
|
198
195
|
- LICENSE
|
|
196
|
+
- README.md
|
|
199
197
|
files:
|
|
200
198
|
- ".dockerignore"
|
|
201
199
|
- ".github/ISSUE_TEMPLATE/bug_report.yml"
|
|
@@ -463,6 +461,7 @@ files:
|
|
|
463
461
|
- lib/twilio-ruby/rest/flex_api/v1/assessments.rb
|
|
464
462
|
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
|
|
465
463
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
|
464
|
+
- lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb
|
|
466
465
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
|
467
466
|
- lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb
|
|
468
467
|
- lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb
|
|
@@ -666,6 +665,7 @@ files:
|
|
|
666
665
|
- lib/twilio-ruby/rest/oauth/v1/authorize.rb
|
|
667
666
|
- lib/twilio-ruby/rest/oauth/v1/token.rb
|
|
668
667
|
- lib/twilio-ruby/rest/oauth/v2.rb
|
|
668
|
+
- lib/twilio-ruby/rest/oauth/v2/authorize.rb
|
|
669
669
|
- lib/twilio-ruby/rest/oauth/v2/token.rb
|
|
670
670
|
- lib/twilio-ruby/rest/oauth_base.rb
|
|
671
671
|
- lib/twilio-ruby/rest/preview.rb
|
|
@@ -928,7 +928,6 @@ licenses:
|
|
|
928
928
|
metadata:
|
|
929
929
|
documentation_uri: https://www.twilio.com/docs/libraries/reference/twilio-ruby/
|
|
930
930
|
yard.run: yri
|
|
931
|
-
post_install_message:
|
|
932
931
|
rdoc_options:
|
|
933
932
|
- "--line-numbers"
|
|
934
933
|
- "--inline-source"
|
|
@@ -949,9 +948,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
949
948
|
- !ruby/object:Gem::Version
|
|
950
949
|
version: '0'
|
|
951
950
|
requirements: []
|
|
952
|
-
|
|
953
|
-
rubygems_version: 2.6.14.4
|
|
954
|
-
signing_key:
|
|
951
|
+
rubygems_version: 4.0.7
|
|
955
952
|
specification_version: 4
|
|
956
953
|
summary: The official library for communicating with the Twilio REST API, building
|
|
957
954
|
TwiML, and generating Twilio JWT Capability Tokens
|