diff --git a/rest/addresses/instance-create-example/instance-create-example.3.x.js b/rest/addresses/instance-create-example/instance-create-example.3.x.js new file mode 100644 index 0000000000..178fff8c23 --- /dev/null +++ b/rest/addresses/instance-create-example/instance-create-example.3.x.js @@ -0,0 +1,17 @@ +// Download the Node helper library from twilio.com/docs/node/install +// These identifiers are your accountSid and authToken from +// https://www.twilio.com/console +const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; +const authToken = 'your_auth_token'; +const client = require('twilio')(accountSid, authToken); + +client.addresses + .create({ + customerName: 'FriendlyName', + street: 'Elm Street', + city: 'Racoon', + region: 'Mordor', + postalCode: '150', + isoCountry: 'AX', + }) + .then(address => console.log(address.customerName)); diff --git a/rest/addresses/instance-create-example/instance-create-example.5.x.cs b/rest/addresses/instance-create-example/instance-create-example.5.x.cs new file mode 100644 index 0000000000..95b6c1d03c --- /dev/null +++ b/rest/addresses/instance-create-example/instance-create-example.5.x.cs @@ -0,0 +1,26 @@ +// Download the twilio-csharp library from twilio.com/docs/libraries/csharp +using System; +using Twilio; +using Twilio.Rest.Api.V2010.Account; + +class Example +{ + static void Main(string[] args) + { + // Find your Account Sid and Auth Token at twilio.com/console + const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; + const string authToken = "your_auth_token"; + TwilioClient.Init(accountSid, authToken); + + var address = AddressResource.Create( + customerName: "FriendlyName", + street: "Elm Street", + city: "Racoon", + region: "Mordor", + postalCode: "150", + isoCountry: "AX" + ); + + Console.WriteLine(address.CustomerName); + } +} diff --git a/rest/addresses/instance-create-example/instance-create-example.5.x.php b/rest/addresses/instance-create-example/instance-create-example.5.x.php new file mode 100644 index 0000000000..f0e73a6139 --- /dev/null +++ b/rest/addresses/instance-create-example/instance-create-example.5.x.php @@ -0,0 +1,24 @@ +addresses + ->create( + 'FriendlyName', + 'Elm Street', + 'Racoon', + 'Mordor', + '150', + 'AX' + ); + +echo $address->customerName; diff --git a/rest/addresses/instance-create-example/instance-create-example.5.x.rb b/rest/addresses/instance-create-example/instance-create-example.5.x.rb new file mode 100644 index 0000000000..7c0d135bfa --- /dev/null +++ b/rest/addresses/instance-create-example/instance-create-example.5.x.rb @@ -0,0 +1,21 @@ +# Get twilio-ruby from twilio.com/docs/ruby/install +require 'twilio-ruby' + +# Get your Account SID and Auth Token from twilio.com/console +account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' +auth_token = 'your_auth_token' + +# Initialize Twilio Client +@client = Twilio::REST::Client.new(account_sid, auth_token) + +# Get an object from its sid. If you do not have a sid, +# check out the list resource examples on this page +@address = @client.api.addresses.create( + customer_name: 'FriendlyName', + street: 'Elm Street', + city: 'Racoon', + region: 'Mordor', + postal_code: '150', + iso_country: 'AX') + +puts @address.customer_name diff --git a/rest/addresses/instance-create-example/instance-create-example.6.x.py b/rest/addresses/instance-create-example/instance-create-example.6.x.py new file mode 100644 index 0000000000..deb7e5fe2e --- /dev/null +++ b/rest/addresses/instance-create-example/instance-create-example.6.x.py @@ -0,0 +1,17 @@ +# Download the Python helper library from twilio.com/docs/python/install +from twilio.rest import Client + +# Your Account Sid and Auth Token from twilio.com/user/account +account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +auth_token = "your_auth_token" +client = Client(account_sid, auth_token) + +address = client.addresses.create( + customer_name='FriendlyName', + street='Elm Street', + city='Racoon', + region='Mordor', + postal_code='150', + iso_country='AX') + +print(address.customer_name) diff --git a/rest/addresses/instance-create-example/instance-create-example.7.x.java b/rest/addresses/instance-create-example/instance-create-example.7.x.java new file mode 100644 index 0000000000..4b90301f73 --- /dev/null +++ b/rest/addresses/instance-create-example/instance-create-example.7.x.java @@ -0,0 +1,26 @@ +// Install the Java helper library from twilio.com/docs/java/install +import com.twilio.Twilio; +import com.twilio.rest.api.v2010.account.Address; + +public class Example { + // Find your Account Sid and Token at twilio.com/user/account + public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; + public static final String AUTH_TOKEN = "your_auth_token"; + + public static void main(String[] args) { + Twilio.init(ACCOUNT_SID, AUTH_TOKEN); + + // Get an object from its sid. If you do not have a sid, + // check out the list resource examples on this page + Address address = Address.creator( + "FriendlyName", + "Elm Street", + "Racoon", + "Mordor", + "150", + "AX" + ).create(); + + System.out.println(address.getCustomerName()); + } +} diff --git a/rest/addresses/instance-create-example/meta.json b/rest/addresses/instance-create-example/meta.json new file mode 100644 index 0000000000..3d368b2f38 --- /dev/null +++ b/rest/addresses/instance-create-example/meta.json @@ -0,0 +1,4 @@ +{ + "title": "Instance Create Example", + "type": "server" +}