Skip to content

Commit

Permalink
Merge pull request #132 from ordercloud-api/dev
Browse files Browse the repository at this point in the history
Updates for latest api version
  • Loading branch information
djsteinmetz authored Oct 10, 2024
2 parents 53eec44 + 4884893 commit 50ba816
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 55 deletions.
25 changes: 24 additions & 1 deletion src/OrderCloud.SDK/Generated/ErrorCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,31 @@ public static class Promotion
public const string CannotSetQuantityLimitPerOrder = "Promotion.CannotSetQuantityLimitPerOrder";
/// <summary>QuantityLimitPerOrder is not supported in conjuction with ItemLimitPerOrder.</summary>
public const string CannotSetQuantityAndItemLimitPerOrder = "Promotion.CannotSetQuantityAndItemLimitPerOrder";
/// <summary>LineItemLevel must be true and ItemLimitPerOrder or QuantityLimitPerOrder must have a value in order to use ItemSortBy.</summary>
/// <summary>LineItemLevel must be true and ItemLimitPerOrder must have a value in order to use ItemSortBy.</summary>
public const string CannotSetItemSortBy = "Promotion.CannotSetItemSortBy";
/// <summary>Either set a ValueExpression, or define ValidatePromotion event for your client.</summary>
public const string ValueExpressionCannotBeNull = "Promotion.ValueExpressionCannotBeNull";
/// <summary>ValueExpression can be null only if UseIntegration is true.</summary>
public const string ValueExpressionCanBeNullIfUseIntegration = "Promotion.ValueExpressionCanBeNullIfUseIntegration";
/// <summary>UseIntegration must be false if ValueExpression is not null.</summary>
public const string UseIntegrationMustBeFalse = "Promotion.UseIntegrationMustBeFalse";
}
public static class PromotionIntegration
{
/// <summary>Failed to evaluate integration promotion.</summary>
public const string FailedToEvaluate = "PromotionIntegration.FailedToEvaluate";
/// <summary>Promotion integration returned the error.</summary>
public const string EvaluationErrorReturned = "PromotionIntegration.EvaluationErrorReturned";
/// <summary>Cannot delete a promotion integration if promotions exist where ValueExpression = null.</summary>
public const string CannotDeletePromotionIntegration = "PromotionIntegration.CannotDeletePromotionIntegration";
/// <summary>PromotionID in the response does not match any PromosRequested ID in the Promotion Integration payload.</summary>
public const string PromotionIDMismatch = "PromotionIntegration.PromotionIDMismatch";
/// <summary>LineItemId is required for LineItemLevel promotion.</summary>
public const string LineItemIdRequired = "PromotionIntegration.LineItemIdRequired";
/// <summary>LineItemId must be null for not LineItemLevel promotion.</summary>
public const string LineItemIdMustBeNull = "PromotionIntegration.LineItemIdMustBeNull";
/// <summary>Promotion cannot be used on this order.</summary>
public const string NotEligible = "PromotionIntegration.NotEligible";
}
public static class Registration
{
Expand Down
4 changes: 1 addition & 3 deletions src/OrderCloud.SDK/Generated/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,6 @@ public class OrderPromotion : OrderCloudModel
[Required]
public string EligibleExpression { get => GetProp<string>("EligibleExpression"); set => SetProp<string>("EligibleExpression", value); }
/// <summary>The expression evaluated to determine the discount amount of an eligible promotion. See Rules Engine documentation for formatting details.</summary>
[Required]
public string ValueExpression { get => GetProp<string>("ValueExpression"); set => SetProp<string>("ValueExpression", value); }
/// <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>
public bool CanCombine { get => GetProp<bool>("CanCombine"); set => SetProp<bool>("CanCombine", value); }
Expand Down Expand Up @@ -2027,7 +2026,7 @@ public class PasswordConfig : OrderCloudModel
public int? MinimumPasswordAge { get => GetProp<int?>("MinimumPasswordAge"); set => SetProp<int?>("MinimumPasswordAge", value); }
/// <summary>The number of failed attempts before the account is Locked for the LockoutDuration.</summary>
public int? AllowedFailedAttempts { get => GetProp<int?>("AllowedFailedAttempts"); set => SetProp<int?>("AllowedFailedAttempts", value); }
/// <summary>The number of minutes an account is locked when the AllowedFailedAttempts is reached.</summary>
/// <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>
public int? LockoutDuration { get => GetProp<int?>("LockoutDuration"); set => SetProp<int?>("LockoutDuration", value); }
/// <summary>At least one upper case character is required.</summary>
public bool UpperCaseRequired { get => GetProp<bool>("UpperCaseRequired"); set => SetProp<bool>("UpperCaseRequired", value); }
Expand Down Expand Up @@ -2427,7 +2426,6 @@ public class Promotion : OrderCloudModel
[Required]
public string EligibleExpression { get => GetProp<string>("EligibleExpression"); set => SetProp<string>("EligibleExpression", value); }
/// <summary>The expression evaluated to determine the discount amount of an eligible promotion. See Rules Engine documentation for formatting details.</summary>
[Required]
public string ValueExpression { get => GetProp<string>("ValueExpression"); set => SetProp<string>("ValueExpression", value); }
/// <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>
public bool CanCombine { get => GetProp<bool>("CanCombine"); set => SetProp<bool>("CanCombine", value); }
Expand Down
Loading

0 comments on commit 50ba816

Please sign in to comment.