Skip to content

Commit 2a9dbe7

Browse files
authored
Merge pull request #630 from EasyPost/SHPE-445_uspsshipaccount
feat: adds support for UspsShipAccount
2 parents 0d8fd30 + d18c413 commit 2a9dbe7

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Next Release
44

5-
- Disposes of Luma service
5+
- Adds support for `UspsShipAccount`
6+
- Disposes of Luma service after use
67

78
## v7.2.0 (2025-06-18)
89

EasyPost/Constants.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,13 @@ public static class CarrierAccounts
128128
/// </summary>
129129
private static List<string> CarrierTypesWithCustomCreateWorkflows => new()
130130
{
131+
CarrierAccountType.AmazonShippingAccount.Name,
131132
CarrierAccountType.FedEx.Name,
132133
CarrierAccountType.FedExSmartPost.Name,
133134
CarrierAccountType.Ups.Name,
134135
CarrierAccountType.UpsMailInnovations.Name,
135136
CarrierAccountType.UpsSurePost.Name,
136-
CarrierAccountType.AmazonShippingAccount.Name,
137+
CarrierAccountType.UspsShipAccount.Name,
137138
};
138139

139140
internal static string DeriveCreateEndpoint(string carrierType)
@@ -143,7 +144,7 @@ internal static string DeriveCreateEndpoint(string carrierType)
143144
var @switch = new SwitchCase
144145
{
145146
{ new List<string> { CarrierAccountType.FedEx.Name, CarrierAccountType.FedExSmartPost.Name }.Contains(carrierType), () => endpoint = CustomCreateEndpoint },
146-
{ new List<string> { CarrierAccountType.AmazonShippingAccount.Name, CarrierAccountType.Ups.Name, CarrierAccountType.UpsMailInnovations.Name, CarrierAccountType.UpsSurePost.Name, }.Contains(carrierType), () => endpoint = OauthCreateEndpoint },
147+
{ new List<string> { CarrierAccountType.AmazonShippingAccount.Name, CarrierAccountType.Ups.Name, CarrierAccountType.UpsMailInnovations.Name, CarrierAccountType.UpsSurePost.Name, CarrierAccountType.UspsShipAccount.Name, }.Contains(carrierType), () => endpoint = OauthCreateEndpoint },
147148
{ SwitchCaseScenario.Default, () => endpoint = StandardCreateEndpoint },
148149
};
149150

EasyPost/Models/API/CarrierAccountType.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public class CarrierAccountType : ValueEnum
3838
/// </summary>
3939
public static readonly CarrierAccountType AmazonShippingAccount = new CarrierAccountType(62, "AmazonShippingAccount");
4040

41+
/// <summary>
42+
/// Represents a USPS Ship carrier account.
43+
/// </summary>
44+
public static readonly CarrierAccountType UspsShipAccount = new CarrierAccountType(63, "UspsShipAccount");
45+
4146
/// <summary>
4247
/// Initializes a new instance of the <see cref="CarrierAccountType"/> class.
4348
/// </summary>

0 commit comments

Comments
 (0)