twilio-ruby 7.0.0.pre.rc.2 → 7.0.0.pre.rc.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1730c85dbb2c0da063c2c73ea90bc28b87fb5015
4
- data.tar.gz: 70485b2a857f7076f8c2d05c4c4a43286688392c
3
+ metadata.gz: b26986efc81d3a3fffc2b6d307adc1c448f93691
4
+ data.tar.gz: e7e446ff01aa4c4ca736cf1f231304ae52da786d
5
5
  SHA512:
6
- metadata.gz: abbb783d2713dc054fcb827acdbf12a772764d0bcfff66432033c9eaedb6a60750986ae1afcf43164f653130e51df07976d49f9943632cad5c9e472a190c53ec
7
- data.tar.gz: 8cfbd2b13dad2fe85106abdb37cbded08d7828e961d9e2f87782240f11c75101fa39031a7b5a4ff4284d8b0fff9dc139f622c3e28144cc8afcfdf7ef4e8a4039
6
+ metadata.gz: 3420cc10ea1b8f7bca5772d2bcfe7cdf041b166245d292f82bde90206b32d40bc5685e8553918df81ee264f84b3ca6aae4e31de1d071d63de55abcb658712465
7
+ data.tar.gz: b07b4864e25cbf7971e63b71fad9681fd5763f86070a87246bb09e4b44a079c5d98a94e2ecad10b7650205d87c1e39c3f3f1da0dba59f213175e434e5e15a746
data/CHANGES.md CHANGED
@@ -2,6 +2,12 @@ twilio-ruby changelog
2
2
  =====================
3
3
 
4
4
 
5
+ [2024-03-14] Version 7.0.0-rc.3
6
+ -------------------------------
7
+ **Oauth**
8
+ - Add new APIs for vendor authorize and token endpoints
9
+
10
+
5
11
  [2024-03-12] Version 7.0.0-rc.2
6
12
  -------------------------------
7
13
  **Library - Chore**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 7.0.0-rc.2'
42
+ gem 'twilio-ruby', '~> 7.0.0-rc.3'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 7.0.0-rc.2
48
+ gem install twilio-ruby -v 7.0.0-rc.3
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -165,7 +165,11 @@ module Twilio
165
165
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
166
166
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
167
167
  # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
168
+ # @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
169
+ # @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
168
170
  # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
171
+ # @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
172
+ # @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
169
173
  # @param [Integer] limit Upper limit for the number of records to return. stream()
170
174
  # guarantees to never return more than limit. Default is no limit
171
175
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -173,14 +177,18 @@ module Twilio
173
177
  # but a limit is defined, stream() will attempt to read the limit with the most
174
178
  # efficient page size, i.e. min(limit, 1000)
175
179
  # @return [Array] Array of up to limit results
176
- def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
180
+ def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, limit: nil, page_size: nil)
177
181
  self.stream(
178
182
  to: to,
179
183
  from: from,
180
184
  parent_call_sid: parent_call_sid,
181
185
  status: status,
182
186
  start_time: start_time,
187
+ start_time_before: start_time_before,
188
+ start_time_after: start_time_after,
183
189
  end_time: end_time,
190
+ end_time_before: end_time_before,
191
+ end_time_after: end_time_after,
184
192
  limit: limit,
185
193
  page_size: page_size
186
194
  ).entries
@@ -195,7 +203,11 @@ module Twilio
195
203
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
196
204
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
197
205
  # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
206
+ # @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
207
+ # @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
198
208
  # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
209
+ # @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
210
+ # @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
199
211
  # @param [Integer] limit Upper limit for the number of records to return. stream()
200
212
  # guarantees to never return more than limit. Default is no limit
201
213
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -203,7 +215,7 @@ module Twilio
203
215
  # but a limit is defined, stream() will attempt to read the limit with the most
204
216
  # efficient page size, i.e. min(limit, 1000)
205
217
  # @return [Enumerable] Enumerable that will yield up to limit results
206
- def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
218
+ def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, limit: nil, page_size: nil)
207
219
  limits = @version.read_limits(limit, page_size)
208
220
 
209
221
  page = self.page(
@@ -212,7 +224,11 @@ module Twilio
212
224
  parent_call_sid: parent_call_sid,
213
225
  status: status,
214
226
  start_time: start_time,
227
+ start_time_before: start_time_before,
228
+ start_time_after: start_time_after,
215
229
  end_time: end_time,
230
+ end_time_before: end_time_before,
231
+ end_time_after: end_time_after,
216
232
  page_size: limits[:page_size], )
217
233
 
218
234
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -240,19 +256,27 @@ module Twilio
240
256
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
241
257
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
242
258
  # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
259
+ # @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
260
+ # @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
243
261
  # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
262
+ # @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
263
+ # @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
244
264
  # @param [String] page_token PageToken provided by the API
245
265
  # @param [Integer] page_number Page Number, this value is simply for client state
246
266
  # @param [Integer] page_size Number of records to return, defaults to 50
247
267
  # @return [Page] Page of CallInstance
248
- def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
268
+ def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
249
269
  params = Twilio::Values.of({
250
270
  'To' => to,
251
271
  'From' => from,
252
272
  'ParentCallSid' => parent_call_sid,
253
273
  'Status' => status,
254
274
  'StartTime' => Twilio.serialize_iso8601_datetime(start_time),
275
+ 'StartTime<' => Twilio.serialize_iso8601_datetime(start_time_before),
276
+ 'StartTime>' => Twilio.serialize_iso8601_datetime(start_time_after),
255
277
  'EndTime' => Twilio.serialize_iso8601_datetime(end_time),
278
+ 'EndTime<' => Twilio.serialize_iso8601_datetime(end_time_before),
279
+ 'EndTime>' => Twilio.serialize_iso8601_datetime(end_time_after),
256
280
  'PageToken' => page_token,
257
281
  'Page' => page_number,
258
282
  'PageSize' => page_size,
@@ -38,7 +38,11 @@ module Twilio
38
38
  # Unlike stream(), this operation is eager and will load `limit` records into
39
39
  # memory before returning.
40
40
  # @param [Date] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
41
+ # @param [Date] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
42
+ # @param [Date] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
41
43
  # @param [Date] date_updated The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
44
+ # @param [Date] date_updated_before The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
45
+ # @param [Date] date_updated_after The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
42
46
  # @param [String] friendly_name The string that identifies the Conference resources to read.
43
47
  # @param [Status] status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
44
48
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -48,10 +52,14 @@ module Twilio
48
52
  # but a limit is defined, stream() will attempt to read the limit with the most
49
53
  # efficient page size, i.e. min(limit, 1000)
50
54
  # @return [Array] Array of up to limit results
51
- def list(date_created: :unset, date_updated: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
55
+ def list(date_created: :unset, date_created_before: :unset, date_created_after: :unset, date_updated: :unset, date_updated_before: :unset, date_updated_after: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
52
56
  self.stream(
53
57
  date_created: date_created,
58
+ date_created_before: date_created_before,
59
+ date_created_after: date_created_after,
54
60
  date_updated: date_updated,
61
+ date_updated_before: date_updated_before,
62
+ date_updated_after: date_updated_after,
55
63
  friendly_name: friendly_name,
56
64
  status: status,
57
65
  limit: limit,
@@ -64,7 +72,11 @@ module Twilio
64
72
  # This operation lazily loads records as efficiently as possible until the limit
65
73
  # is reached.
66
74
  # @param [Date] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
75
+ # @param [Date] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
76
+ # @param [Date] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
67
77
  # @param [Date] date_updated The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
78
+ # @param [Date] date_updated_before The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
79
+ # @param [Date] date_updated_after The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
68
80
  # @param [String] friendly_name The string that identifies the Conference resources to read.
69
81
  # @param [Status] status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
70
82
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -74,12 +86,16 @@ module Twilio
74
86
  # but a limit is defined, stream() will attempt to read the limit with the most
75
87
  # efficient page size, i.e. min(limit, 1000)
76
88
  # @return [Enumerable] Enumerable that will yield up to limit results
77
- def stream(date_created: :unset, date_updated: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
89
+ def stream(date_created: :unset, date_created_before: :unset, date_created_after: :unset, date_updated: :unset, date_updated_before: :unset, date_updated_after: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
78
90
  limits = @version.read_limits(limit, page_size)
79
91
 
80
92
  page = self.page(
81
93
  date_created: date_created,
94
+ date_created_before: date_created_before,
95
+ date_created_after: date_created_after,
82
96
  date_updated: date_updated,
97
+ date_updated_before: date_updated_before,
98
+ date_updated_after: date_updated_after,
83
99
  friendly_name: friendly_name,
84
100
  status: status,
85
101
  page_size: limits[:page_size], )
@@ -105,17 +121,25 @@ module Twilio
105
121
  # Retrieve a single page of ConferenceInstance records from the API.
106
122
  # Request is executed immediately.
107
123
  # @param [Date] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
124
+ # @param [Date] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
125
+ # @param [Date] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
108
126
  # @param [Date] date_updated The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
127
+ # @param [Date] date_updated_before The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
128
+ # @param [Date] date_updated_after The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
109
129
  # @param [String] friendly_name The string that identifies the Conference resources to read.
110
130
  # @param [Status] status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
111
131
  # @param [String] page_token PageToken provided by the API
112
132
  # @param [Integer] page_number Page Number, this value is simply for client state
113
133
  # @param [Integer] page_size Number of records to return, defaults to 50
114
134
  # @return [Page] Page of ConferenceInstance
115
- def page(date_created: :unset, date_updated: :unset, friendly_name: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
135
+ def page(date_created: :unset, date_created_before: :unset, date_created_after: :unset, date_updated: :unset, date_updated_before: :unset, date_updated_after: :unset, friendly_name: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
116
136
  params = Twilio::Values.of({
117
137
  'DateCreated' => Twilio.serialize_iso8601_date(date_created),
138
+ 'DateCreated<' => Twilio.serialize_iso8601_date(date_created_before),
139
+ 'DateCreated>' => Twilio.serialize_iso8601_date(date_created_after),
118
140
  'DateUpdated' => Twilio.serialize_iso8601_date(date_updated),
141
+ 'DateUpdated<' => Twilio.serialize_iso8601_date(date_updated_before),
142
+ 'DateUpdated>' => Twilio.serialize_iso8601_date(date_updated_after),
119
143
  'FriendlyName' => friendly_name,
120
144
  'Status' => status,
121
145
  'PageToken' => page_token,
@@ -127,6 +127,8 @@ module Twilio
127
127
  # @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
128
128
  # @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
129
129
  # @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
130
+ # @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
131
+ # @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
130
132
  # @param [Integer] limit Upper limit for the number of records to return. stream()
131
133
  # guarantees to never return more than limit. Default is no limit
132
134
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -134,11 +136,13 @@ module Twilio
134
136
  # but a limit is defined, stream() will attempt to read the limit with the most
135
137
  # efficient page size, i.e. min(limit, 1000)
136
138
  # @return [Array] Array of up to limit results
137
- def list(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
139
+ def list(to: :unset, from: :unset, date_sent: :unset, date_sent_before: :unset, date_sent_after: :unset, limit: nil, page_size: nil)
138
140
  self.stream(
139
141
  to: to,
140
142
  from: from,
141
143
  date_sent: date_sent,
144
+ date_sent_before: date_sent_before,
145
+ date_sent_after: date_sent_after,
142
146
  limit: limit,
143
147
  page_size: page_size
144
148
  ).entries
@@ -151,6 +155,8 @@ module Twilio
151
155
  # @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
152
156
  # @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
153
157
  # @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
158
+ # @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
159
+ # @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
154
160
  # @param [Integer] limit Upper limit for the number of records to return. stream()
155
161
  # guarantees to never return more than limit. Default is no limit
156
162
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -158,13 +164,15 @@ module Twilio
158
164
  # but a limit is defined, stream() will attempt to read the limit with the most
159
165
  # efficient page size, i.e. min(limit, 1000)
160
166
  # @return [Enumerable] Enumerable that will yield up to limit results
161
- def stream(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
167
+ def stream(to: :unset, from: :unset, date_sent: :unset, date_sent_before: :unset, date_sent_after: :unset, limit: nil, page_size: nil)
162
168
  limits = @version.read_limits(limit, page_size)
163
169
 
164
170
  page = self.page(
165
171
  to: to,
166
172
  from: from,
167
173
  date_sent: date_sent,
174
+ date_sent_before: date_sent_before,
175
+ date_sent_after: date_sent_after,
168
176
  page_size: limits[:page_size], )
169
177
 
170
178
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -190,15 +198,19 @@ module Twilio
190
198
  # @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
191
199
  # @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
192
200
  # @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
201
+ # @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
202
+ # @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
193
203
  # @param [String] page_token PageToken provided by the API
194
204
  # @param [Integer] page_number Page Number, this value is simply for client state
195
205
  # @param [Integer] page_size Number of records to return, defaults to 50
196
206
  # @return [Page] Page of MessageInstance
197
- def page(to: :unset, from: :unset, date_sent: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
207
+ def page(to: :unset, from: :unset, date_sent: :unset, date_sent_before: :unset, date_sent_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
198
208
  params = Twilio::Values.of({
199
209
  'To' => to,
200
210
  'From' => from,
201
211
  'DateSent' => Twilio.serialize_iso8601_datetime(date_sent),
212
+ 'DateSent<' => Twilio.serialize_iso8601_datetime(date_sent_before),
213
+ 'DateSent>' => Twilio.serialize_iso8601_datetime(date_sent_after),
202
214
  'PageToken' => page_token,
203
215
  'Page' => page_number,
204
216
  'PageSize' => page_size,
@@ -117,6 +117,11 @@ module Twilio
117
117
  @numbers ||= Numbers.new self
118
118
  end
119
119
  ##
120
+ # Access the Oauth Twilio Domain
121
+ def oauth
122
+ @oauth ||= Oauth.new self
123
+ end
124
+ ##
120
125
  # Access the Preview Twilio Domain
121
126
  def preview
122
127
  @preview ||= Preview.new self
@@ -85,6 +85,34 @@ module Twilio
85
85
  end
86
86
  end
87
87
 
88
+ class CatalogItem
89
+ # @param [id]: [String]
90
+ # @param [section_title]: [String]
91
+ # @param [name]: [String]
92
+ # @param [media_url]: [String]
93
+ # @param [price]: [Float]
94
+ # @param [description]: [String]
95
+ attr_accessor :id, :section_title, :name, :media_url, :price, :description
96
+ def initialize(payload)
97
+ @id = payload["id"]
98
+ @section_title = payload["section_title"]
99
+ @name = payload["name"]
100
+ @media_url = payload["media_url"]
101
+ @price = payload["price"]
102
+ @description = payload["description"]
103
+ end
104
+ def to_json(options = {})
105
+ {
106
+ id: @id,
107
+ section_title: @section_title,
108
+ name: @name,
109
+ media_url: @media_url,
110
+ price: @price,
111
+ description: @description,
112
+ }.to_json(options)
113
+ end
114
+ end
115
+
88
116
  class ContentCreateRequest
89
117
  # @param [friendly_name]: [String] User defined name of the content
90
118
  # @param [variables]: [Hash<String, String>] Key value pairs of variable name to value
@@ -183,6 +211,34 @@ module Twilio
183
211
  end
184
212
  end
185
213
 
214
+ class TwilioCatalog
215
+ # @param [title]: [String]
216
+ # @param [body]: [String]
217
+ # @param [subtitle]: [String]
218
+ # @param [id]: [String]
219
+ # @param [items]: [Array<ContentList.CatalogItem>]
220
+ # @param [dynamic_items]: [String]
221
+ attr_accessor :title, :body, :subtitle, :id, :items, :dynamic_items
222
+ def initialize(payload)
223
+ @title = payload["title"]
224
+ @body = payload["body"]
225
+ @subtitle = payload["subtitle"]
226
+ @id = payload["id"]
227
+ @items = payload["items"]
228
+ @dynamic_items = payload["dynamic_items"]
229
+ end
230
+ def to_json(options = {})
231
+ {
232
+ title: @title,
233
+ body: @body,
234
+ subtitle: @subtitle,
235
+ id: @id,
236
+ items: @items,
237
+ dynamic_items: @dynamic_items,
238
+ }.to_json(options)
239
+ end
240
+ end
241
+
186
242
  class TwilioListPicker
187
243
  # @param [body]: [String]
188
244
  # @param [button]: [String]
@@ -274,9 +330,10 @@ module Twilio
274
330
  # @param [twilio_call_to_action]: [ContentList.TwilioCallToAction]
275
331
  # @param [twilio_quick_reply]: [ContentList.TwilioQuickReply]
276
332
  # @param [twilio_card]: [ContentList.TwilioCard]
333
+ # @param [twilio_catalog]: [ContentList.TwilioCatalog]
277
334
  # @param [whatsapp_card]: [ContentList.WhatsappCard]
278
335
  # @param [whatsapp_authentication]: [ContentList.WhatsappAuthentication]
279
- attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :whatsapp_card, :whatsapp_authentication
336
+ attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :twilio_catalog, :whatsapp_card, :whatsapp_authentication
280
337
  def initialize(payload)
281
338
  @twilio_text = payload["twilio_text"]
282
339
  @twilio_media = payload["twilio_media"]
@@ -285,6 +342,7 @@ module Twilio
285
342
  @twilio_call_to_action = payload["twilio_call_to_action"]
286
343
  @twilio_quick_reply = payload["twilio_quick_reply"]
287
344
  @twilio_card = payload["twilio_card"]
345
+ @twilio_catalog = payload["twilio_catalog"]
288
346
  @whatsapp_card = payload["whatsapp_card"]
289
347
  @whatsapp_authentication = payload["whatsapp_authentication"]
290
348
  end
@@ -297,6 +355,7 @@ module Twilio
297
355
  twilio_call_to_action: @twilio_call_to_action,
298
356
  twilio_quick_reply: @twilio_quick_reply,
299
357
  twilio_card: @twilio_card,
358
+ twilio_catalog: @twilio_catalog,
300
359
  whatsapp_card: @whatsapp_card,
301
360
  whatsapp_authentication: @whatsapp_authentication,
302
361
  }.to_json(options)
@@ -84,6 +84,8 @@ module Twilio
84
84
  # @param [SortBy] sort_by Can be `valid-until` or `date-updated`. Defaults to `date-created`.
85
85
  # @param [SortDirection] sort_direction Default is `DESC`. Can be `ASC` or `DESC`.
86
86
  # @param [Time] valid_until_date Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
87
+ # @param [Time] valid_until_date_before Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
88
+ # @param [Time] valid_until_date_after Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
87
89
  # @param [Integer] limit Upper limit for the number of records to return. stream()
88
90
  # guarantees to never return more than limit. Default is no limit
89
91
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -91,7 +93,7 @@ module Twilio
91
93
  # but a limit is defined, stream() will attempt to read the limit with the most
92
94
  # efficient page size, i.e. min(limit, 1000)
93
95
  # @return [Array] Array of up to limit results
94
- def list(status: :unset, friendly_name: :unset, regulation_sid: :unset, iso_country: :unset, number_type: :unset, has_valid_until_date: :unset, sort_by: :unset, sort_direction: :unset, valid_until_date: :unset, limit: nil, page_size: nil)
96
+ def list(status: :unset, friendly_name: :unset, regulation_sid: :unset, iso_country: :unset, number_type: :unset, has_valid_until_date: :unset, sort_by: :unset, sort_direction: :unset, valid_until_date: :unset, valid_until_date_before: :unset, valid_until_date_after: :unset, limit: nil, page_size: nil)
95
97
  self.stream(
96
98
  status: status,
97
99
  friendly_name: friendly_name,
@@ -102,6 +104,8 @@ module Twilio
102
104
  sort_by: sort_by,
103
105
  sort_direction: sort_direction,
104
106
  valid_until_date: valid_until_date,
107
+ valid_until_date_before: valid_until_date_before,
108
+ valid_until_date_after: valid_until_date_after,
105
109
  limit: limit,
106
110
  page_size: page_size
107
111
  ).entries
@@ -120,6 +124,8 @@ module Twilio
120
124
  # @param [SortBy] sort_by Can be `valid-until` or `date-updated`. Defaults to `date-created`.
121
125
  # @param [SortDirection] sort_direction Default is `DESC`. Can be `ASC` or `DESC`.
122
126
  # @param [Time] valid_until_date Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
127
+ # @param [Time] valid_until_date_before Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
128
+ # @param [Time] valid_until_date_after Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
123
129
  # @param [Integer] limit Upper limit for the number of records to return. stream()
124
130
  # guarantees to never return more than limit. Default is no limit
125
131
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -127,7 +133,7 @@ module Twilio
127
133
  # but a limit is defined, stream() will attempt to read the limit with the most
128
134
  # efficient page size, i.e. min(limit, 1000)
129
135
  # @return [Enumerable] Enumerable that will yield up to limit results
130
- def stream(status: :unset, friendly_name: :unset, regulation_sid: :unset, iso_country: :unset, number_type: :unset, has_valid_until_date: :unset, sort_by: :unset, sort_direction: :unset, valid_until_date: :unset, limit: nil, page_size: nil)
136
+ def stream(status: :unset, friendly_name: :unset, regulation_sid: :unset, iso_country: :unset, number_type: :unset, has_valid_until_date: :unset, sort_by: :unset, sort_direction: :unset, valid_until_date: :unset, valid_until_date_before: :unset, valid_until_date_after: :unset, limit: nil, page_size: nil)
131
137
  limits = @version.read_limits(limit, page_size)
132
138
 
133
139
  page = self.page(
@@ -140,6 +146,8 @@ module Twilio
140
146
  sort_by: sort_by,
141
147
  sort_direction: sort_direction,
142
148
  valid_until_date: valid_until_date,
149
+ valid_until_date_before: valid_until_date_before,
150
+ valid_until_date_after: valid_until_date_after,
143
151
  page_size: limits[:page_size], )
144
152
 
145
153
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -171,11 +179,13 @@ module Twilio
171
179
  # @param [SortBy] sort_by Can be `valid-until` or `date-updated`. Defaults to `date-created`.
172
180
  # @param [SortDirection] sort_direction Default is `DESC`. Can be `ASC` or `DESC`.
173
181
  # @param [Time] valid_until_date Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
182
+ # @param [Time] valid_until_date_before Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
183
+ # @param [Time] valid_until_date_after Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
174
184
  # @param [String] page_token PageToken provided by the API
175
185
  # @param [Integer] page_number Page Number, this value is simply for client state
176
186
  # @param [Integer] page_size Number of records to return, defaults to 50
177
187
  # @return [Page] Page of BundleInstance
178
- def page(status: :unset, friendly_name: :unset, regulation_sid: :unset, iso_country: :unset, number_type: :unset, has_valid_until_date: :unset, sort_by: :unset, sort_direction: :unset, valid_until_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
188
+ def page(status: :unset, friendly_name: :unset, regulation_sid: :unset, iso_country: :unset, number_type: :unset, has_valid_until_date: :unset, sort_by: :unset, sort_direction: :unset, valid_until_date: :unset, valid_until_date_before: :unset, valid_until_date_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
179
189
  params = Twilio::Values.of({
180
190
  'Status' => status,
181
191
  'FriendlyName' => friendly_name,
@@ -186,6 +196,8 @@ module Twilio
186
196
  'SortBy' => sort_by,
187
197
  'SortDirection' => sort_direction,
188
198
  'ValidUntilDate' => Twilio.serialize_iso8601_datetime(valid_until_date),
199
+ 'ValidUntilDate<' => Twilio.serialize_iso8601_datetime(valid_until_date_before),
200
+ 'ValidUntilDate>' => Twilio.serialize_iso8601_datetime(valid_until_date_after),
189
201
  'PageToken' => page_token,
190
202
  'Page' => page_number,
191
203
  'PageSize' => page_size,
@@ -0,0 +1,143 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Oauth
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 Oauth < OauthBase
19
+ class V1 < 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
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/authorize"
31
+
32
+ end
33
+ ##
34
+ # Fetch the AuthorizeInstance
35
+ # @param [String] response_type Response Type
36
+ # @param [String] client_id The Client Identifier
37
+ # @param [String] redirect_uri The url to which response will be redirected to
38
+ # @param [String] scope The scope of the access request
39
+ # @param [String] state An opaque value which can be used to maintain state between the request and callback
40
+ # @return [AuthorizeInstance] Fetched AuthorizeInstance
41
+ def fetch(
42
+ response_type: :unset,
43
+ client_id: :unset,
44
+ redirect_uri: :unset,
45
+ scope: :unset,
46
+ state: :unset
47
+ )
48
+
49
+ params = Twilio::Values.of({
50
+ 'ResponseType' => response_type,
51
+ 'ClientId' => client_id,
52
+ 'RedirectUri' => redirect_uri,
53
+ 'Scope' => scope,
54
+ 'State' => state,
55
+ })
56
+
57
+ payload = @version.fetch('GET', @uri, params: params)
58
+ AuthorizeInstance.new(
59
+ @version,
60
+ payload,
61
+ )
62
+ end
63
+
64
+
65
+
66
+
67
+ # Provide a user friendly representation
68
+ def to_s
69
+ '#<Twilio.Oauth.V1.AuthorizeList>'
70
+ end
71
+ end
72
+
73
+ class AuthorizePage < Page
74
+ ##
75
+ # Initialize the AuthorizePage
76
+ # @param [Version] version Version that contains the resource
77
+ # @param [Response] response Response from the API
78
+ # @param [Hash] solution Path solution for the resource
79
+ # @return [AuthorizePage] AuthorizePage
80
+ def initialize(version, response, solution)
81
+ super(version, response)
82
+
83
+ # Path Solution
84
+ @solution = solution
85
+ end
86
+
87
+ ##
88
+ # Build an instance of AuthorizeInstance
89
+ # @param [Hash] payload Payload response from the API
90
+ # @return [AuthorizeInstance] AuthorizeInstance
91
+ def get_instance(payload)
92
+ AuthorizeInstance.new(@version, payload)
93
+ end
94
+
95
+ ##
96
+ # Provide a user friendly representation
97
+ def to_s
98
+ '<Twilio.Oauth.V1.AuthorizePage>'
99
+ end
100
+ end
101
+ class AuthorizeInstance < InstanceResource
102
+ ##
103
+ # Initialize the AuthorizeInstance
104
+ # @param [Version] version Version that contains the resource
105
+ # @param [Hash] payload payload that contains response from Twilio
106
+ # @param [String] account_sid The SID of the
107
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Authorize
108
+ # resource.
109
+ # @param [String] sid The SID of the Call resource to fetch.
110
+ # @return [AuthorizeInstance] AuthorizeInstance
111
+ def initialize(version, payload )
112
+ super(version)
113
+
114
+ # Marshaled Properties
115
+ @properties = {
116
+ 'redirect_to' => payload['redirect_to'],
117
+ }
118
+ end
119
+
120
+
121
+ ##
122
+ # @return [String] The callback URL
123
+ def redirect_to
124
+ @properties['redirect_to']
125
+ end
126
+
127
+ ##
128
+ # Provide a user friendly representation
129
+ def to_s
130
+ "<Twilio.Oauth.V1.AuthorizeInstance>"
131
+ end
132
+
133
+ ##
134
+ # Provide a detailed, user friendly representation
135
+ def inspect
136
+ "<Twilio.Oauth.V1.AuthorizeInstance>"
137
+ end
138
+ end
139
+
140
+ end
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,175 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Oauth
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 Oauth < OauthBase
19
+ class V1 < Version
20
+ class TokenList < ListResource
21
+
22
+ ##
23
+ # Initialize the TokenList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [TokenList] TokenList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/token"
31
+
32
+ end
33
+ ##
34
+ # Create the TokenInstance
35
+ # @param [String] grant_type Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
36
+ # @param [String] client_id A 34 character string that uniquely identifies this OAuth App.
37
+ # @param [String] client_secret The credential for confidential OAuth App.
38
+ # @param [String] code JWT token related to the authorization code grant type.
39
+ # @param [String] redirect_uri The redirect uri
40
+ # @param [String] audience The targeted audience uri
41
+ # @return [TokenInstance] Created TokenInstance
42
+ def create(
43
+ grant_type: nil,
44
+ client_id: nil,
45
+ client_secret: nil,
46
+ code: :unset,
47
+ redirect_uri: :unset,
48
+ audience: :unset
49
+ )
50
+
51
+ data = Twilio::Values.of({
52
+ 'GrantType' => grant_type,
53
+ 'ClientId' => client_id,
54
+ 'ClientSecret' => client_secret,
55
+ 'Code' => code,
56
+ 'RedirectUri' => redirect_uri,
57
+ 'Audience' => audience,
58
+ })
59
+
60
+
61
+ payload = @version.create('POST', @uri, data: data)
62
+ TokenInstance.new(
63
+ @version,
64
+ payload,
65
+ )
66
+ end
67
+
68
+
69
+
70
+
71
+ # Provide a user friendly representation
72
+ def to_s
73
+ '#<Twilio.Oauth.V1.TokenList>'
74
+ end
75
+ end
76
+
77
+ class TokenPage < Page
78
+ ##
79
+ # Initialize the TokenPage
80
+ # @param [Version] version Version that contains the resource
81
+ # @param [Response] response Response from the API
82
+ # @param [Hash] solution Path solution for the resource
83
+ # @return [TokenPage] TokenPage
84
+ def initialize(version, response, solution)
85
+ super(version, response)
86
+
87
+ # Path Solution
88
+ @solution = solution
89
+ end
90
+
91
+ ##
92
+ # Build an instance of TokenInstance
93
+ # @param [Hash] payload Payload response from the API
94
+ # @return [TokenInstance] TokenInstance
95
+ def get_instance(payload)
96
+ TokenInstance.new(@version, payload)
97
+ end
98
+
99
+ ##
100
+ # Provide a user friendly representation
101
+ def to_s
102
+ '<Twilio.Oauth.V1.TokenPage>'
103
+ end
104
+ end
105
+ class TokenInstance < InstanceResource
106
+ ##
107
+ # Initialize the TokenInstance
108
+ # @param [Version] version Version that contains the resource
109
+ # @param [Hash] payload payload that contains response from Twilio
110
+ # @param [String] account_sid The SID of the
111
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Token
112
+ # resource.
113
+ # @param [String] sid The SID of the Call resource to fetch.
114
+ # @return [TokenInstance] TokenInstance
115
+ def initialize(version, payload )
116
+ super(version)
117
+
118
+ # Marshaled Properties
119
+ @properties = {
120
+ 'access_token' => payload['access_token'],
121
+ 'refresh_token' => payload['refresh_token'],
122
+ 'id_token' => payload['id_token'],
123
+ 'token_type' => payload['token_type'],
124
+ 'expires_in' => Twilio.deserialize_iso8601_datetime(payload['expires_in']),
125
+ }
126
+ end
127
+
128
+
129
+ ##
130
+ # @return [String] Token which carries the necessary information to access a Twilio resource directly.
131
+ def access_token
132
+ @properties['access_token']
133
+ end
134
+
135
+ ##
136
+ # @return [String] Token which carries the information necessary to get a new access token.
137
+ def refresh_token
138
+ @properties['refresh_token']
139
+ end
140
+
141
+ ##
142
+ # @return [String] Token which carries the information necessary of user profile.
143
+ def id_token
144
+ @properties['id_token']
145
+ end
146
+
147
+ ##
148
+ # @return [String] Token type
149
+ def token_type
150
+ @properties['token_type']
151
+ end
152
+
153
+ ##
154
+ # @return [Time]
155
+ def expires_in
156
+ @properties['expires_in']
157
+ end
158
+
159
+ ##
160
+ # Provide a user friendly representation
161
+ def to_s
162
+ "<Twilio.Oauth.V1.TokenInstance>"
163
+ end
164
+
165
+ ##
166
+ # Provide a detailed, user friendly representation
167
+ def inspect
168
+ "<Twilio.Oauth.V1.TokenInstance>"
169
+ end
170
+ end
171
+
172
+ end
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,46 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Oauth
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
+ module Twilio
16
+ module REST
17
+ class Oauth
18
+ class V1 < Version
19
+ ##
20
+ # Initialize the V1 version of Oauth
21
+ def initialize(domain)
22
+ super
23
+ @version = 'v1'
24
+ @authorize = nil
25
+ @token = nil
26
+ end
27
+
28
+ ##
29
+ # @return [Twilio::REST::Oauth::V1::AuthorizeList]
30
+ def authorize
31
+ @authorize ||= AuthorizeList.new self
32
+ end
33
+ ##
34
+ # @return [Twilio::REST::Oauth::V1::TokenList]
35
+ def token
36
+ @token ||= TokenList.new self
37
+ end
38
+ ##
39
+ # Provide a user friendly representation
40
+ def to_s
41
+ '<Twilio::REST::Oauth::V1>';
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,6 @@
1
+ module Twilio
2
+ module REST
3
+ class Oauth < OauthBase;
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,38 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # NOTE: This class is auto generated by OpenAPI Generator.
8
+ # https://openapi-generator.tech
9
+ # Do not edit the class manually.
10
+ # frozen_string_literal: true
11
+ module Twilio
12
+ module REST
13
+ class OauthBase < Domain
14
+ ##
15
+ # Initialize oauth domain
16
+ #
17
+ # @param twilio - The twilio client
18
+ #
19
+ def initialize(twilio)
20
+ super(twilio)
21
+ @base_url = "https://oauth.twilio.com"
22
+ @host = "oauth.twilio.com"
23
+ @port = 443
24
+ @v1 = nil
25
+ end
26
+
27
+ def v1
28
+ @v1 ||= Oauth::V1.new self
29
+ end
30
+
31
+ ##
32
+ # Provide a user friendly representation
33
+ def to_s
34
+ '<Twilio::REST::Oauth::V1>';
35
+ end
36
+ end
37
+ end
38
+ end
@@ -58,6 +58,7 @@ module Twilio
58
58
  # Lists CustomerProfilesEntityAssignmentsInstance records from the API as a list.
59
59
  # Unlike stream(), this operation is eager and will load `limit` records into
60
60
  # memory before returning.
61
+ # @param [String] object_type A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.
61
62
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
63
  # guarantees to never return more than limit. Default is no limit
63
64
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,8 +66,9 @@ module Twilio
65
66
  # but a limit is defined, stream() will attempt to read the limit with the most
66
67
  # efficient page size, i.e. min(limit, 1000)
67
68
  # @return [Array] Array of up to limit results
68
- def list(limit: nil, page_size: nil)
69
+ def list(object_type: :unset, limit: nil, page_size: nil)
69
70
  self.stream(
71
+ object_type: object_type,
70
72
  limit: limit,
71
73
  page_size: page_size
72
74
  ).entries
@@ -76,6 +78,7 @@ module Twilio
76
78
  # Streams Instance records from the API as an Enumerable.
77
79
  # This operation lazily loads records as efficiently as possible until the limit
78
80
  # is reached.
81
+ # @param [String] object_type A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.
79
82
  # @param [Integer] limit Upper limit for the number of records to return. stream()
80
83
  # guarantees to never return more than limit. Default is no limit
81
84
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -83,10 +86,11 @@ module Twilio
83
86
  # but a limit is defined, stream() will attempt to read the limit with the most
84
87
  # efficient page size, i.e. min(limit, 1000)
85
88
  # @return [Enumerable] Enumerable that will yield up to limit results
86
- def stream(limit: nil, page_size: nil)
89
+ def stream(object_type: :unset, limit: nil, page_size: nil)
87
90
  limits = @version.read_limits(limit, page_size)
88
91
 
89
92
  page = self.page(
93
+ object_type: object_type,
90
94
  page_size: limits[:page_size], )
91
95
 
92
96
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -109,12 +113,14 @@ module Twilio
109
113
  ##
110
114
  # Retrieve a single page of CustomerProfilesEntityAssignmentsInstance records from the API.
111
115
  # Request is executed immediately.
116
+ # @param [String] object_type A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.
112
117
  # @param [String] page_token PageToken provided by the API
113
118
  # @param [Integer] page_number Page Number, this value is simply for client state
114
119
  # @param [Integer] page_size Number of records to return, defaults to 50
115
120
  # @return [Page] Page of CustomerProfilesEntityAssignmentsInstance
116
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
121
+ def page(object_type: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
117
122
  params = Twilio::Values.of({
123
+ 'ObjectType' => object_type,
118
124
  'PageToken' => page_token,
119
125
  'Page' => page_number,
120
126
  'PageSize' => page_size,
@@ -58,6 +58,7 @@ module Twilio
58
58
  # Lists TrustProductsEntityAssignmentsInstance records from the API as a list.
59
59
  # Unlike stream(), this operation is eager and will load `limit` records into
60
60
  # memory before returning.
61
+ # @param [String] object_type A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.
61
62
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
63
  # guarantees to never return more than limit. Default is no limit
63
64
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,8 +66,9 @@ module Twilio
65
66
  # but a limit is defined, stream() will attempt to read the limit with the most
66
67
  # efficient page size, i.e. min(limit, 1000)
67
68
  # @return [Array] Array of up to limit results
68
- def list(limit: nil, page_size: nil)
69
+ def list(object_type: :unset, limit: nil, page_size: nil)
69
70
  self.stream(
71
+ object_type: object_type,
70
72
  limit: limit,
71
73
  page_size: page_size
72
74
  ).entries
@@ -76,6 +78,7 @@ module Twilio
76
78
  # Streams Instance records from the API as an Enumerable.
77
79
  # This operation lazily loads records as efficiently as possible until the limit
78
80
  # is reached.
81
+ # @param [String] object_type A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.
79
82
  # @param [Integer] limit Upper limit for the number of records to return. stream()
80
83
  # guarantees to never return more than limit. Default is no limit
81
84
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -83,10 +86,11 @@ module Twilio
83
86
  # but a limit is defined, stream() will attempt to read the limit with the most
84
87
  # efficient page size, i.e. min(limit, 1000)
85
88
  # @return [Enumerable] Enumerable that will yield up to limit results
86
- def stream(limit: nil, page_size: nil)
89
+ def stream(object_type: :unset, limit: nil, page_size: nil)
87
90
  limits = @version.read_limits(limit, page_size)
88
91
 
89
92
  page = self.page(
93
+ object_type: object_type,
90
94
  page_size: limits[:page_size], )
91
95
 
92
96
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -109,12 +113,14 @@ module Twilio
109
113
  ##
110
114
  # Retrieve a single page of TrustProductsEntityAssignmentsInstance records from the API.
111
115
  # Request is executed immediately.
116
+ # @param [String] object_type A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.
112
117
  # @param [String] page_token PageToken provided by the API
113
118
  # @param [Integer] page_number Page Number, this value is simply for client state
114
119
  # @param [Integer] page_size Number of records to return, defaults to 50
115
120
  # @return [Page] Page of TrustProductsEntityAssignmentsInstance
116
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
121
+ def page(object_type: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
117
122
  params = Twilio::Values.of({
123
+ 'ObjectType' => object_type,
118
124
  'PageToken' => page_token,
119
125
  'Page' => page_number,
120
126
  'PageSize' => page_size,
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '7.0.0-rc.2'
2
+ VERSION = '7.0.0-rc.3'
3
3
  end
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: 7.0.0.pre.rc.2
4
+ version: 7.0.0.pre.rc.3
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: 2024-03-12 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -583,6 +583,11 @@ files:
583
583
  - lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb
584
584
  - lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
585
585
  - lib/twilio-ruby/rest/numbers_base.rb
586
+ - lib/twilio-ruby/rest/oauth.rb
587
+ - lib/twilio-ruby/rest/oauth/v1.rb
588
+ - lib/twilio-ruby/rest/oauth/v1/authorize.rb
589
+ - lib/twilio-ruby/rest/oauth/v1/token.rb
590
+ - lib/twilio-ruby/rest/oauth_base.rb
586
591
  - lib/twilio-ruby/rest/preview.rb
587
592
  - lib/twilio-ruby/rest/preview/deployed_devices.rb
588
593
  - lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb