twilio-ruby 5.0.0.rc25 → 5.0.0.rc26

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01f12541d8117c7793ef1e5379c69d3e214d80d2
4
- data.tar.gz: 4e5d252025e627244c09ef9eb42e0a92bb4f1e6e
3
+ metadata.gz: db8a11cb848a053910d7aa5812a8c15f474505cc
4
+ data.tar.gz: 91ca06f98099e83fbe7b5226d159cb3e52a5fadf
5
5
  SHA512:
6
- metadata.gz: 076f2cb21d3b85b132d75f8057c87c50520eaa5abfd336f49013e98109196a21ffb709aba5a8454338527beb93b5bdcc125bccbaab84c27eee27ee3ab24ec64e
7
- data.tar.gz: ed11a19b6ccfe01f1e07f3e3894a25ffbae4a2289a7d5c4cfb1a2529d7a9daa8e0dca1ec89c1f6a2ffa36d74d0e53d05850dda355e8fd60418be18016b4c29c4
6
+ metadata.gz: e1deca7186f4c386f31eaaa26922fac2a0f82f9463aa2360553b48ff6c9b7e1ef10055a40dd0f394538aae15905d1c5b90a89f213ea95a2121d3ed9c56e90544
7
+ data.tar.gz: 95bca3058f5c672ea891799c2d3358914b789c8c4984615172f34988019c9f7a6b5be4fd4aa48f3d165fe808bb0b7de4b4b065b7c0694f10d928a8e9c5f40884
data/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
+ [2017-07-07] Version 5.0.0.rc26
4
+ --------------------------------
5
+ **Api**
6
+ - [omit] Rachet /Keys and /SigningKeys
7
+
8
+ **Preview**
9
+ - Add `status_callback_url` and `status_callback_method` to HostedNumberOrders.
10
+
11
+
3
12
  [2017-07-06] Version 5.0.0.rc25
4
13
  --------------------------------
5
14
  **Messaging**
