Skip to content

Commit

Permalink
Merge pull request twilio#32 from twilio/DEVED-3402-restore-nested-ar…
Browse files Browse the repository at this point in the history
…gs-node-capped-chain-fix

DEVED-3402 restore nested args node capped chain fix
  • Loading branch information
dprothero authored Jul 13, 2018
2 parents 9336c6e + d39511b commit 468104b
Show file tree
Hide file tree
Showing 829 changed files with 3,268 additions and 2,300 deletions.
3 changes: 2 additions & 1 deletion accounts/v1/aws/create-default/create-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.aws
client.accounts.credentials
.aws
.create({
credentials: 'AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
})
Expand Down
3 changes: 2 additions & 1 deletion accounts/v1/aws/create-default/create-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

aws = @client.accounts.credentials.aws
aws = @client.accounts.credentials
.aws
.create(
credentials: 'AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
)
Expand Down
3 changes: 2 additions & 1 deletion accounts/v1/aws/create-default/create-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

aws = client.accounts.credentials.aws \
aws = client.accounts.credentials \
.aws \
.create(
credentials='AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
)
Expand Down
9 changes: 5 additions & 4 deletions accounts/v1/aws/delete-default/delete-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.remove()
.then(aws => console.log(aws.sid))
.done();
client.accounts.credentials
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.remove()
.then(aws => console.log(aws.sid))
.done();
9 changes: 5 additions & 4 deletions accounts/v1/aws/fetch-default/fetch-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch()
.then(aws => console.log(aws.friendlyName))
.done();
client.accounts.credentials
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch()
.then(aws => console.log(aws.friendlyName))
.done();
5 changes: 3 additions & 2 deletions accounts/v1/aws/fetch-default/fetch-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

aws = @client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch
aws = @client.accounts.credentials
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch

puts aws.friendly_name
5 changes: 3 additions & 2 deletions accounts/v1/aws/fetch-default/fetch-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

aws = client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.fetch()
aws = client.accounts.credentials \
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.fetch()

print(aws.friendly_name)
9 changes: 5 additions & 4 deletions accounts/v1/aws/update-default/update-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update({friendlyName: 'friendlyName'})
.then(aws => console.log(aws.friendlyName))
.done();
client.accounts.credentials
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update({friendlyName: 'friendlyName'})
.then(aws => console.log(aws.friendlyName))
.done();
5 changes: 3 additions & 2 deletions accounts/v1/aws/update-default/update-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

aws = @client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update(friendly_name: 'friendly_name')
aws = @client.accounts.credentials
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update(friendly_name: 'friendly_name')

puts aws.friendly_name
5 changes: 3 additions & 2 deletions accounts/v1/aws/update-default/update-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

aws = client.accounts.credentials.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(friendly_name='friendly_name')
aws = client.accounts.credentials \
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(friendly_name='friendly_name')

