Class LineItem
Represents Line Item in the system. The actual item that is bought.
Implements
Inherited Members
Namespace: Mediachase.Commerce.Orders
Assembly: Mediachase.Commerce.dll
Version: 12.17.2Syntax
public class LineItem : OrderStorageBase, IXmlSerializable, IStorageObject, ICloneable, ISerializable, ILineItemDiscountAmount, IReturnLineItem, ILineItem, IExtendedProperties, ILineItemCalculatedAmount, ILineItemInventory
Constructors
LineItem()
Initializes a new instance of the LineItem class.
Declaration
public LineItem()
LineItem(SerializationInfo, StreamingContext)
Initializes a new instance of the LineItem class.
Declaration
protected LineItem(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Properties
AllowBackordersAndPreorders
Gets or sets a value indicating whether [allow backorders and preorders].
Declaration
public bool AllowBackordersAndPreorders { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
BackorderQuantity
Gets or sets the backorder quantity.
Declaration
[Obsolete("This property is no longer used. Inventory information can be retrieved using IInventoryService. Will remain at least until June 2019.")]
public decimal BackorderQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The backorder quantity. |
Catalog
Gets or sets the catalog.
Declaration
public string Catalog { get; set; }
Property Value
Type | Description |
---|---|
System.String | The catalog. |
CatalogNode
Gets or sets the catalog node.
Declaration
public string CatalogNode { get; set; }
Property Value
Type | Description |
---|---|
System.String | The catalog node. |
Code
Gets or sets the catalog entry code.
Declaration
public string Code { get; set; }
Property Value
Type | Description |
---|---|
System.String | The catalog entry id. |
ConfigurationId
Gets or sets the configuration id. The external component configuration id, used by bundle, kits and other combination products.
Declaration
public string ConfigurationId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The configuration id. |
Description
Gets or sets the description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | The description. |
Discounts
Gets the list of discounts that were applied to that particular line item.
Declaration
[Obsolete("Use promotion system in EPiServer.Commerce.Marketing instead. Will be removed in a future major release, but not earlier than August 2018.")]
public LineItemDiscountCollection Discounts { get; }
Property Value
Type | Description |
---|---|
LineItemDiscountCollection | The discounts. |
DisplayName
Gets or sets the name of the display.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the display. |
ExtendedPrice
Gets or sets the extended price.
Declaration
public decimal ExtendedPrice { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The extended price. |
InStockQuantity
Gets or sets the in stock quantity.
Declaration
[Obsolete("This property is no longer used. Inventory information can be retrieved using IInventoryService. Will remain at least until June 2019.")]
public decimal InStockQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The in stock quantity. |
InventoryStatus
Gets or sets the inventory status.
Declaration
public int InventoryStatus { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The inventory status. |
IsGift
Gets or sets a value indicating whether the line item is a gift item.
Declaration
public bool IsGift { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsInventoryAllocated
Gets a value indicating if the inventory for this item has already been allocated from the inventory system.
Declaration
public bool IsInventoryAllocated { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LineItemCalculator
The order calculator
Declaration
public Injected<ILineItemCalculator> LineItemCalculator { get; set; }
Property Value
Type | Description |
---|---|
EPiServer.ServiceLocation.Injected<ILineItemCalculator> |
LineItemDiscountAmount
Gets or sets the line item discount amount.
Declaration
public decimal LineItemDiscountAmount { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The line item discount amount. |
LineItemId
Gets the line item id.
Declaration
public int LineItemId { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The line item id. |
LineItemOrdering
Gets or sets the line item ordering.
Declaration
public DateTime LineItemOrdering { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The line item ordering. |
ListPrice
Gets or sets the list price. The price that the item is listed in the catalog.
Declaration
[Obsolete("This property is no longer used. Use PlacedPrice instead. Will remain at least until June 2019.")]
public decimal ListPrice { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The list price. |
MaxQuantity
Gets or sets the max quantity.
Declaration
[Obsolete("This property is no longer used. Inventory information can be retrieved using IInventoryService. Will remain at least until June 2019.")]
public decimal MaxQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The max quantity. |
MinQuantity
Gets or sets the min quantity.
Declaration
[Obsolete("This property is no longer used. Inventory information can be retrieved using IInventoryService. Will remain at least until June 2019.")]
public decimal MinQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The min quantity. |
OldQuantity
Gets the old quantity.
Declaration
public decimal OldQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The old quantity. |
OrderFormId
Gets or sets the order form id.
Declaration
public int OrderFormId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The order form id. |
OrderGroupId
Gets or sets the order group id.
Declaration
public int OrderGroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The order group id. |
OrderLevelDiscountAmount
Gets or sets the order level discount amount.
Declaration
public decimal OrderLevelDiscountAmount { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The order level discount amount. |
OrigLineItemId
Gets or sets the identity orig line item for RMA line item.
Declaration
public int? OrigLineItemId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The rma orig line item id. |
Parent
Gets the parent Order Form.
Declaration
public OrderForm Parent { get; }
Property Value
Type | Description |
---|---|
OrderForm | The parent. |
ParentCatalogEntryId
Gets or sets the parent catalog entry id. Typically for Product/Sku(Variation) types of products, this will be a product code.
Declaration
public string ParentCatalogEntryId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The parent catalog entry id. |
PlacedPrice
Gets or sets the placed price.
Declaration
public decimal PlacedPrice { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The placed price. |
PreorderQuantity
Gets or sets the preorder quantity.
Declaration
[Obsolete("This property is no longer used. Inventory information can be retrieved using IInventoryService. Will remain at least until June 2019.")]
public decimal PreorderQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The preorder quantity. |
PricesIncludeTax
Gets the setting of including tax in price from the order group.
Declaration
public bool PricesIncludeTax { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ProviderId
Gets or sets the provider id. Used to identify the line item in the extrnal system.
Declaration
public string ProviderId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The provider id. |
Quantity
Gets or sets the quantity.
Declaration
public decimal Quantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The quantity. |
ReturnQuantity
Gets or sets the returned in stock quantity.
Declaration
public decimal ReturnQuantity { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal | The return quantity. |
ReturnReason
Gets or sets the reason for RMA line item. ("Corrupted", "Mismatch" etc..).
Declaration
public string ReturnReason { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ShippingAddressId
Gets or sets the shipping address name.
Declaration
[Obsolete("Use Shipment.ShippingAddressId for the line item the shipment belongs to. Will remain at least until October 2017.")]
public string ShippingAddressId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The shipping address id. |
ShippingMethodId
Gets or sets the shipping method id.
Declaration
[Obsolete("Use Shipment.ShippingMethodId for the line item the shipment belongs to. Will remain at least until October 2017.")]
public Guid ShippingMethodId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | The shipping method id. |
ShippingMethodName
Gets or sets the name of the shipping method.
Declaration
[Obsolete("Use Shipment.ShippingMethodName for the line item the shipment belongs to. Will remain at least until October 2017.")]
public string ShippingMethodName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the shipping method. |
Status
Gets or sets the status.
Declaration
public string Status { get; set; }
Property Value
Type | Description |
---|---|
System.String | The status. |
WarehouseCode
Gets or sets the warehouse code
Declaration
[Obsolete("Use Shipment.WarehouseCode for the line item the shipment belongs to. Will remain at least until October 2017.")]
public string WarehouseCode { get; set; }
Property Value
Type | Description |
---|---|
System.String | The warehouse code. |
Methods
AcceptChanges()
Accepts the changes.
Declaration
public override void AcceptChanges()
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Gets the object data.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Overrides
PopulateCollections(DataTableCollection, String)
Populates collections within table. The tables used will be removed from the table collection. Override this method to populate your custom collection objects.
Declaration
protected override void PopulateCollections(DataTableCollection tables, string filter)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataTableCollection | tables | The tables. |
System.String | filter | The filter. |
Overrides
ReadXml(XmlReader)
Generates an object from its XML representation.
Declaration
public override void ReadXml(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader stream from which the object is deserialized. |
Overrides
SetParent(Object)
Sets the parent.
Declaration
public override void SetParent(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | The parent. |
Overrides
WriteXml(XmlWriter)
Converts an object into its XML representation.
Declaration
public override void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter stream to which the object is serialized |
Overrides
Explicit Interface Implementations
ILineItem.InventoryTrackingStatus
Gets or sets the inventory tracking status on whether to check inventory.
Declaration
InventoryTrackingStatus ILineItem.InventoryTrackingStatus { get; set; }
Returns
Type | Description |
---|---|
InventoryTrackingStatus |
ILineItem.TaxCategoryId
Gets or sets the tax category id for the line item.
Declaration
int? ILineItem.TaxCategoryId { get; set; }
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
ILineItemDiscountAmount.EntryAmount
Gets or sets the line item discount amount.
Declaration
decimal ILineItemDiscountAmount.EntryAmount { get; set; }
Returns
Type | Description |
---|---|
System.Decimal | The line item discount amount. |
ILineItemDiscountAmount.OrderAmount
Gets or sets the order level discount amount.
Declaration
decimal ILineItemDiscountAmount.OrderAmount { get; set; }
Returns
Type | Description |
---|---|
System.Decimal |
ILineItemCalculatedAmount.IsSalesTaxUpToDate
Gets or sets the flag indicating whether the SalesTax is up-to-date.
Declaration
bool ILineItemCalculatedAmount.IsSalesTaxUpToDate { get; set; }
Returns
Type | Description |
---|---|
System.Boolean |
ILineItemCalculatedAmount.SalesTax
Gets or sets the sales tax amount.
Declaration
decimal ILineItemCalculatedAmount.SalesTax { get; set; }
Returns
Type | Description |
---|---|
System.Decimal |
IReturnLineItem.OriginalLineItemId
Gets or sets the identity original line item id for RMA line item.
Declaration
int? IReturnLineItem.OriginalLineItemId { get; set; }
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
IExtendedProperties.Properties
Gets the property bag for dealing with custom meta fields.
Declaration
Hashtable IExtendedProperties.Properties { get; }
Returns
Type | Description |
---|---|
System.Collections.Hashtable |