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