com.twilio.sdk.resource.instance
Class Account

java.lang.Object
  extended by com.twilio.sdk.resource.Resource
      extended by com.twilio.sdk.resource.InstanceResource
          extended by com.twilio.sdk.resource.instance.Account

public class Account
extends InstanceResource

The Class Account. For more information see https://www.twilio.com/docs/api/rest/account


Constructor Summary
Account(TwilioRestClient client)
          Instantiates a new account.
Account(TwilioRestClient client, Map<String,Object> properties)
          Instantiates a new account.
 
Method Summary
 boolean close()
          Close this subaccount.
 Application getApplication(String sid)
          Get a given application instance by sid
 ApplicationFactory getApplicationFactory()
          Gets the application factory which lets you create new applications https://www.twilio.com/docs/api/rest/applications#list-post
 ApplicationList getApplications()
          Gets the application list https://www.twilio.com/docs/api/rest/applications
 ApplicationList getApplications(Map<String,String> filters)
          Gets the application list with the given filters https://www.twilio.com/docs/api/rest/applications
 AuthorizedConnectApp getAuthorizedConnectApp(String sid)
          Get a given connect app instance by sid
 AuthorizedConnectAppList getAuthorizedConnectApps()
          Gets the authorized connect app list https://www.twilio.com/docs/api/rest/authorized-connect-apps
 AuthorizedConnectAppList getAuthorizedConnectApps(Map<String,String> filters)
          Gets the authorized connect app list with the given filters https://www.twilio.com/docs/api/rest/authorized-connect-apps
 String getAuthToken()
          Gets the auth token.
 AvailablePhoneNumberList getAvailablePhoneNumbers()
          Gets the available phone numbers.
 AvailablePhoneNumberList getAvailablePhoneNumbers(Map<String,String> filters)
          Gets the available phone numbers.
 AvailablePhoneNumberList getAvailablePhoneNumbers(Map<String,String> filters, String isoCountry, String type)
          Gets the available phone numbers with the given iso country and type See: https://www.twilio.com/docs/api/rest/available-phone-numbers
 Call getCall(String sid)
          Get a given call instance by sid
 CallFactory getCallFactory()
          Gets the call factory, which lets you make outgoing calls.
 CallList getCalls()
          Gets the calls list resource without any filters.
 CallList getCalls(Map<String,String> filters)
          Gets the calls list resource with the given filters.
 Conference getConference(String sid)
          Get a given conference instance by sid
 ConferenceList getConferences()
          Gets the conference list See: https://www.twilio.com/docs/api/rest/conference
 ConferenceList getConferences(Map<String,String> filters)
          Gets the conferences list with the given filters See: https://www.twilio.com/docs/api/rest/conference
 ConnectApp getConnectApp(String sid)
          Get a given connect app instance by sid
 ConnectAppList getConnectApps()
          Gets the connect app list https://www.twilio.com/docs/api/rest/connect-apps
 ConnectAppList getConnectApps(Map<String,String> filters)
          Gets the connect app list with the given filters https://www.twilio.com/docs/api/rest/connect-apps
 CredentialListInstance getCredentialList(String sid)
          Get a given CredentialList instance by sid
 CredentialListFactory getCredentialListFactory()
          Gets a CredentialListFactory
 CredentialListList getCredentialLists()
          Gets the sip CredentialLists list.
 CredentialListList getCredentialLists(Map<String,String> filters)
          Gets the CredentialList list with the given filters https://www.twilio.com/docs/api/rest/sip-credential-lists
 Date getDateCreated()
          Gets the date created.
 Date getDateUpdated()
          Gets the date updated.
 Domain getDomain(String sid)
          Get a given sip domain instance by sid
 DomainFactory getDomainFactory()
          Gets a DomainFactory
 DomainList getDomains()
          Gets the sip domains list.
 DomainList getDomains(Map<String,String> filters)
          Gets the domain list with the given filters https://www.twilio.com/docs/api/rest/sip-domains
 String getFriendlyName()
          Gets the friendly name.
 IncomingPhoneNumber getIncomingPhoneNumber(String sid)
          Get a given incoming phone number instance by sid
 IncomingPhoneNumberFactory getIncomingPhoneNumberFactory()
          Gets the incoming phone number factory.
 IncomingPhoneNumberList getIncomingPhoneNumbers()
          Gets the incoming phone numbers list See: https://www.twilio.com/docs/api/rest/incoming-phone-numbers
 IncomingPhoneNumberList getIncomingPhoneNumbers(Map<String,String> filters)
          Gets the incoming phone numbers list with the given filters See: https://www.twilio.com/docs/api/rest/incoming-phone-numbers
 IpAccessControlList getIpAccessControlList(String sid)
          Get a given IpAccessControlList instance by sid
 IpAccessControlListFactory getIpAccessControlListFactory()
          Gets an IpAccessControlListFactory
 IpAccessControlListList getIpAccessControlLists()
          Gets the sip IpAccessControlLists list.
 IpAccessControlListList getIpAccessControlLists(Map<String,String> filters)
          Gets the IpAccessControlList list with the given filters https://www.twilio.com/docs/api/rest/sip-ip-access-control-lists
 MediaList getMedia()
          Gets the media list.
 MediaList getMedia(Map<String,String> filters)
          Gets the media list with the given filters.
 Media getMedia(String sid)
          Gets the media instance for this sid.
 Message getMessage(String sid)
          Get a given message instance by sid
 MessageFactory getMessageFactory()
          Gets the message factory which lets you send messages https://www.twilio.com/docs/api/rest/sending-messages
 MessageList getMessages()
          Gets the message list.
 MessageList getMessages(Map<String,String> filters)
          Gets the messages list with the given filters https://www.twilio.com/docs/api/rest/messages
 Notification getNotification(String sid)
          Get a given notification instance by sid
 NotificationList getNotifications()
          Gets the notifications.
 NotificationList getNotifications(Map<String,String> filters)
          Gets the notifications.
 OutgoingCallerId getOutgoingCallerId(String sid)
          Get a given outgoing caller id instance by sid
 OutgoingCallerIdFactory getOutgoingCallerIdFactory()
          Gets the outgoing caller id factory which lets you create outgoing caller ids https://www.twilio.com/docs/api/rest/outgoing-caller-ids
 OutgoingCallerIdList getOutgoingCallerIds()
          Gets the outgoing caller ids.
 OutgoingCallerIdList getOutgoingCallerIds(Map<String,String> filters)
          Gets the outgoing caller ids.
 Queue getQueue(String sid)
          Get a given queue by sid
 QueueFactory getQueueFactory()
          Get the queue factory
 QueueList getQueues()
          Gets the queue list See: https://www.twilio.com/docs/api/rest/queue
 Recording getRecording(String sid)
          Get a given recording instance by sid
 RecordingList getRecordings()
          Gets the recordings list https://www.twilio.com/docs/api/rest/recording
 RecordingList getRecordings(Map<String,String> filters)
          Gets the recordings list https://www.twilio.com/docs/api/rest/recording
 Sandbox getSandbox()
          Get the developer sandbox https://www.twilio.com/docs/api/rest/sandbox
 ShortCode getShortCode(String sid)
          Get a given short code instance by sid
 ShortCodeList getShortCodes()
          Gets the shortcode list.
 ShortCodeList getShortCodes(Map<String,String> filters)
          Gets the short code list with filters
 String getSid()
          Gets the sid.
 Sms getSms(String sid)
          Get a given sms instance by sid
 SmsFactory getSmsFactory()
          Gets the sms factory which lets you send sms messages https://www.twilio.com/docs/api/rest/sending-sms
 SmsList getSmsMessages()
          Gets the sms message list.
 SmsList getSmsMessages(Map<String,String> filters)
          Gets the sms messages list with the given filters https://www.twilio.com/docs/api/rest/sms
 String getStatus()
          Gets the status.
 Transcription getTranscription(String sid)
          Get a given transcription instance by sid
 TranscriptionList getTranscriptions()
          Gets the transcriptions list https://www.twilio.com/docs/api/rest/transcription
 TranscriptionList getTranscriptions(Map<String,String> filters)
          Gets the transcriptions list with the given filters https://www.twilio.com/docs/api/rest/transcription
 String getType()
          Gets the account type
 UsageRecordList getUsageRecords()
          Gets the Usage Record list https://www.twilio.com/docs/api/rest/usage-records
 UsageRecordList getUsageRecords(Map<String,String> filters)
          Gets the Usage Record list with the given filters https://www.twilio.com/docs/api/rest/usage-records
 UsageTrigger getUsageTrigger(String sid)
          Get a specific Usage Trigger
 UsageTriggerFactory getUsageTriggerFactory()
          Gets the Usage Trigger factory which lets you create usage triggers
 UsageTriggerList getUsageTriggers()
          Gets the Usage Triggers list https://www.twilio.com/docs/api/rest/usage-triggers
 UsageTriggerList getUsageTriggers(Map<String,String> filters)
          Gets the Usage Triggers list with the given filters https://www.twilio.com/docs/api/rest/usage-triggers
 void setAuthToken(String authToken)
          Sets the auth token.
 void setSid(String accountSid)
          Sets the sid.
 
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

