Package com.easypost.service
Class PickupService
java.lang.Object
com.easypost.service.PickupService
- 
Method Summary
Modifier and TypeMethodDescriptionGet a list of all Pickup objects.buy(String id, PickupRate pickupRate) Buy this Pickup.Buy this Pickup.Cancel this Pickup.Cancel this Pickup.Create a new Pickup object from a map of parameters.getNextPage(PickupCollection collection) Get the next page of an PickupCollection.getNextPage(PickupCollection collection, Integer pageSize) Get the next page of an PickupCollection.Retrieve a Pickup from the API. 
- 
Method Details
- 
all
Get a list of all Pickup objects.- Parameters:
 params- The options for the query.- Returns:
 - PickupCollection object
 - Throws:
 EasyPostException- when the request fails.
 - 
getNextPage
Get the next page of an PickupCollection.- Parameters:
 collection- PickupCollection to get next page of.- Returns:
 - PickupCollection object.
 - Throws:
 EndOfPaginationError- when there are no more pages to retrieve.
 - 
getNextPage
public PickupCollection getNextPage(PickupCollection collection, Integer pageSize) throws EndOfPaginationError Get the next page of an PickupCollection.- Parameters:
 collection- PickupCollection to get next page of.pageSize- The number of results to return on the next page.- Returns:
 - PickupCollection object.
 - Throws:
 EndOfPaginationError- when there are no more pages to retrieve.
 - 
create
Create a new Pickup object from a map of parameters.- Parameters:
 params- Map of parameters.- Returns:
 - Pickup object.
 - Throws:
 EasyPostException- when the request fails.
 - 
retrieve
Retrieve a Pickup from the API.- Parameters:
 id- ID of Pickup to retrieve.- Returns:
 - Pickup object.
 - Throws:
 EasyPostException- when the request fails.
 - 
buy
Buy this Pickup.- Parameters:
 id- The ID of pickup.params- Map of parameters.- Returns:
 - Pickup object.
 - Throws:
 EasyPostException- when the request fails.
 - 
buy
Buy this Pickup.- Parameters:
 id- The ID of pickup.pickupRate- PickupRate to buy.- Returns:
 - Pickup object.
 - Throws:
 EasyPostException- when the request fails.
 - 
cancel
Cancel this Pickup.- Parameters:
 id- The ID of pickup.- Returns:
 - Pickup object.
 - Throws:
 EasyPostException- when the request fails.
 - 
cancel
Cancel this Pickup.- Parameters:
 id- The ID of pickup.params- Map of parameters.- Returns:
 - Pickup object.
 - Throws:
 EasyPostException- when the request fails.
 
 -