public class Clients extends CreateSendBase
jerseyClient, urlEncodingScheme| Constructor and Description |
|---|
Clients(AuthenticationDetails auth)
Constructor used to create new clients.
|
Clients(AuthenticationDetails auth,
String clientID)
Constructor used for working with existing clients.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
refreshTokenpublic 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.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 creationCreateSendException - 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(String emailAddress) throws CreateSendException
emailAddress - A subscriber's email addressCreateSendException - 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(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 >= 400public void suppress(SuppressionDetails details) throws CreateSendException
CreateSendExceptionpublic void unsuppress(String email) throws CreateSendException
CreateSendExceptionpublic 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.CreateSendExceptionpublic void delete()
throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400public Person[] people() throws CreateSendException
CreateSendExceptionpublic String getPrimaryContact() throws CreateSendException
CreateSendExceptionpublic void setPrimaryContact(String emailAddress) throws CreateSendException
CreateSendExceptionCopyright © 2013. All Rights Reserved.