- Adds generic
makeApiCallfunction
- Adds the following functions usable by child and referral customer users:
apiKey.createapiKey.deleteapiKey.enableapiKey.disable
- Adds a
tracker.deletefunction
- Corrects
StatelessRateDeserializerandWebhookDeserializerto treat all camelCase fields like all other models to properly deserialize JSON fields containing underscors
- Adds the following functions:
fedexRegistration.registerAddressfedexRegistration.requestPinfedexRegistration.validatePinfedexRegistration.submitInvoice
- Adds
detailsproperty of aRateobjec
- Adds missing
apiKeysfield toBaseUser - Removes unecessary
SerializedNameentries inStatelessRate
- Adds the following functions:
embeddable.createSessioncustomerPortal.createAccountLink
- Adds support for
UspsShipAccount - Adds
tracker.retrieveBatchfunction - Adds
verify_carrieraddress param
- Adds the following functions
shipment.createAndBuyLumashipment.buyLumaluma.getPromise
- Adds
referenceto Claims
- Corrects the endpoint used for creating/updating UPS accounts
See our Upgrade Guide for more details.
- Adds
WebhookCustomHeadermodel, allowingcustom_headersto be passed when creating/updating a webhook - Adds the following functions to assist ReferralCustomers add credit cards and bank accounts:
betaReferralCustomer.createCreditCardClientSecretbetaReferralCustomer.createBankAccountClientSecretreferralCustomer.addCreditCardFromStripereferralCustomer.addBankAccountFromStripe
- Adds missing tracker props
- Adds
tracking_codesparam to tracker index endpoint - Routes
AmazonShippingAccountto the correct endpoint - Corrects payload wrapping for updating a webhook
- Fixes error parsing
- Allows for alternative format of
errorsfield (previously we deserialized theerrorsfield into a list ofErrorobjects; however, sometimes the errors are simply a list of strings. This change make theerrorsfield a list ofObjectallowing for either the newFieldErrorobject or a list of strings. Users will need to check for the type of error returned and handle appropriately) - Removed the unused
Errormodel - Added an explicit
AddressVerificationFieldErrormodel - The
BetaPaymentRefundnow uses a list ofFieldErrorinstead ofErrorfor theerrorsfield
- Allows for alternative format of
- Removes deprecated functions
paymentMethod.all(usebilling.retrievePaymentMethodsinstead)user.apiKeys(useapiKey.retrieveApiKeysForUserinstead)
- Replaces deprecated functions
shipment.lowestSmartRate(3rd param expects a validSmartRateAccuracy)utilities.findLowestSmartRate(3rd param expects a validSmartRateAccuracy)
- Renames
SmartrateAccuracyis nowSmartRateAccuracySmartrateCollectionis nowSmartRateCollectionshipment.smartratesis nowshipment.smartRatesTimeInTransit.getBySmartrateAccuracyis nowTimeInTransit.getSmartRateAccuracy
- Bumps dependencies
- Fixes how params are passed to the API when buying a pickup and providing a pickup rate (closes #340)
- Removes the unusable buy a pickup overload where no params are specified as
carrierandserviceare required paramaters when buying a pickup
- Removes the unusable buy a pickup overload where no params are specified as
- Removes the deprecated
create_listtracker endpoint function as it is no longer available via API
- Remove the custom DateDeserializer that contained a parsing issue. This change closes the related GitHub issue #333
- Fix pagination parameters for
getNextPageinUserservice
- Fix bug where response hooks were not being called if an API request failed
- Add new
Claimservice for filing claims on EasyPost shipments and insurances
- Adds new
shipment.recommendShipDate,smartrate.recommendShipDate, andsmartrate.estimateDeliveryDatefunctions - Routes
UpsAccount,UpsMailInnovationsAccount, andUpsSurepostAccountcreate/update requests to the new/ups_oauth_registrationsendpoint- Starting
2024-08-05, UPS accounts will require a new payload to register or update. See UPS OAuth 2.0 Update for more details
- Starting
- Fix
Fieldsserialization bug causing carrier account operations to fail
- Adds
refundfunction in Insurance service for requesting a refund for a standalone insurance - Fix payment method funding and deletion failures due to undetermined payment method type
- Fix
toStringmethod for all EasyPost models
- Fix
EasyPostTimeInTransitDataclass andeasypostTimeInTransitDataproperty ofEstimatedDeliveryDateclass being publicly inaccessible
- Adds
allChildrenfunction in User service to get a paginated list of child users - Adds
getNextPagefunction in User service to get next paginated list of child users
- Adds the
objectfield to all models; previously, most models were missing this field.
See our Upgrade Guide for more details.
- Removes
withCarbonOffsetparameter fromcreate,buy, andregenerateRatesfunctions of the Shipment service as EasyPost now offers Carbon Neutral shipments by default for free - Removes the undocumented
createAndBuyfunction from the Batch service. The proper usage is to create a batch first and buy it separately - Changes return type of
all()in webhook service fromWebhookCollectiontoa list of webhooks BetaCarrierMetadataservice has been removed. Please useCarrierMetadatainstead.
- Fixes a bug where address verification errors were not being properly deserialized
- Deprecates
user.apiKeyswhich will be removed in a future release, please use the newapiKey.allandapiKey.retrieveApiKeysForUserfunctions instead instead - Fixes various build warnings
- Fix endpoint for creating a FedEx Smartpost carrier account
- Adds new
RequestHookandResponseHookclasses. (un)subscribe to them with the newsubscribeToRequestHook,subscribeToResponseHook,unsubscribeFromRequestHook, orunsubscribeFromResponseHookmethods of anEasyPostClient - Maps 400 status codes to the new
BadRequestErrorclass
- Retrieving carrier metadata is now generally available via
client.carrierMetadata.retrieve - Bump all dependencies
- Test suite tweaked so EasyVCR is no longer a production dependency
- Adds
retrieveEstimatedDeliveryDatefunction to the Shipment class
- Adds beta
retrieveCarrierMetadatafunction - Fixes the type for
requestBodyfrom Map to String for Payload class - Add
retrieveCarrierMetadatamethod to retrieve carrier metadata for carriers
- Adds
getNextPagefunction to each service which retrieves the next page of a collection when thehas_morekey is present in the response (eg:client.address.getNextPage(addressCollection)) - Adds missing Event
statusproperty
- Handle edge cases when deseralizing error JSON, closes Github issue #239
- Adds beta
retrieveStatelessRatesfunction to get stateless rates - Adds
getLowestStatelessRatefunction to filter the lowest stateless rate
- Adds
allfunction toPickupto retrieve all pickups - Adds
retrieveAllPayloadsandretrievePayloadto retrieve all payloads or a single event payload
- Adds new beta billing functionality for ReferralCustomer users
addPaymentMethodcan add a pre-existing Stripe bank account or credit card to your EasyPost accountrefundByAmountrefunds your wallet by a dollar amountrefundByPaymentLogrefunds you wallet by a PaymentLog ID
See our Upgrade Guide for more details.
Includes all the changes from v6.0.0-rc1 listed below in addition to the following:
- All constants are now defined in the top-level
Constantsclass (com.easypost.Constants)- Users who are utilizing the constants for exception message parsing should account for the new namespace
- Added support for creating/registering carrier accounts that require custom workflows (e.g. FedEx, UPS)
- Swapped the parameters for the following functions, making
idthe first argumentShipment.generateForm()EndShipper.update()CarrierAccount.update()
- Fixed a typo,
ServiceUnavailablErroris nowServiceUnavailableError - Fixed a typo:
Smartrateis nowSmartRate,apikeysis nowapiKey,scanformis nowscanForm - Moved
validateWebook,findLowestSmartrate, andgetLowestSmartRatefrom Services to Utilities since it does not required an EasyPost client object - Added a root level
APIExceptionclass for all HTTP exceptions
- Library is now thread-safe
- Initialize an
EasyPostClientobject with an API key. Optionally set connection and readtime params - All methods (i.e.
create,retrieve,all) exist in services, accessed via property of the client (eg:client.shipment.create())- E.g. Static method ->
Shipment shipment = client.address.create(params) - E.g. Instance methods are now static ->
Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)
- E.g. Static method ->
- All functions are now taking object ID instead of an object, which means the functions are returning the response value directly instead of updating the current object
- E.g.
Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)
- E.g.
- Initialize an
- Improves error exception handling
- Specific error types for each category of error
- API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string.
- Removes
createAndVerifyWithCarrierfunction - Removes
verifyWithCarrierfunction - Removes
getUpdateandsetUpdatefrom Tracker class - Removes all beta features and corrsponding unit tests
- Removes
serviceCodefromRateclass since this value is internal use only - Removes invalid function
User.create()since creating a child-user requires a name - Removes deprecated class
CreditCardand its associated classesPrimaryPaymentMethod,SecondaryPaymentMethod, andBaseCreditCard, please use alternativeBillingclass - Removes all the setters of each object
- Removes the
refresh()function in all classes, please useretrieve()function instead - Removes invalid functions that allow users to make an API request without providing required parameters
- Changes the type of Insurance
Amountfrom Float to String - Changes the type
hasMorein ReferralCustomerCollection frombooleantoBoolean - Renames some getters
- Pickup class:
getPickoutRates()->getPickupRates() - PaymentMethod class:
getPrimaryPaymentMethodObject()->getPrimaryPaymentMethod() - PaymentMethod class:
getSecondaryPaymentMethodObject()->getSecondaryPaymentMethod()
- Pickup class:
- Converts return type from a boolean to void when we receive an empty response body from the API
fundWallet()anddeletePaymentMethod()in Billing classcreateList()in Tracker classupdateEmail()in ReferralCustomer class
- Changes the type
resultof Event fromEasyPostResourcetoMap<String, Object>
- Adds two missing attributes in the Event class:
pendingUrlsandcompletedUrls - AppEngine default timeout is now the same as connection timeout
- Adds support to pass an
EndShipper IDwhen buying a shipment - Removes the unusable overload shipment
buyfunctions that did not contain a rate parameter - Add White Label support:
- Create a referral customer
- Update a referral customer's email address
- List all referral customers
- Add a credit card to a referral customer's account
- Moves EndShipper out of beta into the general library namespace
- Removes the unusable
ParcelCollectionandallfunction of the Parcel object
- Fixes a bug where an erroneous API call to retrieve smartrates would be made behind the scenes whenever a shipment object was updated locally from the API (such as when regenerating rates) due to the deprecated function name being called
getSmartratesand the library assuming this was a getter and attempting to use it to update the shipment data
- Adds Carbon Offset support
- Adds the ability to create a shipment with carbon offset
- Adds the ability to buy a shipment with carbon offset
- Adds the ability to one-call-buy a shipment with carbon offset
- Adds the ability to re-rate a shipment with carbon offset
- Adds
validateWebhookfunction that returns your webhook or raises an error if there is a webhook secret mismatch
- Adds ability to generate a shipment form via
generate_form()function
- Adds
Billing.retrievePaymentMethods(),Billing.fundWallet(), andBilling.deletePaymentMethod()functions - Deprecates some existing payment method and credit card functions and features (repleaced by new Billing functions):
- Deprecates
CreditCard.fund()andCreditCard.delete()functions - Deprecates
PaymentMethod.all()function - Deprecates certain
PaymentMethodobject functions
- Deprecates
- Some
getXfunctions have been deprecated and renamed to simplyXto avoid confusion with proper getter/setter functions.getSmartrates()->smartrates()getLowestSmartRate()->findLowestSmartrate()
- Adds OS specific details to the user-agent header
- Adds
billingTypeattribute toRateandCarrierAccountclasses. - Adds missing attributes to the
CarrierAcccountobject (closes #145)
- Adds
PaymentMethod.all(),CreditCard.fund(), andCreditCard.delete()functions. - Fixes a bug that did not merge local and remote objects correctly on update (eg: User, Referral)
- Adds the
EndShipperBeta class withcreate,retrieve,all, andupdatefunctions - Adds support for
columnsandadditional_columnson Report creation - Adds
declaractionattribute in CustomsInfo class - Adds
AddressVerificationsclass - Adds a
lowestRate()function to Orders and Pickups - Adds a
Shipment.getLowestSmartrate()function and ashipment.lowestSmartrate()function - Adds beta Referral class for White Label API with these new functions:
create(),updateEmail(),all(), andaddCreditCard() - Adds
CreditCardclass foraddCreditCard()function return type - All SmartRate-related functions now return lists of Smartrate objects rather than lists of Rate objects
- Remove the dead
messageconditional check inAddress.createAndVerify()
- Adds a getter and setter for
eel_pfcon theCustomsInfoobject - Adds a getter and setter for
idon theBrandobject - Fixes a bug that didn't allow Refunds to be created
- Adds a complete test suite and upgrade JUnit4 to JUnit5
- Fixes the
AddressCollectionto return a list ofAddressobjects instead ofBatchobjects
- Adds support to one-call buy a Shipment by passing a
serviceandcarrierAccountskey - Adds support to retrieve carrier types via
CarrierType.all() - Adds support to one-call buy an Order by passing a
serviceandcarrierAccountskey - Adds support to update the user's brand via
User.updateBrand() - Allow user to override default API timeouts via getters and setters
- Bump all plugins and remove dead
oss-parentplugin - Various other small improvements and bug fixes
See our Upgrade Guide for more details.
- Bump minimum Java version from 1.5 to 8
- Changed PUT/POST request bodies from url-form encoded to JSON encoded
- Added support for
SmartRate - Added support for
Tax Identifiers - Added
Checkstyleas a plugin and linted the project - Added new
rerateshipment function - Bumped project dependencies
- Include Java version in User-Agent header
- Remove
itemsandcontainerswhich have not been supported for some time - Corrects references of
contact@easypost.comtosupport@easypost.com - Updates the connection timeout to 30 seconds from 20 and the request timeout to 60 from 40
- Actually bump User-Agent (which hadn't been bumped since 4.0.0)
- Change
PUTrequests to be properly-encoded - Handle null previous_attributes
- Merged pull request #49
- Added EvenTest file
- Fixed test cases on EasyPostTest (testPickup, testShipmentWithPostageLabelWithOptions )
- Fixed intermittent WebHook callback event containing "previous_attributes": null
- Add labelFile for postage_label_inline option
- Added additional fields to Error object used in Address verification
- Added delivery details to Address verification
- Changed message field of ShipmentMessage to support non-string values
- Fixed currency field of Rate to handle null
- Fixed Report params to include start_date and end_date in the top-level JSON, as expected by the reports endpoint
- Added createdAt, updatedAt and fees fields on all top-level objects
- Added batchId to Shipment objects
- Updated version of junit from 4.1.10 to 4.1.12
- Updated version of maven-compiler-plugin from 1.5 to 1.8
- Added tests for new shipment option payment
- Added orderId field to Shipments
- Allow Reports to be retrieved without passing a type
- Updated X-EasyPost-Client-User-Agent to X-Client-User-Agent
- Added additional values to CarrierDetail
- Added statusDetail field to Trackers and TrackingDetails
- Added newRates method to Orders to refresh rates
- Allow Webhook update and index to be called with empty params
- Fixed ScanForm create
- Added basic CRUD methods for Webhooks
- Fixed bug in Maven test dependencies
- Changed Shipment and Order options from being a Map<String, String> to Map<String, Object> to support new non-string options
- Added ability to create, retrieve, and index shipment, tracker and payment_log reports
- Added delete() to Users (for children only)
- Added getbatchId() and other methods to ScanForms
- Added getCreatedAt() and getUpdatedAt() methods for Tracker objects
- Removed some CRUD methods that are not (and never were) valid
- Updated version of GSON from 2.2.4 to 2.7 to allow looser parsing of DateTime formats
- Added standalone insurance objects
- Allow the connection's read timeout to be set with EasyPost.readTimeout
- Allow shipment_id to be null on rates
- Bump version for deployment reasons
- Updated POM.xml to fit Maven better and support the correct plugins
- Removed a flaky text
- Updated PickupRate to properly include the carrier field
- Updated Order Messages to be of the new, more descriptive format
- Added "confirmation" field to ScanForm object, along with appropriate accessor methods
- Update Address verification errors array
- Added ability to create new top-level users without API KEY
- Added a Form attribute - submittedElectronically.
- Fixed some types on the User object so that they match what is returned by the API (Number -> String).
- Added support for the new "verify" and "verify_strict" parameters for Address creation/validation.
- Fixed Shipment Insure method so that it correctly uses http POST.
- Added createList method to Tracker class
- Added CarrierDetail object to tracker model.
- Added Rate.listRate and Rate.listCurrency.
- Added Carrier field to the tracker model.
- Added Form model and Shipment.forms.
- Added User model, and filled out CarrierAccount to be able to interact with both via the API.
- Updated Tracker model to have weight, signedBy and estDeliveryDate fields
- Fixed Address createAndVerify method
- Added Address verifyWithCarrier and createAndVerifyWithCarrier methods
- Added Pickup classes and pickup create, buy, cancel methods
- Orders now update themselves after a buy call.
- Added Address.residential attribute, and Batch.buy function
- Added a number of new Rate attributes and Batch.numShipments, Batch.reference, ScanForm.status
- Added ShipmentMessage type for Shipment.messages
- Added Tracker to shipment buy response
- Added Tracking Locations to Tracking Details
- Enhanced Tests
- Added Container, Item, Order resources.
- Added Batch.createScanForm function for generating manifests from a batch.
- Refactored and added a lot of new attributes for objects across the board.
- Bug fix. Made Batch.status public and removed the conflicting getStatus method.
- Added Event resource for webhook digestion.
- Changed Batch.getStatus to Batch.getBatchStatus to avoid collisions with Tracker.getStatus in Event deserialization.
- Bug fix: Fixed handleAPIError to return proper exception message.
- API Addition: Tracker resource added. Trackers can be used to register any tracking code with EasyPost webhooks.
- Attribute Addition: Added new BatchStatus attribute, and additional label format attributes to PostageLabel.
- Added unique carrier/service combination serviceCodes to Rate objects.
- Added function to Address to all creating and verifying at the same time.
- Add label function to Shipment to request specific label file_formats (pdf, epl2, zpl).
- Add insure function to Shipment. Add insurance to any shipment in one call!