Releases: EasyPost/easypost-node
Releases · EasyPost/easypost-node
v6.4.0
- Adds
retrieveEstimatedDeliveryDate
in Shipment service
v6.3.0
- Fixes the Beta client, previously the beta functions were not accessible due to how they were exported. This has now changed so each service is prepended with
Beta
(eg:BetaCarrierMetadata
) - Adds
CarrierMetadata
typescript definitions
v6.2.0
- Adds beta
retrieveCarrierMetadata
function - Adds missing
api_keys
property toUser
- Improves Error Deserialization to dynamically handle edge cases that have a bad format
- Adds a helper function to retrieve carrier metadata
v6.1.0
- Add
getNextPage
function that retrieves the next page of results for a paginated collection
v6.0.0
Includes all of the changes made in v6.0.0-rc1 below plus the following:
- Adds class properties to each model for autocomplete and explicit deserialization
- Adds missing
status_detail
to trackers
v6.0.0-rc1
Breaking Changes
- Bumps minimum Node from 10 to 12
- Renamed default export
API
toEasyPostClient
- Overhauled the data flow of the library
- Instead of creating a local object and then calling
.save()
on it to create/update it at the API level, you will pass in the same data as before but to one of eithercreate()
orupdate()
functions on the service in question - The base service no longer implements all functions and instead each individual service implements its own functions. This means the library namespace won't be cluttered with various
notImplemented
functions - All instance functions (excluding
lowestRate
) previously called on an object are instead called on a service. (eg:shipment.buy(shipment.lowest_rate())
is nowclient.Shipment.buy(shipment.id, shipment.lowest_rate())
))- All functions attached to a service are now async and must be awaited
- Instead of creating a local object and then calling
- Moved library structure around
- Introduced
/models
that contain the EasyPost objects - Renamed
/resources
to/services
to better reflect that a service called against an EasyPostClient differs from an API resource, now known as themodels
- Each service file now has
_service
appended - Added
/utils
which contains bothinternal_util.js
which is not intended for user consumption andutil.js
which contains public utilities - Moved
getLowestSmartRate
andvalidateWebook
function toutil.js
as neither of them require the client object to function
- Introduced
- References of
Referral
were changed toReferralCustomer
to match the API - Bumps major versions of all dependencies
- Changes the
primaryOrSecondary
parameter name topriority
in billing functions to match the API - Empty response functions now return nothing (deleting records, funding a wallet, etc)
- Explicit
type
parameter for retrieving all reports removed, includetype
in genericparams
dictionary instead. - Improves error 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.
- Corrects references of
smartrate
toSmartRate
andsmartRate
to match the API
New Features
- Add
retrieveStatelessRates
andgetLowestStatelessRate
functions
Bug Fixes
- Completely overhauled deserialization process, nested objects (eg: rates of shipments, etc) now properly convert to their appropriate EasyPostObject
- Fixes the
verifyAddress
function to actually verify an address - Fixes a bug that could double wrap or unintentionally wrap the results of an
/all
API call with the name of the object in question
v5.10.1
v5.10.0
- Adds
all
function toPickup
class to retrieve all pickups - Adds
retrievePayload
andretrieveAllPayloads
functions to retrieve payloads for an Event- These are static functions on the Event class, so you can call them like
easypost.Event.retrieveAllPayloads(eventId)
- These are static functions on the Event class, so you can call them like
- Adds missing Typescript implementations for
CustomsInfo
,CustomsItem
,ScanForm
,User
,Referral
,Rate
,CarbonOffset
, andBrand
(closes #328)
v5.9.0
- Adds new beta billing functionality for ReferralCustomer users
addPaymentMethod
can add a pre-existing Stripe bank account or credit card to your EasyPost accountrefundByAmount
refunds your wallet by a dollar amountrefundByPaymentLog
refunds you wallet by a PaymentLog ID
v5.8.0
- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the
save
function