- Fixes HTTP query parameter serialization bug causing
TrackingCodes
to be ignored when listing trackers
- Removes the deprecated
CreateList
Tracker function as it is no longer available via API - Adds
TrackingCodes
optional parameter toTracker.All
parameter set for listing trackers - Adds
RestrictionComments
optional parameter toCustomsInfo.Create
parameter set and enforces usage ifRestrictionType
is not "none"
- Corrects all API documentation link references to point to their new locations
- Fix recursion during disposal causing stack overflow
- Fix inclusion of
Verify
andVerifyStrict
parameters when creating an Address as part of a larger object creation (e.g. Shipment, Order, etc.)
- Fix pagination parameters for
GetNextPageOfChildren
function for User service
- Add new
Claim
service for filing claims on EasyPost shipments and insurances
- Add new
SmartRate
service for interacting with the SmartRate API- New
RecommendShipDateForShipment
function to recommend ship date for a shipment based on a desired delivery date. - New
EstimateDeliveryDateForRoute
function to estimate delivery date based on a list of carriers, to/from ZIP codes and a planned ship date (no existing shipment required). - New
RecommendShipDateForRoute
function to to recommend ship date based on a list of carriers, to/from ZIP codes and a planned ship date (no existing shipment required). - New model classes as needed for JSON response to new API functions
- New
- Enforce one-or-other for
Shipment
andBatch
parameters inPickup.Create
parameter set - Add internal parameter dependency utility
- Fix
Shipment
parameter requirement forPickup.Create
parameter set
- Fix
Batch
object not allowed to be used in parameter sets due to missingIBatchParameter
inheritance
- Add missing parameters for
CustomsItem.Create
parameter set
- Add missing parameters for
Order.Create
parameter set
- Fix
CarrierFields
serialization bug causing carrier account operations to fail - Fix accessibility for
CreateFedExSmartPost
parameter set
- Add Refund function in insurance service for requesting a refund for standalone insurance.
- Fix payment method funding and deletion failures due to undetermined payment method type
- Fix
ToString
method forEasyPostObject
- andEphemeralEasyPostObject
-based objects to return object type and optional ID
- Fix serialization bug for carrier accounts parameter on
RetrieveStatelessRates
parameter set
- Mark some unused parameters for various
All
functions as obsolete- These will be removed in a later version. It is recommended to stop using these parameters immediately.
- Add
AllChildren
andGetNextPageOfChildren
functions toUser
service
- No changes since
v6.0.0-rc1
, see below.
- Drop support for .NET Core 3.1
- Add support for .NET 8.0
- Remove
carbon_offset
(CarbonOffset
) parameter from shipment creation and purchase flows- This parameter is no longer supported by the EasyPost API
- Remove
CarbonOffset
model - Remove
CreateAndBuy
method inBatch
service due to API deprecation - Add
Options
parameter for beta rates retrieval parameter set - Add ability to add custom options via
AddAdditionalOption
, in case an option is not explicitly supported - Beta
CarrierMetadata
service and classes removed. Please use the GACarrierMetadata
service and classes instead.
- Add
RetrieveApiKeysForUser
toApiKey
service
- Fix FedEx SmartPost carrier account creation not going to the correct endpoint
- Add missing optional
ReturnAddress
andBuyerAddress
parameters to Shipment creation parameter set
- Add ability to compare an EasyPost object to a parameter set object via
Matches
function- Users can define a custom
Matches
function on any parameter set class
- Users can define a custom
- Fix parameter set serialization that was causing issues when altering and reusing parameter sets
- Add custom parameter sets (
CreateFedEx
,CreateUps
) for carrier account creation API calls- Users required to use these parameter sets if creating a FedEx or UPS account
- Fix incorrect JSON mapping for
EasyPostEstimatedDeliveryDate
EasyPostEstimatedDeliveryDate
is now aDateTime
object rather than astring
- Make the
Id
property of anyEasyPostObject
-based object instance settable (previously, this was read-only)- This will allow users to make temporary references to existing objects in Parameter sets without having to retrieve the object from the API first
- Maps 400 status codes to new
BadRequestError
class
- Adds
Hooks
to introspect HTTP requests and responses (seeHTTP Hooks
section of README for more details) - Adds
TaxIdExpirationDate
toEasyPost.Models.API.Options
forShipment
creation
- Carrier Metadata is now in GA, accessible via
myClient.CarrierMetadata
myClient.Beta.CarrierMetadata
is now deprecated and will be removed in a future release- Method to retrieve carrier metadata has been renamed:
myClient.Beta.CarrierMetadata.RetrieveCarrierMetadata
is nowmyClient.CarrierMetadata.Retrieve
- Constructors for all response objects (e.g.
EasyPost.Models.API.Address
) are publicly available for end-users to construct their own objects for testing purposes.
- All API-calling functions on models have been moved to their respective services. For example,
myPickup.Buy()
is nowmyClient.Pickup.Buy(myPickup.Id)
. Client
constructor now takes aClientConfiguration
object rather than a list of parameters.Client myClient = new Client("my_api_key");
is nowClient myClient = new Client(new ClientConfiguration("my_api_key"));
Smartrate
is nowSmartRate
myClient.Clone
functionality has been removed. Please construct a newClient
object instead.- RestSharp dependency has been dropped entirely.
- Renamed
UnexpectedHttpError
exception type toUnknownHttpError
to better reflect its purpose. - Removed
UnknownApiError
exception type, consolidated intoUnknownHttpError
exception type. ExternalApiError
no longer inherits fromApiError
(ApiError
reserved for EasyPost API errors only).- All
EasyPostError
exceptions and subclasses now have aPrettyPrint
getter that returns a human-readable string representation of the error.- Previously, only
ApiError
exceptions had this. Now, all exceptions thrown by the library should have this.
- Previously, only
- Logic for calculating exception type to throw based on API error
- EasyPost API failures can trigger a variety of specific exceptions, all inheriting from
ApiError
. - Non-EasyPost API/HTTP failures will trigger an
ExternalApiError
exception.
- EasyPost API failures can trigger a variety of specific exceptions, all inheriting from
- Parameter sets are out of beta. Users can use access them via
EasyPost.Parameters
namespace.- Previous plural namespaces are now singular (eg:
Parameters.Addresses
is nowParameters.Address
)
- Previous plural namespaces are now singular (eg:
- All API-calling functions accept an optional
CancellationToken
parameter that can be used to cancel the request. - Reintroduce
GenerateForm
function for shipments that was accidentally removed inv4
. - All
EasyPostClient
-based classes, allEasyPostService
-based classes,ClientConfiguration
and internal request classes are now explicitly disposable.
- Add missing
Declaration
parameter to Customs Info creation parameter set - Handle API timeout errors more gracefully (produce proper
TimeoutError
exception with readable messages) myClient.Webhook.Update
function now has an optionalParameters.Webhook.Update
parameter (rather than required)- All aspects of the library have been documented with XML comments
- Adds
GetNextPage
function to each service which retrieves the next page of a collection when thehas_more
key is present in the response (eg:Client.Address.GetNextPage(addressCollection)
) - Adds
RetrieveCarrierMetadata
viamyClient.Beta.CarrierMetadata
- Fixes the type of
RequestBody
from Dictionary to String in Payload class - Fixes a deserialization bug when an error.message from the API was returned as an object instead of a string
- Adds new
Parameters
namespace and objects, allowing you to create the paramaters of any CRUD request without needing to build the dictionaries manually. See the README for more details - Adds missing
StatusDetail
property toTracker
andTrackingDetail
classes - Adds missing
Fee
property toInsurance
class - Removes the
Client
property of aCollection
- Added new beta
RateService
, accessible viamyClient.Beta.Rate
- Added
RetrieveStatelessRate
function under betaRateService
to pull stateless rates when shipment data is provided - Added
GetLowestStatelessRate
function underUtilities.Rate
to filter the lowest stateless rate - Added new
GetLowest
instance functions, callable onList<Rate>
,List<Smartrate>
andList<StatelessRate>
, to filter the lowest rate - Deprecated rate and smartrate filtering methods in
ShipmentService
,RateService
andCalculation.Rates
namespaces, moved toUtilities.Rate
namespace - Fixes Strong-Name signing that was unintentionally removed in v4.1.0 (this package is now strong-name signed once again)
- Added payload functions
RetrieveAllPayloadsForEvent
andRetrievePayloadForEvent
methods, accessible viamyClient.Event
service. - Added function to retrieve all pickups via
myClient.Pickup.All()
- Added new beta billing functionality for referral customer users, accessible via
myClient.Beta.Referral
serviceAddPaymentMethod
to add an existing Stripe bank account or credit card to your EasyPost accountRefundByAmount
refunds you wallet balance by a specified amountRefundByPaymentLog
refunds you wallet balance by a specified payment log
- Added new
DeliveryMaxDatetime
Shipment option
- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the
Create
function Constants
are now stored inEasyPost.Constants
instead ofEasyPost.Exceptions.Constants
- Fixed a typo in
/charges
endpoint that was causing bank and credit card charge requests to fail
- Fix bug where the temporary internal API key switch when adding a credit card to a referral user was not reverted after the request.
- After adding a credit card to a referral user, the existing Client would be misconfigured for following requests.
myInsurance.Refresh()
function HTTP method fixed fromPATCH
toGET
- This function has been marked as obsolete and will be removed in a future release
- Fix return type of
order.Buy()
when passing in a rate. Function will now return the updated order. - Fix bug where request time limits were not being copied to a cloned Client.
- Fix bug where hashcode of any
EasyPostObject
or subtype was not consistent.- Hashcode and equality now consider properties of the object, including Client. Different properties and/or different Clients will result in different hashcodes and objects will not be considered equal.
- Fix bug where the wrong
SmartrateAccuracy
would be chosenPercentile75
might accidentally have been chosen rather thanPercentile85
due to a bug in theSmartrateAccuracy
enum ID.
- Fix bug where some embedded elements (e.g. customs items) were not being created if included during a larger creation request (e.g. customs info create).
- Prevent users from attempting to buy a shipment with a
null
rate, avoiding aNullReferenceException
.
The v4.0.0
release includes all the changes from the release candidate (see v4.0.0-rc1
below) as well as the following items:
- Improved API error parsing
- API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string.
- Capture 1xx and 3xx HTTP status codes as errors
- Any known 3xx status code from the EasyPost API will throw a
RedirectError
exception - Any unknown 3xx status code will throw a
UnexpectedHttpError
exception - Any 1xx status code (known or unknown) will throw a
UnexpectedHttpError
exception
- Any known 3xx status code from the EasyPost API will throw a
- Library is now thread-safe
- Initialize a
Client
object with an API key - Static methods (i.e.
create
,retrieve
, retrieveall
of a resource) exist in services, accessed via property of the client (e.g.myClient.Address.Create()
) - Instance methods (i.e.
update
,delete
) accessed on instance of a resource (i.e.myShipment.Update()
)
- Initialize a
- All properties are now title-cased rather than snake-cased to match standard .NET naming conventions
- e.g.
myShipment.id
is nowmyShipment.Id
,myAddress.federal_tax_id
is nowmyAddress.FederalTaxId
,myTrackerCollection.has_more
is nowmyTrackerCollection.HasMore
- Some properties have been renamed to avoid naming conflicts:
Rate.rate
is nowRate.Price
Message.message
is nowMessage.Text
- e.g.
- All properties are now nullable
- Almost all properties will be assigned a value during JSON deserialization. This is mostly to address compiler warnings
- Users can proceed with the assumption that any given property will not be null
- Consistent exception handling
- All exceptions inherit from
EasyPostError
- API-related and HTTP-related exceptions will throw an
ApiError
or inherited-type exception - API exception types can be retrieved by HTTP status code via the
EasyPost.Exceptions.Constants
class (i.e. to anticipate what error will be thrown for a 404, etc.) - Common exception messages and templates can be found in the
EasyPost.Exceptions.Constants
class (i.e. for log parsing)
- All exceptions inherit from
- Source code files have been organized
- Most EasyPost-related objects (i.e.
Shipment
,Address
,Tracker
, etc.) are now in theEasyPost.Model.API
namespace
- Most EasyPost-related objects (i.e.
- Dependencies updated to latest versions, including
RestSharp
v108
- Under the hood improvements:
- Underlying
Request
-Client
-ClientConfiguration
relationship has been re-architected to allow for thread safety - Process of generating an API request has been standardized and simplified
- Improved accessibility levels of internal functions, to prevent accidental use by end users
- Files have been organized into a more logical structure
- Methods and properties have been organized (e.g. methods ordered by CRUD, properties ordered alphabetically)
- Underlying
- Adds missing
dropoff_max_datetime
andpickup_max_datetime
Shipment options
- Adds
end_shipper_id
shipment option - Adds support to pass an EndShipper ID when buying a shipment
- Add Partner 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
- Adds
ValidateWebhook
function - Adds
duty_payment
shipment option - Moves
EndShipper
out of beta to the general namespace
- 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
- Removes the unusable
carrier
param from theverify
function on an Address
- Adds ability to generate shipment forms via
GenerateForm
function
- Adds
DeletePaymentMethod
,FundWallet
, andRetrievePaymentMethods
functions - Adds
billing_type
attribute in CarrierAccount and Rate classes - Adds support for webhook secrets
- Collect OS details in User-Agent header
- Update functions now use
patch
instead ofput
under the hood to better match the API behavior and documentation. Behavior of these functions should remain the same
- Adds the
EndShipper
class with the ability to create, retrieve, and update EndShipper objects - Requests will now fail fast with an error if an API key is not provided instead of making a live API call with no key.
Upgrading major versions of this project? Refer to the Upgrade Guide.
- Dropped explicit support for .NET Framework, replaced with .NET Standard 2.0
- Upgrades RestSharp from v106 to v107
- Project was built with C# 8.0
- Project is now entirely asynchronous which will require the addition of async/await on function calls
- Renames methods from
List()
toAll()
to make our library consistent (previously we had methods calling the/all
endpoint with both names) - Removes the unusable
Rating
class - Removes
shipment.GetRates()
method since the shipment object already has rates. If you need to get new rates for a shipment, please use theshipment.RegenerateRates()
method. - Must use
verify
andverify_strict
parameters to verify addresses during creation, per our API docs;verification
andstrict_verification
will no longer work - Clarify XList vs XCollection distinction:
ReportList
,ScanFormList
,ShipmentList
andTrackerList
renamed toReportCollection
,ScanFormCollection
,ShipmentCollection
andTrackerCollection
to match the other names throughout the project
- Functions previously called
Destroy
are now calledDelete
for consistency (eg: deleting a carrier account) - Removes non-static
Create()
functions onAddress
,Order
,Pickup
andShipment
classes for Visual Basic compatibility.
- Adds explicit support for .NET 5.0 & 6.0
- Adds F# & Visual Basic compatibility
- Adds
RetrieveMe()
which retrieves the authenticated user without the need to pass an ID - Adds missing
billing_ref
anddropoff_type
Shipment options - Adds comprehensive test suite for .NET/.NET Core
- Adds
declaration
attribute toCustomsInfo
class - Adds missing
id
property to theBrand
class - Adds option to pass in a custom
HttpClient
to the Client constructor (.NET/.NET Core only) - Adds
CreateAndBuy
function to the Batch class
- Fixes bug where
AddressCollection
was storingBatch
objects rather thanAddress
objects - Fixes Address creation respecting
verify
andverify_strict
parameters - Fixes a bug where Pickup error messages were not deserializing properly
- Repackaged the project which contains all the changes made from
2.6.0
-2.8.0
(see details below) - Added .NET Core 3.1 to the released package (was previously built but not included starting in
2.6.0
)
This release includes changes intended for v2.8.0
- Adds the missing Insurance object and associated actions (closes #47)
- Adds support for updating a user's brand
- Adds support to one-call buy shipments and orders via the
service
key - Adds support for retrieving all Batch objects
- Adds support for retrieving all Address objects
- Adds support for retrieving all Event objects
- Adds support to regenerate Shipment rates via the
RegenerateRates
method - Adds support for creating trackers in bulk via the
CreateList
Tracker method - Removes the unused
orderBy
parameter from theBatch
object - Update the
DefaultApiBase
to includev2
and removev2
from every request url string - Adds the .NET version in use to the User-Agent header
- Add a 30 second connection timeout and a 60 second request timeout for all HTTP requests
- Lints the entire project and adds/updates docstrings throughout
- Fixes the test suite for the project making it runnable once again
This release includes changes intended for v2.7.0
- Adds support for tax identifiers (PR #181)
This release includes changes intended for v2.6.0 & v2.6.1
- Adds missing
commercial_invoice_letterhead
option (closes #142) - Adds missing
license_number
option - Adds missing
receiver_liquor_license
option - Adds missing
VerificationDetails
object (closes #140, #141, #162) - Changes the Client delegate constructor from
internal
topublic
- Updates various information in the README related to thread-safety, examples, releasing, etc
- Adds all missing dates and versions to the CHANGELOG
- Bumps RestSharp from 106.4.2 to 106.13.0
- Adds support for .NET Core 3.1
- Includes SmartRate handling.
- Updated Code Signing Identity.
This release was mispackaged, please use v2.8.1
or newer.
This release was mispackaged, please use v2.8.1
or newer.
This release was mispackaged, please use v2.8.1
or newer.
- Add restricted delivery shipment option
- Correct certified mail type
- Add certified mail, registered mail, and return receipt shipment options
- Added suppress etd option
- Added overlabel shipment options