Class EasyPostClient
java.lang.Object
com.easypost.service.EasyPostClient
-
Field Summary
Modifier and TypeFieldDescriptionfinal AddressService
final ApiKeyService
final BatchService
final BetaRateService
final BillingService
final CarrierAccountService
final CarrierMetadataService
final CarrierTypeService
final ClaimService
final CustomsInfoService
final CustomsItemService
final EndShipperService
final EventService
final InsuranceService
final OrderService
final ParcelService
final PaymentMethodService
final PickupService
final RateService
final ReferralCustomerService
final RefundService
final ReportService
final ScanformService
final ShipmentService
final SmartRateService
final TrackerService
final UserService
final WebhookService
-
Constructor Summary
ConstructorDescriptionEasyPostClient
(String apiKey) EasyPostClient constructor.EasyPostClient
(String apiKey, int connectTimeoutMilliseconds) EasyPostClient constructor.EasyPostClient
(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds) EasyPostClient constructor.EasyPostClient
(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds, String apiBase) EasyPostClient constructor.EasyPostClient
(String apiKey, int connectTimeoutMilliseconds, String apiBase) EasyPostClient constructor.EasyPostClient
(String apiKey, String apiBase) EasyPostClient constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet API base for this EasyPostClient object.Get API key for this EasyPostClient object.Get API version for this EasyPostClient object.int
Get connection timeout milliseconds for this EasyPostClient object.int
Get read timeout milliseconds for this EasyPostClient object.void
subscribeToRequestHook
(Function<RequestHookResponses, Object> function) Subscribes to a request hook from the given function.void
Subscribes to a response hook from the given function.void
Unsubscribes to a request hook from the given function.void
Unubscribes to a response hook from the given function.
-
Field Details
-
address
-
apiKey
-
batch
-
betaReferralCustomer
-
betaRate
-
billing
-
carrierAccount
-
carrierMetadata
-
carrierType
-
claim
-
customsInfo
-
customsItem
-
endShipper
-
event
-
insurance
-
order
-
parcel
-
paymentMethod
-
pickup
-
rate
-
referralCustomer
-
refund
-
report
-
scanForm
-
shipment
-
smartRate
-
tracker
-
user
-
webhook
-
-
Constructor Details
-
EasyPostClient
EasyPostClient constructor.- Parameters:
apiKey
- API key for API calls.- Throws:
MissingParameterError
- When the request fails.
-
EasyPostClient
EasyPostClient constructor.- Parameters:
apiKey
- API key for API calls.apiBase
- API base for API calls.- Throws:
MissingParameterError
- When the request fails.
-
EasyPostClient
EasyPostClient constructor.- Parameters:
apiKey
- API key for API calls.connectTimeoutMilliseconds
- Timeout for connection.- Throws:
MissingParameterError
- When the request fails.
-
EasyPostClient
public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, String apiBase) throws MissingParameterError EasyPostClient constructor.- Parameters:
apiKey
- API key for API calls.connectTimeoutMilliseconds
- Timeout for connection.apiBase
- API base for API calls.- Throws:
MissingParameterError
- When the request fails.
-
EasyPostClient
public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds) throws MissingParameterError EasyPostClient constructor.- Parameters:
apiKey
- API key for API calls.connectTimeoutMilliseconds
- Timeout for connection.readTimeoutMilliseconds
- Timeout for read.- Throws:
MissingParameterError
- When the request fails.
-
EasyPostClient
public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds, String apiBase) throws MissingParameterError EasyPostClient constructor.- Parameters:
apiKey
- API key for API calls.connectTimeoutMilliseconds
- Timeout for connection.readTimeoutMilliseconds
- Timeout for read.apiBase
- API base for API calls.- Throws:
MissingParameterError
- When the request fails.
-
-
Method Details
-
subscribeToRequestHook
Subscribes to a request hook from the given function.- Parameters:
function
- The function to be subscribed to the request hook
-
unsubscribeFromRequestHook
Unsubscribes to a request hook from the given function.- Parameters:
function
- The function to be unsubscribed from the request hook
-
subscribeToResponseHook
Subscribes to a response hook from the given function.- Parameters:
function
- The function to be subscribed to the response hook
-
unsubscribeFromResponseHook
Unubscribes to a response hook from the given function.- Parameters:
function
- The function to be unsubscribed from the response hook
-
getConnectionTimeoutMilliseconds
public int getConnectionTimeoutMilliseconds()Get connection timeout milliseconds for this EasyPostClient object.- Returns:
- the connection timeout for this EasyPostClient object
-
getReadTimeoutMilliseconds
public int getReadTimeoutMilliseconds()Get read timeout milliseconds for this EasyPostClient object.- Returns:
- the read timeout for this EasyPostClient object
-
getApiKey
Get API key for this EasyPostClient object.- Returns:
- the API key for this EasyPostClient object
-
getApiVersion
Get API version for this EasyPostClient object.- Returns:
- the API version for this EasyPostClient object.
-
getApiBase
Get API base for this EasyPostClient object.- Returns:
- the API base for this EasyPostClient object.
-