Required role: | User |
GET | /app/activity |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
/**
* Gets activity for the specified date range. Date range must be a week or less
*/
@Api(Description="Gets activity for the specified date range. Date range must be a week or less")
public static class GetActivity extends ListRequest<NotificationInfo>
{
}
public static class ListRequest<T> implements IGet
{
/**
* The page of data to retrieve
*/
@ApiMember(Description="The page of data to retrieve")
public Integer page = null;
/**
* If you want all objects to be returned. This should be used with care
*/
@ApiMember(Description="If you want all objects to be returned. This should be used with care")
public Boolean all = null;
/**
* The number per page to retrieve
*/
@ApiMember(Description="The number per page to retrieve")
public Integer countPerPage = null;
/**
* Specific IDs
*/
@ApiMember(Description="Specific IDs")
public ArrayList<String> specificIds = null;
/**
* Specify a sort field
*/
@ApiMember(Description="Specify a sort field")
public String sortField = null;
/**
* Specify a sort order
*/
@ApiMember(Description="Specify a sort order")
public SortOrders sortOrder = null;
/**
* Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array
*/
@ApiMember(Description="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array")
public Boolean simplifiedPaging = null;
public Integer getPage() { return page; }
public ListRequest<T> setPage(Integer value) { this.page = value; return this; }
public Boolean isAll() { return all; }
public ListRequest<T> setAll(Boolean value) { this.all = value; return this; }
public Integer getCountPerPage() { return countPerPage; }
public ListRequest<T> setCountPerPage(Integer value) { this.countPerPage = value; return this; }
public ArrayList<String> getSpecificIds() { return specificIds; }
public ListRequest<T> setSpecificIds(ArrayList<String> value) { this.specificIds = value; return this; }
public String getSortField() { return sortField; }
public ListRequest<T> setSortField(String value) { this.sortField = value; return this; }
public SortOrders getSortOrder() { return sortOrder; }
public ListRequest<T> setSortOrder(SortOrders value) { this.sortOrder = value; return this; }
public Boolean isSimplifiedPaging() { return simplifiedPaging; }
public ListRequest<T> setSimplifiedPaging(Boolean value) { this.simplifiedPaging = value; return this; }
}
public static enum SortOrders
{
Ascend,
Descend;
}
public static class NotificationInfo extends EntityInfo
{
/**
* The account ID this endpoint is associated with
*/
@ApiMember(Description="The account ID this endpoint is associated with")
public String accountId = null;
/**
* The name of the account this endpoint is associated with
*/
@ApiMember(Description="The name of the account this endpoint is associated with")
public String accountName = null;
/**
* The ID of the customer this endpoint is associated with
*/
@ApiMember(Description="The ID of the customer this endpoint is associated with")
public String customerId = null;
/**
* The name of the customer this endpoint is associated with
*/
@ApiMember(Description="The name of the customer this endpoint is associated with")
public String customerName = null;
/**
* The breadcrumb to the customer for this endpoint
*/
@ApiMember(Description="The breadcrumb to the customer for this endpoint")
public ArrayList<CustomerBreadcrumb> customerBreadcrumb = null;
/**
* The type of notification
*/
@ApiMember(Description="The type of notification")
public NotificationTypes type = null;
/**
* The subject of the notification
*/
@ApiMember(Description="The subject of the notification")
public String subject = null;
/**
* The body of the notification
*/
@ApiMember(Description="The body of the notification")
public String body = null;
/**
* The recipients of this notification
*/
@ApiMember(Description="The recipients of this notification")
public ArrayList<NotificationRecipientInfo> recipients = null;
/**
* The list of attachments
*/
@ApiMember(Description="The list of attachments")
public ArrayList<FileInfo> attachments = null;
/**
* The original from for the session
*/
@ApiMember(Description="The original from for the session")
public String from = null;
/**
* The original To for the session
*/
@ApiMember(Description="The original To for the session")
public String to = null;
/**
* Was there an error?
*/
@ApiMember(Description="Was there an error?")
public Boolean error = null;
/**
* The error message
*/
@ApiMember(Description="The error message")
public String errorMessage = null;
public String getAccountId() { return accountId; }
public NotificationInfo setAccountId(String value) { this.accountId = value; return this; }
public String getAccountName() { return accountName; }
public NotificationInfo setAccountName(String value) { this.accountName = value; return this; }
public String getCustomerId() { return customerId; }
public NotificationInfo setCustomerId(String value) { this.customerId = value; return this; }
public String getCustomerName() { return customerName; }
public NotificationInfo setCustomerName(String value) { this.customerName = value; return this; }
public ArrayList<CustomerBreadcrumb> getCustomerBreadcrumb() { return customerBreadcrumb; }
public NotificationInfo setCustomerBreadcrumb(ArrayList<CustomerBreadcrumb> value) { this.customerBreadcrumb = value; return this; }
public NotificationTypes getType() { return type; }
public NotificationInfo setType(NotificationTypes value) { this.type = value; return this; }
public String getSubject() { return subject; }
public NotificationInfo setSubject(String value) { this.subject = value; return this; }
public String getBody() { return body; }
public NotificationInfo setBody(String value) { this.body = value; return this; }
public ArrayList<NotificationRecipientInfo> getRecipients() { return recipients; }
public NotificationInfo setRecipients(ArrayList<NotificationRecipientInfo> value) { this.recipients = value; return this; }
public ArrayList<FileInfo> getAttachments() { return attachments; }
public NotificationInfo setAttachments(ArrayList<FileInfo> value) { this.attachments = value; return this; }
public String getFrom() { return from; }
public NotificationInfo setFrom(String value) { this.from = value; return this; }
public String getTo() { return to; }
public NotificationInfo setTo(String value) { this.to = value; return this; }
public Boolean isError() { return error; }
public NotificationInfo setError(Boolean value) { this.error = value; return this; }
public String getErrorMessage() { return errorMessage; }
public NotificationInfo setErrorMessage(String value) { this.errorMessage = value; return this; }
}
public static class EntityInfo
{
/**
* The ID of the object
*/
@ApiMember(Description="The ID of the object")
public String id = null;
/**
* The date the object was created
*/
@ApiMember(Description="The date the object was created")
public String dateCreated = null;
/**
* The date the object was last modified
*/
@ApiMember(Description="The date the object was last modified")
public String dateLastModified = null;
/**
* The user that created this object
*/
@ApiMember(Description="The user that created this object")
public String createdBy = null;
/**
* The user that last modified this object
*/
@ApiMember(Description="The user that last modified this object")
public String lastModifiedBy = null;
public String getId() { return id; }
public EntityInfo setId(String value) { this.id = value; return this; }
public String getDateCreated() { return dateCreated; }
public EntityInfo setDateCreated(String value) { this.dateCreated = value; return this; }
public String getDateLastModified() { return dateLastModified; }
public EntityInfo setDateLastModified(String value) { this.dateLastModified = value; return this; }
public String getCreatedBy() { return createdBy; }
public EntityInfo setCreatedBy(String value) { this.createdBy = value; return this; }
public String getLastModifiedBy() { return lastModifiedBy; }
public EntityInfo setLastModifiedBy(String value) { this.lastModifiedBy = value; return this; }
}
public static class CustomerBreadcrumb
{
public String id = null;
public String name = null;
public String getId() { return id; }
public CustomerBreadcrumb setId(String value) { this.id = value; return this; }
public String getName() { return name; }
public CustomerBreadcrumb setName(String value) { this.name = value; return this; }
}
public static enum NotificationTypes
{
Email,
Sms,
Push,
IncomingCall,
OutgoingCall;
}
public static class NotificationRecipientInfo
{
/**
* The address of the recipient
*/
@ApiMember(Description="The address of the recipient")
public String address = null;
/**
* Extra info about the recipient e.g. CC, BCC
*/
@ApiMember(Description="Extra info about the recipient e.g. CC, BCC")
public String extra = null;
/**
* The name of the recipient
*/
@ApiMember(Description="The name of the recipient")
public String name = null;
public String getAddress() { return address; }
public NotificationRecipientInfo setAddress(String value) { this.address = value; return this; }
public String getExtra() { return extra; }
public NotificationRecipientInfo setExtra(String value) { this.extra = value; return this; }
public String getName() { return name; }
public NotificationRecipientInfo setName(String value) { this.name = value; return this; }
}
public static class FileInfo extends EntityInfo
{
/**
* The type of file this is
*/
@ApiMember(Description="The type of file this is")
public FileTypes type = null;
/**
* The account ID this file is associated with
*/
@ApiMember(Description="The account ID this file is associated with")
public String accountId = null;
/**
* The name of the account this file is associated with
*/
@ApiMember(Description="The name of the account this file is associated with")
public String accountName = null;
/**
* The ID of the customer this file is associated with
*/
@ApiMember(Description="The ID of the customer this file is associated with")
public String customerId = null;
/**
* The name of the customer this file is associated with
*/
@ApiMember(Description="The name of the customer this file is associated with")
public String customerName = null;
/**
* The breadcrumb to the customer for this file
*/
@ApiMember(Description="The breadcrumb to the customer for this file")
public ArrayList<CustomerBreadcrumb> customerBreadcrumb = null;
/**
* The ID of the user this file is assocaited with
*/
@ApiMember(Description="The ID of the user this file is assocaited with")
public String userId = null;
/**
* The name of the user this file is associated with
*/
@ApiMember(Description="The name of the user this file is associated with")
public String userName = null;
/**
* The original file name for the file
*/
@ApiMember(Description="The original file name for the file")
public String fileName = null;
/**
* The URI of the file
*/
@ApiMember(Description="The URI of the file")
public String uri = null;
/**
* The Content type of the file
*/
@ApiMember(Description="The Content type of the file")
public String contentType = null;
/**
* The size of the file
*/
@ApiMember(Description="The size of the file")
public Long contentLength = null;
/**
* The Twilio ID of the recording
*/
@ApiMember(Description="The Twilio ID of the recording")
public String recordingSid = null;
/**
* The duration of the recording in seconds
*/
@ApiMember(Description="The duration of the recording in seconds")
public Integer recordingDuration = null;
/**
* Who is the recording from?
*/
@ApiMember(Description="Who is the recording from?")
public String recordingFrom = null;
/**
* Transcription (if available)
*/
@ApiMember(Description="Transcription (if available)")
public String transcription = null;
/**
* From Address (e.g. caller ID) for incoming calls
*/
@ApiMember(Description="From Address (e.g. caller ID) for incoming calls")
public String fromAddress = null;
/**
* To Address (e.g. dialed number) for outgoing calls
*/
@ApiMember(Description="To Address (e.g. dialed number) for outgoing calls")
public String toAddress = null;
/**
* The AI transcription for this call
*/
@ApiMember(Description="The AI transcription for this call")
public String aiTranscription = null;
public FileTypes getType() { return type; }
public FileInfo setType(FileTypes value) { this.type = value; return this; }
public String getAccountId() { return accountId; }
public FileInfo setAccountId(String value) { this.accountId = value; return this; }
public String getAccountName() { return accountName; }
public FileInfo setAccountName(String value) { this.accountName = value; return this; }
public String getCustomerId() { return customerId; }
public FileInfo setCustomerId(String value) { this.customerId = value; return this; }
public String getCustomerName() { return customerName; }
public FileInfo setCustomerName(String value) { this.customerName = value; return this; }
public ArrayList<CustomerBreadcrumb> getCustomerBreadcrumb() { return customerBreadcrumb; }
public FileInfo setCustomerBreadcrumb(ArrayList<CustomerBreadcrumb> value) { this.customerBreadcrumb = value; return this; }
public String getUserId() { return userId; }
public FileInfo setUserId(String value) { this.userId = value; return this; }
public String getUserName() { return userName; }
public FileInfo setUserName(String value) { this.userName = value; return this; }
public String getFileName() { return fileName; }
public FileInfo setFileName(String value) { this.fileName = value; return this; }
public String getUri() { return uri; }
public FileInfo setUri(String value) { this.uri = value; return this; }
public String getContentType() { return contentType; }
public FileInfo setContentType(String value) { this.contentType = value; return this; }
public Long getContentLength() { return contentLength; }
public FileInfo setContentLength(Long value) { this.contentLength = value; return this; }
public String getRecordingSid() { return recordingSid; }
public FileInfo setRecordingSid(String value) { this.recordingSid = value; return this; }
public Integer getRecordingDuration() { return recordingDuration; }
public FileInfo setRecordingDuration(Integer value) { this.recordingDuration = value; return this; }
public String getRecordingFrom() { return recordingFrom; }
public FileInfo setRecordingFrom(String value) { this.recordingFrom = value; return this; }
public String getTranscription() { return transcription; }
public FileInfo setTranscription(String value) { this.transcription = value; return this; }
public String getFromAddress() { return fromAddress; }
public FileInfo setFromAddress(String value) { this.fromAddress = value; return this; }
public String getToAddress() { return toAddress; }
public FileInfo setToAddress(String value) { this.toAddress = value; return this; }
public String getAiTranscription() { return aiTranscription; }
public FileInfo setAiTranscription(String value) { this.aiTranscription = value; return this; }
}
public static enum FileTypes
{
Upload,
VoiceMessage,
CallRecording,
Fax,
Attachment,
FaxOutgoing;
}
public static class ListResponse<T>
{
/**
* The items
*/
@ApiMember(Description="The items")
public ArrayList<AccountInfo> items = null;
/**
* The total number of items
*/
@ApiMember(Description="The total number of items")
public Integer totalCount = null;
/**
* The total number of pages
*/
@ApiMember(Description="The total number of pages")
public Integer totalPages = null;
/**
* Are there more pages of items? Used with simplified paging
*/
@ApiMember(Description="Are there more pages of items? Used with simplified paging")
public Boolean hasMorePages = null;
public ArrayList<AccountInfo> getItems() { return items; }
public ListResponse<T> setItems(ArrayList<AccountInfo> value) { this.items = value; return this; }
public Integer getTotalCount() { return totalCount; }
public ListResponse<T> setTotalCount(Integer value) { this.totalCount = value; return this; }
public Integer getTotalPages() { return totalPages; }
public ListResponse<T> setTotalPages(Integer value) { this.totalPages = value; return this; }
public Boolean isHasMorePages() { return hasMorePages; }
public ListResponse<T> setHasMorePages(Boolean value) { this.hasMorePages = value; return this; }
}
public static class AccountInfo extends EntityInfo
{
/**
* The name of this account
*/
@ApiMember(Description="The name of this account")
public String name = null;
/**
* The ID of this account's parent
*/
@ApiMember(Description="The ID of this account's parent")
public String parentAccountId = null;
/**
* The twilio account SID
*/
@ApiMember(Description="The twilio account SID")
public String twilioAccountSid = null;
/**
* The ancestors of this account. Useful for breadcrumbs
*/
@ApiMember(Description="The ancestors of this account. Useful for breadcrumbs")
public ArrayList<String> ancestorIds = null;
/**
* The max number of phone numbers this account can have
*/
@ApiMember(Description="The max number of phone numbers this account can have")
public Integer maxPhoneNumbers = null;
/**
* This account is BYOA
*/
@ApiMember(Description="This account is BYOA")
public Boolean isBYOA = null;
/**
* TrustHub Profile Sid
*/
@ApiMember(Description="TrustHub Profile Sid")
public String trustHubProfileSid = null;
/**
* The ID of the logo file
*/
@ApiMember(Description="The ID of the logo file")
public String logoId = null;
/**
* The URI of the logo file
*/
@ApiMember(Description="The URI of the logo file")
public String logoUri = null;
/**
* The billing settings for this account
*/
@ApiMember(Description="The billing settings for this account")
public BillingSettings billingSettings = null;
public String getName() { return name; }
public AccountInfo setName(String value) { this.name = value; return this; }
public String getParentAccountId() { return parentAccountId; }
public AccountInfo setParentAccountId(String value) { this.parentAccountId = value; return this; }
public String getTwilioAccountSid() { return twilioAccountSid; }
public AccountInfo setTwilioAccountSid(String value) { this.twilioAccountSid = value; return this; }
public ArrayList<String> getAncestorIds() { return ancestorIds; }
public AccountInfo setAncestorIds(ArrayList<String> value) { this.ancestorIds = value; return this; }
public Integer getMaxPhoneNumbers() { return maxPhoneNumbers; }
public AccountInfo setMaxPhoneNumbers(Integer value) { this.maxPhoneNumbers = value; return this; }
public Boolean getIsBYOA() { return isBYOA; }
public AccountInfo setIsBYOA(Boolean value) { this.isBYOA = value; return this; }
public String getTrustHubProfileSid() { return trustHubProfileSid; }
public AccountInfo setTrustHubProfileSid(String value) { this.trustHubProfileSid = value; return this; }
public String getLogoId() { return logoId; }
public AccountInfo setLogoId(String value) { this.logoId = value; return this; }
public String getLogoUri() { return logoUri; }
public AccountInfo setLogoUri(String value) { this.logoUri = value; return this; }
public BillingSettings getBillingSettings() { return billingSettings; }
public AccountInfo setBillingSettings(BillingSettings value) { this.billingSettings = value; return this; }
}
public static class BillingSettings
{
public BillingItem base = null;
public BillingItem localNumbers = null;
public BillingItem tollFreeNumbers = null;
public BillingItem inboundVoiceCalls = null;
public BillingItem outboundVoiceCalls = null;
public BillingItem inboundFaxes = null;
public BillingItem outboundFaxes = null;
public BillingItem inboundSmsMessages = null;
public BillingItem outboundSmsMessages = null;
public BillingItem aiInsights = null;
public BillingItem aiLiveMinutes = null;
public BillingItem getBase() { return base; }
public BillingSettings setBase(BillingItem value) { this.base = value; return this; }
public BillingItem getLocalNumbers() { return localNumbers; }
public BillingSettings setLocalNumbers(BillingItem value) { this.localNumbers = value; return this; }
public BillingItem getTollFreeNumbers() { return tollFreeNumbers; }
public BillingSettings setTollFreeNumbers(BillingItem value) { this.tollFreeNumbers = value; return this; }
public BillingItem getInboundVoiceCalls() { return inboundVoiceCalls; }
public BillingSettings setInboundVoiceCalls(BillingItem value) { this.inboundVoiceCalls = value; return this; }
public BillingItem getOutboundVoiceCalls() { return outboundVoiceCalls; }
public BillingSettings setOutboundVoiceCalls(BillingItem value) { this.outboundVoiceCalls = value; return this; }
public BillingItem getInboundFaxes() { return inboundFaxes; }
public BillingSettings setInboundFaxes(BillingItem value) { this.inboundFaxes = value; return this; }
public BillingItem getOutboundFaxes() { return outboundFaxes; }
public BillingSettings setOutboundFaxes(BillingItem value) { this.outboundFaxes = value; return this; }
public BillingItem getInboundSmsMessages() { return inboundSmsMessages; }
public BillingSettings setInboundSmsMessages(BillingItem value) { this.inboundSmsMessages = value; return this; }
public BillingItem getOutboundSmsMessages() { return outboundSmsMessages; }
public BillingSettings setOutboundSmsMessages(BillingItem value) { this.outboundSmsMessages = value; return this; }
public BillingItem getAiInsights() { return aiInsights; }
public BillingSettings setAiInsights(BillingItem value) { this.aiInsights = value; return this; }
public BillingItem getAiLiveMinutes() { return aiLiveMinutes; }
public BillingSettings setAiLiveMinutes(BillingItem value) { this.aiLiveMinutes = value; return this; }
}
public static class BillingItem
{
public Double baseCost = null;
public Double rawUnitMultiplier = null;
public Double unitCost = null;
public Integer allowance = null;
public Double getBaseCost() { return baseCost; }
public BillingItem setBaseCost(Double value) { this.baseCost = value; return this; }
public Double getRawUnitMultiplier() { return rawUnitMultiplier; }
public BillingItem setRawUnitMultiplier(Double value) { this.rawUnitMultiplier = value; return this; }
public Double getUnitCost() { return unitCost; }
public BillingItem setUnitCost(Double value) { this.unitCost = value; return this; }
public Integer getAllowance() { return allowance; }
public BillingItem setAllowance(Integer value) { this.allowance = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /app/activity HTTP/1.1 Host: team.evovoice.io Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ListResponseOfNotificationInfofvYQJmgX xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api"> <HasMorePages>false</HasMorePages> <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Notifications"> <d2p1:NotificationInfo> <CreatedBy>String</CreatedBy> <DateCreated>String</DateCreated> <DateLastModified>String</DateLastModified> <Id>String</Id> <LastModifiedBy>String</LastModifiedBy> <d2p1:AccountId>String</d2p1:AccountId> <d2p1:AccountName>String</d2p1:AccountName> <d2p1:Attachments xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Files"> <d4p1:FileInfo> <CreatedBy>String</CreatedBy> <DateCreated>String</DateCreated> <DateLastModified>String</DateLastModified> <Id>String</Id> <LastModifiedBy>String</LastModifiedBy> <d4p1:AITranscription>String</d4p1:AITranscription> <d4p1:AccountId>String</d4p1:AccountId> <d4p1:AccountName>String</d4p1:AccountName> <d4p1:ContentLength>0</d4p1:ContentLength> <d4p1:ContentType>String</d4p1:ContentType> <d4p1:CustomerBreadcrumb xmlns:d6p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers"> <d6p1:CustomerBreadcrumb> <d6p1:Id>String</d6p1:Id> <d6p1:Name>String</d6p1:Name> </d6p1:CustomerBreadcrumb> </d4p1:CustomerBreadcrumb> <d4p1:CustomerId>String</d4p1:CustomerId> <d4p1:CustomerName>String</d4p1:CustomerName> <d4p1:FileName>String</d4p1:FileName> <d4p1:FromAddress>String</d4p1:FromAddress> <d4p1:RecordingDuration>0</d4p1:RecordingDuration> <d4p1:RecordingFrom>String</d4p1:RecordingFrom> <d4p1:RecordingSid>String</d4p1:RecordingSid> <d4p1:ToAddress>String</d4p1:ToAddress> <d4p1:Transcription>String</d4p1:Transcription> <d4p1:Type>Upload</d4p1:Type> <d4p1:Uri>String</d4p1:Uri> <d4p1:UserId>String</d4p1:UserId> <d4p1:UserName>String</d4p1:UserName> </d4p1:FileInfo> </d2p1:Attachments> <d2p1:Body>String</d2p1:Body> <d2p1:CustomerBreadcrumb xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers"> <d4p1:CustomerBreadcrumb> <d4p1:Id>String</d4p1:Id> <d4p1:Name>String</d4p1:Name> </d4p1:CustomerBreadcrumb> </d2p1:CustomerBreadcrumb> <d2p1:CustomerId>String</d2p1:CustomerId> <d2p1:CustomerName>String</d2p1:CustomerName> <d2p1:Error>false</d2p1:Error> <d2p1:ErrorMessage>String</d2p1:ErrorMessage> <d2p1:From>String</d2p1:From> <d2p1:Recipients> <d2p1:NotificationRecipientInfo> <d2p1:Address>String</d2p1:Address> <d2p1:Extra>String</d2p1:Extra> <d2p1:Name>String</d2p1:Name> </d2p1:NotificationRecipientInfo> </d2p1:Recipients> <d2p1:Subject>String</d2p1:Subject> <d2p1:To>String</d2p1:To> <d2p1:Type>Email</d2p1:Type> </d2p1:NotificationInfo> </Items> <TotalCount>0</TotalCount> <TotalPages>0</TotalPages> </ListResponseOfNotificationInfofvYQJmgX>