- Adds generic
makeApiCallfunction
- Adds the following functions:
fedexRegistration.registerAddressfedexRegistration.requestPinfedexRegistration.validatePinfedexRegistration.submitInvoice
- Adds the following functions usable by child and referral customer users (closes #375):
apiKey.createapiKey.deleteapiKey.enableapiKey.disable
- Adds
tracker.deletefunction
- 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.
- Drops support for PHP 8.0
- Adds
custom_headersproperty to webhook model - Adds the following functions to assist ReferralCustomers add credit cards and bank accounts:
betaReferralCustomer.createCreditCardClientSecretbetaReferralCustomer.createBankAccountClientSecretreferralCustomer.addCreditCardFromStripereferralCustomer.addBankAccountFromStripe
- Adds missing properties to
TrackerandTrackingDetailmodels - Routes
AmazonShippingAccountto the correct endpoint - Corrects wrapping payload for update webhook endpoint
- Corrects various type hints throughout project
- Fixes error handling
- Corrects the type of
errorsproperty on anApiExceptionto allow for the alternative format - Fixes a bug where you could not
prettyPrintan error if it used the alternative format - Corrects the
paramreferences topropertyreferences on all error models - Adds new
AddressVerificationFieldErrorfor theerrorsproperty on aVerificationmodel - Adds missing
suggestionproperty toFieldError
- Corrects the type of
- Removes deprecated
tracker.createListendpoint function as it is no longer available via API - Removes deprecated
user.allApiKeysanduser.apiKeys, useapiKey.allandapiKey.retrieveApiKeysForUserrespectively - Bump deps
- Fixes an issue with how query params were sent when using the
addCreditCardfunction
- Fix parameters for retrieving next page of child users
- Adds 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 payment method funding and deletion failures due to undetermined payment method type
- Adds
refundfunction in Insurance service for requesting a refund for a standalone insurance
- Add
allChildrenandgetNextPageOfChildrenmethods touserservice
See our Upgrade Guide for more details.
- Drops support for PHP 7.4
- Adds support for PHP 8.3
- Persists the HTTP client inside of the
EasyPostClientvia thehttpClientproperty to reduce memory consumption on consecutive requests - Adds type declarations for parameters and return values throughout the library, corrects docstrings to match
- Removed
withCarbonOffsetparameter fromcreate,buy, andregenerateRatesfunctions of the Shipment service as EasyPost now offers Carbon Neutral shipments by default for free - Fixes a bug where the original filtering criteria of
allcalls wasn't passed along togetNextPagecalls. Now, these are persisted via a_paramskey on response objects locally - Removes the undocumented
createAndBuyfunction from theBatchservice. The proper usage is to create a batch first and buy it separately - Renames
primaryOrSecondarytopriorityto match the API name for the parameter - Corrects the order of the
userIdandemailparameters in theupdateEmailfunction of the ReferralCustomer service to match the rest of the library where IDs are always the first parameter - Fix various bugs throughout the library
- Fixes a bug that globally reset the timezone to UTC instead of setting the timezone per-request (closes #310)
- Deprecates API key-related functions in the
userservice and introduces the replacement functions in theapi_keysservice - Fixes a bug that changed the timezone to UTC on each request without resetting it to the original timezone in use (closes #310)
- Fixes documentation generation command invocation
- Fix endpoint for creating a FedEx Smartpost carrier account
- Adds new
RequestHookandResponseHookevents. (un)subscribe to them with the newsubscribeToRequestHook,subscribeToResponseHook,unsubscribeFromRequestHook, orunsubscribeFromResponseHookmethods of anEasyPostClient - Maps 400 status codes to new
BadRequestExceptionclass
- Migrates carrier metadata to GA (now available via
client.carrierMetadata.retrieve)
- Adds
retrieveEstimatedDeliveryDatefunction to the Shipment class
- Adds beta
retrieveCarrierMetadatafunction - Improves Error Deserialization to dynamically handle edge cases that have a bad format
- Add
getNextPagefunction that retrieves the next page of results for a paginated collection
- Adds missing
status_detailproperty to Tracker - Fixes spelling of
weightproperty on Parcel
- Adds beta
retrieveStatelessRatesfunction - Adds
getLowestStatelessRateutility - Correct HTTP 403 status responses to throw
ForbiddenException - Various other small corrections and improvements
- Added function to retrieve all pickups via
$client->pickup->all() - Added payload functions
retrievePayloadandretrieveAllPayloadsmethods, accessible via$client->eventservice.
- Adds new beta billing functionality for referral customer users, accessible via the
$client->betaReferralCustomerserviceaddPaymentMethodto add an existing Stripe bank account or credit card to your EasyPost accountrefundByAmountrefunds you wallet balance by a specified amountrefundByPaymentLogrefunds you wallet balance by a specified payment log
See our Upgrade Guide for more details.
- Release final version of v6 that contains all the changes in the
v6.0.0-rc1below
- PHP 7.3 is no longer supported
- Added a new
EasyPostClientobject which encapsulates the API key. All functions are called against this client allowing for thread-safety (eg:$client->shipment->create())- All instance methods and the ability to have objects update in-place has been removed due to this rearchitecture. When updating objects or performing actions on them (eg: creating a label/scanform), you will need to assign the return value to a variable and use that moving forward instead of relying on the object getting updated without capturing the new return value
->save()instance methods are nowupdate()static methods- Functions no longer accept an API key as an optional parameter
- EasyPost objects no longer contain the logic associated with them; instead, we have
Servicesfor each EasyPost object. All the services are properties of anEasyPostClient. You can then call functions on a Service.
- All function and parameter names are now camelCase. Previously we used a mix of camel and snake cases
- Improves error exception handling (closes #7)
- Introduced ~2 dozen new exception types that extend from either
ApiExceptionorEasyPostException - ApiExceptions will behave like the previous EasyPostException class did. They will include a
message,errors,code,httpStatusandhttpBody. This class extends the more generic EasyPostException which only contains a message, used for exceptions thrown directly from this library - The
ecodeproperty of anApiExceptionis now justcode
- Introduced ~2 dozen new exception types that extend from either
- Functions that previously returned
truenow return void as there is no response body from the API (eg:fundWallet,deletePaymentMethod,updateEmail,createList) - Adopts
Guzzleas the HTTP client for this library. This should provide a much more consistent experience, better encoding, and faster request times in some cases - The results of calling
allApiKeysis no longer double wrapped with the mode of the API key (these are still accessible inside of each object) Requestorhas moved toHttp, constants fromEasyPostnow live inConstants,Errormoved toException- Occurances of
smartrateare nowsmartRateandSmartrateare nowSmartRateto match the documentation and API expectations Referralis nowReferralCustomerto better match documentation and API expectationvalidateWebhook,getLowestSmartRate, andreceiveEventare now underEasyPost\Util\Utilas they do not make any API calls and do not need the associated client object- The
receivefunction previously in the namespace ofEventis now calledreceiveEventsince it has been relocated to the generic Util namespace - Internal, library only utilities have been moved to
EasyPost\Util\InternalUtil
- The
- The beta
EndShipperclass has been removed, please use the generally availableEndShipperclass - Various properties and functions that were previously intended for private/protected use but were public have been corrected
- All phpdoc type hints, descriptions, return values, and throws references were corrected or updated
- All dependencies were bumped
- Various other bug fixes and improvements were made along with addressing deprecation warnings
- Adds carrier account creation routes requests correctly for carriers that require custom workflows
- Instead of returning
nullwhen a list of child API keys cannot be returned (eg: when you callapi_keyson a non-user object) it will return an empty list. The expected impact to end users is extremely low - Retrieving child user API keys for users with large numbers of child users should see much faster results as we now break on the match instead of iterating the entire list
- Adds Partner White Label (Referral) Support
- Adds ability to create a referral user
- Adds ability to update a referral user's email
- Adds ability to retrieve all referral users
- Adds ability to add a credit card to a referral user's account
- Adds support to specify an
$endShipperIdon the buy call of a Shipment - Removes unreachable code in the address verification flow that checked for the existence of an address (errors will continue to be thrown on failure)
- Moves EndShipper out of beta into the general library namespace
- Removes some extra imports that no longer exist causing errors when importing this library. Adds a regression test to protect against this in the future.
- Adds Carbon Offset support
- Adds ability to create a shipment with carbon offset
- Adds ability to buy a shipment with carbon offset
- Adds ability to one-call-buy a shipment with carbon offset
- Adds ability to rerate a shipment with carbon offset
- Adds
validateWebhookfunction that returns your webhook or raises an error if there is awebhookSecretmismatch - Fixes a bug that required the values of
verifyandverify_strictparams on an Address creation call to be arrays since passingtrueas a boolean is also valid (passing an array will continue to work but is no longer required)
- Add ability to generate forms for shipments via
generate_form()function
- Adds
Billing::retrieve_payment_methods(),Billing::fund_wallet(), andBilling::delete_payment_method()functions - Adds OS specific details to the
User-Agentheader - Applies a patch to coerce array error messages to strings where error mapping is done improperly (as is the case with carriers like GSO/GLS) (closes #181)
- Fixes a missing parameter bug by setting the
betaparameter in therefreshfunction tofalseby default
- Adds the
EndShipperBeta class withcreate,retrieve,all, andsavefunctions
- Adds present but unimported supplemental EasyPost object classes such as
TrackingDetailsto the lib (closes #164)
- Adds a
lowest_rate()function to Orders and Pickups - Adds
Shipment::get_lowest_smartrate()and$shipment.lowest_smartrate()functions - Removes the
paramsfrom theAddress->verify()method since it's non-static and unused - Removes dead conditional
messagecheck inAddress::create_and_verify
See our Upgrade Guide for more details.
- Bumped minimum PHP version supported from
5.3to7.3 - Adds a full test suite, all functions are now tested for each object
- Adds class properties to every class (closes #96)
- Updates and adds docblocks to each function throughout the library
- Switched from
array()syntax to[]throughout the project - Adds the
update_brand()method on theUserobject - Set a default timeout of 30 seconds for connections and 60 seconds for requests
- Fixes the
create_list()Tracker andcreate_and_buy()Batch method's encodings to properly send through the parameters - Adds the PHP version used to the
User-Agentheader - Removed unusable
all()method on theParcelobject - Removed unpaginated
all()method on theOrder,CustomsInfo, andCustomsItemobjects - Removed the
get_rates()method on the Shipment object since a Shipment object already has rates. If you need new rates for a shipment, use theregenerate_rates()method instead - Ignores return types for now on
ArrayAccessandIteratormethods (closes #124) - Bumps dev dependencies
- Various other small improvements and bug fixes
- Further fixes JSON encoding by dropping null key/values, sending values as strings where necessary (returning to previous behavior), and removing the
array_filterfrom the previous release
- Properly handles empty lists and objects with JSON encoding (closes #114)
See our Upgrade Guide for more details.
- JSON encodes POST bodies instead of form encoding them
- Adds TaxIdentifier support
- Corrects references of
contact@easypost.comtosupport@easypost.com - Bumps patch versions of dependencies
- Adds
SmartRatefunctionality to theShipmentsobject (available by callingget_smartrates()on a shipment)
- Added event retrieval methods
- Fixed a bug that did not allow carrier accounts to be deleted
- Fixed a bug that did not allow users to be deleted
- Removed various pieces of old code
- Added "Refund" and "Shipment Invoice" to the prefix and type lists
- Version bump with updated author
- Bumped version in package.json for Packagist
- Updated README with release instructions
- Fixed a bug that would not create reports properly
- Added unit tests for reports
- Added ability to set connection and response timeouts for all EasyPost actions (thanks mattjanssen!)
- Renamed
ObjectclassEasyPostObjectsince Object is a keyword in PHP7.2
- Fixed confusing Pickup example
- Enabled Reports to retrieve without a type parameter
- Use X-Client-User-Agent over X-EasyPost-Client-User-Agent
- Added get_rates method to Order objects
- Fixed compatibility issues with older PHP versions and the Report class
- Fixed Create for ScanForms
- Added basic CRUD methods for Webhooks
- Fixed error in Util.php they may have affected shipment_reports retrievals
- Added ability to create Report objects for shipment, tracker and payment_log reports
- Fixed warning message from Address Verify/VerifyStrict
- Added create_list for trackers
- Added Insurance support
- Renamed "Resource" class to "EasypostResource" since Resource is reserved in PHP7 (thanks ccovey!)
- Added ability to create top-level users
- Added 'verify' and 'verify_strict' options to Address creation
- Updated ReadMe (thanks browner12!)
- Added DocBlock annotations to all methods (thanks browner12!)
- Fixed Shipment Retrieve by tracking_code
- Added Tracker.all example, and updated some old examples
- Removed cURL options for SSL version, timeout, and connect timeout. The default values for these options are acceptable.
- Added User and CarrierAccount resources and examples for each.
- Modified EasyPost Object setter to record the change in the top level parent object rather than the object that the change was made in. This allows you to change sub objects and then call save() on the parent to have all properties saved.
- Removed EasyPost Object transientValues and made unsavedValues act as a representation of the params to send on save, rather than a flag to indicate if a property had been changed.
- Added support for EasyPost's new error format: {"error": {"message": "...", "code": ..., "errors": {...}}} as well as a prettyPrint function to better display errors in development.
- Added support for additional HTTP methods PATCH and PUT.
- EasyPost Objects are now Iterable.
- Added pickup class
- Added pickup example
- Added tracker to shipment buy response
- Updated tracker examples
- Added Item, Container, and Order resources.
- Updated the CA cert bundle.
- Added the ability to add negative filters to Shipment->lowest_rate by starting them with an exclamation mark.
- Added endpoint to create shipment from tracking code.
- Added Event resource for webhooks.
- API Addition: Batch.buy method added. Trigger the purchasing of labels after a successful Batch.create.
- API Addition: Batch.scan_form method added. Quickly generate a scan_form for an entire batch.
- API Addition: Tracker objects added. Trackers can be used to register any tracking code with EasyPost webhooks.
- Bug fix: error messages should no longer be truncated to their first character.
- 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!