com.twilio.sdk.resource.instance
Class Address

java.lang.Object
  extended by com.twilio.sdk.resource.Resource<C>
      extended by com.twilio.sdk.resource.InstanceResource<TwilioRestClient>
          extended by com.twilio.sdk.resource.instance.Address

public class Address
extends InstanceResource<TwilioRestClient>

An Address instance resource. An Address instance resource represents your or your customer’s physical location within a country. Around the world, some local authorities require the name and address of the user to be on file with Twilio to purchase and own a phone number. Addresses are represented by the following properties: - FriendlyName: an optional, user-defined string describing this Address. 64 characters maximum. - CustomerName: You or your customer's business name. - Street: The number and street of this address. - City: The city of this address. - Region: The state or region of the address. - PostalCode: The postal code (zip code). - IsoCountry: The country, in ISO-3166-1 alpha-2 (two-character) format, e.g. "CA" for Canada For more information see https://www.twilio.com/docs/api/rest/address


Constructor Summary
Address(TwilioRestClient client, Map<String,Object> properties)
          Instantiates a new address.
Address(TwilioRestClient client, String sid)
          Instantiates a new Address.
 
Method Summary
 boolean delete()
           
 String getAccountSid()
          Identifier for the account owning this Address.
 String getCity()
          The city for this Address.
 String getCustomerName()
          You or your customer's business name for this Address.
 Date getDateCreated()
          The date/time the Address resource was created.
 Date getDateUpdated()
          Date/time this Address was last updated.
 DependentPhoneNumberList getDependentPhoneNumbers()
          A list of phone numbers owned by this Address's account that depend on it to satisfy legal requirements.
 String getFriendlyName()
          An optional user-defined string describing this Address.
 String getIsoCountry()
          The country for this address, specified in ISO 3166-1 alpha-2 (two characters) format.
 String getPostalCode()
          The postal or zip code for this Address.
 String getRegion()
          The state or region for this Address.
 String getSid()
          A unique identifier for this Address.
 String getStreet()
          The number and street of this Address.
 
Methods inherited from class com.twilio.sdk.resource.InstanceResource
getObject, getProperty, update, update
 
Methods inherited from class com.twilio.sdk.resource.Resource
setRequestAccountSid
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Address

public Address(TwilioRestClient client,
               String sid)
Instantiates a new Address.

Parameters:
client - the client
sid - the sid

Address

public Address(TwilioRestClient client,
               Map<String,Object> properties)
Instantiates a new address.

Parameters:
client - the client
properties - the properties
Method Detail

getSid

public String getSid()
A unique identifier for this Address.

Returns:
the sid

getDateCreated

public Date getDateCreated()
The date/time the Address resource was created.

Returns:
the date created

getDateUpdated

public Date getDateUpdated()
Date/time this Address was last updated.

Returns:
the date updated

getAccountSid

public String getAccountSid()
Identifier for the account owning this Address.

Returns:
the account sid

getFriendlyName

public String getFriendlyName()
An optional user-defined string describing this Address.

Returns:
the friendly name

getCustomerName

public String getCustomerName()
You or your customer's business name for this Address.

Returns:
the customer name

getStreet

public String getStreet()
The number and street of this Address.

Returns:
the street number

getCity

public String getCity()
The city for this Address.

Returns:
the city

getRegion

public String getRegion()
The state or region for this Address.

Returns:
the region

getPostalCode

public String getPostalCode()
The postal or zip code for this Address.

Returns:
the postal code

getIsoCountry

public String getIsoCountry()
The country for this address, specified in ISO 3166-1 alpha-2 (two characters) format.

Returns:
the country code

getDependentPhoneNumbers

public DependentPhoneNumberList getDependentPhoneNumbers()
A list of phone numbers owned by this Address's account that depend on it to satisfy legal requirements. If this list is non-empty, the Address cannot be deleted until another Address(es) satisfying the requirements for these numbers is created.


delete

public boolean delete()
               throws TwilioRestException
Throws:
TwilioRestException


Copyright © 2011 Twilio, Inc. All Rights Reserved.