Account

public Account(TwilioRestClient client)
Instantiates a new account.

Parameters:
client - the client

Account

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

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

getSid

public String getSid()
Gets the sid.

Returns:
the sid

setSid

public void setSid(String accountSid)
Sets the sid.

Parameters:
accountSid - the new sid

getAuthToken

public String getAuthToken()
Gets the auth token.

Returns:
the auth token

setAuthToken

public void setAuthToken(String authToken)
Sets the auth token.

Parameters:
authToken - the new auth token

getFriendlyName

public String getFriendlyName()
Gets the friendly name.

Returns:
the friendly name

getStatus

public String getStatus()
Gets the status.

Returns:
the status

getType

public String getType()
Gets the account type

Returns:
the account type

getDateCreated

public Date getDateCreated()
Gets the date created.

Returns:
the date created

getDateUpdated

public Date getDateUpdated()
Gets the date updated.

Returns:
the date updated

getCalls

public CallList getCalls()
Gets the calls list resource without any filters. https://www.twilio.com/docs/api/rest/call

Returns:
the calls

getCalls

public CallList getCalls(Map<String,String> filters)
Gets the calls list resource with the given filters. https://www.twilio.com/docs/api/rest/call

Parameters:
filters - the filters
Returns:
the calls

getCall

public Call getCall(String sid)
Get a given call instance by sid

