Class ClaimService
java.lang.Object
com.easypost.service.ClaimService
-
Method Summary
Modifier and TypeMethodDescriptionGet a list of Claims.Cancel an Claim from the API.Create a new claim object from a map of parameters.getNextPage
(ClaimCollection collection) Get the next page of an ClaimCollection.getNextPage
(ClaimCollection collection, Integer pageSize) Get the next page of an ClaimCollection.Retrieve an Claim from the API.
-
Method Details
-
create
Create a new claim object from a map of parameters.- Parameters:
params
- Map of parameters.- Returns:
- Claim object
- Throws:
EasyPostException
- when the request fails.
-
retrieve
Retrieve an Claim from the API.- Parameters:
id
- The ID of the Claim to retrieve.- Returns:
- Claim object
- Throws:
EasyPostException
- when the request fails.
-
all
Get a list of Claims.- Parameters:
params
- a map of parameters- Returns:
- ClaimCollection object
- Throws:
EasyPostException
- when the request fails.
-
cancel
Cancel an Claim from the API.- Parameters:
id
- The ID of the Claim to cancel.- Returns:
- Claim object
- Throws:
EasyPostException
- when the request fails.
-
getNextPage
Get the next page of an ClaimCollection.- Parameters:
collection
- ClaimCollection to get next page of.- Returns:
- ClaimCollection object.
- Throws:
EndOfPaginationError
- when there are no more pages to retrieve.
-
getNextPage
public ClaimCollection getNextPage(ClaimCollection collection, Integer pageSize) throws EndOfPaginationError Get the next page of an ClaimCollection.- Parameters:
collection
- ClaimCollection to get next page of.pageSize
- The number of results to return on the next page.- Returns:
- ClaimCollection object.
- Throws:
EndOfPaginationError
- when there are no more pages to retrieve.
-