diff --git a/src/OrderCloud.SDK.Tests/OrderCloud.SDK.Tests.csproj b/src/OrderCloud.SDK.Tests/OrderCloud.SDK.Tests.csproj
index 0fb8290..61f1b69 100644
--- a/src/OrderCloud.SDK.Tests/OrderCloud.SDK.Tests.csproj
+++ b/src/OrderCloud.SDK.Tests/OrderCloud.SDK.Tests.csproj
@@ -15,9 +15,9 @@
-
-
-
+
+
+
diff --git a/src/OrderCloud.SDK.Tests/SdkTests.cs b/src/OrderCloud.SDK.Tests/SdkTests.cs
index 4e108b6..13dce07 100644
--- a/src/OrderCloud.SDK.Tests/SdkTests.cs
+++ b/src/OrderCloud.SDK.Tests/SdkTests.cs
@@ -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 del = async () => await GetClient().Me.GetAsync(); // Will ThrowAuthExceptionAsync
var response = Assert.ThrowsAsync(del);
Assert.NotNull(response);
@@ -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 del = async () => await GetClient().Me.GetAsync(); //Will ThrowApiExceptionAsync
var response = Assert.ThrowsAsync(del);
Assert.NotNull(response);
diff --git a/src/OrderCloud.SDK/Generated/ErrorCodes.cs b/src/OrderCloud.SDK/Generated/ErrorCodes.cs
index d48425e..60516a2 100644
--- a/src/OrderCloud.SDK/Generated/ErrorCodes.cs
+++ b/src/OrderCloud.SDK/Generated/ErrorCodes.cs
@@ -106,6 +106,21 @@ public static class BillingAddress
/// 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.
public const string CannotPatchSetByID = "BillingAddress.CannotPatchSetByID";
}
+ public static class Bulk
+ {
+ /// Product not found.
+ public const string ProductNotFound = "Bulk.ProductNotFound";
+ /// Variant not found.
+ public const string VariantNotFound = "Bulk.VariantNotFound";
+ /// InventoryRecordNotFound not found.
+ public const string InventoryRecordNotFound = "Bulk.InventoryRecordNotFound";
+ /// Product.Inventory must be configured.
+ public const string InventoryNotConfigured = "Bulk.InventoryNotConfigured";
+ /// VariantID is required when Product.Inventory.VariantLevelTracking is true.
+ public const string VariantIDRequired = "Bulk.VariantIDRequired";
+ /// VariantID is not allowed when Product.Inventory.VariantLevelTracking is false.
+ public const string VariantIDNotAllowed = "Bulk.VariantIDNotAllowed";
+ }
public static class Bundle
{
/// Cannot assign a product to a bundle with a different OwnerID.
@@ -182,6 +197,11 @@ public static class DeliveryConfig
/// The requested synchronization cannot be performed because the associated delivery configuration is disabled.
public const string ConfigurationDisabled = "DeliveryConfig.ConfigurationDisabled";
}
+ public static class Discount
+ {
+ /// CategoryID requires a corresponding CatalogID.
+ public const string CategoryRequiresCatalog = "Discount.CategoryRequiresCatalog";
+ }
public static class EntitySyncConfig
{
/// Only one entity sync per entity type can be configured for a marketplace.
@@ -422,6 +442,12 @@ public static class Order
public const string CannotMixSubmittedAndUnsubmitted = "Order.CannotMixSubmittedAndUnsubmitted";
/// Order status must be Unsubmitted or Awaiting Approval to apply a promotion.
public const string CannotApplyPromoBadStatus = "Order.CannotApplyPromoBadStatus";
+ /// Cannot repeat an order placed by a different user.
+ public const string CannotRepeatOtherUsersOrder = "Order.CannotRepeatOtherUsersOrder";
+ /// Order must be in a submitted state to repeat.
+ public const string MustBeSubmittedToRepeat = "Order.MustBeSubmittedToRepeat";
+ /// None of the original order's line items are currently available.
+ public const string RepeatNoAvailableItems = "Order.RepeatNoAvailableItems";
}
public static class OrderReturn
{
@@ -644,6 +670,10 @@ public static class ProductSyncConfig
public const string OnlyOneConfigPerMarketplace = "ProductSyncConfig.OnlyOneConfigPerMarketplace";
/// The requested operation is not available because an administrative lock has been placed on product synchronization for this marketplace. Please contact support.
public const string AdminLockout = "ProductSyncConfig.AdminLockout";
+ /// Must specify between 1 and 5 catalogs for product synchronization.
+ public const string InvalidCatalogCount = "ProductSyncConfig.InvalidCatalogCount";
+ /// Category filtering is only supported when synchronizing a single catalog.
+ public const string CategoryFilterRequiresSingleCatalog = "ProductSyncConfig.CategoryFilterRequiresSingleCatalog";
}
public static class Promotion
{
@@ -681,6 +711,14 @@ public static class Promotion
public const string ValueExpressionCanBeNullIfUseIntegration = "Promotion.ValueExpressionCanBeNullIfUseIntegration";
/// UseIntegration must be false if ValueExpression is not null.
public const string UseIntegrationMustBeFalse = "Promotion.UseIntegrationMustBeFalse";
+ /// GeneratedCodeCount cannot be greater than 0 when Code is set.
+ public const string CannotGenerateCodesWithCode = "Promotion.CannotGenerateCodesWithCode";
+ /// GeneratedCodeCount cannot be greater than 0 when AutoApply is true.
+ public const string CannotGenerateCodesForAutoApply = "Promotion.CannotGenerateCodesForAutoApply";
+ /// Code is required when GeneratedCodeCount is 0.
+ public const string CodeRequired = "Promotion.CodeRequired";
+ /// GeneratedCodeLength is required when GeneratedCodeCount is greater than 0.
+ public const string GeneratedCodeLengthRequired = "Promotion.GeneratedCodeLengthRequired";
}
public static class PromotionIntegration
{
@@ -779,6 +817,8 @@ public static class Synchronize
{
/// EntitySync for AdminUsers is not configured or the delivery configuration is disabled.
public const string EntitySyncForAdminUsersNotEnabled = "Synchronize.EntitySyncForAdminUsersNotEnabled";
+ /// EntitySync for Catalogs is not configured or the delivery configuration is disabled.
+ public const string EntitySyncForCatalogNotEnabled = "Synchronize.EntitySyncForCatalogNotEnabled";
/// EntitySync for Categories is not configured or the delivery configuration is disabled.
public const string EntitySyncForCategoryNotEnabled = "Synchronize.EntitySyncForCategoryNotEnabled";
/// EntitySync for Buyer is not configured or the delivery configuration is disabled.
diff --git a/src/OrderCloud.SDK/Generated/Models.cs b/src/OrderCloud.SDK/Generated/Models.cs
index 2d31553..ba700fc 100644
--- a/src/OrderCloud.SDK/Generated/Models.cs
+++ b/src/OrderCloud.SDK/Generated/Models.cs
@@ -5,7 +5,7 @@
namespace OrderCloud.SDK
{
public enum AccessLevel { Private, Public, Shareable }
- public enum ApiRole { ApiClientAdmin, ApiClientReader, AddressAdmin, AddressReader, AdminAddressAdmin, AdminAddressReader, AdminUserAdmin, AdminUserGroupAdmin, AdminUserGroupReader, AdminUserReader, ApprovalRuleAdmin, ApprovalRuleReader, BundleAdmin, BundleAssignmentAdmin, BundleReader, BuyerAdmin, BuyerImpersonation, BuyerReader, BuyerUserAdmin, BuyerUserReader, CatalogAdmin, CatalogReader, CategoryAdmin, CategoryReader, CostCenterAdmin, CostCenterReader, CreditCardAdmin, CreditCardReader, EntitySyncConfigAdmin, FullAccess, IncrementorAdmin, IncrementorReader, LocaleReader, LocaleAdmin, MeAddressAdmin, MeAdmin, MeCreditCardAdmin, MessageConfigAssignmentAdmin, MeSubscriptionAdmin, MeXpAdmin, OrderAdmin, OrderReader, OverrideShipping, OverrideTax, OverrideUnitPrice, PasswordReset, PriceScheduleAdmin, PriceScheduleReader, ProductAdmin, ProductAssignmentAdmin, ProductCollectionReader, ProductFacetAdmin, ProductFacetReader, ProductReader, ProductSyncConfigAdmin, PromotionAdmin, PromotionReader, SecurityProfileAdmin, SecurityProfileReader, SetSecurityProfile, ShipmentAdmin, ShipmentReader, Shopper, SpendingAccountAdmin, SpendingAccountReader, SubscriptionAdmin, SubscriptionReader, SupplierAddressAdmin, SupplierAddressReader, SupplierAdmin, SupplierReader, SupplierUserAdmin, SupplierUserGroupAdmin, SupplierUserGroupReader, SupplierUserReader, UnsubmittedOrderReader, UserGroupAdmin, UserGroupReader, OpenIDConnectReader, OpenIDConnectAdmin, MessageSenderReader, MessageSenderAdmin, XpIndexAdmin, WebhookReader, WebhookAdmin, IntegrationEventReader, IntegrationEventAdmin, TrackingEventReader, TrackingEventAdmin, DeliveryConfigAdmin, OrderSyncConfigAdmin, ErrorConfigAdmin }
+ public enum ApiRole { ApiClientAdmin, ApiClientReader, AddressAdmin, AddressReader, AdminAddressAdmin, AdminAddressReader, AdminUserAdmin, AdminUserGroupAdmin, AdminUserGroupReader, AdminUserReader, ApprovalRuleAdmin, ApprovalRuleReader, BulkReader, BundleAdmin, BundleAssignmentAdmin, BundleReader, BuyerAdmin, BuyerImpersonation, BuyerReader, BuyerUserAdmin, BuyerUserReader, CatalogAdmin, CatalogReader, CategoryAdmin, CategoryReader, CostCenterAdmin, CostCenterReader, CreditCardAdmin, CreditCardReader, EntitySyncConfigAdmin, FullAccess, IncrementorAdmin, IncrementorReader, LocaleReader, LocaleAdmin, MeAddressAdmin, MeAdmin, MeCreditCardAdmin, MessageConfigAssignmentAdmin, MeSubscriptionAdmin, MeXpAdmin, OrderAdmin, OrderReader, OverrideShipping, OverrideTax, OverrideUnitPrice, PasswordReset, PriceScheduleAdmin, PriceScheduleReader, ProductAdmin, ProductAssignmentAdmin, ProductCollectionReader, ProductFacetAdmin, ProductFacetReader, ProductReader, ProductSyncConfigAdmin, PromotionAdmin, PromotionReader, SecurityProfileAdmin, SecurityProfileReader, SetSecurityProfile, ShipmentAdmin, ShipmentReader, Shopper, SpendingAccountAdmin, SpendingAccountReader, SubscriptionAdmin, SubscriptionReader, SupplierAddressAdmin, SupplierAddressReader, SupplierAdmin, SupplierReader, SupplierUserAdmin, SupplierUserGroupAdmin, SupplierUserGroupReader, SupplierUserReader, UnsubmittedOrderReader, UserGroupAdmin, UserGroupReader, OpenIDConnectReader, OpenIDConnectAdmin, MessageSenderReader, MessageSenderAdmin, XpIndexAdmin, WebhookReader, WebhookAdmin, IntegrationEventReader, IntegrationEventAdmin, TrackingEventReader, TrackingEventAdmin, DeliveryConfigAdmin, OrderSyncConfigAdmin, ErrorConfigAdmin }
public enum ApprovalStatus { Pending, Approved, Declined }
public enum ApprovalType { Order, OrderReturn }
public enum CommerceRole { Buyer, Seller, Supplier }
@@ -47,8 +47,7 @@ public class AddedPromo : OrderCloudModel
public string ID { get => GetProp("ID"); set => SetProp("ID", value); }
/// If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.
public bool LineItemLevel { get => GetProp("LineItemLevel"); set => SetProp("LineItemLevel", value); }
- /// Must be unique. Entered by buyer when adding promo to order.
- [Required]
+ /// Must be unique within a marketplace. Entered by buyer when adding promo to order. Required when GeneratedCodeCount is 0.
public string Code { get => GetProp("Code"); set => SetProp("Code", value); }
/// Name of the added promo. Max length 100 characters. Searchable: priority level 2. Sortable: priority level 1.
public string Name { get => GetProp("Name"); set => SetProp("Name", value); }
@@ -92,6 +91,12 @@ public class AddedPromo : OrderCloudModel
public bool UseIntegration { get => GetProp("UseIntegration"); set => SetProp("UseIntegration", value); }
/// Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.
public int? Priority { get => GetProp("Priority"); set => SetProp("Priority", value); }
+ /// Features in beta are subject to change and are not available in production. Number of platform-generated single-use codes for this promotion. Mutually exclusive with Code.
+ public int GeneratedCodeCount { get => GetProp("GeneratedCodeCount"); set => SetProp("GeneratedCodeCount", value); }
+ /// Features in beta are subject to change and are not available in production. Character length of each generated code (excluding prefix). Required when GeneratedCodeCount > 0.
+ public int? GeneratedCodeLength { get => GetProp("GeneratedCodeLength"); set => SetProp("GeneratedCodeLength", value); }
+ /// Features in beta are subject to change and are not available in production. Optional prefix prepended to generated codes, separated by a dash.
+ public string GeneratedCodePrefix { get => GetProp("GeneratedCodePrefix"); set => SetProp("GeneratedCodePrefix", value); }
/// Container for extended (custom) properties of the added promo.
public dynamic xp { get => GetProp("xp", new ExpandoObject()); set => SetProp("xp", value); }
}
@@ -290,6 +295,15 @@ public class ApiClientSecretCreateResponse : OrderCloudModel
/// Expiration of the api client secret create response.
public DateTimeOffset? Expiration { get => GetProp("Expiration"); set => SetProp("Expiration", value); }
}
+ public class ApiError : OrderCloudModel
+ {
+ /// Error code of the api error.
+ public string ErrorCode { get => GetProp("ErrorCode"); set => SetProp("ErrorCode", value); }
+ /// Message of the api error.
+ public string Message { get => GetProp("Message"); set => SetProp("Message", value); }
+ /// Data of the api error.
+ public object Data { get => GetProp