public class Segments extends CreateSendBase
jerseyClient, urlEncodingScheme| Constructor and Description |
|---|
Segments(AuthenticationDetails auth)
Constructor used to create new segments.
|
Segments(AuthenticationDetails auth,
String segmentID)
Constructor for working with existing segments.
|
| Modifier and Type | Method and Description |
|---|---|
PagedResult<Subscriber> |
active()
Gets a paged collection of active subscribers within the specified segment.
|
PagedResult<Subscriber> |
active(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of active subscribers within the specified segment
since the provided date.
|
PagedResult<Subscriber> |
active(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of active subscribers within the specified segment.
|
void |
addRule(Rule rule)
Adds a new rule to an existing list segment
|
String |
create(String listID,
Segment segment)
Creates a new segment on the specified list.
|
void |
delete()
Deletes the specified segment.
|
void |
deleteRules()
Deletes all rules from the specifed segment
|
Segment |
details()
Gets the details of the specified segment, including all rules and the current number of
active subscribers.
|
String |
getSegmentID()
Gets the current segment ID.
|
void |
setSegmentID(String segmentID)
Sets the current segment ID
|
void |
update(Segment segment)
Updates an existing segment with the specified details
|
refreshTokenpublic Segments(AuthenticationDetails auth)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.public Segments(AuthenticationDetails auth, String segmentID)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.segmentID - The Segment ID to use when making API calls.public void setSegmentID(String segmentID)
segmentID - The ID of the segment to apply calls to.public String getSegmentID()
public String create(String listID, Segment segment) throws CreateSendException
listID - The ID of the list to segmentsegment - The segment detailsCreateSendException - Thrown when the API responds with HTTP Status >= 400public void update(Segment segment) throws CreateSendException
segment - The details of the segment to update.
The SegmentID field of this object must be populatedCreateSendException - Thrown when the API responds with HTTP Status >= 400public void addRule(Rule rule) throws CreateSendException
rule - The rule specificationCreateSendException - Raised when the API responds with HTTP Status >= 400public Segment details() 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 void delete()
throws CreateSendException
CreateSendException - Raised when the API responds with HTTP Status >= 400public void deleteRules()
throws CreateSendException
CreateSendException - Raised when the API responds with HTTP Status >= 400Copyright © 2013. All Rights Reserved.