Try our conversational search powered by Generative AI!

Class ILineItemExtensions

Extension methods for ILineItem

Inheritance
System.Object
ILineItemExtensions
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.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public static class ILineItemExtensions

Methods

GetEntryContent(ILineItem)

Gets the entry content from the line item.

Declaration
public static EntryContentBase GetEntryContent(this ILineItem lineItem)
Parameters
Type Name Description
ILineItem lineItem

The line item.

Returns
Type Description
EntryContentBase

The EntryContentBase for the line item.

GetEntryContent(ILineItem, ReferenceConverter, IContentLoader)

Gets the entry content from the line item.

Declaration
public static EntryContentBase GetEntryContent(this ILineItem lineItem, ReferenceConverter referenceConverter, IContentLoader contentLoader)
Parameters
Type Name Description
ILineItem lineItem

The line item.

ReferenceConverter referenceConverter

The reference converter.

EPiServer.IContentLoader contentLoader

The content loader.

Returns
Type Description
EntryContentBase

The EntryContentBase for the line item.

GetEntryDiscount(ILineItem)

Gets the entry discount amount for the specific line item, which are set by the PromotionEngine.

Declaration
public static decimal GetEntryDiscount(this ILineItem lineItem)
Parameters
Type Name Description
ILineItem lineItem

The line item.

Returns
Type Description
System.Decimal

The entry discount amount for the specific line item

UpdatePlacedPrice(ILineItem, CustomerContact, IMarket, Currency, Action<ILineItem, ValidationIssue>)

Updates the placed price for the ILineItem.

Declaration
public static bool UpdatePlacedPrice(this ILineItem lineItem, CustomerContact customerContact, IMarket market, Currency currency, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type Name Description
ILineItem lineItem

The line item.

CustomerContact customerContact

The customer contact.

IMarket market

The market.

Currency currency

The currency.

System.Action<ILineItem, ValidationIssue> onValidationError

A callback that is invoked if a validation issue is detected.

Returns
Type Description
System.Boolean

true if price is valid; otherwise false.

UpdatePlacedPrice(ILineItem, CustomerContact, IMarket, Currency, Action<ILineItem, ValidationIssue>, IPlacedPriceProcessor)

Updates the placed price for the ILineItem.

Declaration
public static bool UpdatePlacedPrice(this ILineItem lineItem, CustomerContact customerContact, IMarket market, Currency currency, Action<ILineItem, ValidationIssue> onValidationError, IPlacedPriceProcessor placedPriceProcessor)
Parameters
Type Name Description
ILineItem lineItem

The line item.

CustomerContact customerContact

The customer contact.

IMarket market

The market.

Currency currency

The currency.

System.Action<ILineItem, ValidationIssue> onValidationError

A callback that is invoked if a validation issue is detected.

IPlacedPriceProcessor placedPriceProcessor

The placed price processor.

Returns
Type Description
System.Boolean

true if price is valid; otherwise false.