diff --git a/CHANGELOG.md b/CHANGELOG.md index 09a364a5..937e17ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next Release - Fix pagination parameters for `GetNextPageOfChildren` function for User service +- Add `Surcharges` property to `Rate` class ## v6.7.0 (2024-07-24) diff --git a/EasyPost/Models/API/Beta/StatelessRate.cs b/EasyPost/Models/API/Beta/StatelessRate.cs index b4a57ffe..271cc574 100644 --- a/EasyPost/Models/API/Beta/StatelessRate.cs +++ b/EasyPost/Models/API/Beta/StatelessRate.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using EasyPost._base; using Newtonsoft.Json; @@ -105,6 +106,12 @@ public class StatelessRate : EphemeralEasyPostObject [JsonProperty("shipment_id")] public string? ShipmentId { get; set; } + /// + /// The list of s for this rate. + /// + [JsonProperty("surcharges")] + public List? Surcharges { get; set; } + #endregion } } diff --git a/EasyPost/Models/API/Rate.cs b/EasyPost/Models/API/Rate.cs index cab518e7..8bd8ce88 100644 --- a/EasyPost/Models/API/Rate.cs +++ b/EasyPost/Models/API/Rate.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using EasyPost._base; using Newtonsoft.Json; @@ -104,8 +105,13 @@ public class Rate : EasyPostObject [JsonProperty("shipment_id")] public string? ShipmentId { get; set; } - #endregion + /// + /// The list of s for this rate. + /// + [JsonProperty("surcharges")] + public List? Surcharges { get; set; } + #endregion } } #pragma warning disable CA1724 // Naming conflicts with Parameters.Beta.Rate diff --git a/EasyPost/Models/API/Surcharge.cs b/EasyPost/Models/API/Surcharge.cs new file mode 100644 index 00000000..5d957543 --- /dev/null +++ b/EasyPost/Models/API/Surcharge.cs @@ -0,0 +1,45 @@ +using EasyPost._base; +using Newtonsoft.Json; + +namespace EasyPost.Models.API +{ + /// + /// Class representing a surcharge for a object. + /// + public class Surcharge : EphemeralEasyPostObject + { + #region JSON Properties + + /// + /// The type of surcharge. + /// + [JsonProperty("type")] + public string? Type { get; set; } + + /// + /// The amount of the surcharge. + /// + [JsonProperty("carrier")] + public string? Amount { get; set; } + + /// + /// The list amount of the surcharge. + /// + [JsonProperty("list_amount")] + public string? ListAmount { get; set; } + + /// + /// The retail amount of the surcharge. + /// + [JsonProperty("retail_amount")] + public string? RetailAmount { get; set; } + + /// + /// The currency for the surcharge. + /// + [JsonProperty("currency")] + public string? Currency { get; set; } + + #endregion + } +}