twilio-ruby 5.26.0 → 5.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +5 -6
- data/CHANGES.md +21 -0
- data/README.md +28 -19
- data/VERSIONS.md +9 -10
- data/lib/twilio-ruby.rb +4 -2
- data/lib/twilio-ruby/framework/domain.rb +1 -1
- data/lib/twilio-ruby/http/http_client.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -2
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +12 -6
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +12 -12
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +17 -16
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +35 -35
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +8 -8
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +16 -12
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +12 -12
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +13 -11
- data/lib/twilio-ruby/rest/client.rb +2 -2
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +4 -4
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +4 -4
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +4 -4
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +4 -4
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +4 -4
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +11 -5
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +12 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +12 -12
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +17 -16
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +35 -35
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +8 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +16 -12
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +12 -12
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +13 -11
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -5
- data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +16 -16
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/util/configuration.rb +10 -5
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/http/http_client_spec.rb +2 -2
- data/spec/integration/lookups/v1/phone_number_spec.rb +1 -1
- data/spec/integration/monitor/v1/alert_spec.rb +5 -28
- data/spec/integration/pricing/v1/voice/number_spec.rb +1 -1
- data/spec/integration/pricing/v2/voice/number_spec.rb +1 -1
- data/spec/rest/client_spec.rb +22 -0
- data/spec/twilio_spec.rb +3 -1
- data/spec/util/configuration_spec.rb +6 -0
- metadata +4 -3
@@ -21,7 +21,7 @@ describe 'Number' do
|
|
21
21
|
expect(
|
22
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
23
23
|
method: 'get',
|
24
|
-
url: 'https://pricing.twilio.com/v1/Voice/Numbers
|
24
|
+
url: 'https://pricing.twilio.com/v1/Voice/Numbers/%2B15017122661',
|
25
25
|
))).to eq(true)
|
26
26
|
end
|
27
27
|
|
@@ -21,7 +21,7 @@ describe 'Number' do
|
|
21
21
|
expect(
|
22
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
23
23
|
method: 'get',
|
24
|
-
url: 'https://pricing.twilio.com/v2/Voice/Numbers
|
24
|
+
url: 'https://pricing.twilio.com/v2/Voice/Numbers/%2B15017122661',
|
25
25
|
))).to eq(true)
|
26
26
|
end
|
27
27
|
|
data/spec/rest/client_spec.rb
CHANGED
@@ -49,6 +49,28 @@ describe Twilio::REST::TrunkingClient do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
describe Twilio::REST::Client do
|
52
|
+
before do
|
53
|
+
Twilio.configure do |config|
|
54
|
+
config.account_sid = 'someSid'
|
55
|
+
config.auth_token = 'someToken'
|
56
|
+
config.http_client = 'someClient'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'uses the global configuration by default' do
|
61
|
+
@client = Twilio::REST::Client.new
|
62
|
+
expect(@client.account_sid).to eq('someSid')
|
63
|
+
expect(@client.auth_token).to eq('someToken')
|
64
|
+
expect(@client.http_client).to eq('someClient')
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'uses the arguments over global configuration' do
|
68
|
+
@client = Twilio::REST::Client.new('myUser', 'myPassword', nil, nil, 'myClient')
|
69
|
+
expect(@client.account_sid).to eq('myUser')
|
70
|
+
expect(@client.auth_token).to eq('myPassword')
|
71
|
+
expect(@client.http_client).to eq('myClient')
|
72
|
+
end
|
73
|
+
|
52
74
|
it 'successfully validates the working SSL certificate' do
|
53
75
|
@holodeck.mock Twilio::Response.new(200, '')
|
54
76
|
expect { @client.validate_ssl_certificate }.not_to raise_error
|
data/spec/twilio_spec.rb
CHANGED
@@ -3,13 +3,15 @@ describe Twilio do
|
|
3
3
|
Twilio.instance_variable_set('@configuration', nil)
|
4
4
|
end
|
5
5
|
|
6
|
-
it 'should set the
|
6
|
+
it 'should set the configuration with a config block' do
|
7
7
|
Twilio.configure do |config|
|
8
8
|
config.account_sid = 'someSid'
|
9
9
|
config.auth_token = 'someToken'
|
10
|
+
config.http_client = 'someClient'
|
10
11
|
end
|
11
12
|
|
12
13
|
expect(Twilio.account_sid).to eq('someSid')
|
13
14
|
expect(Twilio.auth_token).to eq('someToken')
|
15
|
+
expect(Twilio.http_client).to eq('someClient')
|
14
16
|
end
|
15
17
|
end
|
@@ -12,4 +12,10 @@ describe Twilio::Util::Configuration do
|
|
12
12
|
config.auth_token = 'someToken'
|
13
13
|
expect(config.auth_token).to eq('someToken')
|
14
14
|
end
|
15
|
+
|
16
|
+
it 'should have an http client attribute' do
|
17
|
+
config = Twilio::Util::Configuration.new
|
18
|
+
config.http_client = 'someClient'
|
19
|
+
expect(config.http_client).to eq('someClient')
|
20
|
+
end
|
15
21
|
end
|
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.27.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: 2019-09-
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -920,7 +920,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
920
920
|
- !ruby/object:Gem::Version
|
921
921
|
version: '0'
|
922
922
|
requirements: []
|
923
|
-
|
923
|
+
rubyforge_project:
|
924
|
+
rubygems_version: 2.5.2.3
|
924
925
|
signing_key:
|
925
926
|
specification_version: 4
|
926
927
|
summary: The official library for communicating with the Twilio REST API, building
|