Parameters:
sid - The 34 character sid starting with CA

getCallFactory

public CallFactory getCallFactory()
Gets the call factory, which lets you make outgoing calls. https://www.twilio.com/docs/api/rest/making_calls

Returns:
the call factory

getSmsMessages

public SmsList getSmsMessages()
Gets the sms message list. https://www.twilio.com/docs/api/rest/sms

Returns:
the sms messages

getSmsMessages

public SmsList getSmsMessages(Map<String,String> filters)
Gets the sms messages list with the given filters https://www.twilio.com/docs/api/rest/sms

Parameters:
filters - the filters
Returns:
the sms messages

getSms

public Sms getSms(String sid)
Get a given sms instance by sid

Parameters:
sid - The 34 character sid starting with SM

getSmsFactory

public SmsFactory getSmsFactory()
Gets the sms factory which lets you send sms messages https://www.twilio.com/docs/api/rest/sending-sms

Returns:
the sms factory

getMessages

public MessageList getMessages()
Gets the message list. https://www.twilio.com/docs/api/rest/messages

Returns:
the messages

getMessages

public MessageList getMessages(Map<String,String> filters)
Gets the messages list with the given filters https://www.twilio.com/docs/api/rest/messages

Parameters:
filters - the filters
Returns:
the messages

getMessageFactory

public MessageFactory getMessageFactory()
Gets the message factory which lets you send messages https://www.twilio.com/docs/api/rest/sending-messages

Returns:
the message factory

getMessage

public Message getMessage(String sid)
Get a given message instance by sid

Parameters:
sid - The 34 character sid starting with MM or SM

getMedia

public MediaList getMedia()
Gets the media list.

Returns:
the media list

