twilio-ruby 5.55.0 → 5.58.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/.gitignore +2 -0
- data/.rubocop_todo.yml +7 -7
- data/.travis.yml +23 -6
- data/CHANGES.md +73 -0
- data/Gemfile +1 -0
- data/README.md +10 -2
- data/examples/examples.rb +1 -1
- 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/call.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/conversations.rb +6 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
- data/lib/twilio-ruby/rest/insights.rb +6 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +428 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +19 -1
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +29 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
- data/lib/twilio-ruby/version.rb +1 -1
- data/sonar-project.properties +13 -0
- metadata +18 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90245670a85b148807ee4a2be28da950b65530413eef56cf403e16708222a5d4
|
4
|
+
data.tar.gz: e279a65d127e4b629c904a9de0081c03effd7fa76ec73aa945bb52a8f4d32806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4cf12efd6b9c6b1a8dd4d3239c369e1592cb920e1c2c68451e5e835dcb43a1aa2d914b2fc6eaadd4daa65c09c980278d2fa6fd09723db8ecede21023bc38108
|
7
|
+
data.tar.gz: f92a04a5901154ccdb52b8a79dce167019b61177e90cc050774a2f1bfcb6a3b466b73fe92639363bdc43a697845423fd9d4d00e9ff1cad9fe34c9ae27329c831
|
data/.gitignore
CHANGED
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
@@ -3,17 +3,29 @@ cache: bundler
|
|
3
3
|
bundler_args: "--without development"
|
4
4
|
rvm:
|
5
5
|
- ruby-head
|
6
|
-
- 3.0
|
7
|
-
- 2.7
|
8
|
-
- 2.6
|
9
|
-
- 2.5
|
10
|
-
- 2.4
|
11
6
|
- jruby-9.2
|
7
|
+
- 2.4
|
8
|
+
- 2.5
|
9
|
+
- 2.6
|
10
|
+
- 2.7
|
11
|
+
- 3.0
|
12
12
|
services:
|
13
13
|
- docker
|
14
14
|
install: make install
|
15
|
-
script:
|
15
|
+
script:
|
16
|
+
- make test
|
17
|
+
- if [[ "$TRAVIS_BRANCH" == "main" || "$TRAVIS_BRANCH" == "travis" ]] && [ "$TRAVIS_PULL_REQUEST"
|
18
|
+
== "false" ]; then echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}"
|
19
|
+
--password-stdin; fi
|
16
20
|
matrix:
|
21
|
+
include:
|
22
|
+
- language: ruby
|
23
|
+
rvm: '3.0'
|
24
|
+
# The below workaround is necessary because of the branch coverage inclusion in simplecov 0.18+
|
25
|
+
# more discussion here - https://community.sonarsource.com/t/ruby-coverage-simplecov-json-file-does-not-work/20909/7
|
26
|
+
after_success:
|
27
|
+
- ruby -rjson -e 'sqube = JSON.load(File.read("coverage/.resultset.json"))["RSpec"]["coverage"].transform_values {|lines| lines["lines"]}; total = { "RSpec" => { "coverage" => sqube, "timestamp" => Time.now.to_i }}; puts JSON.dump(total)' > coverage/.resultset.sonarqube.json
|
28
|
+
- sonar-scanner
|
17
29
|
allow_failures:
|
18
30
|
- rvm: ruby-head
|
19
31
|
fast_finish: true
|
@@ -37,3 +49,8 @@ notifications:
|
|
37
49
|
on_failure: change
|
38
50
|
rooms:
|
39
51
|
secure: HG7rC5VSDOZiLCkpTsC4ZImh1k59OPi6YEjYKhdGXItybLHa6Yh5C42WvSx3kVW3SeyLOm1CiaMv+pbBZUXStXYsl8eH69MbEZimhDWsPs/m+bh+gEISov22WNUs3ZfUqIXMIb6v18oXPp2Qa1gX5LUEAGoSxHWNmCAcHayWl7M=
|
52
|
+
addons:
|
53
|
+
sonarcloud:
|
54
|
+
organization: twilio
|
55
|
+
token:
|
56
|
+
secure: OSEahx/yO/r9PdjXbASwJt+ogphxkDDpnlajWNCBTc+hoiEurGP/12CN0oQi7+iishIgIowqo5J9/+m1BQfsAv4fKST+t6mSazx27udiiM9am03lhviW8QSG6STADvtq6uJRqTXMk3WehoSidNRYXamVdCoBbqxCSaMX8MbMsN8=
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,79 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-08-11] Version 5.58.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #566](https://github.com/twilio/twilio-ruby/pull/566): integrate sonarcloud. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
|
8
|
+
|
9
|
+
**Library - Docs**
|
10
|
+
- [PR #565](https://github.com/twilio/twilio-ruby/pull/565): update mms example to use media_url. Thanks to [@cnorm35](https://github.com/cnorm35)!
|
11
|
+
|
12
|
+
**Api**
|
13
|
+
- Corrected the `price`, `call_sid_to_coach`, and `uri` data types for Conference, Participant, and Recording **(breaking change)**
|
14
|
+
- Made documentation for property `time_limit` in the call api public. **(breaking change)**
|
15
|
+
- Added `domain_sid` in sip_credential_list_mapping and sip_ip_access_control_list_mapping APIs **(breaking change)**
|
16
|
+
|
17
|
+
**Insights**
|
18
|
+
- Added new endpoint to fetch Call Summaries
|
19
|
+
|
20
|
+
**Messaging**
|
21
|
+
- Add brand_type field to a2p brand_registration api
|
22
|
+
- Revert brand registration api update to add brand_type field
|
23
|
+
- Add brand_type field to a2p brand_registration api
|
24
|
+
|
25
|
+
**Taskrouter**
|
26
|
+
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` as Response Headers to all TaskRouter endpoints
|
27
|
+
|
28
|
+
**Verify**
|
29
|
+
- Add `TemplateSid` optional parameter on Verification creation.
|
30
|
+
- Include `whatsapp` as a channel type in the verifications API.
|
31
|
+
|
32
|
+
|
33
|
+
[2021-07-28] Version 5.57.1
|
34
|
+
---------------------------
|
35
|
+
**Conversations**
|
36
|
+
- Expose ParticipantConversations resource
|
37
|
+
|
38
|
+
**Taskrouter**
|
39
|
+
- Adding `links` to the activity resource
|
40
|
+
|
41
|
+
**Verify**
|
42
|
+
- Added a `Version` to Verify Factors `Webhooks` to add new fields without breaking old Webhooks.
|
43
|
+
|
44
|
+
|
45
|
+
[2021-07-14] Version 5.57.0
|
46
|
+
---------------------------
|
47
|
+
**Conversations**
|
48
|
+
- Changed `last_read_message_index` and `unread_messages_count` type in User Conversation's resource **(breaking change)**
|
49
|
+
- Expose UserConversations resource
|
50
|
+
|
51
|
+
**Messaging**
|
52
|
+
- Add brand_score field to brand registration responses
|
53
|
+
|
54
|
+
|
55
|
+
[2021-06-30] Version 5.56.0
|
56
|
+
---------------------------
|
57
|
+
**Library - Feature**
|
58
|
+
- [PR #559](https://github.com/twilio/twilio-ruby/pull/559): Add `Twilio::HTTP::Client#configure_connection`. Thanks to [@darwinShopify](https://github.com/darwinShopify)!
|
59
|
+
- [PR #558](https://github.com/twilio/twilio-ruby/pull/558): Autoload Twilio::REST and Twilio::HTTP. Thanks to [@gmcgibbon](https://github.com/gmcgibbon)!
|
60
|
+
|
61
|
+
**Conversations**
|
62
|
+
- Read-only Conversation Email Binding property `binding`
|
63
|
+
|
64
|
+
**Supersim**
|
65
|
+
- Add Billing Period resource for the Super Sim Pilot
|
66
|
+
- Add List endpoint to Billing Period resource for Super Sim Pilot
|
67
|
+
- Add Fetch endpoint to Billing Period resource for Super Sim Pilot
|
68
|
+
|
69
|
+
**Taskrouter**
|
70
|
+
- Update `transcribe` & `transcription_configuration` form params in Reservation update endpoint to have private visibility **(breaking change)**
|
71
|
+
- Add `transcribe` & `transcription_configuration` form params to Reservation update endpoint
|
72
|
+
|
73
|
+
**Twiml**
|
74
|
+
- Add `modify` event to `statusCallbackEvent` for `<Conference>`.
|
75
|
+
|
76
|
+
|
4
77
|
[2021-06-16] Version 5.55.0
|
5
78
|
---------------------------
|
6
79
|
**Api**
|
data/Gemfile
CHANGED
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.58.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.58.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/examples/examples.rb
CHANGED
@@ -69,7 +69,7 @@ puts @client.messages('SMXXXXXXXX').fetch.body
|
|
69
69
|
@client.messages.create(
|
70
70
|
from: '+14159341234',
|
71
71
|
to: '+16105557069',
|
72
|
-
|
72
|
+
media_url: 'http://example.com/media.png'
|
73
73
|
)
|
74
74
|
|
75
75
|
################ PHONE NUMBERS ################
|
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
|
@@ -151,6 +151,8 @@ module Twilio
|
|
151
151
|
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
|
152
152
|
# audio that is received by Twilio. `outbound` records the audio that is generated
|
153
153
|
# from Twilio. `both` records the audio that is received and generated by Twilio.
|
154
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
155
|
+
# Constraints depend on account and configuration.
|
154
156
|
# @param [String] url The absolute URL that returns the TwiML instructions for the
|
155
157
|
# call. We will call this URL using the `method` when the call connects. For more
|
156
158
|
# information, see the {Url
|
@@ -162,7 +164,7 @@ module Twilio
|
|
162
164
|
# @param [String] application_sid The SID of the Application resource that will
|
163
165
|
# handle the call, if the call will be handled by an application.
|
164
166
|
# @return [CallInstance] Created CallInstance
|
165
|
-
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
|
167
|
+
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
|
166
168
|
data = Twilio::Values.of({
|
167
169
|
'To' => to,
|
168
170
|
'From' => from,
|
@@ -198,6 +200,7 @@ module Twilio
|
|
198
200
|
'CallReason' => call_reason,
|
199
201
|
'CallToken' => call_token,
|
200
202
|
'RecordingTrack' => recording_track,
|
203
|
+
'TimeLimit' => time_limit,
|
201
204
|
})
|
202
205
|
|
203
206
|
payload = @version.create('POST', @uri, data: data)
|
@@ -488,8 +491,10 @@ module Twilio
|
|
488
491
|
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
489
492
|
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
490
493
|
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
494
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
495
|
+
# Constraints depend on account and configuration.
|
491
496
|
# @return [CallInstance] Updated CallInstance
|
492
|
-
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
|
497
|
+
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
|
493
498
|
data = Twilio::Values.of({
|
494
499
|
'Url' => url,
|
495
500
|
'Method' => method,
|
@@ -499,6 +504,7 @@ module Twilio
|
|
499
504
|
'StatusCallback' => status_callback,
|
500
505
|
'StatusCallbackMethod' => status_callback_method,
|
501
506
|
'Twiml' => twiml,
|
507
|
+
'TimeLimit' => time_limit,
|
502
508
|
})
|
503
509
|
|
504
510
|
payload = @version.update('POST', @uri, data: data)
|
@@ -874,8 +880,10 @@ module Twilio
|
|
874
880
|
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
875
881
|
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
876
882
|
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
883
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
884
|
+
# Constraints depend on account and configuration.
|
877
885
|
# @return [CallInstance] Updated CallInstance
|
878
|
-
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
|
886
|
+
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
|
879
887
|
context.update(
|
880
888
|
url: url,
|
881
889
|
method: method,
|
@@ -885,6 +893,7 @@ module Twilio
|
|
885
893
|
status_callback: status_callback,
|
886
894
|
status_callback_method: status_callback_method,
|
887
895
|
twiml: twiml,
|
896
|
+
time_limit: time_limit,
|
888
897
|
)
|
889
898
|
end
|
890
899
|
|
@@ -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.
|
@@ -166,8 +167,10 @@ module Twilio
|
|
166
167
|
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
|
167
168
|
# audio that is received by Twilio. `outbound` records the audio that is sent from
|
168
169
|
# Twilio. `both` records the audio that is received and sent by Twilio.
|
170
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
171
|
+
# Constraints depend on account and configuration.
|
169
172
|
# @return [ParticipantInstance] Created ParticipantInstance
|
170
|
-
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset)
|
173
|
+
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset, time_limit: :unset)
|
171
174
|
data = Twilio::Values.of({
|
172
175
|
'From' => from,
|
173
176
|
'To' => to,
|
@@ -207,6 +210,7 @@ module Twilio
|
|
207
210
|
'CallerId' => caller_id,
|
208
211
|
'CallReason' => call_reason,
|
209
212
|
'RecordingTrack' => recording_track,
|
213
|
+
'TimeLimit' => time_limit,
|
210
214
|
})
|
211
215
|
|
212
216
|
payload = @version.create('POST', @uri, data: data)
|