London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Class ShippingPromotionValidator

Validates conditions for the ShippingPromotion promotion.

Inheritance
System.Object
ShippingPromotionValidator
Implements
EPiServer.Validation.IValidate<ShippingPromotion>
EPiServer.Validation.IValidate
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Validation
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
public class ShippingPromotionValidator : PromotionDataValidatorBase<ShippingPromotion>, IValidate<ShippingPromotion>, IValidate

Constructors

ShippingPromotionValidator(LocalizationService)

Initializes a new instance of the ShippingPromotionValidator class.

Declaration
[Obsolete("This constructor is no longer used. Using the contructor with IContentLoader instead. Will remain at least until Aug 2019.")]
public ShippingPromotionValidator(LocalizationService localizationService)
Parameters
Type Name Description
EPiServer.Framework.Localization.LocalizationService localizationService

The localization service.

ShippingPromotionValidator(IContentLoader, LocalizationService)

Initializes a new instance of the ShippingPromotionValidator class.

Declaration
public ShippingPromotionValidator(IContentLoader contentLoader, LocalizationService localizationService)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader.

EPiServer.Framework.Localization.LocalizationService localizationService

The localization service.

Methods

AddErrorsIfNeeded(ShippingPromotion, List<ValidationError>)

Declaration
protected override void AddErrorsIfNeeded(ShippingPromotion promotion, List<ValidationError> validationErrors)
Parameters
Type Name Description
ShippingPromotion promotion
System.Collections.Generic.List<EPiServer.Validation.ValidationError> validationErrors
Overrides
EPiServer.Commerce.Validation.PromotionDataValidatorBase<EPiServer.Commerce.Marketing.ShippingPromotion>.AddErrorsIfNeeded(EPiServer.Commerce.Marketing.ShippingPromotion, System.Collections.Generic.List<EPiServer.Validation.ValidationError>)

GetShippingMethodsByMarkets(IEnumerable<String>)

Gets all available shipping methods from given markets.

Declaration
protected virtual IEnumerable<Guid> GetShippingMethodsByMarkets(IEnumerable<string> marketIds)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> marketIds

Target markets

Returns
Type Description
System.Collections.Generic.IEnumerable<System.Guid>

Available shipping methods belong to markets.

Implements

EPiServer.Validation.IValidate<>
EPiServer.Validation.IValidate