print(aws.friendly_name)
9 changes: 5 additions & 4 deletions accounts/v1/public_key/create-default/create-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.publicKey
.create({publicKey: 'publickey'})
.then(public_key => console.log(public_key.sid))
.done();
client.accounts.credentials
.publicKey
.create({publicKey: 'publickey'})
.then(public_key => console.log(public_key.sid))
.done();
9 changes: 5 additions & 4 deletions accounts/v1/public_key/delete-default/delete-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.publicKey('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.remove()
.then(public_key => console.log(public_key.sid))
.done();
client.accounts.credentials
.publicKey('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.remove()
.then(public_key => console.log(public_key.sid))
.done();
5 changes: 3 additions & 2 deletions accounts/v1/public_key/delete-default/delete-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.accounts.credentials.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.delete
@client.accounts.credentials
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.delete
5 changes: 3 additions & 2 deletions accounts/v1/public_key/delete-default/delete-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

client.accounts.credentials.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.delete()
client.accounts.credentials \
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.delete()
3 changes: 2 additions & 1 deletion accounts/v1/public_key/fetch-default/fetch-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.publicKey('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
client.accounts.credentials
.publicKey('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch()
.then(public_key => console.log(public_key.friendlyName))
.done();
7 changes: 4 additions & 3 deletions accounts/v1/public_key/fetch-default/fetch-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

public_key = @client.accounts.credentials
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch
public_key = @client.accounts
.credentials
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch

puts public_key.friendly_name
7 changes: 4 additions & 3 deletions accounts/v1/public_key/fetch-default/fetch-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

public_key = client.accounts.credentials \
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.fetch()
public_key = client.accounts \
.credentials \
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.fetch()

print(public_key.friendly_name)
5 changes: 3 additions & 2 deletions accounts/v1/public_key/read-default/read-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.publicKey
.each(publicKey => console.log(publicKey.sid));
client.accounts.credentials
.publicKey
.each(publicKey => console.log(publicKey.sid));
3 changes: 2 additions & 1 deletion accounts/v1/public_key/update-default/update-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.accounts.credentials.publicKey('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
client.accounts.credentials
.publicKey('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update({friendlyName: 'friendlyName'})
.then(public_key => console.log(public_key.friendlyName))
.done();
7 changes: 4 additions & 3 deletions accounts/v1/public_key/update-default/update-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

public_key = @client.accounts.credentials
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update(friendly_name: 'friendly_name')
public_key = @client.accounts
.credentials
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update(friendly_name: 'friendly_name')

puts public_key.friendly_name
7 changes: 4 additions & 3 deletions accounts/v1/public_key/update-default/update-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

public_key = client.accounts.credentials \
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(friendly_name='friendly_name')
public_key = client.accounts \
.credentials \
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(friendly_name='friendly_name')

print(public_key.friendly_name)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.api.accounts
.create({friendlyName: 'Submarine'})
.then(account => console.log(account.sid))
.done();
client.api.accounts.create({friendlyName: 'Submarine'})
.then(account => console.log(account.sid))
.done();
7 changes: 3 additions & 4 deletions api/v2010/application/create-default/create-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.applications
.create({friendlyName: 'friendlyName'})
.then(application => console.log(application.sid))
.done();
client.applications.create({friendlyName: 'friendlyName'})
.then(application => console.log(application.sid))
.done();
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.availablePhoneNumbers('US').fetch()
client.availablePhoneNumbers('US')
.fetch()
.then(available_phone_number_country => console.log(available_phone_number_country.countryCode))
.done();
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@


# Your Account Sid and Auth Token from twilio.com/console
account_sid = '"ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"'
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

conference = client.conferences("CFbbe46ff1274e283f7e3ac1df0072ab39") \
.update(announce_url="http://www.myapp.com/announce")
conference = client.conferences('CFbbe46ff1274e283f7e3ac1df0072ab39') \
.update(announce_url='http://www.myapp.com/announce')

print(conference.friendly_name)
7 changes: 3 additions & 4 deletions api/v2010/credential/create-default/create-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

credential = client.sip \
.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials \
.create(username='username', password='password')
credential = client.sip.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials \
.create(username='username', password='password')

print(credential.sid)
7 changes: 3 additions & 4 deletions api/v2010/credential/fetch-default/fetch-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

credential = client.sip \
.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.fetch()
credential = client.sip.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.fetch()

print(credential.username)
7 changes: 3 additions & 4 deletions api/v2010/credential/read-default/read-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

credentials = client.sip \
.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials \
.list()
credentials = client.sip.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials \
.list()

for record in credentials:
print(record.sid)
7 changes: 3 additions & 4 deletions api/v2010/credential/update-default/update-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

credential = client.sip \
.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(password='password')
credential = client.sip.credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(password='password')

print(credential.username)
7 changes: 3 additions & 4 deletions api/v2010/domain/create-default/create-default.3.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains
.create({domainName: 'domainName'})
.then(domain => console.log(domain.sid))
.done();
client.sip.domains.create({domainName: 'domainName'})
.then(domain => console.log(domain.sid))
.done();
5 changes: 2 additions & 3 deletions api/v2010/feedback/fetch-default/fetch-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

feedback = client.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.feedback() \
.fetch()
feedback = client.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').feedback() \
.fetch()

print(feedback.date_created)
11 changes: 6 additions & 5 deletions api/v2010/feedback_summary/create-default/create-default.5.x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

feedback_summary = @client.calls.feedback_summaries
.create(
start_date: Date.new(2008, 1, 2),
end_date: Date.new(2008, 1, 2)
)
feedback_summary = @client.calls
.feedback_summaries
.create(
start_date: Date.new(2008, 1, 2),
end_date: Date.new(2008, 1, 2)
)

puts feedback_summary.sid
11 changes: 6 additions & 5 deletions api/v2010/feedback_summary/create-default/create-default.6.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

feedback_summary = client.calls.feedback_summaries \
.create(
start_date=date(2008, 1, 2),
end_date=date(2008, 1, 2)
)
feedback_summary = client.calls \
.feedback_summaries \
.create(
start_date=date(2008, 1, 2),
end_date=date(2008, 1, 2)
)

print(feedback_summary.sid)
Loading

0 comments on commit 468104b

Please sign in to comment.