Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add getQueueFactory method to account

  • Loading branch information...
commit 36f6d55e58c298ef9dd8f22e8153425a2b4b0a0f 1 parent 9c3c2de
Kevin Burke authored
Showing with 87 additions and 80 deletions.
  1. +87 −80 src/main/java/com/twilio/sdk/resource/instance/Account.java
View
167 src/main/java/com/twilio/sdk/resource/instance/Account.java
@@ -16,7 +16,7 @@
// TODO: Auto-generated Javadoc
/**
* The Class Account.
- *
+ *
* For more information see <a
* href="http://www.twilio.com/docs/api/rest/account"
* >http://www.twilio.com/docs/api/rest/account</a>
@@ -46,7 +46,7 @@
/**
* Instantiates a new account.
- *
+ *
* @param client
* the client
*/
@@ -56,7 +56,7 @@ public Account(TwilioRestClient client) {
/**
* Instantiates a new account.
- *
+ *
* @param client
* the client
* @param properties
@@ -78,7 +78,7 @@ public Account(TwilioRestClient client, Map<String, Object> properties) {
*/
/**
* Gets the sid.
- *
+ *
* @return the sid
*/
public String getSid() {
@@ -91,7 +91,7 @@ public String getSid() {
/**
* Sets the sid.
- *
+ *
* @param accountSid
* the new sid
*/
@@ -102,7 +102,7 @@ public void setSid(String accountSid) {
/**
* Gets the auth token.
- *
+ *
* @return the auth token
*/
public String getAuthToken() {
@@ -111,7 +111,7 @@ public String getAuthToken() {
/**
* Sets the auth token.
- *
+ *
* @param authToken
* the new auth token
*/
@@ -121,7 +121,7 @@ public void setAuthToken(String authToken) {
/**
* Gets the friendly name.
- *
+ *
* @return the friendly name
*/
public String getFriendlyName() {
@@ -130,7 +130,7 @@ public String getFriendlyName() {
/**
* Gets the status.
- *
+ *
* @return the status
*/
public String getStatus() {
@@ -148,7 +148,7 @@ public String getType() {
/**
* Gets the date created.
- *
+ *
* @return the date created
*/
public Date getDateCreated() {
@@ -163,7 +163,7 @@ public Date getDateCreated() {
/**
* Gets the date updated.
- *
+ *
* @return the date updated
*/
public Date getDateUpdated() {
@@ -178,7 +178,7 @@ public Date getDateUpdated() {
/*
* (non-Javadoc)
- *
+ *
* @see com.twilio.sdk.resource.Resource#getResourceLocation()
*/
@Override
@@ -192,9 +192,9 @@ protected String getResourceLocation() {
*/
/**
* Gets the calls list resource without any filters.
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/call">http://www.twilio.com/docs/api/rest/call</a>
- *
+ *
* @return the calls
*/
public CallList getCalls() {
@@ -203,9 +203,9 @@ public CallList getCalls() {
/**
* Gets the calls list resource with the given filters.
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/call">http://www.twilio.com/docs/api/rest/call</a>
- *
+ *
* @param filters
* the filters
* @return the calls
@@ -229,9 +229,9 @@ public Call getCall(String sid) {
/**
* Gets the call factory, which lets you make outgoing calls.
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/making_calls">http://www.twilio.com/docs/api/rest/making_calls</a>
- *
+ *
* @return the call factory
*/
public CallFactory getCallFactory() {
@@ -240,9 +240,9 @@ public CallFactory getCallFactory() {
/**
* Gets the sms message list.
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/sms">http://www.twilio.com/docs/api/rest/sms</a>
- *
+ *
* @return the sms messages
*/
public SmsList getSmsMessages() {
@@ -251,9 +251,9 @@ public SmsList getSmsMessages() {
/**
* Gets the sms messages list with the given filters
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/sms">http://www.twilio.com/docs/api/rest/sms</a>
- *
+ *
* @param filters
* the filters
* @return the sms messages
@@ -277,7 +277,7 @@ public Sms getSms(String sid) {
/**
* Gets the sms factory which lets you send sms messages
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/sending-sms">http://www.twilio.com/docs/api/rest/sending-sms</a>
* @return the sms factory
*/
@@ -297,7 +297,7 @@ public UsageTriggerFactory getUsageTriggerFactory() {
/**
* Gets the application list
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/applications">http://www.twilio.com/docs/api/rest/applications</a>
* @return the applications
*/
@@ -307,9 +307,9 @@ public ApplicationList getApplications() {
/**
* Gets the application list with the given filters
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/applications">http://www.twilio.com/docs/api/rest/applications</a>
- *
+ *
* @param filters
* the filters
* @return the applications
@@ -333,9 +333,9 @@ public Application getApplication(String sid) {
/**
* Gets the application factory which lets you create new applications
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/applications#list-post">http://www.twilio.com/docs/api/rest/applications#list-post</a>
- *
+ *
* @return the application factory
*/
public ApplicationFactory getApplicationFactory() {
@@ -346,7 +346,7 @@ public ApplicationFactory getApplicationFactory() {
/**
* Gets the available phone numbers. Defaults to US/Local
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/available-phone-numbers">http://www.twilio.com/docs/api/rest/available-phone-numbers</a>
* @return the available phone numbers
*/
@@ -357,9 +357,9 @@ public AvailablePhoneNumberList getAvailablePhoneNumbers() {
/**
* Gets the available phone numbers. With the given search filters. Defaults
* to US/Local numbers
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/available-phone-numbers">http://www.twilio.com/docs/api/rest/available-phone-numbers</a>
- *
+ *
* @param filters
* the filters
* @return the available phone numbers
@@ -374,9 +374,9 @@ public AvailablePhoneNumberList getAvailablePhoneNumbers(
/**
* Gets the available phone numbers with the given iso country and type
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/available-phone-numbers">http://www.twilio.com/docs/api/rest/available-phone-numbers</a>
- *
+ *
* @param filters
* the filters
* @param isoCountry
@@ -385,7 +385,7 @@ public AvailablePhoneNumberList getAvailablePhoneNumbers(
* the type of phone number. Possible values are
* AvailablePhoneNumber.TYPE_LOCAL or
* AvailablePhoneNumber.TYPE_TOLLFREE
- *
+ *
* @return the available phone numbers
*/
public AvailablePhoneNumberList getAvailablePhoneNumbers(
@@ -399,9 +399,9 @@ public AvailablePhoneNumberList getAvailablePhoneNumbers(
/**
* Gets the conference list
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/conference">http://www.twilio.com/docs/api/rest/conference</a>
- *
+ *
* @return the conferences
*/
public ConferenceList getConferences() {
@@ -410,9 +410,9 @@ public ConferenceList getConferences() {
/**
* Gets the conferences list with the given filters
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/conference">http://www.twilio.com/docs/api/rest/conference</a>
- *
+ *
* @param filters
* the filters
* @return the conferences
@@ -435,9 +435,9 @@ public Conference getConference(String sid) {
/**
* Gets the queue list
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/queue">http://www.twilio.com/docs/api/rest/queue</a>
- *
+ *
* @return the {@link QueueList}
*/
public QueueList getQueues() {
@@ -459,10 +459,17 @@ public Queue getQueue(String sid) {
}
/**
+ * Get the queue factory
+ */
+ public QueueFactory getQueueFactory() {
+ return this.getQueues();
+ }
+
+ /**
* Gets the incoming phone numbers list
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/incoming-phone-numbers">http://www.twilio.com/docs/api/rest/incoming-phone-numbers</a>
- *
+ *
* @return the incoming phone numbers
*/
public IncomingPhoneNumberList getIncomingPhoneNumbers() {
@@ -471,9 +478,9 @@ public IncomingPhoneNumberList getIncomingPhoneNumbers() {
/**
* Gets the incoming phone numbers list with the given filters
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/incoming-phone-numbers">http://www.twilio.com/docs/api/rest/incoming-phone-numbers</a>
- *
+ *
* @param filters
* the filters
* @return the incoming phone numbers
@@ -498,9 +505,9 @@ public IncomingPhoneNumber getIncomingPhoneNumber(String sid) {
/**
* Gets the incoming phone number factory.
- *
+ *
* See: <a href="http://www.twilio.com/docs/api/rest/incoming-phone-numbers#list-post">http://www.twilio.com/docs/api/rest/incoming-phone-numbers#list-post</a>
- *
+ *
* @return the incoming phone number factory
*/
public IncomingPhoneNumberFactory getIncomingPhoneNumberFactory() {
@@ -509,7 +516,7 @@ public IncomingPhoneNumberFactory getIncomingPhoneNumberFactory() {
/**
* Gets the shortcode list.
- *
+ *
* @return the short code list
*/
public ShortCodeList getShortCodes() {
@@ -518,7 +525,7 @@ public ShortCodeList getShortCodes() {
/**
* Gets the short code list with filters
- *
+ *
* @param filters
* the filters
* @return the short code list
@@ -541,7 +548,7 @@ public ShortCode getShortCode(String sid) {
/**
* Gets the notifications.
- *
+ *
* @return the notifications
*/
public NotificationList getNotifications() {
@@ -550,7 +557,7 @@ public NotificationList getNotifications() {
/**
* Gets the notifications.
- *
+ *
* @param filters
* the filters
* @return the notifications
@@ -574,9 +581,9 @@ public Notification getNotification(String sid) {
/**
* Gets the outgoing caller ids.
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/outgoing-caller-ids">http://www.twilio.com/docs/api/rest/outgoing-caller-ids</a>
- *
+ *
* @return the outgoing caller ids
*/
public OutgoingCallerIdList getOutgoingCallerIds() {
@@ -585,9 +592,9 @@ public OutgoingCallerIdList getOutgoingCallerIds() {
/**
* Gets the outgoing caller ids.
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/outgoing-caller-ids">http://www.twilio.com/docs/api/rest/outgoing-caller-ids</a>
- *
+ *
* @param filters
* the filters
* @return the outgoing caller ids
@@ -613,9 +620,9 @@ public OutgoingCallerId getOutgoingCallerId(String sid) {
/**
* Gets the outgoing caller id factory which lets you create outgoing caller ids
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/outgoing-caller-ids">http://www.twilio.com/docs/api/rest/outgoing-caller-ids</a>
- *
+ *
* @return the outgoing caller id factory
*/
public OutgoingCallerIdFactory getOutgoingCallerIdFactory() {
@@ -624,9 +631,9 @@ public OutgoingCallerIdFactory getOutgoingCallerIdFactory() {
/**
* Gets the recordings list
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/recording">http://www.twilio.com/docs/api/rest/recording</a>
- *
+ *
* @return the recordings
*/
public RecordingList getRecordings() {
@@ -634,10 +641,10 @@ public RecordingList getRecordings() {
}
/**
- * Gets the recordings list
- *
+ * Gets the recordings list
+ *
* <a href="http://www.twilio.com/docs/api/rest/recording">http://www.twilio.com/docs/api/rest/recording</a>
- *
+ *
* @param filters
* the filters
* @return the recordings
@@ -657,12 +664,12 @@ public Recording getRecording(String sid) {
r.setRequestAccountSid(this.getRequestAccountSid());
return r;
}
-
+
/**
* Gets the transcriptions list
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/transcription">http://www.twilio.com/docs/api/rest/transcription</a>
- *
+ *
* @return the transcriptions
*/
public TranscriptionList getTranscriptions() {
@@ -671,9 +678,9 @@ public TranscriptionList getTranscriptions() {
/**
* Gets the transcriptions list with the given filters
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/transcription">http://www.twilio.com/docs/api/rest/transcription</a>
- *
+ *
* @param filters
* the filters
* @return the transcriptions
@@ -751,9 +758,9 @@ public UsageTriggerList getUsageTriggers() {
/**
* Gets the connect app list
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/connect-apps">http://www.twilio.com/docs/api/rest/connect-apps</a>
- *
+ *
* @return the connect app list
*/
public ConnectAppList getConnectApps() {
@@ -762,9 +769,9 @@ public ConnectAppList getConnectApps() {
/**
* Gets the connect app list with the given filters
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/connect-apps">http://www.twilio.com/docs/api/rest/connect-apps</a>
- *
+ *
* @param filters
* the filters
* @return the connect app list
@@ -789,20 +796,20 @@ public ConnectApp getConnectApp(String sid) {
/**
* Gets the authorized connect app list
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/authorized-connect-apps">http://www.twilio.com/docs/api/rest/authorized-connect-apps</a>
- *
+ *
* @return the connect app list
*/
public AuthorizedConnectAppList getAuthorizedConnectApps() {
return this.getAuthorizedConnectApps(new HashMap<String, String>());
}
-
+
/**
* Gets the authorized connect app list with the given filters
- *
+ *
* <a href="http://www.twilio.com/docs/api/rest/authorized-connect-apps">http://www.twilio.com/docs/api/rest/authorized-connect-apps</a>
- *
+ *
* @param filters
* the filters
* @return the connect app list
@@ -838,20 +845,20 @@ public Sandbox getSandbox() {
}
/**
- * Close this subaccount. This will release all phone numbers assigned to it and shut it down completely.
+ * 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.
- *
+ *
* @throws TwilioRestException
* if there is an error in the request
* @return true, if successful
- *
+ *
*/
public boolean close() throws TwilioRestException {
Map<String, String> vars = new HashMap<String, String>();
vars.put("Status", "closed");
TwilioRestResponse response = this.getClient().safeRequest(
this.getResourceLocation(), "POST", vars);
-
+
return !response.isError();
- }
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.