Class ApiKeyService
java.lang.Object
com.easypost.service.ApiKeyService
-
Method Summary
Modifier and TypeMethodDescriptionall()Get all API keys.Create an API key for a child or referral customer user.voidDelete an API key for a child or referral customer user.Disable a child or referral customer API key.Enable a child or referral customer API key.Get this User's API keys.
-
Method Details
-
retrieveApiKeysForUser
Get this User's API keys.- Parameters:
id- The ID of the user.- Returns:
- List of ApiKey objects.
- Throws:
EasyPostException- when the request fails.
-
all
Get all API keys.- Returns:
- ApiKeys object.
- Throws:
EasyPostException- when the request fails.
-
create
Create an API key for a child or referral customer user.- Parameters:
mode- The mode of the API key (production or test).- Returns:
- ApiKey object.
- Throws:
EasyPostException- when the request fails.
-
delete
Delete an API key for a child or referral customer user.- Parameters:
id- The ID of the API key to delete.- Throws:
EasyPostException- when the request fails.
-
enable
Enable a child or referral customer API key.- Parameters:
id- The ID of the API key to enable.- Returns:
- ApiKey object.
- Throws:
EasyPostException- when the request fails.
-
disable
Disable a child or referral customer API key.- Parameters:
id- The ID of the API key to disable.- Returns:
- ApiKey object.
- Throws:
EasyPostException- when the request fails.
-