Releases: EasyPost/easypost-csharp
Releases · EasyPost/easypost-csharp
v5.4.1
What's Changed
- Fix incorrect JSON mapping for
EasyPostEstimatedDeliveryDate
EasyPostEstimatedDeliveryDate
is now aDateTime
object rather than astring
Full Changelog: v5.4.0...v5.4.1
v5.4.0
v5.3.0
v5.2.0
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