com.twilio.sdk.resource.instance
Class Account
java.lang.Object
com.twilio.sdk.resource.Resource
com.twilio.sdk.resource.InstanceResource
com.twilio.sdk.resource.instance.Account
public class Account
- extends InstanceResource
The Class Account.
For more information see http://www.twilio.com/docs/api/rest/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
http://www.twilio.com/docs/api/rest/applications#list-post |
ApplicationList |
getApplications()
Gets the application list
http://www.twilio.com/docs/api/rest/applications |
ApplicationList |
getApplications(Map<String,String> filters)
Gets the application list with the given filters
http://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
http://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
http://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: http://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: http://www.twilio.com/docs/api/rest/conference |
ConferenceList |
getConferences(Map<String,String> filters)
Gets the conferences list with the given filters
See: http://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
http://www.twilio.com/docs/api/rest/connect-apps |
ConnectAppList |
getConnectApps(Map<String,String> filters)
Gets the connect app list with the given filters
http://www.twilio.com/docs/api/rest/connect-apps |
Date |
getDateCreated()
Gets the date created. |
Date |
getDateUpdated()
Gets the date updated. |
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: http://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: http://www.twilio.com/docs/api/rest/incoming-phone-numbers |
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
http://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: http://www.twilio.com/docs/api/rest/queue |
Recording |
getRecording(String sid)
Get a given recording instance by sid |
RecordingList |
getRecordings()
Gets the recordings list
http://www.twilio.com/docs/api/rest/recording |
RecordingList |
getRecordings(Map<String,String> filters)
Gets the recordings list
http://www.twilio.com/docs/api/rest/recording |
Sandbox |
getSandbox()
Get the developer sandbox
http://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
http://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
http://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
http://www.twilio.com/docs/api/rest/transcription |
TranscriptionList |
getTranscriptions(Map<String,String> filters)
Gets the transcriptions list with the given filters
http://www.twilio.com/docs/api/rest/transcription |
String |
getType()
Gets the account type |
UsageRecordList |
getUsageRecords()
Gets the Usage Record list
http://www.twilio.com/docs/api/rest/usage-records |
UsageRecordList |
getUsageRecords(Map<String,String> filters)
Gets the Usage Record list with the given filters
http://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
http://www.twilio.com/docs/api/rest/usage-triggers |
UsageTriggerList |
getUsageTriggers(Map<String,String> filters)
Gets the Usage Triggers list with the given filters
http://www.twilio.com/docs/api/rest/usage-triggers |
void |
setAuthToken(String authToken)
Sets the auth token. |
void |
setSid(String accountSid)
Sets the sid. |
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 clientproperties - the properties
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.
http://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.
http://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.
http://www.twilio.com/docs/api/rest/making_calls
- Returns:
- the call factory
getSmsMessages
public SmsList getSmsMessages()
- Gets the sms message list.
http://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
http://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
http://www.twilio.com/docs/api/rest/sending-sms
- Returns:
- the sms factory
getApplications
public ApplicationList getApplications()
- Gets the application list
http://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
http://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
http://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: http://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: http://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: http://www.twilio.com/docs/api/rest/available-phone-numbers
- Parameters:
filters - the filtersisoCountry - the Iso Country code you are searching intype - 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: http://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: http://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: http://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: http://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: http://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: http://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.
http://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.
http://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
http://www.twilio.com/docs/api/rest/outgoing-caller-ids
- Returns:
- the outgoing caller id factory
getRecordings
public RecordingList getRecordings()
- Gets the recordings list
http://www.twilio.com/docs/api/rest/recording
- Returns:
- the recordings
getRecordings
public RecordingList getRecordings(Map<String,String> filters)
- Gets the recordings list
http://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
http://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
http://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
http://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
http://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
http://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
http://www.twilio.com/docs/api/rest/usage-triggers
- Returns:
- the usage triggers
getConnectApps
public ConnectAppList getConnectApps()
- Gets the connect app list
http://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
http://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
http://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
http://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
getSandbox
public Sandbox getSandbox()
- Get the developer sandbox
http://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.