twilio-ruby 5.62.0 → 5.63.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/.github/workflows/test-and-deploy.yml +13 -8
- data/CHANGES.md +22 -0
- data/Makefile +2 -2
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +15 -5
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +16 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +80 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 582f6e6561bd6ee40a9aadaefc0e2550df5d565f
|
4
|
+
data.tar.gz: 8ec0f4c692bd66e1da3a7ea99d58f4ddaa8b6d0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5864ca88585ee5e2f4952218d1c85180caac3e0b0c4361836e8cc850c2e1fc716f20d0fcd931df29e03e05e54ad4c5bb9c93d46eda5e6e94f8d3aee5a6aa0e64
|
7
|
+
data.tar.gz: 26560b4c09aa1161baac7ba7ac3c83bebe154b4a923e71e550e03742614c1d51e4ef086b747e83645c27f2092eb05a8c811f23f0f7636f0b8f6e191407513fa0
|
@@ -45,6 +45,14 @@ jobs:
|
|
45
45
|
with:
|
46
46
|
fetch-depth: 0
|
47
47
|
|
48
|
+
- name: Set up Ruby
|
49
|
+
uses: ruby/setup-ruby@v1
|
50
|
+
with:
|
51
|
+
ruby-version: 2.4
|
52
|
+
bundler-cache: true
|
53
|
+
|
54
|
+
- run: bundle install
|
55
|
+
|
48
56
|
- name: Login to Docker Hub
|
49
57
|
uses: docker/login-action@v1
|
50
58
|
with:
|
@@ -55,16 +63,13 @@ jobs:
|
|
55
63
|
- name: Get tagged version
|
56
64
|
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
57
65
|
|
66
|
+
- name: Create GitHub Release
|
67
|
+
uses: sendgrid/dx-automator/actions/release@main
|
68
|
+
env:
|
69
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
70
|
+
|
58
71
|
- name: Build and Push image
|
59
72
|
run: make docker-build && make docker-push
|
60
|
-
|
61
|
-
- name: Set up Ruby
|
62
|
-
uses: ruby/setup-ruby@v1
|
63
|
-
with:
|
64
|
-
ruby-version: 2.4
|
65
|
-
bundler-cache: true
|
66
|
-
|
67
|
-
- run: bundle install
|
68
73
|
- name: Publish to Rubygems
|
69
74
|
env:
|
70
75
|
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-01-12] Version 5.63.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Feature**
|
7
|
+
- [PR #586](https://github.com/twilio/twilio-ruby/pull/586): add GitHub release step during deploy. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
8
|
+
|
9
|
+
**Library - Chore**
|
10
|
+
- [PR #584](https://github.com/twilio/twilio-ruby/pull/584): run yard in bundle context. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
11
|
+
- [PR #583](https://github.com/twilio/twilio-ruby/pull/583): remove githook dependency from make install. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
|
12
|
+
|
13
|
+
**Api**
|
14
|
+
- Make fixed time scheduling parameters public **(breaking change)**
|
15
|
+
|
16
|
+
**Messaging**
|
17
|
+
- Add update brand registration API
|
18
|
+
|
19
|
+
**Numbers**
|
20
|
+
- Add API endpoint for List Bundle Copies resource
|
21
|
+
|
22
|
+
**Video**
|
23
|
+
- Enable external storage for all customers
|
24
|
+
|
25
|
+
|
4
26
|
[2021-12-15] Version 5.62.0
|
5
27
|
---------------------------
|
6
28
|
**Library - Feature**
|
data/Makefile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
githooks:
|
4
4
|
ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
|
5
5
|
|
6
|
-
install:
|
6
|
+
install:
|
7
7
|
bundle install --with development; bundle exec rake install
|
8
8
|
|
9
9
|
test: lint
|
@@ -13,7 +13,7 @@ lint:
|
|
13
13
|
bundle exec rubocop -d --cache true --parallel
|
14
14
|
|
15
15
|
docs:
|
16
|
-
yard doc --output-dir ./doc
|
16
|
+
bundle exec yard doc --output-dir ./doc
|
17
17
|
|
18
18
|
authors:
|
19
19
|
echo "Authors\n=======\n\nA huge thanks to all of our contributors:\n\n" > AUTHORS.md
|
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.63.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.63.0
|
45
45
|
```
|
46
46
|
|
47
47
|
To build and install the development branch yourself from the latest source:
|
@@ -78,6 +78,10 @@ module Twilio
|
|
78
78
|
# @param [Boolean] smart_encoded Whether to detect Unicode characters that have a
|
79
79
|
# similar GSM-7 character and replace them. Can be: `true` or `false`.
|
80
80
|
# @param [Array[String]] persistent_action Rich actions for Channels Messages.
|
81
|
+
# @param [message.ScheduleType] schedule_type Indicates your intent to schedule a
|
82
|
+
# message. Pass the value `fixed` to schedule a message at a fixed time.
|
83
|
+
# @param [Time] send_at The time that Twilio will send the message. Must be in ISO
|
84
|
+
# 8601 format.
|
81
85
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
82
86
|
# a single MMS message, regardless of the presence of media. This is a Beta
|
83
87
|
# Feature.
|
@@ -111,7 +115,7 @@ module Twilio
|
|
111
115
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
112
116
|
# per message. You can send images in an SMS message in only the US and Canada.
|
113
117
|
# @return [MessageInstance] Created MessageInstance
|
114
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
118
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
115
119
|
data = Twilio::Values.of({
|
116
120
|
'To' => to,
|
117
121
|
'From' => from,
|
@@ -129,6 +133,8 @@ module Twilio
|
|
129
133
|
'AddressRetention' => address_retention,
|
130
134
|
'SmartEncoded' => smart_encoded,
|
131
135
|
'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
|
136
|
+
'ScheduleType' => schedule_type,
|
137
|
+
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
132
138
|
'SendAsMms' => send_as_mms,
|
133
139
|
})
|
134
140
|
|
@@ -333,9 +339,11 @@ module Twilio
|
|
333
339
|
# Update the MessageInstance
|
334
340
|
# @param [String] body The text of the message you want to send. Can be up to
|
335
341
|
# 1,600 characters long.
|
342
|
+
# @param [message.UpdateStatus] status When set as `canceled`, allows a message
|
343
|
+
# cancelation request if a message has not yet been sent.
|
336
344
|
# @return [MessageInstance] Updated MessageInstance
|
337
|
-
def update(body: :unset)
|
338
|
-
data = Twilio::Values.of({'Body' => body, })
|
345
|
+
def update(body: :unset, status: :unset)
|
346
|
+
data = Twilio::Values.of({'Body' => body, 'Status' => status, })
|
339
347
|
|
340
348
|
payload = @version.update('POST', @uri, data: data)
|
341
349
|
|
@@ -583,9 +591,11 @@ module Twilio
|
|
583
591
|
# Update the MessageInstance
|
584
592
|
# @param [String] body The text of the message you want to send. Can be up to
|
585
593
|
# 1,600 characters long.
|
594
|
+
# @param [message.UpdateStatus] status When set as `canceled`, allows a message
|
595
|
+
# cancelation request if a message has not yet been sent.
|
586
596
|
# @return [MessageInstance] Updated MessageInstance
|
587
|
-
def update(body: :unset)
|
588
|
-
context.update(body: body, )
|
597
|
+
def update(body: :unset, status: :unset)
|
598
|
+
context.update(body: body, status: status, )
|
589
599
|
end
|
590
600
|
|
591
601
|
##
|
@@ -198,6 +198,15 @@ module Twilio
|
|
198
198
|
BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
|
199
199
|
end
|
200
200
|
|
201
|
+
##
|
202
|
+
# Update the BrandRegistrationInstance
|
203
|
+
# @return [BrandRegistrationInstance] Updated BrandRegistrationInstance
|
204
|
+
def update
|
205
|
+
payload = @version.update('POST', @uri)
|
206
|
+
|
207
|
+
BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
|
208
|
+
end
|
209
|
+
|
201
210
|
##
|
202
211
|
# Access the brand_vettings
|
203
212
|
# @return [BrandVettingList]
|
@@ -403,6 +412,13 @@ module Twilio
|
|
403
412
|
context.fetch
|
404
413
|
end
|
405
414
|
|
415
|
+
##
|
416
|
+
# Update the BrandRegistrationInstance
|
417
|
+
# @return [BrandRegistrationInstance] Updated BrandRegistrationInstance
|
418
|
+
def update
|
419
|
+
context.update
|
420
|
+
end
|
421
|
+
|
406
422
|
##
|
407
423
|
# Access the brand_vettings
|
408
424
|
# @return [brand_vettings] brand_vettings
|
@@ -42,6 +42,86 @@ module Twilio
|
|
42
42
|
BundleCopyInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
|
43
43
|
end
|
44
44
|
|
45
|
+
##
|
46
|
+
# Lists BundleCopyInstance records from the API as a list.
|
47
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
48
|
+
# memory before returning.
|
49
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
|
+
# guarantees to never return more than limit. Default is no limit
|
51
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
52
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
53
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
54
|
+
# efficient page size, i.e. min(limit, 1000)
|
55
|
+
# @return [Array] Array of up to limit results
|
56
|
+
def list(limit: nil, page_size: nil)
|
57
|
+
self.stream(limit: limit, page_size: page_size).entries
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# Streams BundleCopyInstance records from the API as an Enumerable.
|
62
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
63
|
+
# is reached.
|
64
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
65
|
+
# guarantees to never return more than limit. Default is no limit.
|
66
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
67
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
68
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
69
|
+
# efficient page size, i.e. min(limit, 1000)
|
70
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
71
|
+
def stream(limit: nil, page_size: nil)
|
72
|
+
limits = @version.read_limits(limit, page_size)
|
73
|
+
|
74
|
+
page = self.page(page_size: limits[:page_size], )
|
75
|
+
|
76
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# When passed a block, yields BundleCopyInstance records from the API.
|
81
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
82
|
+
# is reached.
|
83
|
+
def each
|
84
|
+
limits = @version.read_limits
|
85
|
+
|
86
|
+
page = self.page(page_size: limits[:page_size], )
|
87
|
+
|
88
|
+
@version.stream(page,
|
89
|
+
limit: limits[:limit],
|
90
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Retrieve a single page of BundleCopyInstance records from the API.
|
95
|
+
# Request is executed immediately.
|
96
|
+
# @param [String] page_token PageToken provided by the API
|
97
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
98
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
99
|
+
# @return [Page] Page of BundleCopyInstance
|
100
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
101
|
+
params = Twilio::Values.of({
|
102
|
+
'PageToken' => page_token,
|
103
|
+
'Page' => page_number,
|
104
|
+
'PageSize' => page_size,
|
105
|
+
})
|
106
|
+
|
107
|
+
response = @version.page('GET', @uri, params: params)
|
108
|
+
|
109
|
+
BundleCopyPage.new(@version, response, @solution)
|
110
|
+
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# Retrieve a single page of BundleCopyInstance records from the API.
|
114
|
+
# Request is executed immediately.
|
115
|
+
# @param [String] target_url API-generated URL for the requested results page
|
116
|
+
# @return [Page] Page of BundleCopyInstance
|
117
|
+
def get_page(target_url)
|
118
|
+
response = @version.domain.request(
|
119
|
+
'GET',
|
120
|
+
target_url
|
121
|
+
)
|
122
|
+
BundleCopyPage.new(@version, response, @solution)
|
123
|
+
end
|
124
|
+
|
45
125
|
##
|
46
126
|
# Provide a user friendly representation
|
47
127
|
def to_s
|
@@ -334,6 +334,7 @@ module Twilio
|
|
334
334
|
'bitrate' => payload['bitrate'].to_i,
|
335
335
|
'size' => payload['size'].to_i,
|
336
336
|
'duration' => payload['duration'].to_i,
|
337
|
+
'media_external_location' => payload['media_external_location'],
|
337
338
|
'url' => payload['url'],
|
338
339
|
'links' => payload['links'],
|
339
340
|
}
|
@@ -450,6 +451,12 @@ module Twilio
|
|
450
451
|
@properties['duration']
|
451
452
|
end
|
452
453
|
|
454
|
+
##
|
455
|
+
# @return [String] The URL of the media file associated with the composition when stored externally
|
456
|
+
def media_external_location
|
457
|
+
@properties['media_external_location']
|
458
|
+
end
|
459
|
+
|
453
460
|
##
|
454
461
|
# @return [String] The absolute URL of the resource
|
455
462
|
def url
|
@@ -272,6 +272,7 @@ module Twilio
|
|
272
272
|
'grouping_sids' => payload['grouping_sids'],
|
273
273
|
'track_name' => payload['track_name'],
|
274
274
|
'offset' => payload['offset'].to_i,
|
275
|
+
'media_external_location' => payload['media_external_location'],
|
275
276
|
'links' => payload['links'],
|
276
277
|
}
|
277
278
|
|
@@ -375,6 +376,12 @@ module Twilio
|
|
375
376
|
@properties['offset']
|
376
377
|
end
|
377
378
|
|
379
|
+
##
|
380
|
+
# @return [String] The URL of the media file associated with the recording when stored externally
|
381
|
+
def media_external_location
|
382
|
+
@properties['media_external_location']
|
383
|
+
end
|
384
|
+
|
378
385
|
##
|
379
386
|
# @return [String] The URLs of related resources
|
380
387
|
def links
|
@@ -255,6 +255,7 @@ module Twilio
|
|
255
255
|
'grouping_sids' => payload['grouping_sids'],
|
256
256
|
'track_name' => payload['track_name'],
|
257
257
|
'offset' => payload['offset'].to_i,
|
258
|
+
'media_external_location' => payload['media_external_location'],
|
258
259
|
'room_sid' => payload['room_sid'],
|
259
260
|
'links' => payload['links'],
|
260
261
|
}
|
@@ -359,6 +360,12 @@ module Twilio
|
|
359
360
|
@properties['offset']
|
360
361
|
end
|
361
362
|
|
363
|
+
##
|
364
|
+
# @return [String] The URL of the media file associated with the recording when stored externally
|
365
|
+
def media_external_location
|
366
|
+
@properties['media_external_location']
|
367
|
+
end
|
368
|
+
|
362
369
|
##
|
363
370
|
# @return [String] The SID of the Room resource the recording is associated with
|
364
371
|
def room_sid
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.63.0
|
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:
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|