data/README.md CHANGED
@@ -11,13 +11,13 @@ A module for using the Twilio REST API and generating valid [TwiML](http://www.t
11
11
  To install using [Bundler][bundler] grab the latest stable version:
12
12
 
13
13
  ```ruby
14
- gem 'twilio-ruby', '~> 5.0.0.rc25'
14
+ gem 'twilio-ruby', '~> 5.0.0.rc26'
15
15
  ```
16
16
 
17
17
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
18
18
 
19
19
  ```bash
20
- gem install twilio-ruby -v 5.0.0.rc25
20
+ gem install twilio-ruby -v 5.0.0.rc26
21
21
  ```
22
22
 
23
23
  To build and install the development branch yourself from the latest source:
@@ -93,7 +93,7 @@ twilio-ruby uses [Faraday][faraday] to make HTTP requests. You can tell Twilio::
93
93
  If you just need to generate a Capability Token for use with Twilio Client, you
94
94
  can do this:
95
95
 
96
- ``` ruby
96
+ ```ruby
97
97
  require 'twilio-ruby'
98
98
 
99
99
  # put your own account credentials here:
@@ -124,18 +124,18 @@ section of the wiki.
124
124
  TwiML support is based on the [Builder][builder] library. You can construct a
125
125
  TwiML response like this:
126
126
 
127
- ``` ruby
127
+ ```ruby
128
128
  require 'twilio-ruby'
129
129
 
130
130
  response = Twilio::TwiML::VoiceResponse.new do |r|
131
131
  r.say('hello there', voice: 'alice')
132
- r.dial('', caller_id: '+14159992222') do |d|
132
+ r.dial(caller_id: '+14159992222') do |d|
133
133
  d.client 'jenny'
134
134
  end
135
135
  end
136
136
 
137
137
  # print the result
138
- puts response.to_s()
138
+ puts response.to_s
139
139
  ```
140
140
 
141
141
  This will print the following (except for the whitespace):
@@ -144,7 +144,7 @@ This will print the following (except for the whitespace):
144
144
  <?xml version="1.0" encoding="UTF-8"?>
145
145
  <Response>
146
146
  <Say voice="alice">hello there</Say>
147
- <Dial callerid="+14159992222">
147
+ <Dial callerId="+14159992222">
148
148
  <Client>jenny</Client>
149
149
  </Dial>
150
150
  </Response>
@@ -30,10 +30,8 @@ puts(@account.friendly_name)
30
30
  end
31
31
 
32
32
  # get a particular call and list its recording urls
33
- @client.calls('CAXXXXXXX').fetch do |call|
34
- call.recordings().each do |r|
33
+ @client.calls('CAXXXXXXX').recordings.each do |r|
35
34
  puts r.wav
36
- end
37
35
  end
38
36
 
39
37
  # make a new outgoing call. returns a call object just like calls.get
@@ -80,7 +78,7 @@ puts @client.messages('SMXXXXXXXX').fetch.body
80
78
  @client.available_phone_numbers.list
81
79
 
82
80
  # print some available numbers
83
- @client.available_phone_numbers('US').local.list().each do |num|
81
+ @client.available_phone_numbers('US').local.list.each do |num|
84
82
 
85
83
  end
86
84
 
@@ -104,7 +102,7 @@ number = numbers[0].sid
104
102
 
105
103
  # get a particular conference's participants object and stash it
106
104
  conference = @client.conferences('CFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx').fetch
107
- @participants = conference.participants()
105
+ @participants = conference.participants
108
106
 
109
107
  # list participants
110
108
  @participants.each do |p|
@@ -121,7 +119,7 @@ end
121
119
  @queue = @client.queues.create(friendly_name: 'MyQueue', max_size: 50)
122
120
 
123
121
  # get a list of queues for this account
124
- @queues = @client.queues.list()
122
+ @queues = @client.queues.list
125
123
 
126
124
  # get a particular queue and its members
127
125
  @queue = @client.queues('QQxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx').fetch
@@ -208,8 +208,12 @@ module Twilio
208
208
  # IncomingPhoneNumber resource.
209
209
  # @param [String] sms_fallback_method Optional. The SMS Fallback Method attached
210
210
  # to the IncomingPhoneNumber resource.
211
+ # @param [String] status_callback_url Optional. The Status Callback URL attached
212
+ # to the IncomingPhoneNumber resource.
213
+ # @param [String] status_callback_method Optional. The Status Callback Method
214
+ # attached to the IncomingPhoneNumber resource.
211
215
  # @return [HostedNumberOrderInstance] Newly created HostedNumberOrderInstance
212
- def create(address_sid: nil, phone_number: nil, iso_country: nil, sms_capability: nil, email: nil, account_sid: :unset, friendly_name: :unset, unique_name: :unset, cc_emails: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset)
216
+ def create(address_sid: nil, phone_number: nil, iso_country: nil, sms_capability: nil, email: nil, account_sid: :unset, friendly_name: :unset, unique_name: :unset, cc_emails: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset, status_callback_url: :unset, status_callback_method: :unset)
213
217
  data = Twilio::Values.of({
214
218
  'AddressSid' => address_sid,
215
219
  'PhoneNumber' => phone_number,
@@ -224,6 +228,8 @@ module Twilio
224
228
  'SmsMethod' => sms_method,
225
229
  'SmsFallbackUrl' => sms_fallback_url,
226
230
  'SmsFallbackMethod' => sms_fallback_method,
231
+ 'StatusCallbackUrl' => status_callback_url,
232
+ 'StatusCallbackMethod' => status_callback_method,
227
233
  })
228
234
 
229
235
  payload = @version.create(
@@ -24,7 +24,7 @@ module Twilio
24
24
  # == Returns:
25
25
  # A <Response> element with a <Message> child element
26
26
  def message(
27
- body,
27
+ body: nil,
28
28
  to: nil,
29
29
  from: nil,
30
30
  method: nil,
@@ -29,7 +29,7 @@ module Twilio
29
29
  # == Returns:
30
30
  # A <Response> element with a <Dial> child element
31
31
  def dial(
32
- number,
32
+ number: nil,
33
33
  action: nil,
34
34
  method: nil,
35
35
  timeout: nil,
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.0.0.rc25'
2
+ VERSION = '5.0.0.rc26'
3
3
  end
@@ -135,7 +135,7 @@ describe 'Key' do
135
135
  }
136
136
  ],
137
137
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
138
- "end": 3,
138
+ "end": 0,
139
139
  "previous_page_uri": null,
140
140
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
141
141
  "page_size": 50,
@@ -159,7 +159,7 @@ describe 'Key' do
159
159
  {
160
160
  "keys": [],
161
161
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
162
- "end": 3,
162
+ "end": 0,
163
163
  "previous_page_uri": null,
164
164
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
165
165
  "page_size": 50,
@@ -134,10 +134,10 @@ describe 'SigningKey' do
134
134
  "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000"
135
135
  }
136
136
  ],
137
- "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
138
- "end": 3,
137
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0",
138
+ "end": 0,
139
139
  "previous_page_uri": null,
140
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
140
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0",
141
141
  "page_size": 50,
142
142
  "start": 0,
143
143
  "next_page_uri": null,
@@ -158,10 +158,10 @@ describe 'SigningKey' do
158
158
  %q[
159
159
  {
160
160
  "signing_keys": [],
161
- "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
162
- "end": 3,
161
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0",
162
+ "end": 0,
163
163
  "previous_page_uri": null,
164
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0",
164
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0",
165
165
  "page_size": 50,
166
166
  "start": 0,
167
167
  "next_page_uri": null,
@@ -9,21 +9,21 @@ describe Twilio::TwiML::MessagingResponse do
9
9
 
10
10
  it 'should allow populated response' do
11
11
  r = Twilio::TwiML::MessagingResponse.new
12
- r.message 'Hello'
12
+ r.message(body: 'Hello')
13
13
  r.redirect('example.com')
14
14
 
15
15
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message><Redirect>example.com</Redirect></Response>')
16
16
  end
17
17
 
18
18
  it 'should allow chaining' do
19
- r = Twilio::TwiML::MessagingResponse.new.message('Hello').redirect('example.com')
19
+ r = Twilio::TwiML::MessagingResponse.new.message(body: 'Hello').redirect('example.com')
20
20
 
21
21
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message><Redirect>example.com</Redirect></Response>')
22
22
  end
23
23
 
24
24
  it 'should allow nesting' do
25
25
  r = Twilio::TwiML::MessagingResponse.new
26
- r.message('Hello') do |m|
26
+ r.message(body: 'Hello') do |m|
27
27
  m.media('foobar')
28
28
  end
29
29
 
@@ -32,7 +32,7 @@ describe Twilio::TwiML::MessagingResponse do
32
32
 
33
33
  it 'should allow nesting and chaining' do
34
34
  r = Twilio::TwiML::MessagingResponse.new
35
- r.message('Hello') do |m|
35
+ r.message(body: 'Hello') do |m|
36
36
  m.media('foobar')
37
37
  end
38
38
 
@@ -43,7 +43,7 @@ describe Twilio::TwiML::MessagingResponse do
43
43
 
44
44
  it 'should allow nesting from the initializer' do
45
45
  response = Twilio::TwiML::MessagingResponse.new do |r|
46
- r.message('Hello')
46
+ r.message(body: 'Hello')
47
47
  r.redirect('example.com')
48
48
  end
49
49
  expect(response.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message><Redirect>example.com</Redirect></Response>')
@@ -53,7 +53,7 @@ describe Twilio::TwiML::MessagingResponse do
53
53
  context 'Testing Message' do
54
54
  it 'should allow a body' do
55
55
  r = Twilio::TwiML::MessagingResponse.new
56
- r.message 'Hello'
56
+ r.message(body: 'Hello')
57
57
 
58
58
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message></Response>')
59
59
  end
@@ -329,7 +329,7 @@ describe Twilio::TwiML::VoiceResponse do
329
329
  context 'Testing Dial' do
330
330
  it 'should allow VoiceResponse.dial' do
331
331
  r = Twilio::TwiML::VoiceResponse.new
332
- r.dial '1231231234'
332
+ r.dial(number: '1231231234')
333
333
 
334
334
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Dial>1231231234</Dial></Response>')
335
335
  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.0.0.rc25
4
+ version: 5.0.0.rc26
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: 2017-07-07 00:00:00.000000000 Z
11
+ date: 2017-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libxml-ruby