Releases: EasyPost/easypost-csharp
Releases · EasyPost/easypost-csharp
v5.4.1
What's Changed
- Fix incorrect JSON mapping for
EasyPostEstimatedDeliveryDateEasyPostEstimatedDeliveryDateis now aDateTimeobject 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.CarrierMetadatamyClient.Beta.CarrierMetadatais now deprecated and will be removed in a future release- Method to retrieve carrier metadata has been renamed:
myClient.Beta.CarrierMetadata.RetrieveCarrierMetadatais 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). Clientconstructor now takes aClientConfigurationobject rather than a list of parameters.Client myClient = new Client("my_api_key");is nowClient myClient = new Client(new ClientConfiguration("my_api_key"));
Smartrateis nowSmartRatemyClient.Clonefunctionality has been removed. Please construct a newClientobject instead.- RestSharp dependency has been dropped entirely.
- Renamed
UnexpectedHttpErrorexception type toUnknownHttpErrorto better reflect its purpose. - Removed
UnknownApiErrorexception type, consolidated intoUnknownHttpErrorexception type. ExternalApiErrorno longer inherits fromApiError(ApiErrorreserved for EasyPost API errors only).- All
EasyPostErrorexceptions and subclasses now have aPrettyPrintgetter that returns a human-readable string representation of the error.- Previously, only
ApiErrorexceptions 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
ExternalApiErrorexception.
- 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.Parametersnamespace.- Previous plural namespaces are now singular (eg:
Parameters.Addressesis nowParameters.Address)
- Previous plural namespaces are now singular (eg:
- All API-calling functions accept an optional
CancellationTokenparameter that can be used to cancel the request. - Reintroduce
GenerateFormfunction for shipments that was accidentally removed inv4. - All
EasyPostClient-based classes, allEasyPostService-based classes,ClientConfigurationand internal request classes are now explicitly disposable.
Miscellaneous
- Add missing
Declarationparameter to Customs Info creation parameter set - Handle API timeout errors more gracefully (produce proper
TimeoutErrorexception with readable messages) myClient.Webhook.Updatefunction now has an optionalParameters.Webhook.Updateparameter (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
GetNextPagefunction to each service which retrieves the next page of a collection when thehas_morekey is present in the response (eg:Client.Address.GetNextPage(addressCollection)) - Adds
RetrieveCarrierMetadataviamyClient.Beta.CarrierMetadata - Fixes the type of
RequestBodyfrom 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
Parametersnamespace 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
StatusDetailproperty toTrackerandTrackingDetailclasses - Adds missing
Feeproperty toInsuranceclass - Removes the
Clientproperty of aCollection