From d18c41308e3237eeff7d780c275731ff3e8d982c Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:27:43 -0600 Subject: [PATCH] feat: adds support for UspsShipAccount --- CHANGELOG.md | 3 ++- EasyPost/Constants.cs | 5 +++-- EasyPost/Models/API/CarrierAccountType.cs | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df3aed718..3893cb080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## Next Release -- Disposes of Luma service +- Adds support for `UspsShipAccount` +- Disposes of Luma service after use ## v7.2.0 (2025-06-18) diff --git a/EasyPost/Constants.cs b/EasyPost/Constants.cs index 6bad54bcf..986f8d4fb 100644 --- a/EasyPost/Constants.cs +++ b/EasyPost/Constants.cs @@ -128,12 +128,13 @@ public static class CarrierAccounts /// private static List CarrierTypesWithCustomCreateWorkflows => new() { + CarrierAccountType.AmazonShippingAccount.Name, CarrierAccountType.FedEx.Name, CarrierAccountType.FedExSmartPost.Name, CarrierAccountType.Ups.Name, CarrierAccountType.UpsMailInnovations.Name, CarrierAccountType.UpsSurePost.Name, - CarrierAccountType.AmazonShippingAccount.Name, + CarrierAccountType.UspsShipAccount.Name, }; internal static string DeriveCreateEndpoint(string carrierType) @@ -143,7 +144,7 @@ internal static string DeriveCreateEndpoint(string carrierType) var @switch = new SwitchCase { { new List { CarrierAccountType.FedEx.Name, CarrierAccountType.FedExSmartPost.Name }.Contains(carrierType), () => endpoint = CustomCreateEndpoint }, - { new List { CarrierAccountType.AmazonShippingAccount.Name, CarrierAccountType.Ups.Name, CarrierAccountType.UpsMailInnovations.Name, CarrierAccountType.UpsSurePost.Name, }.Contains(carrierType), () => endpoint = OauthCreateEndpoint }, + { new List { CarrierAccountType.AmazonShippingAccount.Name, CarrierAccountType.Ups.Name, CarrierAccountType.UpsMailInnovations.Name, CarrierAccountType.UpsSurePost.Name, CarrierAccountType.UspsShipAccount.Name, }.Contains(carrierType), () => endpoint = OauthCreateEndpoint }, { SwitchCaseScenario.Default, () => endpoint = StandardCreateEndpoint }, }; diff --git a/EasyPost/Models/API/CarrierAccountType.cs b/EasyPost/Models/API/CarrierAccountType.cs index 74be123cb..fae0988bf 100644 --- a/EasyPost/Models/API/CarrierAccountType.cs +++ b/EasyPost/Models/API/CarrierAccountType.cs @@ -38,6 +38,11 @@ public class CarrierAccountType : ValueEnum /// public static readonly CarrierAccountType AmazonShippingAccount = new CarrierAccountType(62, "AmazonShippingAccount"); + /// + /// Represents a USPS Ship carrier account. + /// + public static readonly CarrierAccountType UspsShipAccount = new CarrierAccountType(63, "UspsShipAccount"); + /// /// Initializes a new instance of the class. ///