|
||||||||||
| 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,
String clientID)
Constructor used for working with existing clients. |
|
| Method Summary | |
|---|---|
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 |
String |
getClientID()
Gets the current client ID |
String |
getPrimaryContact()
looks up the primary contact for this client |
ListBasics[] |
lists()
Gets all lists for the current client |
ListForEmail[] |
listsForEmailAddress(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(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(String emailAddress)
sets the primary contact for this client to the person with the specified email address |
void |
suppress(SuppressionDetails details)
|
PagedResult<SuppressedSubscriber> |
suppressionList(Integer page,
Integer pageSize,
String orderField,
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(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,
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(String clientID)
clientID - The ID of the client to apply API calls to.public String getClientID()
public String create(Client client)
throws CreateSendException
client - The client information to use during creation
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public AllClientDetails details()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public SentCampaign[] sentCampaigns()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public ScheduledCampaign[] scheduledCampaigns()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public DraftCampaign[] draftCampaigns()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public ListBasics[] lists()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public ListForEmail[] listsForEmailAddress(String emailAddress)
throws CreateSendException
emailAddress - A subscriber's email address
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public Segment[] segments()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public PagedResult<SuppressedSubscriber> suppressionList(Integer page,
Integer pageSize,
String orderField,
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 >= 400
public void suppress(SuppressionDetails details)
throws CreateSendException
CreateSendException
public void unsuppress(String email)
throws CreateSendException
CreateSendException
public Template[] templates()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public 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 >= 400
public 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 >= 400
public 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 >= 400
public 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 >= 400
public Person[] people()
throws CreateSendException
CreateSendException
public String getPrimaryContact()
throws CreateSendException
CreateSendException
public void setPrimaryContact(String emailAddress)
throws CreateSendException
CreateSendException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||