twilio-ruby 5.53.0 → 5.56.0
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/.rubocop_todo.yml +7 -7
- data/.travis.yml +2 -2
- data/CHANGES.md +62 -0
- data/README.md +10 -2
- data/lib/twilio-ruby.rb +5 -15
- data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
- data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
- data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
- data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
- data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
- data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
- data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
- data/lib/twilio-ruby/http.rb +5 -0
- data/lib/twilio-ruby/http/http_client.rb +11 -1
- data/lib/twilio-ruby/rest.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +8 -7
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
- data/lib/twilio-ruby/rest/events/v1/sink.rb +19 -5
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +28 -22
- data/lib/twilio-ruby/rest/frontline_api.rb +47 -0
- data/lib/twilio-ruby/rest/frontline_api/v1.rb +45 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +233 -0
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +8 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +175 -15
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +15 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
- data/lib/twilio-ruby/rest/video/v1/composition.rb +0 -8
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80e6c32f919f1a2514aafbbb28a11b07f6099e9ffeca5f95dde586e2a717712d
|
4
|
+
data.tar.gz: '09a90113868ce5fc759734f819b76040c96da3c237657a5159912ecc4bd7a871'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 456c8ac1a992f24200563b2c754b6b9f9259287b4e4042550420218b18850de8c0a6e1c875c83e3e00b1e487f42c0b9c22a36060f95729a390b957cf34171319
|
7
|
+
data.tar.gz: dfb91366c5e2db2c817db0a782ec67c5290892daa430c0f32279ba7b7a8ae5e25fac42f9801952845d47c026603b1a95f29f5312637e283cb957bfb671dcd4cc
|
data/.rubocop_todo.yml
CHANGED
@@ -66,7 +66,7 @@ Lint/UnusedBlockArgument:
|
|
66
66
|
Lint/UnusedMethodArgument:
|
67
67
|
Exclude:
|
68
68
|
- 'lib/twilio-ruby.rb'
|
69
|
-
- 'lib/twilio-ruby/framework/page.rb'
|
69
|
+
- 'lib/twilio-ruby/framework/rest/page.rb'
|
70
70
|
- 'spec/holodeck/holodeck.rb'
|
71
71
|
|
72
72
|
# Offense count: 1
|
@@ -130,7 +130,7 @@ Style/FrozenStringLiteralComment:
|
|
130
130
|
# Configuration parameters: MinBodyLength.
|
131
131
|
Style/GuardClause:
|
132
132
|
Exclude:
|
133
|
-
- 'lib/twilio-ruby/framework/page.rb'
|
133
|
+
- 'lib/twilio-ruby/framework/rest/page.rb'
|
134
134
|
|
135
135
|
# Offense count: 1
|
136
136
|
# Cop supports --auto-correct.
|
@@ -144,8 +144,8 @@ Style/HashSyntax:
|
|
144
144
|
# Cop supports --auto-correct.
|
145
145
|
Style/IfUnlessModifier:
|
146
146
|
Exclude:
|
147
|
-
- 'lib/twilio-ruby/framework/page.rb'
|
148
|
-
- 'lib/twilio-ruby/framework/version.rb'
|
147
|
+
- 'lib/twilio-ruby/framework/rest/page.rb'
|
148
|
+
- 'lib/twilio-ruby/framework/rest/version.rb'
|
149
149
|
- 'lib/twilio-ruby/jwt/access_token.rb'
|
150
150
|
- 'lib/twilio-ruby/jwt/client_capability.rb'
|
151
151
|
- 'lib/twilio-ruby/jwt/jwt.rb'
|
@@ -168,9 +168,9 @@ Style/RedundantSelf:
|
|
168
168
|
# SupportedStyles: slashes, percent_r, mixed
|
169
169
|
Style/RegexpLiteral:
|
170
170
|
Exclude:
|
171
|
-
- 'lib/twilio-ruby/framework/domain.rb'
|
172
|
-
- 'lib/twilio-ruby/framework/helper.rb'
|
173
|
-
- 'lib/twilio-ruby/framework/version.rb'
|
171
|
+
- 'lib/twilio-ruby/framework/rest/domain.rb'
|
172
|
+
- 'lib/twilio-ruby/framework/rest/helper.rb'
|
173
|
+
- 'lib/twilio-ruby/framework/rest/version.rb'
|
174
174
|
- 'spec/rack/twilio_webhook_authentication_spec.rb'
|
175
175
|
|
176
176
|
# Offense count: 5
|
data/.travis.yml
CHANGED
@@ -19,7 +19,7 @@ matrix:
|
|
19
19
|
fast_finish: true
|
20
20
|
deploy:
|
21
21
|
- provider: script
|
22
|
-
script: make docker-build && make docker-push
|
22
|
+
script: echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin && make docker-build && make docker-push
|
23
23
|
skip_cleanup: true
|
24
24
|
on:
|
25
25
|
tags: true
|
@@ -36,4 +36,4 @@ notifications:
|
|
36
36
|
on_success: never
|
37
37
|
on_failure: change
|
38
38
|
rooms:
|
39
|
-
secure:
|
39
|
+
secure: HG7rC5VSDOZiLCkpTsC4ZImh1k59OPi6YEjYKhdGXItybLHa6Yh5C42WvSx3kVW3SeyLOm1CiaMv+pbBZUXStXYsl8eH69MbEZimhDWsPs/m+bh+gEISov22WNUs3ZfUqIXMIb6v18oXPp2Qa1gX5LUEAGoSxHWNmCAcHayWl7M=
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,68 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-06-30] Version 5.56.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Feature**
|
7
|
+
- [PR #559](https://github.com/twilio/twilio-ruby/pull/559): Add `Twilio::HTTP::Client#configure_connection`. Thanks to [@darwinShopify](https://github.com/darwinShopify)!
|
8
|
+
- [PR #558](https://github.com/twilio/twilio-ruby/pull/558): Autoload Twilio::REST and Twilio::HTTP. Thanks to [@gmcgibbon](https://github.com/gmcgibbon)!
|
9
|
+
|
10
|
+
**Conversations**
|
11
|
+
- Read-only Conversation Email Binding property `binding`
|
12
|
+
|
13
|
+
**Supersim**
|
14
|
+
- Add Billing Period resource for the Super Sim Pilot
|
15
|
+
- Add List endpoint to Billing Period resource for Super Sim Pilot
|
16
|
+
- Add Fetch endpoint to Billing Period resource for Super Sim Pilot
|
17
|
+
|
18
|
+
**Taskrouter**
|
19
|
+
- Update `transcribe` & `transcription_configuration` form params in Reservation update endpoint to have private visibility **(breaking change)**
|
20
|
+
- Add `transcribe` & `transcription_configuration` form params to Reservation update endpoint
|
21
|
+
|
22
|
+
**Twiml**
|
23
|
+
- Add `modify` event to `statusCallbackEvent` for `<Conference>`.
|
24
|
+
|
25
|
+
|
26
|
+
[2021-06-16] Version 5.55.0
|
27
|
+
---------------------------
|
28
|
+
**Api**
|
29
|
+
- Update `status` enum for Messages to include 'canceled'
|
30
|
+
- Update `update_status` enum for Messages to include 'canceled'
|
31
|
+
|
32
|
+
**Trusthub**
|
33
|
+
- Corrected the sid for policy sid in customer_profile_evaluation.json and trust_product_evaluation.json **(breaking change)**
|
34
|
+
|
35
|
+
|
36
|
+
[2021-06-02] Version 5.54.1
|
37
|
+
---------------------------
|
38
|
+
**Events**
|
39
|
+
- join Sinks and Subscriptions service
|
40
|
+
|
41
|
+
**Verify**
|
42
|
+
- Improved the documentation of `challenge` adding the maximum and minimum expected lengths of some fields.
|
43
|
+
- Improve documentation regarding `notification` by updating the documentation of the field `ttl`.
|
44
|
+
|
45
|
+
|
46
|
+
[2021-05-19] Version 5.54.0
|
47
|
+
---------------------------
|
48
|
+
**Events**
|
49
|
+
- add query param to return types filtered by Schema Id
|
50
|
+
- Add query param to return sinks filtered by status
|
51
|
+
- Add query param to return sinks used/not used by a subscription
|
52
|
+
|
53
|
+
**Messaging**
|
54
|
+
- Add fetch and delete instance endpoints to us_app_to_person api **(breaking change)**
|
55
|
+
- Remove delete list endpoint from us_app_to_person api **(breaking change)**
|
56
|
+
- Update read list endpoint to return a list of us_app_to_person compliance objects **(breaking change)**
|
57
|
+
- Add `sid` field to Preregistered US App To Person response
|
58
|
+
|
59
|
+
**Supersim**
|
60
|
+
- Mark `unique_name` in Sim, Fleet, NAP resources as not PII
|
61
|
+
|
62
|
+
**Video**
|
63
|
+
- [Composer] GA maturity level
|
64
|
+
|
65
|
+
|
4
66
|
[2021-05-05] Version 5.53.0
|
5
67
|
---------------------------
|
6
68
|
**Library - Fix**
|
data/README.md
CHANGED
@@ -35,13 +35,13 @@ This library supports the following Ruby implementations:
|
|
35
35
|
To install using [Bundler][bundler] grab the latest stable version:
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
gem 'twilio-ruby', '~> 5.
|
38
|
+
gem 'twilio-ruby', '~> 5.56.0'
|
39
39
|
```
|
40
40
|
|
41
41
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
42
42
|
|
43
43
|
```bash
|
44
|
-
gem install twilio-ruby -v 5.
|
44
|
+
gem install twilio-ruby -v 5.56.0
|
45
45
|
```
|
46
46
|
|
47
47
|
To build and install the development branch yourself from the latest source:
|
@@ -158,6 +158,14 @@ message_sid = 'SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
158
158
|
|
159
159
|
To use a custom HTTP client with this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/custom-http-clients).
|
160
160
|
|
161
|
+
To apply customizations such as middleware, you can use the `configure_connection` method like so:
|
162
|
+
|
163
|
+
```ruby
|
164
|
+
@client.http_client.configure_connection do |faraday|
|
165
|
+
faraday.use SomeMiddleware
|
166
|
+
end
|
167
|
+
```
|
168
|
+
|
161
169
|
### Handling Errors
|
162
170
|
|
163
171
|
```ruby
|
data/lib/twilio-ruby.rb
CHANGED
@@ -16,27 +16,17 @@ require 'twilio-ruby/util'
|
|
16
16
|
require 'twilio-ruby/security/request_validator'
|
17
17
|
require 'twilio-ruby/util/configuration'
|
18
18
|
|
19
|
-
Dir[File.
|
20
|
-
require file
|
21
|
-
end
|
22
|
-
Dir[File.dirname(__FILE__) + '/twilio-ruby/framework/**/*.rb'].sort.each do |file|
|
23
|
-
require file
|
24
|
-
end
|
25
|
-
Dir[File.dirname(__FILE__) + '/twilio-ruby/rest/*.rb'].sort.each do |file|
|
26
|
-
require file
|
27
|
-
end
|
28
|
-
Dir[File.dirname(__FILE__) + '/twilio-ruby/rest/**/*.rb'].sort.each do |file|
|
29
|
-
require file
|
30
|
-
end
|
31
|
-
Dir[File.dirname(__FILE__) + '/twilio-ruby/compatibility/**/*.rb'].sort.each do |file|
|
19
|
+
Dir[File.join(__dir__, 'twilio-ruby/framework/*.rb')].sort.each do |file|
|
32
20
|
require file
|
33
21
|
end
|
34
22
|
|
35
23
|
module Twilio
|
36
24
|
extend SingleForwardable
|
37
25
|
|
38
|
-
autoload :JWT, File.join(
|
39
|
-
autoload :TwiML, File.join(
|
26
|
+
autoload :JWT, File.join(__dir__, 'twilio-ruby', 'jwt', 'jwt.rb')
|
27
|
+
autoload :TwiML, File.join(__dir__, 'twilio-ruby', 'twiml', 'twiml.rb')
|
28
|
+
autoload :HTTP, File.join(__dir__, 'twilio-ruby', 'http.rb')
|
29
|
+
autoload :REST, File.join(__dir__, 'twilio-ruby', 'rest.rb')
|
40
30
|
|
41
31
|
def_delegators :configuration, :account_sid, :auth_token, :http_client, :region, :edge, :logger
|
42
32
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -16,18 +16,28 @@ module Twilio
|
|
16
16
|
@ssl_ca_file = ssl_ca_file
|
17
17
|
@timeout = timeout
|
18
18
|
@adapter = Faraday.default_adapter
|
19
|
+
@configure_connection_blocks = []
|
20
|
+
end
|
21
|
+
|
22
|
+
def configure_connection(&block)
|
23
|
+
raise ArgumentError, "#{__method__} must be given a block!" unless block_given?
|
24
|
+
|
25
|
+
@configure_connection_blocks << block
|
26
|
+
nil
|
19
27
|
end
|
20
28
|
|
21
29
|
def _request(request)
|
22
30
|
@connection = Faraday.new(url: request.host + ':' + request.port.to_s, ssl: { verify: true }) do |f|
|
23
31
|
f.options.params_encoder = Faraday::FlatParamsEncoder
|
24
32
|
f.request :url_encoded
|
25
|
-
f.adapter @adapter
|
26
33
|
f.headers = request.headers
|
27
34
|
f.basic_auth(request.auth[0], request.auth[1])
|
28
35
|
f.proxy = "#{@proxy_prot}://#{@proxy_auth}#{@proxy_path}" if @proxy_prot && @proxy_path
|
29
36
|
f.options.open_timeout = request.timeout || @timeout
|
30
37
|
f.options.timeout = request.timeout || @timeout
|
38
|
+
|
39
|
+
@configure_connection_blocks.each { |block| block.call(f) }
|
40
|
+
f.adapter @adapter
|
31
41
|
end
|
32
42
|
|
33
43
|
@last_request = request
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Dir[File.join(__dir__, 'framework/rest/*.rb')].sort.each do |file|
|
4
|
+
require file
|
5
|
+
end
|
6
|
+
|
7
|
+
Dir[File.join(__dir__, 'rest/*.rb')].sort.each do |file|
|
8
|
+
require file
|
9
|
+
end
|
10
|
+
|
11
|
+
Dir[File.join(__dir__, 'rest/**/*.rb')].sort.each do |file|
|
12
|
+
require file
|
13
|
+
end
|
@@ -107,8 +107,8 @@ module Twilio
|
|
107
107
|
# `POST`.
|
108
108
|
# @param [Array[String]] conference_status_callback_event The conference state
|
109
109
|
# changes that should generate a call to `conference_status_callback`. Can be:
|
110
|
-
# `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`, and
|
111
|
-
# Separate multiple values with a space. Defaults to `start end`.
|
110
|
+
# `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and
|
111
|
+
# `announcement`. Separate multiple values with a space. Defaults to `start end`.
|
112
112
|
# @param [String] recording_channels The recording channels for the final
|
113
113
|
# recording. Can be: `mono` or `dual` and the default is `mono`.
|
114
114
|
# @param [String] recording_status_callback The URL that we should call using the
|
@@ -130,13 +130,14 @@ module Twilio
|
|
130
130
|
# `POST` and defaults to `POST`.
|
131
131
|
# @param [Array[String]] recording_status_callback_event The recording state
|
132
132
|
# changes that should generate a call to `recording_status_callback`. Can be:
|
133
|
-
# `in-progress`, `
|
134
|
-
#
|
133
|
+
# `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`,
|
134
|
+
# and `absent`. Separate multiple values with a space, ex: `'in-progress completed
|
135
|
+
# failed'`.
|
135
136
|
# @param [Array[String]] conference_recording_status_callback_event The conference
|
136
137
|
# recording state changes that generate a call to
|
137
|
-
# `conference_recording_status_callback`. Can be: `in-progress`, `completed`,
|
138
|
-
# `failed`. Separate multiple values with a space
|
139
|
-
#
|
138
|
+
# `conference_recording_status_callback`. Can be: `in-progress`, `completed`,
|
139
|
+
# `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress
|
140
|
+
# completed failed'`
|
140
141
|
# @param [Boolean] coaching Whether the participant is coaching another call. Can
|
141
142
|
# be: `true` or `false`. If not present, defaults to `false` unless
|
142
143
|
# `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
|
@@ -330,7 +330,7 @@ module Twilio
|
|
330
330
|
# @param [String] body The text of the message you want to send. Can be up to
|
331
331
|
# 1,600 characters long.
|
332
332
|
# @return [MessageInstance] Updated MessageInstance
|
333
|
-
def update(body:
|
333
|
+
def update(body: :unset)
|
334
334
|
data = Twilio::Values.of({'Body' => body, })
|
335
335
|
|
336
336
|
payload = @version.update('POST', @uri, data: data)
|
@@ -580,7 +580,7 @@ module Twilio
|
|
580
580
|
# @param [String] body The text of the message you want to send. Can be up to
|
581
581
|
# 1,600 characters long.
|
582
582
|
# @return [MessageInstance] Updated MessageInstance
|
583
|
-
def update(body:
|
583
|
+
def update(body: :unset)
|
584
584
|
context.update(body: body, )
|
585
585
|
end
|
586
586
|
|
@@ -37,6 +37,7 @@ module Twilio
|
|
37
37
|
@events = nil
|
38
38
|
@fax = nil
|
39
39
|
@flex_api = nil
|
40
|
+
@frontline_api = nil
|
40
41
|
@insights = nil
|
41
42
|
@ip_messaging = nil
|
42
43
|
@lookups = nil
|
@@ -206,6 +207,12 @@ module Twilio
|
|
206
207
|
@flex_api ||= FlexApi.new self
|
207
208
|
end
|
208
209
|
|
210
|
+
##
|
211
|
+
# Access the FrontlineApi Twilio Domain
|
212
|
+
def frontline_api
|
213
|
+
@frontline_api ||= FrontlineApi.new self
|
214
|
+
end
|
215
|
+
|
209
216
|
##
|
210
217
|
# Access the Insights Twilio Domain
|
211
218
|
def insights
|
@@ -362,6 +362,7 @@ module Twilio
|
|
362
362
|
'timers' => payload['timers'],
|
363
363
|
'url' => payload['url'],
|
364
364
|
'links' => payload['links'],
|
365
|
+
'bindings' => payload['bindings'],
|
365
366
|
}
|
366
367
|
|
367
368
|
# Context
|
@@ -458,6 +459,12 @@ module Twilio
|
|
458
459
|
@properties['links']
|
459
460
|
end
|
460
461
|
|
462
|
+
##
|
463
|
+
# @return [Hash] The bindings
|
464
|
+
def bindings
|
465
|
+
@properties['bindings']
|
466
|
+
end
|
467
|
+
|
461
468
|
##
|
462
469
|
# Update the ConversationInstance
|
463
470
|
# @param [String] friendly_name The human-readable name of this conversation,
|
@@ -394,6 +394,7 @@ module Twilio
|
|
394
394
|
'timers' => payload['timers'],
|
395
395
|
'url' => payload['url'],
|
396
396
|
'links' => payload['links'],
|
397
|
+
'bindings' => payload['bindings'],
|
397
398
|
}
|
398
399
|
|
399
400
|
# Context
|
@@ -490,6 +491,12 @@ module Twilio
|
|
490
491
|
@properties['links']
|
491
492
|
end
|
492
493
|
|
494
|
+
##
|
495
|
+
# @return [Hash] The bindings
|
496
|
+
def bindings
|
497
|
+
@properties['bindings']
|
498
|
+
end
|
499
|
+
|
493
500
|
##
|
494
501
|
# Update the ConversationInstance
|
495
502
|
# @param [String] friendly_name The human-readable name of this conversation,
|
@@ -29,6 +29,8 @@ module Twilio
|
|
29
29
|
# Lists EventTypeInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
+
# @param [String] schema_id A string parameter filtering the results to return
|
33
|
+
# only the Event Types using a given schema.
|
32
34
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
35
|
# guarantees to never return more than limit. Default is no limit
|
34
36
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -36,14 +38,16 @@ module Twilio
|
|
36
38
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
39
|
# efficient page size, i.e. min(limit, 1000)
|
38
40
|
# @return [Array] Array of up to limit results
|
39
|
-
def list(limit: nil, page_size: nil)
|
40
|
-
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
def list(schema_id: :unset, limit: nil, page_size: nil)
|
42
|
+
self.stream(schema_id: schema_id, limit: limit, page_size: page_size).entries
|
41
43
|
end
|
42
44
|
|
43
45
|
##
|
44
46
|
# Streams EventTypeInstance records from the API as an Enumerable.
|
45
47
|
# This operation lazily loads records as efficiently as possible until the limit
|
46
48
|
# is reached.
|
49
|
+
# @param [String] schema_id A string parameter filtering the results to return
|
50
|
+
# only the Event Types using a given schema.
|
47
51
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
52
|
# guarantees to never return more than limit. Default is no limit.
|
49
53
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -51,10 +55,10 @@ module Twilio
|
|
51
55
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
56
|
# efficient page size, i.e. min(limit, 1000)
|
53
57
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
-
def stream(limit: nil, page_size: nil)
|
58
|
+
def stream(schema_id: :unset, limit: nil, page_size: nil)
|
55
59
|
limits = @version.read_limits(limit, page_size)
|
56
60
|
|
57
|
-
page = self.page(page_size: limits[:page_size], )
|
61
|
+
page = self.page(schema_id: schema_id, page_size: limits[:page_size], )
|
58
62
|
|
59
63
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
64
|
end
|
@@ -76,12 +80,15 @@ module Twilio
|
|
76
80
|
##
|
77
81
|
# Retrieve a single page of EventTypeInstance records from the API.
|
78
82
|
# Request is executed immediately.
|
83
|
+
# @param [String] schema_id A string parameter filtering the results to return
|
84
|
+
# only the Event Types using a given schema.
|
79
85
|
# @param [String] page_token PageToken provided by the API
|
80
86
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
87
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
88
|
# @return [Page] Page of EventTypeInstance
|
83
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
89
|
+
def page(schema_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
84
90
|
params = Twilio::Values.of({
|
91
|
+
'SchemaId' => schema_id,
|
85
92
|
'PageToken' => page_token,
|
86
93
|
'Page' => page_number,
|
87
94
|
'PageSize' => page_size,
|