Package com.courier.api.resources.lists
Class ListsClient
- java.lang.Object
-
- com.courier.api.resources.lists.ListsClient
-
public class ListsClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description ListsClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSubscribers(java.lang.String listId, AddSubscribersToList request)Subscribes additional users to the list, without modifying existing subscriptions.voidaddSubscribers(java.lang.String listId, AddSubscribersToList request, IdempotentRequestOptions requestOptions)Subscribes additional users to the list, without modifying existing subscriptions.voiddelete(java.lang.String listId)Delete a list by list ID.voiddelete(java.lang.String listId, RequestOptions requestOptions)Delete a list by list ID.Listget(java.lang.String listId)Returns a list based on the list ID provided.Listget(java.lang.String listId, RequestOptions requestOptions)Returns a list based on the list ID provided.ListGetSubscriptionsResponsegetSubscribers(java.lang.String listId)Get the list's subscriptions.ListGetSubscriptionsResponsegetSubscribers(java.lang.String listId, GetSubscriptionForListRequest request)Get the list's subscriptions.ListGetSubscriptionsResponsegetSubscribers(java.lang.String listId, GetSubscriptionForListRequest request, RequestOptions requestOptions)Get the list's subscriptions.ListGetAllResponselist()Returns all of the lists, with the ability to filter based on a pattern.ListGetAllResponselist(GetAllListsRequest request)Returns all of the lists, with the ability to filter based on a pattern.ListGetAllResponselist(GetAllListsRequest request, RequestOptions requestOptions)Returns all of the lists, with the ability to filter based on a pattern.voidrestore(java.lang.String listId)Restore a previously deleted list.voidrestore(java.lang.String listId, RequestOptions requestOptions)Restore a previously deleted list.voidsubscribe(java.lang.String listId, java.lang.String userId)Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).voidsubscribe(java.lang.String listId, java.lang.String userId, SubscribeUserToListRequest request)Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).voidsubscribe(java.lang.String listId, java.lang.String userId, SubscribeUserToListRequest request, RequestOptions requestOptions)Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).voidunsubscribe(java.lang.String listId, java.lang.String userId)Delete a subscription to a list by list ID and user ID.voidunsubscribe(java.lang.String listId, java.lang.String userId, RequestOptions requestOptions)Delete a subscription to a list by list ID and user ID.Listupdate(java.lang.String listId, ListPutParams request)Create or replace an existing list with the supplied values.Listupdate(java.lang.String listId, ListPutParams request, RequestOptions requestOptions)Create or replace an existing list with the supplied values.voidupdateSubscribers(java.lang.String listId, SubscribeUsersToListRequest request)Subscribes the users to the list, overwriting existing subscriptions.voidupdateSubscribers(java.lang.String listId, SubscribeUsersToListRequest request, RequestOptions requestOptions)Subscribes the users to the list, overwriting existing subscriptions.
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
ListsClient
public ListsClient(ClientOptions clientOptions)
-
-
Method Detail
-
list
public ListGetAllResponse list()
Returns all of the lists, with the ability to filter based on a pattern.
-
list
public ListGetAllResponse list(GetAllListsRequest request)
Returns all of the lists, with the ability to filter based on a pattern.
-
list
public ListGetAllResponse list(GetAllListsRequest request, RequestOptions requestOptions)
Returns all of the lists, with the ability to filter based on a pattern.
-
get
public List get(java.lang.String listId)
Returns a list based on the list ID provided.
-
get
public List get(java.lang.String listId, RequestOptions requestOptions)
Returns a list based on the list ID provided.
-
update
public List update(java.lang.String listId, ListPutParams request)
Create or replace an existing list with the supplied values.
-
update
public List update(java.lang.String listId, ListPutParams request, RequestOptions requestOptions)
Create or replace an existing list with the supplied values.
-
delete
public void delete(java.lang.String listId)
Delete a list by list ID.
-
delete
public void delete(java.lang.String listId, RequestOptions requestOptions)Delete a list by list ID.
-
restore
public void restore(java.lang.String listId)
Restore a previously deleted list.
-
restore
public void restore(java.lang.String listId, RequestOptions requestOptions)Restore a previously deleted list.
-
getSubscribers
public ListGetSubscriptionsResponse getSubscribers(java.lang.String listId)
Get the list's subscriptions.
-
getSubscribers
public ListGetSubscriptionsResponse getSubscribers(java.lang.String listId, GetSubscriptionForListRequest request)
Get the list's subscriptions.
-
getSubscribers
public ListGetSubscriptionsResponse getSubscribers(java.lang.String listId, GetSubscriptionForListRequest request, RequestOptions requestOptions)
Get the list's subscriptions.
-
updateSubscribers
public void updateSubscribers(java.lang.String listId, SubscribeUsersToListRequest request)Subscribes the users to the list, overwriting existing subscriptions. If the list does not exist, it will be automatically created.
-
updateSubscribers
public void updateSubscribers(java.lang.String listId, SubscribeUsersToListRequest request, RequestOptions requestOptions)Subscribes the users to the list, overwriting existing subscriptions. If the list does not exist, it will be automatically created.
-
addSubscribers
public void addSubscribers(java.lang.String listId, AddSubscribersToList request)Subscribes additional users to the list, without modifying existing subscriptions. If the list does not exist, it will be automatically created.
-
addSubscribers
public void addSubscribers(java.lang.String listId, AddSubscribersToList request, IdempotentRequestOptions requestOptions)Subscribes additional users to the list, without modifying existing subscriptions. If the list does not exist, it will be automatically created.
-
subscribe
public void subscribe(java.lang.String listId, java.lang.String userId)Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).
-
subscribe
public void subscribe(java.lang.String listId, java.lang.String userId, SubscribeUserToListRequest request)Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).
-
subscribe
public void subscribe(java.lang.String listId, java.lang.String userId, SubscribeUserToListRequest request, RequestOptions requestOptions)Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).
-
unsubscribe
public void unsubscribe(java.lang.String listId, java.lang.String userId)Delete a subscription to a list by list ID and user ID.
-
unsubscribe
public void unsubscribe(java.lang.String listId, java.lang.String userId, RequestOptions requestOptions)Delete a subscription to a list by list ID and user ID.
-
-