Package com.easypost.service
Class BatchService
java.lang.Object
com.easypost.service.BatchService
- 
Method Summary
Modifier and TypeMethodDescriptionaddShipments(String id, List<Shipment> shipments) Add shipments to this Batch object.addShipments(String id, Map<String, Object> params) Add shipments to this Batch object.List all Batch objects.Buy this batch.Buy this batch.create()Create a Batch object.Create a Batch object.createScanForm(String id) Create a scan form for this batch.createScanForm(String id, Map<String, Object> params) Create a scan form for this batch.Label this Batch object.removeShipments(String id, List<Shipment> shipments) Remove shipments from this Batch object.removeShipments(String id, Map<String, Object> params) Remove shipments from this Batch object.Retrieve a Batch object from the API. 
- 
Method Details
- 
create
Create a Batch object.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
create
Create a Batch object.- Parameters:
 params- Map of parameters.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
retrieve
Retrieve a Batch object from the API.- Parameters:
 id- ID of the Batch to retrieve.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
all
List all Batch objects.- Parameters:
 params- Map of parameters.- Returns:
 - BatchCollection object.
 - Throws:
 EasyPostException- when the request fails.
 - 
label
Label this Batch object.- Parameters:
 id- The ID of batch.params- Map of parameters.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
addShipments
Add shipments to this Batch object.- Parameters:
 id- The ID of batch.params- Map of parameters.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
addShipments
Add shipments to this Batch object.- Parameters:
 id- The ID of batch.shipments- List of Shipment objects.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
removeShipments
Remove shipments from this Batch object.- Parameters:
 id- The ID of batch.params- Map of parameters.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
removeShipments
Remove shipments from this Batch object.- Parameters:
 id- The ID of batch.shipments- List of Shipment objects.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
buy
Buy this batch.- Parameters:
 id- The ID of batch.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
buy
Buy this batch.- Parameters:
 id- The ID of batch.params- Map of parameters.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
createScanForm
Create a scan form for this batch.- Parameters:
 id- The ID of batch.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 - 
createScanForm
Create a scan form for this batch.- Parameters:
 id- The ID of batch.params- Map of parameters.- Returns:
 - Batch object.
 - Throws:
 EasyPostException- when the request fails.
 
 -