getMedia

public MediaList getMedia(Map<String,String> filters)
Gets the media list with the given filters.

Returns:
the media list

getMedia

public Media getMedia(String sid)
Gets the media instance for this sid.

Returns:
the media

getApplications

public ApplicationList getApplications()
Gets the application list https://www.twilio.com/docs/api/rest/applications

Returns:
the applications

getApplications

public ApplicationList getApplications(Map<String,String> filters)
Gets the application list with the given filters https://www.twilio.com/docs/api/rest/applications

Parameters:
filters - the filters
Returns:
the applications

getApplication

public Application getApplication(String sid)
Get a given application instance by sid

Parameters:
sid - The 34 character sid starting with AP

getApplicationFactory

public ApplicationFactory getApplicationFactory()
Gets the application factory which lets you create new applications https://www.twilio.com/docs/api/rest/applications#list-post

Returns:
the application factory

getAvailablePhoneNumbers

public AvailablePhoneNumberList getAvailablePhoneNumbers()
Gets the available phone numbers. Defaults to US/Local See: https://www.twilio.com/docs/api/rest/available-phone-numbers

Returns:
the available phone numbers

getAvailablePhoneNumbers

public AvailablePhoneNumberList getAvailablePhoneNumbers(Map<String,String> filters)
Gets the available phone numbers. With the given search filters. Defaults to US/Local numbers See: https://www.twilio.com/docs/api/rest/available-phone-numbers

Parameters:
filters - the filters
Returns:
the available phone numbers

getAvailablePhoneNumbers

public AvailablePhoneNumberList getAvailablePhoneNumbers(Map<String,String> filters,
                                                         String isoCountry,
                                                         String type)
Gets the available phone numbers with the given iso country and type See: https://www.twilio.com/docs/api/rest/available-phone-numbers

Parameters:
filters - the filters
isoCountry - the Iso Country code you are searching in
type - the type of phone number. Possible values are AvailablePhoneNumber.TYPE_LOCAL or AvailablePhoneNumber.TYPE_TOLLFREE
Returns:
the available phone numbers

getConferences

public ConferenceList getConferences()
Gets the conference list See: https://www.twilio.com/docs/api/rest/conference

Returns:
the conferences

getConferences

public ConferenceList getConferences(Map<String,String> filters)
Gets the conferences list with the given filters See: https://www.twilio.com/docs/api/rest/conference

Parameters:
filters - the filters
Returns:
the conferences

getConference

public Conference getConference(String sid)
Get a given conference instance by sid

Parameters:
sid - The 34 character sid starting with CF

getQueues

public QueueList getQueues()
Gets the queue list See: https://www.twilio.com/docs/api/rest/queue

Returns:
the QueueList

getQueue

public Queue getQueue(String sid)
Get a given queue by sid

Parameters:
sid - The Sid starting with QU
Returns:
the queue object

getQueueFactory

public QueueFactory getQueueFactory()
Get the queue factory


getIncomingPhoneNumbers

public IncomingPhoneNumberList getIncomingPhoneNumbers()
Gets the incoming phone numbers list See: https://www.twilio.com/docs/api/rest/incoming-phone-numbers

Returns:
the incoming phone numbers

getIncomingPhoneNumbers

public IncomingPhoneNumberList getIncomingPhoneNumbers(Map<String,String> filters)
Gets the incoming phone numbers list with the given filters See: https://www.twilio.com/docs/api/rest/incoming-phone-numbers

Parameters:
filters - the filters
Returns:
the incoming phone numbers

getIncomingPhoneNumber

public IncomingPhoneNumber getIncomingPhoneNumber(String sid)
Get a given incoming phone number instance by sid

Parameters:
sid - The 34 character sid starting with PN

getIncomingPhoneNumberFactory

public IncomingPhoneNumberFactory getIncomingPhoneNumberFactory()
Gets the incoming phone number factory. See: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#list-post

Returns:
the incoming phone number factory

getShortCodes

public ShortCodeList getShortCodes()
Gets the shortcode list.

Returns:
the short code list

getShortCodes

public ShortCodeList getShortCodes(Map<String,String> filters)
Gets the short code list with filters

