public class Lists extends CreateSendBase
jerseyClient, urlEncodingScheme| Constructor and Description |
|---|
Lists(AuthenticationDetails auth)
Constructor used to create new lists.
|
Lists(AuthenticationDetails auth,
String listID)
Constructor for working with existing lists.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateWebhook(String webhookID)
Activates the specified webhook.
|
PagedResult<Subscriber> |
active()
Gets a paged collection of active subscribers who have subscribed to the list.
|
PagedResult<Subscriber> |
active(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of active subscribers who have subscribed to the list
since the provided date.
|
PagedResult<Subscriber> |
active(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of active subscribers who have subscribed to the list.
|
PagedResult<Subscriber> |
bounced()
Gets a paged collection of bounced subscribers who have bounced out of the list.
|
PagedResult<Subscriber> |
bounced(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of bounced subscribers who have bounced out of the list
since the provided date.
|
PagedResult<Subscriber> |
bounced(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of bounced subscribers who have bounced out of the list.
|
String |
create(String clientID,
List list)
Creates a new empty subscriber list.
|
String |
createCustomField(CustomFieldForCreate customField)
Creates a new custom field with the specified data
|
String |
createWebhook(Webhook webhook)
Creates a new webhook on the specified list.
|
CustomField[] |
customFields()
Gets the custom fields available for the list with the specified ID
|
void |
deactivateWebhook(String webhookID)
Deactivates the specified webhook.
|
void |
delete()
Deletes the list with the specified ID
|
void |
deleteCustomField(String fieldKey)
Deletes the custom field with the specified key
|
PagedResult<Subscriber> |
deleted()
Gets a paged collection of subscribers who have been deleted from the list.
|
PagedResult<Subscriber> |
deleted(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of subscribers who have been deleted from the list
since the provided date.
|
PagedResult<Subscriber> |
deleted(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of subscribers who have been deleted from the list.
|
void |
deleteWebhook(String webhookID)
Deletes the specified webhook
|
List |
details()
Gets the details of the list with the given ID
|
String |
getListID()
Gets the current list ID.
|
Segment[] |
segments()
Gets the segments available in the list with the specified ID
|
void |
setListID(String listID)
Sets the current list ID.
|
Statistics |
stats()
Gets subscriber statistics for the list with the specified ID
|
void |
testWebhook(String webhookID)
Tests the specified webhook
|
PagedResult<Subscriber> |
unconfirmed()
Gets a paged collection of unconfirmed subscribers who have subscribed to the list.
|
PagedResult<Subscriber> |
unconfirmed(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of unconfirmed subscribers who have subscribed to the list
since the provided date.
|
PagedResult<Subscriber> |
unconfirmed(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of unconfirmed subscribers who have subscribed to the list.
|
PagedResult<Subscriber> |
unsubscribed()
Gets a paged collection of unsubscribed subscribers who have unsubscribed from the list.
|
PagedResult<Subscriber> |
unsubscribed(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of unsubscribed subscribers who have unsubscribed from the list
since the provided date.
|
PagedResult<Subscriber> |
unsubscribed(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of unsubscribed subscribers who have unsubscribed from the list.
|
void |
update(ListForUpdate list)
Updates the basic list details for an existing subscriber list
|
String |
updateCustomField(String fieldKey,
CustomFieldForUpdate customField)
Updates a new custom field.
|
void |
updateCustomFieldOptions(String fieldKey,
UpdateFieldOptions options)
Updates the available options for a Multi-Valued custom field.
|
Webhook[] |
webhooks()
Gets all webhooks which have been attached to events on the specified list
|
refreshTokenpublic Lists(AuthenticationDetails auth)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.public Lists(AuthenticationDetails auth, String listID)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.listID - The List ID to use when making API calls.public void setListID(String listID)
listID - The ID of the list to apply any calls to.public String getListID()
public String create(String clientID, List list) throws CreateSendException
clientID - The ID of the client owning the new listlist - The details of the new listCreateSendException - Thrown when the API responds with a HTTP Status >= 400public void update(ListForUpdate list) throws CreateSendException
list - The new basic details for the listCreateSendException - Thrown when the API responds with a HTTP Status >= 400public void delete()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public List details() throws CreateSendException
CreateSendException - Raised when the API returns a HTTP Status >= 400public Statistics stats() throws CreateSendException
CreateSendException - Raised when the API responds with HTTP status >= 400public CustomField[] customFields() throws CreateSendException
CreateSendException - Raised when the API responds with HTTP Status >= 400public Segment[] segments() throws CreateSendException
CreateSendException - Raised when the API responds with HTTP Status >= 400public PagedResult<Subscriber> active() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> active(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 a HTTP Status >= 400public PagedResult<Subscriber> active(Date subscribedFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
subscribedFrom - The API will only return subscribers who became active on or after this date.
This field is requiredpage - 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 a HTTP Status >= 400public PagedResult<Subscriber> unconfirmed() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> unconfirmed(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 a HTTP Status >= 400public PagedResult<Subscriber> unconfirmed(Date subscribedFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
subscribedFrom - The API will only return subscribers who subscribed on or after this date.
This field is requiredpage - 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 a HTTP Status >= 400public PagedResult<Subscriber> unsubscribed() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> unsubscribed(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 a HTTP Status >= 400public PagedResult<Subscriber> unsubscribed(Date subscribedFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
subscribedFrom - The API will only return subscribers who unsubscribed on or after this date.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 a HTTP Status >= 400public PagedResult<Subscriber> deleted() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> deleted(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 a HTTP Status >= 400public PagedResult<Subscriber> deleted(Date subscribedFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
subscribedFrom - The API will only return subscribers who were deleted on or after this date.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 a HTTP Status >= 400public PagedResult<Subscriber> bounced() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> bounced(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 a HTTP Status >= 400public PagedResult<Subscriber> bounced(Date subscribedFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
subscribedFrom - The API will only return subscribers who bounced out on or after this date.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 a HTTP Status >= 400public String createCustomField(CustomFieldForCreate customField) throws CreateSendException
customField - The custom field optionsCreateSendException - Thrown when the API responds with HTTP Status >= 400public String updateCustomField(String fieldKey, CustomFieldForUpdate customField) throws CreateSendException
fieldKey - The Key of the custom field to update. This must be surrounded by [].customField - The custom field optionsCreateSendException - Thrown when the API responds with HTTP Status >= 400public void updateCustomFieldOptions(String fieldKey, UpdateFieldOptions options) throws CreateSendException
fieldKey - The Key of the custom field to update. This must be surrounded by [].options - The new options to use for the field.CreateSendException - Raised when the API responds with HTTP Status >= 400public void deleteCustomField(String fieldKey) throws CreateSendException
fieldKey - The Key of the custom field to delete. This must be surrounded by [].CreateSendException - Thrown when the API responds with HTTP Status >= 400public Webhook[] webhooks() throws CreateSendException
CreateSendException - Thrown when the API responds with HTTP Status >= 400public String createWebhook(Webhook webhook) throws CreateSendException
webhook - The webhook detailsCreateSendException - Thrown when the API responds with HTTP Status >= 400public void testWebhook(String webhookID) throws CreateSendException
webhookID - The ID of the webhookCreateSendException - Thrown when the API responds with HTTP Status >= 400. I.e the test failspublic void deleteWebhook(String webhookID) throws CreateSendException
webhookID - The ID of the webhook to deleteCreateSendException - Raised when the API responds with HTTP Status >= 400public void activateWebhook(String webhookID) throws CreateSendException
webhookID - The ID of the webhook to activateCreateSendException - Thrown when the API responds with HTTP Status >= 400public void deactivateWebhook(String webhookID) throws CreateSendException
webhookID - The ID of the webhook to deactivateCreateSendException - Thrown when the API responds with HTTP Status >= 400Copyright © 2013. All Rights Reserved.