twilio-ruby 5.66.2 → 5.67.2

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.
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.66.2
4
+ version: 5.67.2
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-04-20 00:00:00.000000000 Z
11
+ date: 2022-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '0.9'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '2.0'
62
+ version: '3.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '0.9'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '2.0'
72
+ version: '3.0'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: bundler
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -418,10 +418,6 @@ files:
418
418
  - lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb
419
419
  - lib/twilio-ruby/rest/events/v1/subscription.rb
420
420
  - lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb
421
- - lib/twilio-ruby/rest/fax.rb
422
- - lib/twilio-ruby/rest/fax/v1.rb
423
- - lib/twilio-ruby/rest/fax/v1/fax.rb
424
- - lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb
425
421
  - lib/twilio-ruby/rest/flex_api.rb
426
422
  - lib/twilio-ruby/rest/flex_api/v1.rb
427
423
  - lib/twilio-ruby/rest/flex_api/v1/channel.rb
@@ -1,314 +0,0 @@
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 Fax < Domain
12
- class V1 < Version
13
- class FaxContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
- class FaxMediaList < ListResource
17
- ##
18
- # Initialize the FaxMediaList
19
- # @param [Version] version Version that contains the resource
20
- # @param [String] fax_sid The SID of the fax the FaxMedia resource is associated
21
- # with.
22
- # @return [FaxMediaList] FaxMediaList
23
- def initialize(version, fax_sid: nil)
24
- super(version)
25
-
26
- # Path Solution
27
- @solution = {fax_sid: fax_sid}
28
- @uri = "/Faxes/#{@solution[:fax_sid]}/Media"
29
- end
30
-
31
- ##
32
- # Lists FaxMediaInstance records from the API as a list.
33
- # Unlike stream(), this operation is eager and will load `limit` records into
34
- # memory before returning.
35
- # @param [Integer] limit Upper limit for the number of records to return. stream()
36
- # guarantees to never return more than limit. Default is no limit
37
- # @param [Integer] page_size Number of records to fetch per request, when
38
- # not set will use the default value of 50 records. If no page_size is defined
39
- # but a limit is defined, stream() will attempt to read the limit with the most
40
- # efficient page size, i.e. min(limit, 1000)
41
- # @return [Array] Array of up to limit results
42
- def list(limit: nil, page_size: nil)
43
- self.stream(limit: limit, page_size: page_size).entries
44
- end
45
-
46
- ##
47
- # Streams FaxMediaInstance records from the API as an Enumerable.
48
- # This operation lazily loads records as efficiently as possible until the limit
49
- # is reached.
50
- # @param [Integer] limit Upper limit for the number of records to return. stream()
51
- # guarantees to never return more than limit. Default is no limit.
52
- # @param [Integer] page_size Number of records to fetch per request, when
53
- # not set will use the default value of 50 records. If no page_size is defined
54
- # but a limit is defined, stream() will attempt to read the limit with the most
55
- # efficient page size, i.e. min(limit, 1000)
56
- # @return [Enumerable] Enumerable that will yield up to limit results
57
- def stream(limit: nil, page_size: nil)
58
- limits = @version.read_limits(limit, page_size)
59
-
60
- page = self.page(page_size: limits[:page_size], )
61
-
62
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
63
- end
64
-
65
- ##
66
- # When passed a block, yields FaxMediaInstance records from the API.
67
- # This operation lazily loads records as efficiently as possible until the limit
68
- # is reached.
69
- def each
70
- limits = @version.read_limits
71
-
72
- page = self.page(page_size: limits[:page_size], )
73
-
74
- @version.stream(page,
75
- limit: limits[:limit],
76
- page_limit: limits[:page_limit]).each {|x| yield x}
77
- end
78
-
79
- ##
80
- # Retrieve a single page of FaxMediaInstance records from the API.
81
- # Request is executed immediately.
82
- # @param [String] page_token PageToken provided by the API
83
- # @param [Integer] page_number Page Number, this value is simply for client state
84
- # @param [Integer] page_size Number of records to return, defaults to 50
85
- # @return [Page] Page of FaxMediaInstance
86
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
87
- params = Twilio::Values.of({
88
- 'PageToken' => page_token,
89
- 'Page' => page_number,
90
- 'PageSize' => page_size,
91
- })
92
-
93
- response = @version.page('GET', @uri, params: params)
94
-
95
- FaxMediaPage.new(@version, response, @solution)
96
- end
97
-
98
- ##
99
- # Retrieve a single page of FaxMediaInstance records from the API.
100
- # Request is executed immediately.
101
- # @param [String] target_url API-generated URL for the requested results page
102
- # @return [Page] Page of FaxMediaInstance
103
- def get_page(target_url)
104
- response = @version.domain.request(
105
- 'GET',
106
- target_url
107
- )
108
- FaxMediaPage.new(@version, response, @solution)
109
- end
110
-
111
- ##
112
- # Provide a user friendly representation
113
- def to_s
114
- '#<Twilio.Fax.V1.FaxMediaList>'
115
- end
116
- end
117
-
118
- ##
119
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
120
- class FaxMediaPage < Page
121
- ##
122
- # Initialize the FaxMediaPage
123
- # @param [Version] version Version that contains the resource
124
- # @param [Response] response Response from the API
125
- # @param [Hash] solution Path solution for the resource
126
- # @return [FaxMediaPage] FaxMediaPage
127
- def initialize(version, response, solution)
128
- super(version, response)
129
-
130
- # Path Solution
131
- @solution = solution
132
- end
133
-
134
- ##
135
- # Build an instance of FaxMediaInstance
136
- # @param [Hash] payload Payload response from the API
137
- # @return [FaxMediaInstance] FaxMediaInstance
138
- def get_instance(payload)
139
- FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], )
140
- end
141
-
142
- ##
143
- # Provide a user friendly representation
144
- def to_s
145
- '<Twilio.Fax.V1.FaxMediaPage>'
146
- end
147
- end
148
-
149
- ##
150
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
151
- class FaxMediaContext < InstanceContext
152
- ##
153
- # Initialize the FaxMediaContext
154
- # @param [Version] version Version that contains the resource
155
- # @param [String] fax_sid The SID of the fax with the FaxMedia resource to fetch.
156
- # @param [String] sid The Twilio-provided string that uniquely identifies the
157
- # FaxMedia resource to fetch.
158
- # @return [FaxMediaContext] FaxMediaContext
159
- def initialize(version, fax_sid, sid)
160
- super(version)
161
-
162
- # Path Solution
163
- @solution = {fax_sid: fax_sid, sid: sid, }
164
- @uri = "/Faxes/#{@solution[:fax_sid]}/Media/#{@solution[:sid]}"
165
- end
166
-
167
- ##
168
- # Fetch the FaxMediaInstance
169
- # @return [FaxMediaInstance] Fetched FaxMediaInstance
170
- def fetch
171
- payload = @version.fetch('GET', @uri)
172
-
173
- FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid], )
174
- end
175
-
176
- ##
177
- # Delete the FaxMediaInstance
178
- # @return [Boolean] true if delete succeeds, false otherwise
179
- def delete
180
- @version.delete('DELETE', @uri)
181
- end
182
-
183
- ##
184
- # Provide a user friendly representation
185
- def to_s
186
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
187
- "#<Twilio.Fax.V1.FaxMediaContext #{context}>"
188
- end
189
-
190
- ##
191
- # Provide a detailed, user friendly representation
192
- def inspect
193
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
194
- "#<Twilio.Fax.V1.FaxMediaContext #{context}>"
195
- end
196
- end
197
-
198
- ##
199
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
200
- class FaxMediaInstance < InstanceResource
201
- ##
202
- # Initialize the FaxMediaInstance
203
- # @param [Version] version Version that contains the resource
204
- # @param [Hash] payload payload that contains response from Twilio
205
- # @param [String] fax_sid The SID of the fax the FaxMedia resource is associated
206
- # with.
207
- # @param [String] sid The Twilio-provided string that uniquely identifies the
208
- # FaxMedia resource to fetch.
209
- # @return [FaxMediaInstance] FaxMediaInstance
210
- def initialize(version, payload, fax_sid: nil, sid: nil)
211
- super(version)
212
-
213
- # Marshaled Properties
214
- @properties = {
215
- 'sid' => payload['sid'],
216
- 'account_sid' => payload['account_sid'],
217
- 'fax_sid' => payload['fax_sid'],
218
- 'content_type' => payload['content_type'],
219
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
220
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
221
- 'url' => payload['url'],
222
- }
223
-
224
- # Context
225
- @instance_context = nil
226
- @params = {'fax_sid' => fax_sid, 'sid' => sid || @properties['sid'], }
227
- end
228
-
229
- ##
230
- # Generate an instance context for the instance, the context is capable of
231
- # performing various actions. All instance actions are proxied to the context
232
- # @return [FaxMediaContext] FaxMediaContext for this FaxMediaInstance
233
- def context
234
- unless @instance_context
235
- @instance_context = FaxMediaContext.new(@version, @params['fax_sid'], @params['sid'], )
236
- end
237
- @instance_context
238
- end
239
-
240
- ##
241
- # @return [String] The unique string that identifies the resource
242
- def sid
243
- @properties['sid']
244
- end
245
-
246
- ##
247
- # @return [String] The SID of the Account that created the resource
248
- def account_sid
249
- @properties['account_sid']
250
- end
251
-
252
- ##
253
- # @return [String] The SID of the fax the FaxMedia resource is associated with
254
- def fax_sid
255
- @properties['fax_sid']
256
- end
257
-
258
- ##
259
- # @return [String] The content type of the stored fax media
260
- def content_type
261
- @properties['content_type']
262
- end
263
-
264
- ##
265
- # @return [Time] The ISO 8601 date and time in GMT when the resource was created
266
- def date_created
267
- @properties['date_created']
268
- end
269
-
270
- ##
271
- # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
272
- def date_updated
273
- @properties['date_updated']
274
- end
275
-
276
- ##
277
- # @return [String] The absolute URL of the FaxMedia resource
278
- def url
279
- @properties['url']
280
- end
281
-
282
- ##
283
- # Fetch the FaxMediaInstance
284
- # @return [FaxMediaInstance] Fetched FaxMediaInstance
285
- def fetch
286
- context.fetch
287
- end
288
-
289
- ##
290
- # Delete the FaxMediaInstance
291
- # @return [Boolean] true if delete succeeds, false otherwise
292
- def delete
293
- context.delete
294
- end
295
-
296
- ##
297
- # Provide a user friendly representation
298
- def to_s
299
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
300
- "<Twilio.Fax.V1.FaxMediaInstance #{values}>"
301
- end
302
-
303
- ##
304
- # Provide a detailed, user friendly representation
305
- def inspect
306
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
307
- "<Twilio.Fax.V1.FaxMediaInstance #{values}>"
308
- end
309
- end
310
- end
311
- end
312
- end
313
- end
314
- end