Releases: EasyPost/easypost-node
Releases · EasyPost/easypost-node
v5.7.0
- Adds support to pass an
EndShipper
ID to the shipment buy call - Migrates the Partner White Label (Referral) functions from beta to the general library namespace and deprecates the beta functions
v5.6.1
- Fixes a regression introduced in v5.1.0 that included the entire response instead of the response body when errors are returned from the API
- Corrects the error type when Stripe cannot be reached when adding a credit card for referral users
v5.6.0
- Moves EndShipper out of beta to the general library namespace
v5.5.0
- 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 regenerate a shipment with carbon_offset
- Adds
validateWebhook
function that returns your webhook or raises an error if there is awebhookSecret
mismatch - Allows for looser values to the
verify
andverify_strict
params when creating an address (can accept strings or bools outside of an array)
v5.4.0
- Adds the ability to generate shipment forms via
Shipment.generateForm()
function - Adds missing Typescript definitions for Billing and PaymentMethod
v5.3.0
- Adds bundled Typescript definitions in beta (closes #119, #122, #184, and #243 - big thank you to our awesome community!)
- Adds
Billing.retrievePaymentMethods()
,Billing.deletePaymentMethod()
, andBilling.fundWallet()
functions - Adds support for webhook secrets
- Adds OS-specific details to the user-agent header
- Swaps update functions from
put
topatch
to better match API expectation and documentation. Behavior of these functions should remain the same
v5.2.0
- Adds the
EndShipper
Beta class withsave()
,retrieve()
, andall()
functions - Bumps patch versions of dependencies
v5.1.0
- Adds a
lowestRate()
function to Orders and Pickups - Adds a
Shipment.getLowestSmartrate()
andshipment.lowest_smartrate()
functions - Adds an error message to
lowestRate()
functions when no lowest rate can be found - Adds beta Referral class for the new Partner White Label API with these new functions:
create()
,update_email()
,all()
, andadd_credit_card()
- Fixes API error parsing by first trying to additional error message fields before falling back to the current configured fields
v5.0.0
Breaking Changes
- Bumps the minimum version of Node to
v10
- Removes build targets of
0.10
,6
, and8
, the library is now only published under a single bundledeasypost
package instead of separate bundled assets per version - Bumps all dependencies to the most recent compatible versions that still support Node 10, the library is now buildable on Node 16+
- Removed
retrieveRates()
method because the shipment object already has rates. If you need to get new rates for a shipment, please use regenerateRates() method instead - Removed
enable()
anddisable()
methods in the apiKey class. Please use this functionality through EasyPost website - Removed the deprecated
options.useCookie
param. Please useoptions.useProxy
instead - Removed
add_shipment
andremove_shipment
from the Batch object which could lead to confusion as the API documentation only describes adding/removing as an array. If you need to add or remove a single shipment from a batch, use the already existingadd_shipments
andremove_shipments
and pass your single shipment into an array. - The responses from the
/all
endpoints are no longer unwrapped and now properly follow the documentation where records will be wrapped in their respective object key- This now corrects the location of the
has_more
key which allows for pagination
- This now corrects the location of the
Features
- Adds support to one-call buy an order
- Adds the Nodejs version in use to the User-Agent header on requests
- Adds support to update the brand for a user
- Adds
retrieveMe()
convenience function that retrieves the authenticated user without the need to specify an ID - Adds
address.verifyAddress()
andAddress.createAndVerify()
functions - Adds
Batch.createAndBuy()
function - Adds
Refund
class which hasRefund.save()
,Refund.all()
, andRefund.retrieve()
functions
Bug Fixes
- Fixes
delivery_date
property typo on Rate object - Fixes
customs_item.value
to be anumber
instead of astring
- Lowered the default timeout of requests from 120 seconds to 60 seconds
Chores
- Removes
@easypost/build
and instead uses Webpack directly to build the project- The project is now only built for
node
and may not provide browser compatible code. If you require browser compatible Javascript, we suggest you build from source
- The project is now only built for
- Adds
prettier
and formats the entire project - Adds comprehensive test suite with Pollyjs covering every interface of the client library
- Adds jsdoc style info to each method
v4.0.0
- JSON encodes POST bodies instead of form encoding them by default
- Adds support for
tax_identifiers
- The
regenerateRates
method now makes a post request to re-rate a shipment. The newretrieveRates
will simply retrieve the rates of a shipment without re-rating - Ran
npm audit fix
to bump patch versions of dependencies