twilio-ruby 7.5.0 → 7.5.1
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 +4 -4
- data/CHANGES.md +12 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -0
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -39
- data/lib/twilio-ruby/rest/iam/v1/token.rb +186 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +6 -0
- data/lib/twilio-ruby/rest/preview_base.rb +0 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +2 -2
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +3 -12
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -407
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -472
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -467
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -407
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -444
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -470
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -407
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -444
- data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -529
- data/lib/twilio-ruby/rest/preview/sync.rb +0 -49
@@ -1,407 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
-
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
-
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
-
#
|
7
|
-
# Twilio - Preview
|
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 Preview < PreviewBase
|
19
|
-
class Sync < Version
|
20
|
-
class ServiceContext < InstanceContext
|
21
|
-
class SyncListContext < InstanceContext
|
22
|
-
|
23
|
-
class SyncListPermissionList < ListResource
|
24
|
-
|
25
|
-
##
|
26
|
-
# Initialize the SyncListPermissionList
|
27
|
-
# @param [Version] version Version that contains the resource
|
28
|
-
# @return [SyncListPermissionList] SyncListPermissionList
|
29
|
-
def initialize(version, service_sid: nil, list_sid: nil)
|
30
|
-
super(version)
|
31
|
-
# Path Solution
|
32
|
-
@solution = { service_sid: service_sid, list_sid: list_sid }
|
33
|
-
@uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:list_sid]}/Permissions"
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
##
|
38
|
-
# Lists SyncListPermissionInstance records from the API as a list.
|
39
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
40
|
-
# memory before returning.
|
41
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
42
|
-
# guarantees to never return more than limit. Default is no limit
|
43
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
44
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
45
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
46
|
-
# efficient page size, i.e. min(limit, 1000)
|
47
|
-
# @return [Array] Array of up to limit results
|
48
|
-
def list(limit: nil, page_size: nil)
|
49
|
-
self.stream(
|
50
|
-
limit: limit,
|
51
|
-
page_size: page_size
|
52
|
-
).entries
|
53
|
-
end
|
54
|
-
|
55
|
-
##
|
56
|
-
# Streams Instance records from the API as an Enumerable.
|
57
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
58
|
-
# is reached.
|
59
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
60
|
-
# guarantees to never return more than limit. Default is no limit
|
61
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
62
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
63
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
64
|
-
# efficient page size, i.e. min(limit, 1000)
|
65
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
66
|
-
def stream(limit: nil, page_size: nil)
|
67
|
-
limits = @version.read_limits(limit, page_size)
|
68
|
-
|
69
|
-
page = self.page(
|
70
|
-
page_size: limits[:page_size], )
|
71
|
-
|
72
|
-
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
73
|
-
end
|
74
|
-
|
75
|
-
##
|
76
|
-
# When passed a block, yields SyncListPermissionInstance records from the API.
|
77
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
78
|
-
# is reached.
|
79
|
-
def each
|
80
|
-
limits = @version.read_limits
|
81
|
-
|
82
|
-
page = self.page(page_size: limits[:page_size], )
|
83
|
-
|
84
|
-
@version.stream(page,
|
85
|
-
limit: limits[:limit],
|
86
|
-
page_limit: limits[:page_limit]).each {|x| yield x}
|
87
|
-
end
|
88
|
-
|
89
|
-
##
|
90
|
-
# Retrieve a single page of SyncListPermissionInstance records from the API.
|
91
|
-
# Request is executed immediately.
|
92
|
-
# @param [String] page_token PageToken provided by the API
|
93
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
94
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
95
|
-
# @return [Page] Page of SyncListPermissionInstance
|
96
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
97
|
-
params = Twilio::Values.of({
|
98
|
-
'PageToken' => page_token,
|
99
|
-
'Page' => page_number,
|
100
|
-
'PageSize' => page_size,
|
101
|
-
})
|
102
|
-
headers = Twilio::Values.of({})
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
response = @version.page('GET', @uri, params: params, headers: headers)
|
107
|
-
|
108
|
-
SyncListPermissionPage.new(@version, response, @solution)
|
109
|
-
end
|
110
|
-
|
111
|
-
##
|
112
|
-
# Retrieve a single page of SyncListPermissionInstance records from the API.
|
113
|
-
# Request is executed immediately.
|
114
|
-
# @param [String] target_url API-generated URL for the requested results page
|
115
|
-
# @return [Page] Page of SyncListPermissionInstance
|
116
|
-
def get_page(target_url)
|
117
|
-
response = @version.domain.request(
|
118
|
-
'GET',
|
119
|
-
target_url
|
120
|
-
)
|
121
|
-
SyncListPermissionPage.new(@version, response, @solution)
|
122
|
-
end
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
# Provide a user friendly representation
|
127
|
-
def to_s
|
128
|
-
'#<Twilio.Preview.Sync.SyncListPermissionList>'
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
|
133
|
-
class SyncListPermissionContext < InstanceContext
|
134
|
-
##
|
135
|
-
# Initialize the SyncListPermissionContext
|
136
|
-
# @param [Version] version Version that contains the resource
|
137
|
-
# @param [String] service_sid The unique SID identifier of the Sync Service Instance.
|
138
|
-
# @param [String] list_sid Identifier of the Sync List. Either a SID or a unique name.
|
139
|
-
# @param [String] identity Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer.
|
140
|
-
# @return [SyncListPermissionContext] SyncListPermissionContext
|
141
|
-
def initialize(version, service_sid, list_sid, identity)
|
142
|
-
super(version)
|
143
|
-
|
144
|
-
# Path Solution
|
145
|
-
@solution = { service_sid: service_sid, list_sid: list_sid, identity: identity, }
|
146
|
-
@uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:list_sid]}/Permissions/#{@solution[:identity]}"
|
147
|
-
|
148
|
-
|
149
|
-
end
|
150
|
-
##
|
151
|
-
# Delete the SyncListPermissionInstance
|
152
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
153
|
-
def delete
|
154
|
-
|
155
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
@version.delete('DELETE', @uri, headers: headers)
|
160
|
-
end
|
161
|
-
|
162
|
-
##
|
163
|
-
# Fetch the SyncListPermissionInstance
|
164
|
-
# @return [SyncListPermissionInstance] Fetched SyncListPermissionInstance
|
165
|
-
def fetch
|
166
|
-
|
167
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
payload = @version.fetch('GET', @uri, headers: headers)
|
174
|
-
SyncListPermissionInstance.new(
|
175
|
-
@version,
|
176
|
-
payload,
|
177
|
-
service_sid: @solution[:service_sid],
|
178
|
-
list_sid: @solution[:list_sid],
|
179
|
-
identity: @solution[:identity],
|
180
|
-
)
|
181
|
-
end
|
182
|
-
|
183
|
-
##
|
184
|
-
# Update the SyncListPermissionInstance
|
185
|
-
# @param [Boolean] read Boolean flag specifying whether the identity can read the Sync List.
|
186
|
-
# @param [Boolean] write Boolean flag specifying whether the identity can create, update and delete Items of the Sync List.
|
187
|
-
# @param [Boolean] manage Boolean flag specifying whether the identity can delete the Sync List.
|
188
|
-
# @return [SyncListPermissionInstance] Updated SyncListPermissionInstance
|
189
|
-
def update(
|
190
|
-
read: nil,
|
191
|
-
write: nil,
|
192
|
-
manage: nil
|
193
|
-
)
|
194
|
-
|
195
|
-
data = Twilio::Values.of({
|
196
|
-
'Read' => read,
|
197
|
-
'Write' => write,
|
198
|
-
'Manage' => manage,
|
199
|
-
})
|
200
|
-
|
201
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
payload = @version.update('POST', @uri, data: data, headers: headers)
|
208
|
-
SyncListPermissionInstance.new(
|
209
|
-
@version,
|
210
|
-
payload,
|
211
|
-
service_sid: @solution[:service_sid],
|
212
|
-
list_sid: @solution[:list_sid],
|
213
|
-
identity: @solution[:identity],
|
214
|
-
)
|
215
|
-
end
|
216
|
-
|
217
|
-
|
218
|
-
##
|
219
|
-
# Provide a user friendly representation
|
220
|
-
def to_s
|
221
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
222
|
-
"#<Twilio.Preview.Sync.SyncListPermissionContext #{context}>"
|
223
|
-
end
|
224
|
-
|
225
|
-
##
|
226
|
-
# Provide a detailed, user friendly representation
|
227
|
-
def inspect
|
228
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
229
|
-
"#<Twilio.Preview.Sync.SyncListPermissionContext #{context}>"
|
230
|
-
end
|
231
|
-
end
|
232
|
-
|
233
|
-
class SyncListPermissionPage < Page
|
234
|
-
##
|
235
|
-
# Initialize the SyncListPermissionPage
|
236
|
-
# @param [Version] version Version that contains the resource
|
237
|
-
# @param [Response] response Response from the API
|
238
|
-
# @param [Hash] solution Path solution for the resource
|
239
|
-
# @return [SyncListPermissionPage] SyncListPermissionPage
|
240
|
-
def initialize(version, response, solution)
|
241
|
-
super(version, response)
|
242
|
-
|
243
|
-
# Path Solution
|
244
|
-
@solution = solution
|
245
|
-
end
|
246
|
-
|
247
|
-
##
|
248
|
-
# Build an instance of SyncListPermissionInstance
|
249
|
-
# @param [Hash] payload Payload response from the API
|
250
|
-
# @return [SyncListPermissionInstance] SyncListPermissionInstance
|
251
|
-
def get_instance(payload)
|
252
|
-
SyncListPermissionInstance.new(@version, payload, service_sid: @solution[:service_sid], list_sid: @solution[:list_sid])
|
253
|
-
end
|
254
|
-
|
255
|
-
##
|
256
|
-
# Provide a user friendly representation
|
257
|
-
def to_s
|
258
|
-
'<Twilio.Preview.Sync.SyncListPermissionPage>'
|
259
|
-
end
|
260
|
-
end
|
261
|
-
class SyncListPermissionInstance < InstanceResource
|
262
|
-
##
|
263
|
-
# Initialize the SyncListPermissionInstance
|
264
|
-
# @param [Version] version Version that contains the resource
|
265
|
-
# @param [Hash] payload payload that contains response from Twilio
|
266
|
-
# @param [String] account_sid The SID of the
|
267
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this SyncListPermission
|
268
|
-
# resource.
|
269
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
270
|
-
# @return [SyncListPermissionInstance] SyncListPermissionInstance
|
271
|
-
def initialize(version, payload , service_sid: nil, list_sid: nil, identity: nil)
|
272
|
-
super(version)
|
273
|
-
|
274
|
-
# Marshaled Properties
|
275
|
-
@properties = {
|
276
|
-
'account_sid' => payload['account_sid'],
|
277
|
-
'service_sid' => payload['service_sid'],
|
278
|
-
'list_sid' => payload['list_sid'],
|
279
|
-
'identity' => payload['identity'],
|
280
|
-
'read' => payload['read'],
|
281
|
-
'write' => payload['write'],
|
282
|
-
'manage' => payload['manage'],
|
283
|
-
'url' => payload['url'],
|
284
|
-
}
|
285
|
-
|
286
|
-
# Context
|
287
|
-
@instance_context = nil
|
288
|
-
@params = { 'service_sid' => service_sid || @properties['service_sid'] ,'list_sid' => list_sid || @properties['list_sid'] ,'identity' => identity || @properties['identity'] , }
|
289
|
-
end
|
290
|
-
|
291
|
-
##
|
292
|
-
# Generate an instance context for the instance, the context is capable of
|
293
|
-
# performing various actions. All instance actions are proxied to the context
|
294
|
-
# @return [SyncListPermissionContext] CallContext for this CallInstance
|
295
|
-
def context
|
296
|
-
unless @instance_context
|
297
|
-
@instance_context = SyncListPermissionContext.new(@version , @params['service_sid'], @params['list_sid'], @params['identity'])
|
298
|
-
end
|
299
|
-
@instance_context
|
300
|
-
end
|
301
|
-
|
302
|
-
##
|
303
|
-
# @return [String] The unique SID identifier of the Twilio Account.
|
304
|
-
def account_sid
|
305
|
-
@properties['account_sid']
|
306
|
-
end
|
307
|
-
|
308
|
-
##
|
309
|
-
# @return [String] The unique SID identifier of the Sync Service Instance.
|
310
|
-
def service_sid
|
311
|
-
@properties['service_sid']
|
312
|
-
end
|
313
|
-
|
314
|
-
##
|
315
|
-
# @return [String] The unique SID identifier of the Sync List to which the Permission applies.
|
316
|
-
def list_sid
|
317
|
-
@properties['list_sid']
|
318
|
-
end
|
319
|
-
|
320
|
-
##
|
321
|
-
# @return [String] Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer.
|
322
|
-
def identity
|
323
|
-
@properties['identity']
|
324
|
-
end
|
325
|
-
|
326
|
-
##
|
327
|
-
# @return [Boolean] Boolean flag specifying whether the identity can read the Sync List and its Items.
|
328
|
-
def read
|
329
|
-
@properties['read']
|
330
|
-
end
|
331
|
-
|
332
|
-
##
|
333
|
-
# @return [Boolean] Boolean flag specifying whether the identity can create, update and delete Items of the Sync List.
|
334
|
-
def write
|
335
|
-
@properties['write']
|
336
|
-
end
|
337
|
-
|
338
|
-
##
|
339
|
-
# @return [Boolean] Boolean flag specifying whether the identity can delete the Sync List.
|
340
|
-
def manage
|
341
|
-
@properties['manage']
|
342
|
-
end
|
343
|
-
|
344
|
-
##
|
345
|
-
# @return [String] Contains an absolute URL for this Sync List Permission.
|
346
|
-
def url
|
347
|
-
@properties['url']
|
348
|
-
end
|
349
|
-
|
350
|
-
##
|
351
|
-
# Delete the SyncListPermissionInstance
|
352
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
353
|
-
def delete
|
354
|
-
|
355
|
-
context.delete
|
356
|
-
end
|
357
|
-
|
358
|
-
##
|
359
|
-
# Fetch the SyncListPermissionInstance
|
360
|
-
# @return [SyncListPermissionInstance] Fetched SyncListPermissionInstance
|
361
|
-
def fetch
|
362
|
-
|
363
|
-
context.fetch
|
364
|
-
end
|
365
|
-
|
366
|
-
##
|
367
|
-
# Update the SyncListPermissionInstance
|
368
|
-
# @param [Boolean] read Boolean flag specifying whether the identity can read the Sync List.
|
369
|
-
# @param [Boolean] write Boolean flag specifying whether the identity can create, update and delete Items of the Sync List.
|
370
|
-
# @param [Boolean] manage Boolean flag specifying whether the identity can delete the Sync List.
|
371
|
-
# @return [SyncListPermissionInstance] Updated SyncListPermissionInstance
|
372
|
-
def update(
|
373
|
-
read: nil,
|
374
|
-
write: nil,
|
375
|
-
manage: nil
|
376
|
-
)
|
377
|
-
|
378
|
-
context.update(
|
379
|
-
read: read,
|
380
|
-
write: write,
|
381
|
-
manage: manage,
|
382
|
-
)
|
383
|
-
end
|
384
|
-
|
385
|
-
##
|
386
|
-
# Provide a user friendly representation
|
387
|
-
def to_s
|
388
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
389
|
-
"<Twilio.Preview.Sync.SyncListPermissionInstance #{values}>"
|
390
|
-
end
|
391
|
-
|
392
|
-
##
|
393
|
-
# Provide a detailed, user friendly representation
|
394
|
-
def inspect
|
395
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
396
|
-
"<Twilio.Preview.Sync.SyncListPermissionInstance #{values}>"
|
397
|
-
end
|
398
|
-
end
|
399
|
-
|
400
|
-
end
|
401
|
-
end
|
402
|
-
end
|
403
|
-
end
|
404
|
-
end
|
405
|
-
end
|
406
|
-
|
407
|
-
|