Releases: EasyPost/easypost-csharp
Releases · EasyPost/easypost-csharp
v5.1.0
- 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.
v5.0.0
This is a major version bump with a significant number of breaking changes. Please reference our Upgrade Guide for details about the changes.
With this release, v4
of the client library is now deprecated.
Breaking Changes
- 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
New Features
- 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.
Miscellaneous
- 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
v4.6.2
v4.6.1
This release contained incompatibility with RestSharp, please use v4.6.2
instead.
v4.6.0
- 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
v4.5.0
- 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
v4.4.0
- 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)
v4.3.0
- Added payload functions
RetrieveAllPayloadsForEvent
andRetrievePayloadForEvent
methods, accessible viamyClient.Event
service. - Added function to retrieve all pickups via
myClient.Pickup.All()
v4.2.0
- 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
v4.1.0
- 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