Package com.easypost.service
Class EasyPostClient
java.lang.Object
com.easypost.service.EasyPostClient
- 
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AddressServicefinal ApiKeyServicefinal BatchServicefinal BetaRateServicefinal BillingServicefinal CarrierAccountServicefinal CarrierMetadataServicefinal CarrierTypeServicefinal ClaimServicefinal CustomsInfoServicefinal CustomsItemServicefinal EndShipperServicefinal EventServicefinal InsuranceServicefinal LumaServicefinal OrderServicefinal ParcelServicefinal PaymentMethodServicefinal PickupServicefinal RateServicefinal ReferralCustomerServicefinal RefundServicefinal ReportServicefinal ScanformServicefinal ShipmentServicefinal SmartRateServicefinal TrackerServicefinal UserServicefinal WebhookService - 
Constructor Summary
ConstructorsConstructorDescriptionEasyPostClient(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.intGet connection timeout milliseconds for this EasyPostClient object.intGet read timeout milliseconds for this EasyPostClient object.voidsubscribeToRequestHook(Function<RequestHookResponses, Object> function) Subscribes to a request hook from the given function.voidSubscribes to a response hook from the given function.voidUnsubscribes to a request hook from the given function.voidUnubscribes 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
 - 
luma
 - 
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.
 
 
 -