twilio-ruby 5.66.2 → 5.67.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +1 -1
- data/CHANGES.md +36 -0
- data/Makefile +3 -2
- data/README.md +2 -2
- data/lib/twilio-ruby/http/http_client.rb +8 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +7 -0
- data/lib/twilio-ruby/rest/client.rb +2 -8
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +12 -5
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +9 -9
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +23 -16
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +14 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +10 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +11 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +4 -8
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +0 -314
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -459
- data/lib/twilio-ruby/rest/fax/v1.rb +0 -45
- data/lib/twilio-ruby/rest/fax.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35111efb3cd1c98d7e45570f3e4f0290d9b7c0dc
|
4
|
+
data.tar.gz: c4a245a46eb0f17fee275083b9762782049cad42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c72bd52e4a6529b2cce7ce38e13a20377ddf4f4f97f449cdaee564b256f7eb9da052f64d62fa3b711e566571ac26cfa1be7e063d76453964c47258950d279b4
|
7
|
+
data.tar.gz: d1774e844540e03939d8a2849c9f2971fc71607dd881d69046d90a12c80e91a328206dddd35099a922aec2282c328c127e92a0156a00306f085582faf1f15ac1
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,42 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-06-01] Version 5.67.2
|
5
|
+
---------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #608](https://github.com/twilio/twilio-ruby/pull/608): use Docker 'rc' tag for release candidate images. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
8
|
+
|
9
|
+
|
10
|
+
[2022-05-18] Version 5.67.1
|
11
|
+
---------------------------
|
12
|
+
**Api**
|
13
|
+
- Add property `media_url` to the recording resources
|
14
|
+
|
15
|
+
**Verify**
|
16
|
+
- Include `silent` as a channel type in the verifications API.
|
17
|
+
|
18
|
+
|
19
|
+
[2022-05-04] Version 5.67.0
|
20
|
+
---------------------------
|
21
|
+
**Library - Fix**
|
22
|
+
- [PR #607](https://github.com/twilio/twilio-ruby/pull/607): Retrieval of OS Info with Ruby Config for User Agent string. Thanks to [@claudiachua](https://github.com/claudiachua)!
|
23
|
+
- [PR #606](https://github.com/twilio/twilio-ruby/pull/606): Only require twilio_webhook_authentication if Rack version > 2. Thanks to [@jasonnoble](https://github.com/jasonnoble)!
|
24
|
+
- [PR #582](https://github.com/twilio/twilio-ruby/pull/582): avoid JSON::ParserError for all server errors. Thanks to [@dan-jensen](https://github.com/dan-jensen)!
|
25
|
+
|
26
|
+
**Library - Feature**
|
27
|
+
- [PR #591](https://github.com/twilio/twilio-ruby/pull/591): Add Faraday 2.0 support. Thanks to [@tconst](https://github.com/tconst)!
|
28
|
+
|
29
|
+
**Conversations**
|
30
|
+
- Expose query parameter `type` in list operation on Address Configurations resource
|
31
|
+
|
32
|
+
**Supersim**
|
33
|
+
- Add `data_total_billed` and `billed_units` fields to Super SIM UsageRecords API response.
|
34
|
+
- Change ESimProfiles `Eid` parameter to optional to enable Activation Code download method support **(breaking change)**
|
35
|
+
|
36
|
+
**Verify**
|
37
|
+
- Deprecate `push.include_date` parameter in create and update service.
|
38
|
+
|
39
|
+
|
4
40
|
[2022-04-20] Version 5.66.2
|
5
41
|
---------------------------
|
6
42
|
**Library - Chore**
|
data/Makefile
CHANGED
@@ -17,13 +17,14 @@ authors:
|
|
17
17
|
git log --raw | grep "^Author: " | cut -d ' ' -f2- | cut -d '<' -f1 | sed 's/^/- /' | sort | uniq >> AUTHORS.md
|
18
18
|
|
19
19
|
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
|
20
|
+
CURRENT_TAG=$(shell [[ "${GITHUB_TAG}" == *"-rc"* ]] && echo "rc" || echo "latest")
|
20
21
|
docker-build:
|
21
22
|
docker build -t twilio/twilio-ruby .
|
22
23
|
docker tag twilio/twilio-ruby twilio/twilio-ruby:${GITHUB_TAG}
|
23
24
|
docker tag twilio/twilio-ruby twilio/twilio-ruby:apidefs-${API_DEFINITIONS_SHA}
|
24
|
-
docker tag twilio/twilio-ruby twilio/twilio-ruby
|
25
|
+
docker tag twilio/twilio-ruby twilio/twilio-ruby:${CURRENT_TAG}
|
25
26
|
|
26
27
|
docker-push:
|
27
28
|
docker push twilio/twilio-ruby:${GITHUB_TAG}
|
28
29
|
docker push twilio/twilio-ruby:apidefs-${API_DEFINITIONS_SHA}
|
29
|
-
docker push twilio/twilio-ruby
|
30
|
+
docker push twilio/twilio-ruby:${CURRENT_TAG}
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.
|
37
|
+
gem 'twilio-ruby', '~> 5.67.2'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.
|
43
|
+
gem install twilio-ruby -v 5.67.2
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -26,12 +26,16 @@ module Twilio
|
|
26
26
|
nil
|
27
27
|
end
|
28
28
|
|
29
|
-
def _request(request)
|
29
|
+
def _request(request) # rubocop:disable Metrics/MethodLength
|
30
30
|
@connection = Faraday.new(url: request.host + ':' + request.port.to_s, ssl: { verify: true }) do |f|
|
31
31
|
f.options.params_encoder = Faraday::FlatParamsEncoder
|
32
32
|
f.request :url_encoded
|
33
33
|
f.headers = request.headers
|
34
|
-
|
34
|
+
if Faraday::VERSION.start_with?('2.')
|
35
|
+
f.request(:authorization, :basic, request.auth[0], request.auth[1])
|
36
|
+
else
|
37
|
+
f.request(:basic_auth, request.auth[0], request.auth[1])
|
38
|
+
end
|
35
39
|
f.proxy = "#{@proxy_prot}://#{@proxy_auth}#{@proxy_path}" if @proxy_prot && @proxy_path
|
36
40
|
f.options.open_timeout = request.timeout || @timeout
|
37
41
|
f.options.timeout = request.timeout || @timeout
|
@@ -44,8 +48,8 @@ module Twilio
|
|
44
48
|
@last_response = nil
|
45
49
|
|
46
50
|
response = send(request)
|
47
|
-
if response.status
|
48
|
-
object = { message:
|
51
|
+
if (500..599).include?(response.status)
|
52
|
+
object = { message: "Server error (#{response.status})", code: response.status }.to_json
|
49
53
|
elsif response.body && !response.body.empty?
|
50
54
|
object = response.body
|
51
55
|
elsif response.status == 400
|
@@ -83,8 +83,7 @@ module Twilio
|
|
83
83
|
# @param [Time] send_at The time that Twilio will send the message. Must be in ISO
|
84
84
|
# 8601 format.
|
85
85
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
86
|
-
# a single MMS message, regardless of the presence of media.
|
87
|
-
# Feature.
|
86
|
+
# a single MMS message, regardless of the presence of media.
|
88
87
|
# @param [String] from A Twilio phone number in
|
89
88
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
|
90
89
|
# sender
|
@@ -335,6 +335,7 @@ module Twilio
|
|
335
335
|
'uri' => payload['uri'],
|
336
336
|
'encryption_details' => payload['encryption_details'],
|
337
337
|
'subresource_uris' => payload['subresource_uris'],
|
338
|
+
'media_url' => payload['media_url'],
|
338
339
|
}
|
339
340
|
|
340
341
|
# Context
|
@@ -461,6 +462,12 @@ module Twilio
|
|
461
462
|
@properties['subresource_uris']
|
462
463
|
end
|
463
464
|
|
465
|
+
##
|
466
|
+
# @return [String] The URL of the media file.
|
467
|
+
def media_url
|
468
|
+
@properties['media_url']
|
469
|
+
end
|
470
|
+
|
464
471
|
##
|
465
472
|
# Fetch the RecordingInstance
|
466
473
|
# @param [Boolean] include_soft_deleted A boolean parameter indicating whether to
|
@@ -36,7 +36,6 @@ module Twilio
|
|
36
36
|
@chat = nil
|
37
37
|
@conversations = nil
|
38
38
|
@events = nil
|
39
|
-
@fax = nil
|
40
39
|
@flex_api = nil
|
41
40
|
@frontline_api = nil
|
42
41
|
@insights = nil
|
@@ -70,7 +69,8 @@ module Twilio
|
|
70
69
|
def request(host, port, method, uri, params={}, data={}, headers={}, auth=nil, timeout=nil)
|
71
70
|
auth ||= @auth
|
72
71
|
|
73
|
-
|
72
|
+
ruby_config = RbConfig::CONFIG
|
73
|
+
headers['User-Agent'] = "twilio-ruby/#{Twilio::VERSION} (#{ruby_config["host_os"]} #{ruby_config["host_cpu"]}) Ruby/#{RUBY_VERSION}"
|
74
74
|
headers['Accept-Charset'] = 'utf-8'
|
75
75
|
|
76
76
|
user_agent_extensions.each { |extension| headers['User-Agent'] += " #{extension}" }
|
@@ -197,12 +197,6 @@ module Twilio
|
|
197
197
|
@events ||= Events.new self
|
198
198
|
end
|
199
199
|
|
200
|
-
##
|
201
|
-
# Access the Fax Twilio Domain
|
202
|
-
def fax
|
203
|
-
@fax ||= Fax.new self
|
204
|
-
end
|
205
|
-
|
206
200
|
##
|
207
201
|
# Access the FlexApi Twilio Domain
|
208
202
|
def flex_api
|
@@ -27,6 +27,8 @@ module Twilio
|
|
27
27
|
# Lists AddressConfigurationInstance records from the API as a list.
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
29
|
# memory before returning.
|
30
|
+
# @param [String] type Filter the address configurations by its type. This value
|
31
|
+
# can be one of: `whatsapp`, `sms`.
|
30
32
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
31
33
|
# guarantees to never return more than limit. Default is no limit
|
32
34
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -34,14 +36,16 @@ module Twilio
|
|
34
36
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
35
37
|
# efficient page size, i.e. min(limit, 1000)
|
36
38
|
# @return [Array] Array of up to limit results
|
37
|
-
def list(limit: nil, page_size: nil)
|
38
|
-
self.stream(limit: limit, page_size: page_size).entries
|
39
|
+
def list(type: :unset, limit: nil, page_size: nil)
|
40
|
+
self.stream(type: type, limit: limit, page_size: page_size).entries
|
39
41
|
end
|
40
42
|
|
41
43
|
##
|
42
44
|
# Streams AddressConfigurationInstance records from the API as an Enumerable.
|
43
45
|
# This operation lazily loads records as efficiently as possible until the limit
|
44
46
|
# is reached.
|
47
|
+
# @param [String] type Filter the address configurations by its type. This value
|
48
|
+
# can be one of: `whatsapp`, `sms`.
|
45
49
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
46
50
|
# guarantees to never return more than limit. Default is no limit.
|
47
51
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -49,10 +53,10 @@ module Twilio
|
|
49
53
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
50
54
|
# efficient page size, i.e. min(limit, 1000)
|
51
55
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
52
|
-
def stream(limit: nil, page_size: nil)
|
56
|
+
def stream(type: :unset, limit: nil, page_size: nil)
|
53
57
|
limits = @version.read_limits(limit, page_size)
|
54
58
|
|
55
|
-
page = self.page(page_size: limits[:page_size], )
|
59
|
+
page = self.page(type: type, page_size: limits[:page_size], )
|
56
60
|
|
57
61
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
58
62
|
end
|
@@ -74,12 +78,15 @@ module Twilio
|
|
74
78
|
##
|
75
79
|
# Retrieve a single page of AddressConfigurationInstance records from the API.
|
76
80
|
# Request is executed immediately.
|
81
|
+
# @param [String] type Filter the address configurations by its type. This value
|
82
|
+
# can be one of: `whatsapp`, `sms`.
|
77
83
|
# @param [String] page_token PageToken provided by the API
|
78
84
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
79
85
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
80
86
|
# @return [Page] Page of AddressConfigurationInstance
|
81
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
87
|
+
def page(type: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
82
88
|
params = Twilio::Values.of({
|
89
|
+
'Type' => type,
|
83
90
|
'PageToken' => page_token,
|
84
91
|
'Page' => page_number,
|
85
92
|
'PageSize' => page_size,
|
data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
CHANGED
@@ -16,8 +16,8 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the InteractionChannelInviteList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] interaction_sid The
|
20
|
-
# @param [String] channel_sid The
|
19
|
+
# @param [String] interaction_sid The Interaction SID for this Channel.
|
20
|
+
# @param [String] channel_sid The Channel SID for this Invite.
|
21
21
|
# @return [InteractionChannelInviteList] InteractionChannelInviteList
|
22
22
|
def initialize(version, interaction_sid: nil, channel_sid: nil)
|
23
23
|
super(version)
|
@@ -29,7 +29,7 @@ module Twilio
|
|
29
29
|
|
30
30
|
##
|
31
31
|
# Create the InteractionChannelInviteInstance
|
32
|
-
# @param [Hash] routing The routing
|
32
|
+
# @param [Hash] routing The Interaction's routing logic.
|
33
33
|
# @return [InteractionChannelInviteInstance] Created InteractionChannelInviteInstance
|
34
34
|
def create(routing: nil)
|
35
35
|
data = Twilio::Values.of({'Routing' => Twilio.serialize_object(routing), })
|
@@ -170,8 +170,8 @@ module Twilio
|
|
170
170
|
# Initialize the InteractionChannelInviteInstance
|
171
171
|
# @param [Version] version Version that contains the resource
|
172
172
|
# @param [Hash] payload payload that contains response from Twilio
|
173
|
-
# @param [String] interaction_sid The
|
174
|
-
# @param [String] channel_sid The
|
173
|
+
# @param [String] interaction_sid The Interaction SID for this Channel.
|
174
|
+
# @param [String] channel_sid The Channel SID for this Invite.
|
175
175
|
# @return [InteractionChannelInviteInstance] InteractionChannelInviteInstance
|
176
176
|
def initialize(version, payload, interaction_sid: nil, channel_sid: nil)
|
177
177
|
super(version)
|
@@ -187,25 +187,25 @@ module Twilio
|
|
187
187
|
end
|
188
188
|
|
189
189
|
##
|
190
|
-
# @return [String] The
|
190
|
+
# @return [String] The unique string that identifies the resource
|
191
191
|
def sid
|
192
192
|
@properties['sid']
|
193
193
|
end
|
194
194
|
|
195
195
|
##
|
196
|
-
# @return [String] The
|
196
|
+
# @return [String] The Interaction SID for this Channel
|
197
197
|
def interaction_sid
|
198
198
|
@properties['interaction_sid']
|
199
199
|
end
|
200
200
|
|
201
201
|
##
|
202
|
-
# @return [String] The
|
202
|
+
# @return [String] The Channel SID for this Invite
|
203
203
|
def channel_sid
|
204
204
|
@properties['channel_sid']
|
205
205
|
end
|
206
206
|
|
207
207
|
##
|
208
|
-
# @return [Hash]
|
208
|
+
# @return [Hash] A JSON object representing the routing rules for the Interaction Channel
|
209
209
|
def routing
|
210
210
|
@properties['routing']
|
211
211
|
end
|
@@ -15,7 +15,8 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the InteractionChannelList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] interaction_sid The
|
18
|
+
# @param [String] interaction_sid The unique string created by Twilio to identify
|
19
|
+
# an Interaction resource, prefixed with KD.
|
19
20
|
# @return [InteractionChannelList] InteractionChannelList
|
20
21
|
def initialize(version, interaction_sid: nil)
|
21
22
|
super(version)
|
@@ -145,8 +146,10 @@ module Twilio
|
|
145
146
|
##
|
146
147
|
# Initialize the InteractionChannelContext
|
147
148
|
# @param [Version] version Version that contains the resource
|
148
|
-
# @param [String] interaction_sid The
|
149
|
-
#
|
149
|
+
# @param [String] interaction_sid The unique string created by Twilio to identify
|
150
|
+
# an Interaction resource, prefixed with KD.
|
151
|
+
# @param [String] sid The unique string created by Twilio to identify an
|
152
|
+
# Interaction Channel resource, prefixed with UO.
|
150
153
|
# @return [InteractionChannelContext] InteractionChannelContext
|
151
154
|
def initialize(version, interaction_sid, sid)
|
152
155
|
super(version)
|
@@ -176,11 +179,12 @@ module Twilio
|
|
176
179
|
|
177
180
|
##
|
178
181
|
# Update the InteractionChannelInstance
|
179
|
-
# @param [interaction_channel.Status] status
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
182
|
+
# @param [interaction_channel.Status] status Required. Indicates the Interaction
|
183
|
+
# channel's status. When a channel is set to `closed`, all tasks are put in the
|
184
|
+
# `wrapping` state by default unless the Routing status is set to `closed` in
|
185
|
+
# which case the tasks will be `completed`. Value: `closed`.
|
186
|
+
# @param [Hash] routing Optional. The state of associated tasks. If not specified,
|
187
|
+
# all tasks will be set to `wrapping`.
|
184
188
|
# @return [InteractionChannelInstance] Updated InteractionChannelInstance
|
185
189
|
def update(status: nil, routing: :unset)
|
186
190
|
data = Twilio::Values.of({'Status' => status, 'Routing' => Twilio.serialize_object(routing), })
|
@@ -258,8 +262,10 @@ module Twilio
|
|
258
262
|
# Initialize the InteractionChannelInstance
|
259
263
|
# @param [Version] version Version that contains the resource
|
260
264
|
# @param [Hash] payload payload that contains response from Twilio
|
261
|
-
# @param [String] interaction_sid The
|
262
|
-
#
|
265
|
+
# @param [String] interaction_sid The unique string created by Twilio to identify
|
266
|
+
# an Interaction resource, prefixed with KD.
|
267
|
+
# @param [String] sid The unique string created by Twilio to identify an
|
268
|
+
# Interaction Channel resource, prefixed with UO.
|
263
269
|
# @return [InteractionChannelInstance] InteractionChannelInstance
|
264
270
|
def initialize(version, payload, interaction_sid: nil, sid: nil)
|
265
271
|
super(version)
|
@@ -300,7 +306,7 @@ module Twilio
|
|
300
306
|
end
|
301
307
|
|
302
308
|
##
|
303
|
-
# @return [String] The
|
309
|
+
# @return [String] The unique string that identifies the resource
|
304
310
|
def interaction_sid
|
305
311
|
@properties['interaction_sid']
|
306
312
|
end
|
@@ -332,11 +338,12 @@ module Twilio
|
|
332
338
|
|
333
339
|
##
|
334
340
|
# Update the InteractionChannelInstance
|
335
|
-
# @param [interaction_channel.Status] status
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
341
|
+
# @param [interaction_channel.Status] status Required. Indicates the Interaction
|
342
|
+
# channel's status. When a channel is set to `closed`, all tasks are put in the
|
343
|
+
# `wrapping` state by default unless the Routing status is set to `closed` in
|
344
|
+
# which case the tasks will be `completed`. Value: `closed`.
|
345
|
+
# @param [Hash] routing Optional. The state of associated tasks. If not specified,
|
346
|
+
# all tasks will be set to `wrapping`.
|
340
347
|
# @return [InteractionChannelInstance] Updated InteractionChannelInstance
|
341
348
|
def update(status: nil, routing: :unset)
|
342
349
|
context.update(status: status, routing: routing, )
|
@@ -54,7 +54,7 @@ module Twilio
|
|
54
54
|
|
55
55
|
##
|
56
56
|
# @param [String] sid The unique string created by Twilio to identify an
|
57
|
-
# Interaction resource.
|
57
|
+
# Interaction resource, prefixed with KD.
|
58
58
|
# @return [Twilio::REST::Flex_api::V1::InteractionInstance] if sid was passed.
|
59
59
|
# @return [Twilio::REST::Flex_api::V1::InteractionList]
|
60
60
|
def interaction(sid=:unset)
|
@@ -27,19 +27,19 @@ module Twilio
|
|
27
27
|
|
28
28
|
##
|
29
29
|
# Create the EsimProfileInstance
|
30
|
-
# @param [String] eid Identifier of the eUICC that will claim the eSIM Profile.
|
31
30
|
# @param [String] callback_url The URL we should call using the `callback_method`
|
32
31
|
# when the status of the eSIM Profile changes. At this stage of the eSIM Profile
|
33
32
|
# pilot, the a request to the URL will only be called when the ESimProfile
|
34
33
|
# resource changes from `reserving` to `available`.
|
35
34
|
# @param [String] callback_method The HTTP method we should use to call
|
36
35
|
# `callback_url`. Can be: `GET` or `POST` and the default is POST.
|
36
|
+
# @param [String] eid Identifier of the eUICC that will claim the eSIM Profile.
|
37
37
|
# @return [EsimProfileInstance] Created EsimProfileInstance
|
38
|
-
def create(
|
38
|
+
def create(callback_url: :unset, callback_method: :unset, eid: :unset)
|
39
39
|
data = Twilio::Values.of({
|
40
|
-
'Eid' => eid,
|
41
40
|
'CallbackUrl' => callback_url,
|
42
41
|
'CallbackMethod' => callback_method,
|
42
|
+
'Eid' => eid,
|
43
43
|
})
|
44
44
|
|
45
45
|
payload = @version.create('POST', @uri, data: data)
|
@@ -263,6 +263,8 @@ module Twilio
|
|
263
263
|
'data_upload' => payload['data_upload'].to_i,
|
264
264
|
'data_download' => payload['data_download'].to_i,
|
265
265
|
'data_total' => payload['data_total'].to_i,
|
266
|
+
'data_total_billed' => payload['data_total_billed'].to_f,
|
267
|
+
'billed_unit' => payload['billed_unit'],
|
266
268
|
}
|
267
269
|
end
|
268
270
|
|
@@ -320,6 +322,18 @@ module Twilio
|
|
320
322
|
@properties['data_total']
|
321
323
|
end
|
322
324
|
|
325
|
+
##
|
326
|
+
# @return [String] Total amount in the `billed_unit` that was charged for the data uploaded or downloaded.
|
327
|
+
def data_total_billed
|
328
|
+
@properties['data_total_billed']
|
329
|
+
end
|
330
|
+
|
331
|
+
##
|
332
|
+
# @return [String] The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g. `USD`, `EUR`, `JPY`).
|
333
|
+
def billed_unit
|
334
|
+
@properties['billed_unit']
|
335
|
+
end
|
336
|
+
|
323
337
|
##
|
324
338
|
# Provide a user friendly representation
|
325
339
|
def to_s
|
@@ -227,6 +227,7 @@ module Twilio
|
|
227
227
|
'send_code_attempts' => payload['send_code_attempts'],
|
228
228
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
229
229
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
230
|
+
'sna' => payload['sna'],
|
230
231
|
'url' => payload['url'],
|
231
232
|
}
|
232
233
|
|
@@ -324,6 +325,12 @@ module Twilio
|
|
324
325
|
@properties['date_updated']
|
325
326
|
end
|
326
327
|
|
328
|
+
##
|
329
|
+
# @return [Hash] The set of fields used for a silent network auth (`sna`) verification
|
330
|
+
def sna
|
331
|
+
@properties['sna']
|
332
|
+
end
|
333
|
+
|
327
334
|
##
|
328
335
|
# @return [String] The absolute URL of the Verification resource
|
329
336
|
def url
|
@@ -48,10 +48,12 @@ module Twilio
|
|
48
48
|
# a custom code instead of a randomly generated one. Not available for all
|
49
49
|
# customers.
|
50
50
|
# @param [Boolean] push_include_date Optional configuration for the Push factors.
|
51
|
-
# If true, include the date in the Challenge's
|
51
|
+
# If true, include the date in the Challenge's response. Otherwise, the date is
|
52
52
|
# omitted from the response. See
|
53
53
|
# {Challenge}[https://www.twilio.com/docs/verify/api/challenge] resource’s details
|
54
|
-
# parameter for more info. Default:
|
54
|
+
# parameter for more info. Default: false. **Deprecated** do not use this
|
55
|
+
# parameter. This timestamp value is the same one as the one found in
|
56
|
+
# `date_created`, please use that one instead.
|
55
57
|
# @param [String] push_apn_credential_sid Optional configuration for the Push
|
56
58
|
# factors. Set the APN Credential for this service. This will allow to send push
|
57
59
|
# notifications to iOS devices. See {Credential
|
@@ -282,10 +284,11 @@ module Twilio
|
|
282
284
|
# a custom code instead of a randomly generated one. Not available for all
|
283
285
|
# customers.
|
284
286
|
# @param [Boolean] push_include_date Optional configuration for the Push factors.
|
285
|
-
# If true, include the date in the Challenge's
|
287
|
+
# If true, include the date in the Challenge's response. Otherwise, the date is
|
286
288
|
# omitted from the response. See
|
287
289
|
# {Challenge}[https://www.twilio.com/docs/verify/api/challenge] resource’s details
|
288
|
-
# parameter for more info. Default:
|
290
|
+
# parameter for more info. Default: false. **Deprecated** do not use this
|
291
|
+
# parameter.
|
289
292
|
# @param [String] push_apn_credential_sid Optional configuration for the Push
|
290
293
|
# factors. Set the APN Credential for this service. This will allow to send push
|
291
294
|
# notifications to iOS devices. See {Credential
|
@@ -666,10 +669,11 @@ module Twilio
|
|
666
669
|
# a custom code instead of a randomly generated one. Not available for all
|
667
670
|
# customers.
|
668
671
|
# @param [Boolean] push_include_date Optional configuration for the Push factors.
|
669
|
-
# If true, include the date in the Challenge's
|
672
|
+
# If true, include the date in the Challenge's response. Otherwise, the date is
|
670
673
|
# omitted from the response. See
|
671
674
|
# {Challenge}[https://www.twilio.com/docs/verify/api/challenge] resource’s details
|
672
|
-
# parameter for more info. Default:
|
675
|
+
# parameter for more info. Default: false. **Deprecated** do not use this
|
676
|
+
# parameter.
|
673
677
|
# @param [String] push_apn_credential_sid Optional configuration for the Push
|
674
678
|
# factors. Set the APN Credential for this service. This will allow to send push
|
675
679
|
# notifications to iOS devices. See {Credential
|
@@ -72,8 +72,10 @@ module Twilio
|
|
72
72
|
# @param [String] unused_room_timeout Configures how long (in minutes) a room will
|
73
73
|
# remain active if no one joins. Valid values range from 1 to 60 minutes (no
|
74
74
|
# fractions).
|
75
|
+
# @param [Boolean] large_room When set to true, indicated that this is the large
|
76
|
+
# room.
|
75
77
|
# @return [RoomInstance] Created RoomInstance
|
76
|
-
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset, empty_room_timeout: :unset, unused_room_timeout: :unset)
|
78
|
+
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset, empty_room_timeout: :unset, unused_room_timeout: :unset, large_room: :unset)
|
77
79
|
data = Twilio::Values.of({
|
78
80
|
'EnableTurn' => enable_turn,
|
79
81
|
'Type' => type,
|
@@ -89,6 +91,7 @@ module Twilio
|
|
89
91
|
'MaxParticipantDuration' => max_participant_duration,
|
90
92
|
'EmptyRoomTimeout' => empty_room_timeout,
|
91
93
|
'UnusedRoomTimeout' => unused_room_timeout,
|
94
|
+
'LargeRoom' => large_room,
|
92
95
|
})
|
93
96
|
|
94
97
|
payload = @version.create('POST', @uri, data: data)
|
@@ -387,6 +390,7 @@ module Twilio
|
|
387
390
|
'audio_only' => payload['audio_only'],
|
388
391
|
'empty_room_timeout' => payload['empty_room_timeout'].to_i,
|
389
392
|
'unused_room_timeout' => payload['unused_room_timeout'].to_i,
|
393
|
+
'large_room' => payload['large_room'],
|
390
394
|
'url' => payload['url'],
|
391
395
|
'links' => payload['links'],
|
392
396
|
}
|
@@ -533,6 +537,12 @@ module Twilio
|
|
533
537
|
@properties['unused_room_timeout']
|
534
538
|
end
|
535
539
|
|
540
|
+
##
|
541
|
+
# @return [Boolean] Indicates if this is a large room.
|
542
|
+
def large_room
|
543
|
+
@properties['large_room']
|
544
|
+
end
|
545
|
+
|
536
546
|
##
|
537
547
|
# @return [String] The absolute URL of the resource
|
538
548
|
def url
|
data/lib/twilio-ruby/version.rb
CHANGED
data/lib/twilio-ruby.rb
CHANGED
@@ -10,7 +10,7 @@ require 'time'
|
|
10
10
|
require 'json'
|
11
11
|
|
12
12
|
require 'twilio-ruby/version' unless defined?(Twilio::VERSION)
|
13
|
-
require 'rack/twilio_webhook_authentication' if defined?(Rack)
|
13
|
+
require 'rack/twilio_webhook_authentication' if defined?(Rack) && defined?(Rack::MediaType)
|
14
14
|
|
15
15
|
require 'twilio-ruby/util'
|
16
16
|
require 'twilio-ruby/security/request_validator'
|
data/twilio-ruby.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_dependency('jwt', '>= 1.5', '<= 2.5')
|
28
28
|
spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
|
29
|
-
spec.add_dependency('faraday', '>= 0.9', '<
|
29
|
+
spec.add_dependency('faraday', '>= 0.9', '< 3.0')
|
30
30
|
# Workaround for RBX <= 2.2.1, should be fixed in next version
|
31
31
|
spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
32
32
|
|