Skip to content

Commit 50ba816

Browse files
authored
Merge pull request #132 from ordercloud-api/dev
Updates for latest api version
2 parents 53eec44 + 4884893 commit 50ba816

5 files changed

Lines changed: 196 additions & 55 deletions

File tree

src/OrderCloud.SDK/Generated/ErrorCodes.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,31 @@ public static class Promotion
612612
public const string CannotSetQuantityLimitPerOrder = "Promotion.CannotSetQuantityLimitPerOrder";
613613
/// <summary>QuantityLimitPerOrder is not supported in conjuction with ItemLimitPerOrder.</summary>
614614
public const string CannotSetQuantityAndItemLimitPerOrder = "Promotion.CannotSetQuantityAndItemLimitPerOrder";
615-
/// <summary>LineItemLevel must be true and ItemLimitPerOrder or QuantityLimitPerOrder must have a value in order to use ItemSortBy.</summary>
615+
/// <summary>LineItemLevel must be true and ItemLimitPerOrder must have a value in order to use ItemSortBy.</summary>
616616
public const string CannotSetItemSortBy = "Promotion.CannotSetItemSortBy";
617+
/// <summary>Either set a ValueExpression, or define ValidatePromotion event for your client.</summary>
618+
public const string ValueExpressionCannotBeNull = "Promotion.ValueExpressionCannotBeNull";
619+
/// <summary>ValueExpression can be null only if UseIntegration is true.</summary>
620+
public const string ValueExpressionCanBeNullIfUseIntegration = "Promotion.ValueExpressionCanBeNullIfUseIntegration";
621+
/// <summary>UseIntegration must be false if ValueExpression is not null.</summary>
622+
public const string UseIntegrationMustBeFalse = "Promotion.UseIntegrationMustBeFalse";
623+
}
624+
public static class PromotionIntegration
625+
{
626+
/// <summary>Failed to evaluate integration promotion.</summary>
627+
public const string FailedToEvaluate = "PromotionIntegration.FailedToEvaluate";
628+
/// <summary>Promotion integration returned the error.</summary>
629+
public const string EvaluationErrorReturned = "PromotionIntegration.EvaluationErrorReturned";
630+
/// <summary>Cannot delete a promotion integration if promotions exist where ValueExpression = null.</summary>
631+
public const string CannotDeletePromotionIntegration = "PromotionIntegration.CannotDeletePromotionIntegration";
632+
/// <summary>PromotionID in the response does not match any PromosRequested ID in the Promotion Integration payload.</summary>
633+
public const string PromotionIDMismatch = "PromotionIntegration.PromotionIDMismatch";
634+
/// <summary>LineItemId is required for LineItemLevel promotion.</summary>
635+
public const string LineItemIdRequired = "PromotionIntegration.LineItemIdRequired";
636+
/// <summary>LineItemId must be null for not LineItemLevel promotion.</summary>
637+
public const string LineItemIdMustBeNull = "PromotionIntegration.LineItemIdMustBeNull";
638+
/// <summary>Promotion cannot be used on this order.</summary>
639+
public const string NotEligible = "PromotionIntegration.NotEligible";
617640
}
618641
public static class Registration
619642
{

src/OrderCloud.SDK/Generated/Models.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,6 @@ public class OrderPromotion : OrderCloudModel
17741774
[Required]
17751775
public string EligibleExpression { get => GetProp<string>("EligibleExpression"); set => SetProp<string>("EligibleExpression", value); }
17761776
/// <summary>The expression evaluated to determine the discount amount of an eligible promotion. See Rules Engine documentation for formatting details.</summary>
1777-
[Required]
17781777
public string ValueExpression { get => GetProp<string>("ValueExpression"); set => SetProp<string>("ValueExpression", value); }
17791778
/// <summary>If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.</summary>
17801779
public bool CanCombine { get => GetProp<bool>("CanCombine"); set => SetProp<bool>("CanCombine", value); }
@@ -2027,7 +2026,7 @@ public class PasswordConfig : OrderCloudModel
20272026
public int? MinimumPasswordAge { get => GetProp<int?>("MinimumPasswordAge"); set => SetProp<int?>("MinimumPasswordAge", value); }
20282027
/// <summary>The number of failed attempts before the account is Locked for the LockoutDuration.</summary>
20292028
public int? AllowedFailedAttempts { get => GetProp<int?>("AllowedFailedAttempts"); set => SetProp<int?>("AllowedFailedAttempts", value); }
2030-
/// <summary>The number of minutes an account is locked when the AllowedFailedAttempts is reached.</summary>
2029+
/// <summary>The number of minutes an account is locked when the AllowedFailedAttempts is reached. Use 0 to indicate that lockout should be indefinite (i.e. require the intervention of a user admininstrator).</summary>
20312030
public int? LockoutDuration { get => GetProp<int?>("LockoutDuration"); set => SetProp<int?>("LockoutDuration", value); }
20322031
/// <summary>At least one upper case character is required.</summary>
20332032
public bool UpperCaseRequired { get => GetProp<bool>("UpperCaseRequired"); set => SetProp<bool>("UpperCaseRequired", value); }
@@ -2427,7 +2426,6 @@ public class Promotion : OrderCloudModel
24272426
[Required]
24282427
public string EligibleExpression { get => GetProp<string>("EligibleExpression"); set => SetProp<string>("EligibleExpression", value); }
24292428
/// <summary>The expression evaluated to determine the discount amount of an eligible promotion. See Rules Engine documentation for formatting details.</summary>
2430-
[Required]
24312429
public string ValueExpression { get => GetProp<string>("ValueExpression"); set => SetProp<string>("ValueExpression", value); }
24322430
/// <summary>If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.</summary>
24332431
public bool CanCombine { get => GetProp<bool>("CanCombine"); set => SetProp<bool>("CanCombine", value); }

0 commit comments

Comments
 (0)