Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/OrderCloud.SDK.Tests/OrderCloud.SDK.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="NUnit" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageReference Include="NUnit" Version="4.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/OrderCloud.SDK.Tests/SdkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public void http_error_auth_exception_handled() {

httpTest.RespondWith("<>", 502); // auth response with 500 level error code with response that could cause stackoverflow exception if it gets deserialized

AsyncTestDelegate del = async () => await GetClient().Me.GetAsync(); // Will ThrowAuthExceptionAsync
Func<Task> del = async () => await GetClient().Me.GetAsync(); // Will ThrowAuthExceptionAsync

var response = Assert.ThrowsAsync<OrderCloudException>(del);
Assert.NotNull(response);
Expand All @@ -319,7 +319,7 @@ public void http_error_api_exception_handled() {
httpTest.RespondWith("{}"); // auth response
httpTest.RespondWith("<>", 504); // api response that could cause stackoverflow exception if it gets deserialized

AsyncTestDelegate del = async () => await GetClient().Me.GetAsync(); //Will ThrowApiExceptionAsync
Func<Task> del = async () => await GetClient().Me.GetAsync(); //Will ThrowApiExceptionAsync

var response = Assert.ThrowsAsync<OrderCloudException>(del);
Assert.NotNull(response);
Expand Down
40 changes: 40 additions & 0 deletions src/OrderCloud.SDK/Generated/ErrorCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ public static class BillingAddress
/// <summary>Cannot PATCH a billing address that was set by ID. Either PATCH the saved address at /addresses/{{id}}, or PUT a complete address at /billto.</summary>
public const string CannotPatchSetByID = "BillingAddress.CannotPatchSetByID";
}
public static class Bulk
{
/// <summary>Product not found.</summary>
public const string ProductNotFound = "Bulk.ProductNotFound";
/// <summary>Variant not found.</summary>
public const string VariantNotFound = "Bulk.VariantNotFound";
/// <summary>InventoryRecordNotFound not found.</summary>
public const string InventoryRecordNotFound = "Bulk.InventoryRecordNotFound";
/// <summary>Product.Inventory must be configured.</summary>
public const string InventoryNotConfigured = "Bulk.InventoryNotConfigured";
/// <summary>VariantID is required when Product.Inventory.VariantLevelTracking is true.</summary>
public const string VariantIDRequired = "Bulk.VariantIDRequired";
/// <summary>VariantID is not allowed when Product.Inventory.VariantLevelTracking is false.</summary>
public const string VariantIDNotAllowed = "Bulk.VariantIDNotAllowed";
}
public static class Bundle
{
/// <summary>Cannot assign a product to a bundle with a different OwnerID.</summary>
Expand Down Expand Up @@ -182,6 +197,11 @@ public static class DeliveryConfig
/// <summary>The requested synchronization cannot be performed because the associated delivery configuration is disabled.</summary>
public const string ConfigurationDisabled = "DeliveryConfig.ConfigurationDisabled";
}
public static class Discount
{
/// <summary>CategoryID requires a corresponding CatalogID.</summary>
public const string CategoryRequiresCatalog = "Discount.CategoryRequiresCatalog";
}
public static class EntitySyncConfig
{
/// <summary>Only one entity sync per entity type can be configured for a marketplace.</summary>
Expand Down Expand Up @@ -422,6 +442,12 @@ public static class Order
public const string CannotMixSubmittedAndUnsubmitted = "Order.CannotMixSubmittedAndUnsubmitted";
/// <summary>Order status must be Unsubmitted or Awaiting Approval to apply a promotion.</summary>
public const string CannotApplyPromoBadStatus = "Order.CannotApplyPromoBadStatus";
/// <summary>Cannot repeat an order placed by a different user.</summary>
public const string CannotRepeatOtherUsersOrder = "Order.CannotRepeatOtherUsersOrder";
/// <summary>Order must be in a submitted state to repeat.</summary>
public const string MustBeSubmittedToRepeat = "Order.MustBeSubmittedToRepeat";
/// <summary>None of the original order's line items are currently available.</summary>
public const string RepeatNoAvailableItems = "Order.RepeatNoAvailableItems";
}
public static class OrderReturn
{
Expand Down Expand Up @@ -644,6 +670,10 @@ public static class ProductSyncConfig
public const string OnlyOneConfigPerMarketplace = "ProductSyncConfig.OnlyOneConfigPerMarketplace";
/// <summary>The requested operation is not available because an administrative lock has been placed on product synchronization for this marketplace. Please contact support.</summary>
public const string AdminLockout = "ProductSyncConfig.AdminLockout";
/// <summary>Must specify between 1 and 5 catalogs for product synchronization.</summary>
public const string InvalidCatalogCount = "ProductSyncConfig.InvalidCatalogCount";
/// <summary>Category filtering is only supported when synchronizing a single catalog.</summary>
public const string CategoryFilterRequiresSingleCatalog = "ProductSyncConfig.CategoryFilterRequiresSingleCatalog";
}
public static class Promotion
{
Expand Down Expand Up @@ -681,6 +711,14 @@ public static class Promotion
public const string ValueExpressionCanBeNullIfUseIntegration = "Promotion.ValueExpressionCanBeNullIfUseIntegration";
/// <summary>UseIntegration must be false if ValueExpression is not null.</summary>
public const string UseIntegrationMustBeFalse = "Promotion.UseIntegrationMustBeFalse";
/// <summary>GeneratedCodeCount cannot be greater than 0 when Code is set.</summary>
public const string CannotGenerateCodesWithCode = "Promotion.CannotGenerateCodesWithCode";
/// <summary>GeneratedCodeCount cannot be greater than 0 when AutoApply is true.</summary>
public const string CannotGenerateCodesForAutoApply = "Promotion.CannotGenerateCodesForAutoApply";
/// <summary>Code is required when GeneratedCodeCount is 0.</summary>
public const string CodeRequired = "Promotion.CodeRequired";
/// <summary>GeneratedCodeLength is required when GeneratedCodeCount is greater than 0.</summary>
public const string GeneratedCodeLengthRequired = "Promotion.GeneratedCodeLengthRequired";
}
public static class PromotionIntegration
{
Expand Down Expand Up @@ -779,6 +817,8 @@ public static class Synchronize
{
/// <summary>EntitySync for AdminUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForAdminUsersNotEnabled = "Synchronize.EntitySyncForAdminUsersNotEnabled";
/// <summary>EntitySync for Catalogs is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForCatalogNotEnabled = "Synchronize.EntitySyncForCatalogNotEnabled";
/// <summary>EntitySync for Categories is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForCategoryNotEnabled = "Synchronize.EntitySyncForCategoryNotEnabled";
/// <summary>EntitySync for Buyer is not configured or the delivery configuration is disabled.</summary>
Expand Down
Loading
Loading