|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.createsend.CreateSendBase
com.createsend.Clients
public class Clients
Provides methods for accessing all Client resources in the Campaign Monitor API
Field Summary |
---|
Fields inherited from class com.createsend.CreateSendBase |
---|
jerseyClient, urlEncodingScheme |
Constructor Summary | |
---|---|
Clients(AuthenticationDetails auth)
Constructor used to create new clients. |
|
Clients(AuthenticationDetails auth,
java.lang.String clientID)
Constructor used for working with existing clients. |
Method Summary | |
---|---|
java.lang.String |
create(Client client)
Creates a new client based on the provided data. |
void |
delete()
Deletes the current client |
AllClientDetails |
details()
Gets the details of the current client |
DraftCampaign[] |
draftCampaigns()
Gets all draft campaigns created for the current client |
java.lang.String |
getClientID()
Gets the current client ID |
java.lang.String |
getPrimaryContact()
looks up the primary contact for this client |
ListBasics[] |
lists()
Gets all lists for the current client |
ListForEmail[] |
listsForEmailAddress(java.lang.String emailAddress)
Gets the lists across a client, to which a subscriber with a particular email address belongs. |
Person[] |
people()
returns a list of people associated with the client. |
ScheduledCampaign[] |
scheduledCampaigns()
Gets all campaigns scheduled to tbe sent by the current client |
Segment[] |
segments()
Gets all segments defined for the current client |
SentCampaign[] |
sentCampaigns()
Gets all campaigns sent by the current client |
void |
setBasics(Client client)
Sets the basic details for the current client. |
void |
setClientID(java.lang.String clientID)
Sets the current client ID. |
void |
setMonthlyBilling(BillingDetails billing)
Sets a client to be billed monthly based on the current number of active subscribers across all lists. |
void |
setPaygBilling(BillingDetails billing)
Sets a client to be billed per campaign sent. |
void |
setPrimaryContact(java.lang.String emailAddress)
sets the primary contact for this client to the person with the specified email address |
void |
suppress(SuppressionDetails details)
|
PagedResult<SuppressedSubscriber> |
suppressionList(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged collection of subscribers who are suppressed from the current clients lists. |
Template[] |
templates()
Gets all templates defined for the current client. |
CreditsTransferResult |
transferCredits(CreditsTransferDetails details)
Transfer credits to or from this client. |
void |
unsuppress(java.lang.String email)
|
Methods inherited from class com.createsend.CreateSendBase |
---|
refreshToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Clients(AuthenticationDetails auth)
auth
- The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.public Clients(AuthenticationDetails auth, java.lang.String clientID)
auth
- The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.clientID
- The Client ID to use when making API calls.Method Detail |
---|
public void setClientID(java.lang.String clientID)
clientID
- The ID of the client to apply API calls to.public java.lang.String getClientID()
public java.lang.String create(Client client) throws CreateSendException
client
- The client information to use during creation
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public AllClientDetails details() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public SentCampaign[] sentCampaigns() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public ScheduledCampaign[] scheduledCampaigns() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public DraftCampaign[] draftCampaigns() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public ListBasics[] lists() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public ListForEmail[] listsForEmailAddress(java.lang.String emailAddress) throws CreateSendException
emailAddress
- A subscriber's email address
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public Segment[] segments() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public PagedResult<SuppressedSubscriber> suppressionList(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.String orderDirection) throws CreateSendException
page
- The page number or results to get. Use null
for the default (page=1)pageSize
- The number of records to get on the current page. Use null
for the default.orderField
- The field used to order the results by. Use null
for the default.orderDirection
- The direction to order the results by. Use null
for the default.
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public void suppress(SuppressionDetails details) throws CreateSendException
CreateSendException
public void unsuppress(java.lang.String email) throws CreateSendException
CreateSendException
public Template[] templates() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public void setBasics(Client client) throws CreateSendException
client
- The basic details to use for the current client.
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public void setPaygBilling(BillingDetails billing) throws CreateSendException
billing
- The billing options available to the client, including any markup.
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public void setMonthlyBilling(BillingDetails billing) throws CreateSendException
billing
- The billing options available to the client, including any markup.
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public CreditsTransferResult transferCredits(CreditsTransferDetails details) throws CreateSendException
details
- The credit transfer details.
CreateSendException
public void delete() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public Person[] people() throws CreateSendException
CreateSendException
public java.lang.String getPrimaryContact() throws CreateSendException
CreateSendException
public void setPrimaryContact(java.lang.String emailAddress) throws CreateSendException
CreateSendException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |