twilio-ruby 5.58.3 → 5.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/deploy.yml +65 -0
- data/.github/workflows/test.yml +51 -0
- data/.gitignore +3 -1
- data/CHANGES.md +99 -0
- data/Makefile +3 -4
- data/README.md +4 -4
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +30 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
- data/lib/twilio-ruby/rest/media/v1.rb +60 -0
- data/lib/twilio-ruby/rest/media.rb +56 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +353 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +40 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
- data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
- data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
- data/lib/twilio-ruby/rest/verify.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
- data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +16 -5
- data/.travis.yml +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f2583fb03b7f76ca77faa5e168a640ee6666859f
|
4
|
+
data.tar.gz: 861886a68fcff99ea6447453fe9293d078d2b0ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c26374082ab77796489dbc76fb3d4098dfec72c9ab0f8ea5c69896ffca74edd38baf6b128489f61f9b14189c93dab29850ac70aa9cae784f1f1e87baff6731
|
7
|
+
data.tar.gz: 390ba0f3829c07b954a5097995a61dec268c05736cf21b1a971527a36436980ca6ecf17abd5371079cb05fac72f23bbb8426560a1dd7ec82ed92287fcc854cb5
|
@@ -0,0 +1,65 @@
|
|
1
|
+
name: Deploy
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
tags:
|
5
|
+
- '*'
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
deploy:
|
10
|
+
name: Deploy to Rubygems
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- name: Checkout twilio-ruby
|
14
|
+
uses: actions/checkout@v2
|
15
|
+
with:
|
16
|
+
fetch-depth: 0
|
17
|
+
|
18
|
+
- name: Login to Docker Hub
|
19
|
+
uses: docker/login-action@v1
|
20
|
+
with:
|
21
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
22
|
+
password: ${{ secrets.DOCKER_AUTH_TOKEN }}
|
23
|
+
|
24
|
+
# The expression strips off the shortest match from the front of the string to yield just the tag name as the output
|
25
|
+
- name: Get tagged version
|
26
|
+
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
27
|
+
|
28
|
+
- name: Build and Push image
|
29
|
+
run: make docker-build && make docker-push
|
30
|
+
|
31
|
+
- name: Set up Ruby
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: 2.4
|
35
|
+
bundler-cache: true
|
36
|
+
|
37
|
+
- run: bundle install
|
38
|
+
- name: Publish to Rubygems
|
39
|
+
env:
|
40
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
41
|
+
run: |
|
42
|
+
mkdir -p $HOME/.gem
|
43
|
+
touch $HOME/.gem/credentials
|
44
|
+
chmod 0600 $HOME/.gem/credentials
|
45
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
46
|
+
gem build *.gemspec
|
47
|
+
gem push *.gem
|
48
|
+
|
49
|
+
notify-on-failure:
|
50
|
+
name: Slack notify on failure
|
51
|
+
if: ${{ failure() }}
|
52
|
+
needs: [deploy]
|
53
|
+
runs-on: ubuntu-latest
|
54
|
+
steps:
|
55
|
+
- uses: rtCamp/action-slack-notify@v2
|
56
|
+
env:
|
57
|
+
SLACK_COLOR: ${{ needs.deploy.status }}
|
58
|
+
SLACK_ICON_EMOJI: ':github:'
|
59
|
+
SLACK_MESSAGE: ${{ format('Failed to publish {1} to RubyGems{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }}
|
60
|
+
SLACK_TITLE: Deployment Failure
|
61
|
+
SLACK_USERNAME: GitHub Actions
|
62
|
+
SLACK_MSG_AUTHOR: twilio-dx
|
63
|
+
SLACK_FOOTER: Posted automatically using GitHub Actions
|
64
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
65
|
+
MSG_MINIMAL: true
|
@@ -0,0 +1,51 @@
|
|
1
|
+
name: Tests
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [ '*' ]
|
5
|
+
pull_request:
|
6
|
+
branches: [ main ]
|
7
|
+
schedule:
|
8
|
+
# Run automatically at 8AM PST Monday-Friday
|
9
|
+
- cron: '0 15 * * 1-5'
|
10
|
+
workflow_dispatch:
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
name: Test
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
timeout-minutes: 20
|
17
|
+
strategy:
|
18
|
+
matrix:
|
19
|
+
ruby: [2.4, 2.5, 2.6, 2.7, '3.0', ruby-head, jruby-9.2]
|
20
|
+
steps:
|
21
|
+
- name: Checkout twilio-ruby
|
22
|
+
uses: actions/checkout@v2
|
23
|
+
|
24
|
+
- name: Set up Ruby
|
25
|
+
uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: ${{ matrix.ruby }}
|
28
|
+
bundler-cache: true
|
29
|
+
|
30
|
+
- run: bundle install --with development
|
31
|
+
- run: bundle exec rake install
|
32
|
+
- name: Run Unit Tests
|
33
|
+
run: make test
|
34
|
+
|
35
|
+
notify-on-failure:
|
36
|
+
name: Slack notify on failure
|
37
|
+
if: ${{ failure() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
|
38
|
+
needs: [test]
|
39
|
+
runs-on: ubuntu-latest
|
40
|
+
steps:
|
41
|
+
- uses: rtCamp/action-slack-notify@v2
|
42
|
+
env:
|
43
|
+
SLACK_COLOR: ${{ needs.test.status }}
|
44
|
+
SLACK_ICON_EMOJI: ':github:'
|
45
|
+
SLACK_MESSAGE: ${{ format('Build {2} in {1} failed{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }}
|
46
|
+
SLACK_TITLE: Build Failure
|
47
|
+
SLACK_USERNAME: GitHub Actions
|
48
|
+
SLACK_MSG_AUTHOR: twilio-dx
|
49
|
+
SLACK_FOOTER: Posted automatically using GitHub Actions
|
50
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
51
|
+
MSG_MINIMAL: true
|
data/.gitignore
CHANGED
data/CHANGES.md
CHANGED
@@ -1,6 +1,105 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-11-17] Version 5.61.1
|
5
|
+
---------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #578](https://github.com/twilio/twilio-ruby/pull/578): remove yardoc files. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
8
|
+
|
9
|
+
**Library - Fix**
|
10
|
+
- [PR #576](https://github.com/twilio/twilio-ruby/pull/576): git log retrieval issues. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
|
11
|
+
|
12
|
+
**Frontline**
|
13
|
+
- Added `is_available` to User's resource
|
14
|
+
|
15
|
+
**Messaging**
|
16
|
+
- Added GET vetting API
|
17
|
+
|
18
|
+
**Verify**
|
19
|
+
- Add `WHATSAPP` to the attempts API.
|
20
|
+
- Allow to update `config.notification_platform` from `none` to `apn` or `fcm` and viceversa for Verify Push
|
21
|
+
- Add `none` as a valid `config.notification_platform` value for Verify Push
|
22
|
+
|
23
|
+
**Twiml**
|
24
|
+
- Add supported SSML children to `<emphasis>`, `<lang>`, `<p>`, `<prosody>`, `<s>`, and `<w>`.
|
25
|
+
|
26
|
+
|
27
|
+
[2021-11-03] Version 5.61.0
|
28
|
+
---------------------------
|
29
|
+
**Library - Chore**
|
30
|
+
- [PR #575](https://github.com/twilio/twilio-ruby/pull/575): migrate from TravisCI to GitHub Actions. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
31
|
+
|
32
|
+
**Api**
|
33
|
+
- Updated `media_url` property to be treated as PII
|
34
|
+
|
35
|
+
**Messaging**
|
36
|
+
- Added a new enum for brand registration status named DELETED **(breaking change)**
|
37
|
+
- Add a new K12_EDUCATION use case in us_app_to_person_usecase api transaction
|
38
|
+
- Added a new enum for brand registration status named IN_REVIEW
|
39
|
+
|
40
|
+
**Serverless**
|
41
|
+
- Add node14 as a valid Build runtime
|
42
|
+
|
43
|
+
**Verify**
|
44
|
+
- Fix typos in Verify Push Factor documentation for the `config.notification_token` parameter.
|
45
|
+
- Added `TemplateCustomSubstitutions` on verification creation
|
46
|
+
- Make `TemplateSid` parameter public for Verification resource and `DefaultTemplateSid` parameter public for Service resource. **(breaking change)**
|
47
|
+
|
48
|
+
|
49
|
+
[2021-10-18] Version 5.60.0
|
50
|
+
---------------------------
|
51
|
+
**Library - Feature**
|
52
|
+
- [PR #574](https://github.com/twilio/twilio-ruby/pull/574): Add PlaybackGrant. Thanks to [@sarahcstringer](https://github.com/sarahcstringer)!
|
53
|
+
|
54
|
+
**Api**
|
55
|
+
- Corrected enum values for `emergency_address_status` values in `/IncomingPhoneNumbers` response. **(breaking change)**
|
56
|
+
- Clarify `emergency_address_status` values in `/IncomingPhoneNumbers` response.
|
57
|
+
|
58
|
+
**Messaging**
|
59
|
+
- Add PUT and List brand vettings api
|
60
|
+
- Removes beta feature flag based visibility for us_app_to_person_registered and usecase field.Updates test cases to add POLITICAL usecase. **(breaking change)**
|
61
|
+
- Add brand_feedback as optional field to BrandRegistrations
|
62
|
+
|
63
|
+
**Video**
|
64
|
+
- Add `AudioOnly` to create room
|
65
|
+
|
66
|
+
|
67
|
+
[2021-10-06] Version 5.59.0
|
68
|
+
---------------------------
|
69
|
+
**Library - Fix**
|
70
|
+
- [PR #571](https://github.com/twilio/twilio-ruby/pull/571): fix travis build for ruby 3.0. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
|
71
|
+
|
72
|
+
**Api**
|
73
|
+
- Add `emergency_address_status` attribute to `/IncomingPhoneNumbers` response.
|
74
|
+
- Add `siprec` resource
|
75
|
+
|
76
|
+
**Conversations**
|
77
|
+
- Added attachment parameters in configuration for `NewMessage` type of push notifications
|
78
|
+
|
79
|
+
**Flex**
|
80
|
+
- Adding `flex_insights_hr` object to Flex Configuration
|
81
|
+
|
82
|
+
**Numbers**
|
83
|
+
- Add API endpoint for Bundle ReplaceItems resource
|
84
|
+
- Add API endpoint for Bundle Copies resource
|
85
|
+
|
86
|
+
**Serverless**
|
87
|
+
- Add domain_base field to Service response
|
88
|
+
|
89
|
+
**Taskrouter**
|
90
|
+
- Add `If-Match` Header based on ETag for Worker Delete **(breaking change)**
|
91
|
+
- Add `If-Match` Header based on Etag for Reservation Update
|
92
|
+
- Add `If-Match` Header based on ETag for Worker Update
|
93
|
+
- Add `If-Match` Header based on ETag for Worker Delete
|
94
|
+
- Add `ETag` as Response Header to Worker
|
95
|
+
|
96
|
+
**Trunking**
|
97
|
+
- Added `transfer_caller_id` property on Trunks.
|
98
|
+
|
99
|
+
**Verify**
|
100
|
+
- Document new pilot `whatsapp` channel.
|
101
|
+
|
102
|
+
|
4
103
|
[2021-09-22] Version 5.58.3
|
5
104
|
---------------------------
|
6
105
|
**Events**
|
data/Makefile
CHANGED
@@ -10,7 +10,7 @@ test: lint
|
|
10
10
|
bundle exec rake spec
|
11
11
|
|
12
12
|
lint:
|
13
|
-
rubocop --cache true --parallel
|
13
|
+
bundle exec rubocop --cache true --parallel
|
14
14
|
|
15
15
|
docs:
|
16
16
|
yard doc --output-dir ./doc
|
@@ -22,12 +22,11 @@ authors:
|
|
22
22
|
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
|
23
23
|
docker-build:
|
24
24
|
docker build -t twilio/twilio-ruby .
|
25
|
-
docker tag twilio/twilio-ruby twilio/twilio-ruby:${
|
25
|
+
docker tag twilio/twilio-ruby twilio/twilio-ruby:${GITHUB_TAG}
|
26
26
|
docker tag twilio/twilio-ruby twilio/twilio-ruby:apidefs-${API_DEFINITIONS_SHA}
|
27
27
|
docker tag twilio/twilio-ruby twilio/twilio-ruby:latest
|
28
28
|
|
29
29
|
docker-push:
|
30
|
-
|
31
|
-
docker push twilio/twilio-ruby:${TRAVIS_TAG}
|
30
|
+
docker push twilio/twilio-ruby:${GITHUB_TAG}
|
32
31
|
docker push twilio/twilio-ruby:apidefs-${API_DEFINITIONS_SHA}
|
33
32
|
docker push twilio/twilio-ruby:latest
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# twilio-ruby
|
2
2
|
|
3
|
-
[][github-actions]
|
4
4
|
[](https://rubygems.org/gems/twilio-ruby)
|
5
5
|
[](https://twil.io/learn-open-source)
|
6
6
|
|
@@ -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.61.1'
|
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.61.1
|
45
45
|
```
|
46
46
|
|
47
47
|
To build and install the development branch yourself from the latest source:
|
@@ -257,7 +257,7 @@ If you've instead found a bug in the library or would like new features added, g
|
|
257
257
|
[bundler]: https://bundler.io
|
258
258
|
[rubygems]: https://rubygems.org
|
259
259
|
[gem]: https://rubygems.org/gems/twilio
|
260
|
-
[
|
260
|
+
[github-actions]: https://github.com/twilio/twilio-ruby/actions/workflows/test.yml
|
261
261
|
[upgrade]: https://github.com/twilio/twilio-ruby/wiki/Ruby-Version-5.x-Upgrade-Guide
|
262
262
|
[issues]: https://github.com/twilio/twilio-ruby/issues
|
263
263
|
[faraday]: https://github.com/lostisland/faraday
|
@@ -267,6 +267,19 @@ module Twilio
|
|
267
267
|
payload
|
268
268
|
end
|
269
269
|
end
|
270
|
+
|
271
|
+
class PlaybackGrant
|
272
|
+
include AccessTokenGrant
|
273
|
+
attr_accessor :grant
|
274
|
+
|
275
|
+
def _key
|
276
|
+
'player'
|
277
|
+
end
|
278
|
+
|
279
|
+
def _generate_payload
|
280
|
+
grant
|
281
|
+
end
|
282
|
+
end
|
270
283
|
end
|
271
284
|
end
|
272
285
|
end
|