Class PromotionCustomerEligibilityValidationResult
Represents the result of validating whether a customer is eligible for a promotion.
public sealed record PromotionCustomerEligibilityValidationResult
- Inheritance
-
objectPromotionCustomerEligibilityValidationResult
- Extension Methods
Remarks
This record is returned by Validate(PromotionCustomerEligibility, BuyerIdentifier, CancellationToken) to indicate whether a customer meets the eligibility requirements for a promotion.
Constructors
PromotionCustomerEligibilityValidationResult()
public PromotionCustomerEligibilityValidationResult()
Properties
IsEligible
Gets a value indicating whether the customer is eligible for the promotion.
public bool IsEligible { get; init; }
Property Value
- bool
trueif the customer meets the eligibility requirements; otherwise,false.
Methods
Equals(PromotionCustomerEligibilityValidationResult?)
public bool Equals(PromotionCustomerEligibilityValidationResult? other)
Parameters
Returns
- bool
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
ToString()
public override string ToString()
Returns
- string
Operators
operator ==(PromotionCustomerEligibilityValidationResult?, PromotionCustomerEligibilityValidationResult?)
public static bool operator ==(PromotionCustomerEligibilityValidationResult? left, PromotionCustomerEligibilityValidationResult? right)
Parameters
leftPromotionCustomerEligibilityValidationResultrightPromotionCustomerEligibilityValidationResult
Returns
- bool
operator !=(PromotionCustomerEligibilityValidationResult?, PromotionCustomerEligibilityValidationResult?)
public static bool operator !=(PromotionCustomerEligibilityValidationResult? left, PromotionCustomerEligibilityValidationResult? right)
Parameters
leftPromotionCustomerEligibilityValidationResultrightPromotionCustomerEligibilityValidationResult
Returns
- bool