Class AddressService
java.lang.Object
com.easypost.service.AddressService
-
Method Summary
Modifier and TypeMethodDescriptionList all Address objects.Create Address object from parameter map.createAndVerify
(Map<String, Object> params) Create Address object from parameter map and immediately verify it.getNextPage
(AddressCollection collection) Get the next page of an AddressCollection.getNextPage
(AddressCollection collection, Integer pageSize) Get the next page of an AddressCollection.Retrieve Address object from API.Verify this Address object.
-
Method Details
-
create
Create Address object from parameter map.- Parameters:
params
- Map of address parameters.- Returns:
- Address object.
- Throws:
EasyPostException
- when the request fails.
-
retrieve
Retrieve Address object from API.- Parameters:
id
- ID of address to retrieve.- Returns:
- Address object.
- Throws:
EasyPostException
- when the request fails.
-
all
List all Address objects.- Parameters:
params
- Map of parameters.- Returns:
- AddressCollection object.
- Throws:
EasyPostException
- when the request fails.
-
getNextPage
Get the next page of an AddressCollection.- Parameters:
collection
- AddressCollection to get next page of.- Returns:
- AddressCollection object.
- Throws:
EndOfPaginationError
- when there are no more pages to retrieve.
-
getNextPage
public AddressCollection getNextPage(AddressCollection collection, Integer pageSize) throws EndOfPaginationError Get the next page of an AddressCollection.- Parameters:
collection
- AddressCollection to get next page of.pageSize
- The number of results to return on the next page.- Returns:
- AddressCollection object.
- Throws:
EndOfPaginationError
- when there are no more pages to retrieve.
-
createAndVerify
Create Address object from parameter map and immediately verify it.- Parameters:
params
- Map of address parameters.- Returns:
- Address object.
- Throws:
EasyPostException
- when the request fails.
-
verify
Verify this Address object.- Parameters:
id
- The ID of address.- Returns:
- Address object.
- Throws:
EasyPostException
- when the request fails.
-