Parameters:
filters - the filters
Returns:
the short code list

getShortCode

public ShortCode getShortCode(String sid)
Get a given short code instance by sid

Parameters:
sid - The 34 character sid starting with SC

getNotifications

public NotificationList getNotifications()
Gets the notifications.

Returns:
the notifications

getNotifications

public NotificationList getNotifications(Map<String,String> filters)
Gets the notifications.

Parameters:
filters - the filters
Returns:
the notifications

getNotification

public Notification getNotification(String sid)
Get a given notification instance by sid

Parameters:
sid - The 34 character sid starting with NO

getOutgoingCallerIds

public OutgoingCallerIdList getOutgoingCallerIds()
Gets the outgoing caller ids. https://www.twilio.com/docs/api/rest/outgoing-caller-ids

Returns:
the outgoing caller ids

getOutgoingCallerIds

public OutgoingCallerIdList getOutgoingCallerIds(Map<String,String> filters)
Gets the outgoing caller ids. https://www.twilio.com/docs/api/rest/outgoing-caller-ids

Parameters:
filters - the filters
Returns:
the outgoing caller ids

getOutgoingCallerId

public OutgoingCallerId getOutgoingCallerId(String sid)
Get a given outgoing caller id instance by sid

Parameters:
sid - The 34 character sid starting with PN

getOutgoingCallerIdFactory

public OutgoingCallerIdFactory getOutgoingCallerIdFactory()
Gets the outgoing caller id factory which lets you create outgoing caller ids https://www.twilio.com/docs/api/rest/outgoing-caller-ids

Returns:
the outgoing caller id factory

getRecordings

public RecordingList getRecordings()
Gets the recordings list https://www.twilio.com/docs/api/rest/recording

Returns:
the recordings

getRecordings

public RecordingList getRecordings(Map<String,String> filters)
Gets the recordings list https://www.twilio.com/docs/api/rest/recording

Parameters:
filters - the filters
Returns:
the recordings

getRecording

public Recording getRecording(String sid)
Get a given recording instance by sid

Parameters:
sid - The 34 character sid starting with RE

getTranscriptions

public TranscriptionList getTranscriptions()
Gets the transcriptions list https://www.twilio.com/docs/api/rest/transcription

Returns:
the transcriptions

getTranscriptions

public TranscriptionList getTranscriptions(Map<String,String> filters)
Gets the transcriptions list with the given filters https://www.twilio.com/docs/api/rest/transcription

Parameters:
filters - the filters
Returns:
the transcriptions

getTranscription

public Transcription getTranscription(String sid)
Get a given transcription instance by sid

Parameters:
sid - The 34 character sid starting with TR

getUsageRecords

public UsageRecordList getUsageRecords(Map<String,String> filters)
Gets the Usage Record list with the given filters https://www.twilio.com/docs/api/rest/usage-records

Parameters:
filters - the filters
Returns:
the usage records

getUsageRecords

public UsageRecordList getUsageRecords()
Gets the Usage Record list https://www.twilio.com/docs/api/rest/usage-records

Returns:
the usage records

getUsageTrigger

public UsageTrigger getUsageTrigger(String sid)
Get a specific Usage Trigger


getUsageTriggerFactory

public UsageTriggerFactory getUsageTriggerFactory()
Gets the Usage Trigger factory which lets you create usage triggers

Returns:
the usage trigger factory

getUsageTriggers

public UsageTriggerList getUsageTriggers(Map<String,String> filters)
Gets the Usage Triggers list with the given filters https://www.twilio.com/docs/api/rest/usage-triggers

Parameters:
filters - the filters
Returns:
the usage records

getUsageTriggers

public UsageTriggerList getUsageTriggers()
Gets the Usage Triggers list https://www.twilio.com/docs/api/rest/usage-triggers

Returns:
the usage triggers

getConnectApps

public ConnectAppList getConnectApps()
Gets the connect app list https://www.twilio.com/docs/api/rest/connect-apps

Returns:
the connect app list

getConnectApps

