Package com.easypost.service
Class ReportService
java.lang.Object
com.easypost.service.ReportService
-
Method Summary
Modifier and TypeMethodDescriptionGet a list of Reports from the API.Create a Report from a map of parameters.getNextPage(ReportCollection collection) Get the next page of an ReportCollection.getNextPage(ReportCollection collection, Integer pageSize) Get the next page of an ReportCollection.protected StringGenerate a report URL.Retrieve a Report from the API.
-
Method Details
-
create
Create a Report from a map of parameters.- Parameters:
params- a map of parameters.- Returns:
- Report object.
- Throws:
EncodingError- if the parameters cannot be encoded.MissingParameterError- if required parameters are missing.EasyPostException- when the request fails.
-
reportURL
Generate a report URL.- Parameters:
type- the type of report to generate.- Returns:
- the URL to generate the report.
- Throws:
EncodingError- when the request cannot be encoded properly.EasyPostException
-
retrieve
Retrieve a Report from the API.- Parameters:
id- the ID of the Report to retrieve.- Returns:
- Report object.
- Throws:
EasyPostException- when the request fails.
-
all
Get a list of Reports from the API.- Parameters:
params- a map of parameters.- Returns:
- ReportCollection object.
- Throws:
EasyPostException- when the request fails.
-
getNextPage
Get the next page of an ReportCollection.- Parameters:
collection- ReportCollection to get next page of.- Returns:
- ReportCollection object.
- Throws:
EndOfPaginationError- when there are no more pages to retrieve.
-
getNextPage
public ReportCollection getNextPage(ReportCollection collection, Integer pageSize) throws EndOfPaginationError Get the next page of an ReportCollection.- Parameters:
collection- ReportCollection to get next page of.pageSize- The number of results to return on the next page.- Returns:
- ReportCollection object.
- Throws:
EndOfPaginationError- when there are no more pages to retrieve.
-