Skip to content

Releases: EasyPost/easypost-csharp

v5.4.1

17 Aug 21:20
c5c302d
Compare
Choose a tag to compare

What's Changed

  • Fix incorrect JSON mapping for EasyPostEstimatedDeliveryDate
    • EasyPostEstimatedDeliveryDate is now a DateTime object rather than a string

Full Changelog: v5.4.0...v5.4.1

v5.4.0

14 Aug 21:38
9b25c14
Compare
Choose a tag to compare
  • Make the Id property of any EasyPostObject-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

v5.3.0

28 Jul 16:21
c86d36f
Compare
Choose a tag to compare
  • Maps 400 status codes to new BadRequestError class

v5.2.0

12 Jul 16:56
71dce09
Compare
Choose a tag to compare
  • Adds Hooks to introspect HTTP requests and responses (see HTTP Hooks section of README for more details)
  • Adds TaxIdExpirationDate to EasyPost.Models.API.Options for Shipment creation

v5.1.0

06 Jun 21:39
5b90c92
Compare
Choose a tag to compare
  • 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 now myClient.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

15 May 21:10
5e2919c
Compare
Choose a tag to compare

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 now myClient.Pickup.Buy(myPickup.Id).
  • Client constructor now takes a ClientConfiguration object rather than a list of parameters.
    • Client myClient = new Client("my_api_key"); is now Client myClient = new Client(new ClientConfiguration("my_api_key"));
  • Smartrate is now SmartRate
  • myClient.Clone functionality has been removed. Please construct a new Client object instead.
  • RestSharp dependency has been dropped entirely.
  • Renamed UnexpectedHttpError exception type to UnknownHttpError to better reflect its purpose.
  • Removed UnknownApiError exception type, consolidated into UnknownHttpError exception type.
  • ExternalApiError no longer inherits from ApiError (ApiError reserved for EasyPost API errors only).
  • All EasyPostError exceptions and subclasses now have a PrettyPrint 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.
  • 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.

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 now Parameters.Address)
  • 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 in v4.
  • All EasyPostClient-based classes, all EasyPostService-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 optional Parameters.Webhook.Update parameter (rather than required)
  • All aspects of the library have been documented with XML comments

v4.6.2

15 May 21:43
e532e25
Compare
Choose a tag to compare
  • Handle API timeout errors more gracefully (produce proper TimeoutError exception with readable messages)
  • Add missing Declaration parameter to Customs Info creation parameter set

v4.6.1

25 Apr 19:15
daf142e
Compare
Choose a tag to compare

This release contained incompatibility with RestSharp, please use v4.6.2 instead.

v4.6.0

18 Apr 21:40
1fc205b
Compare
Choose a tag to compare
  • Adds GetNextPage function to each service which retrieves the next page of a collection when the has_more key is present in the response (eg: Client.Address.GetNextPage(addressCollection))
  • Adds RetrieveCarrierMetadata via myClient.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

22 Mar 20:02
3210849
Compare
Choose a tag to compare
  • 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 to Tracker and TrackingDetail classes
  • Adds missing Fee property to Insurance class
  • Removes the Client property of a Collection