public ConnectAppList getConnectApps(Map<String,String> filters)
Gets the connect app list with the given filters https://www.twilio.com/docs/api/rest/connect-apps

Parameters:
filters - the filters
Returns:
the connect app list

getConnectApp

public ConnectApp getConnectApp(String sid)
Get a given connect app instance by sid

Parameters:
sid - The 34 character sid starting with CN
Returns:
the connect app

getAuthorizedConnectApps

public AuthorizedConnectAppList getAuthorizedConnectApps()
Gets the authorized connect app list https://www.twilio.com/docs/api/rest/authorized-connect-apps

Returns:
the connect app list

getAuthorizedConnectApps

public AuthorizedConnectAppList getAuthorizedConnectApps(Map<String,String> filters)
Gets the authorized connect app list with the given filters https://www.twilio.com/docs/api/rest/authorized-connect-apps

Parameters:
filters - the filters
Returns:
the connect app list

getAuthorizedConnectApp

public AuthorizedConnectApp getAuthorizedConnectApp(String sid)
Get a given connect app instance by sid

Parameters:
sid - The 34 character sid starting with CN
Returns:
the connect app

getDomains

public DomainList getDomains()
Gets the sip domains list. https://www.twilio.com/docs/api/rest/sip-domains

Returns:
the sip domain

getDomains

public DomainList getDomains(Map<String,String> filters)
Gets the domain list with the given filters https://www.twilio.com/docs/api/rest/sip-domains

Parameters:
filters - the filters
Returns:
the sip domain list

getDomain

public Domain getDomain(String sid)
Get a given sip domain instance by sid

Parameters:
sid - The 34 character sid starting with SD
Returns:
the sip domain

getDomainFactory

public DomainFactory getDomainFactory()
Gets a DomainFactory

Returns:
a DomainFactory that lets you create new Domains

getIpAccessControlLists

public IpAccessControlListList getIpAccessControlLists()
Gets the sip IpAccessControlLists list. https://www.twilio.com/docs/api/rest/sip-ip-access-control-lists

Returns:
the sip IpAccessControlList

getIpAccessControlLists

public IpAccessControlListList getIpAccessControlLists(Map<String,String> filters)
Gets the IpAccessControlList list with the given filters https://www.twilio.com/docs/api/rest/sip-ip-access-control-lists

Parameters:
filters - the filters
Returns:
the sip IpAccessControlList list

getIpAccessControlList

public IpAccessControlList getIpAccessControlList(String sid)
Get a given IpAccessControlList instance by sid

Parameters:
sid - The 34 character sid starting with AL
Returns:
the sip IpAccessControlList

getIpAccessControlListFactory

public IpAccessControlListFactory getIpAccessControlListFactory()
Gets an IpAccessControlListFactory

Returns:
an IpAccessControlListFactory that lets you create new IpAccessControlLists

getCredentialLists

public CredentialListList getCredentialLists()
Gets the sip CredentialLists list. https://www.twilio.com/docs/api/rest/sip-credential-lists

Returns:
the sip CredentialList

getCredentialLists

public CredentialListList getCredentialLists(Map<String,String> filters)
Gets the CredentialList list with the given filters https://www.twilio.com/docs/api/rest/sip-credential-lists

Parameters:
filters - the filters
Returns:
the sip CredentialList list

getCredentialList

public CredentialListInstance getCredentialList(String sid)
Get a given CredentialList instance by sid

Parameters:
sid - The 34 character sid starting with AL
Returns:
the sip CredentialList

getCredentialListFactory

public CredentialListFactory getCredentialListFactory()
Gets a CredentialListFactory

Returns:
the CredentialListFactory that lets you make new CredentialLists

getSandbox

public Sandbox getSandbox()
Get the developer sandbox https://www.twilio.com/docs/api/rest/sandbox

Returns:
the sandbox

close

public boolean close()
              throws TwilioRestException
Close this subaccount. This will release all phone numbers assigned to it and shut it down completely. You will still have access to historical data for that subaccount, but you cannot reopen a closed account.

Returns:
true, if successful
Throws:
TwilioRestException - if there is an error in the request


Copyright © 2011 Twilio, Inc. All Rights Reserved.