Skip to content

Releases: EasyPost/easypost-csharp

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

v4.4.0

23 Feb 01:06
d62bb01
Compare
Choose a tag to compare
  • Added new beta RateService, accessible via myClient.Beta.Rate
  • Added RetrieveStatelessRate function under beta RateService to pull stateless rates when shipment data is provided
  • Added GetLowestStatelessRate function under Utilities.Rate to filter the lowest stateless rate
  • Added new GetLowest instance functions, callable on List<Rate>, List<Smartrate> and List<StatelessRate>, to
    filter the lowest rate
  • Deprecated rate and smartrate filtering methods in ShipmentService, RateService and Calculation.Rates namespaces, moved to Utilities.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

18 Jan 18:10
9461127
Compare
Choose a tag to compare
  • Added payload functions RetrieveAllPayloadsForEvent and RetrievePayloadForEvent methods, accessible via myClient.Event service.
  • Added function to retrieve all pickups via myClient.Pickup.All()

v4.2.0

11 Jan 17:25
d170f85
Compare
Choose a tag to compare
  • Added new beta billing functionality for referral customer users, accessible via myClient.Beta.Referral service
    • AddPaymentMethod to add an existing Stripe bank account or credit card to your EasyPost account
    • RefundByAmount refunds you wallet balance by a specified amount
    • RefundByPaymentLog refunds you wallet balance by a specified payment log
  • Added new DeliveryMaxDatetime Shipment option

v4.1.0

07 Dec 18:12
a6b3c75
Compare
Choose a tag to compare
  • 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 in EasyPost.Constants instead of EasyPost.Exceptions.Constants
  • Fixed a typo in /charges endpoint that was causing bank and credit card charge requests to fail