OrderLine
OrderLine
A single line on an Order which contains one or more OrderItems.
Signature
class OrderLine extends VendureEntity implements HasCustomFields {
constructor(input?: DeepPartial<OrderLine>)
@ManyToOne(type => ProductVariant)
productVariant: ProductVariant;
@ManyToOne(type => TaxCategory)
taxCategory: TaxCategory;
@ManyToOne(type => Asset)
featuredAsset: Asset;
@OneToMany(type => OrderItem, item => item.line, { eager: true })
items: OrderItem[];
@ManyToOne(type => Order, order => order.lines, { onDelete: 'CASCADE' })
order: Order;
@Column(type => CustomOrderLineFields)
customFields: CustomOrderLineFields;
unitPrice: number
unitPriceWithTax: number
unitPriceChangeSinceAdded: number
unitPriceWithTaxChangeSinceAdded: number
discountedUnitPrice: number
discountedUnitPriceWithTax: number
proratedUnitPrice: number
proratedUnitPriceWithTax: number
quantity: number
adjustments: Adjustment[]
taxLines: TaxLine[]
taxRate: number
linePrice: number
linePriceWithTax: number
discountedLinePrice: number
discountedLinePriceWithTax: number
discounts: Discount[]
lineTax: number
proratedLinePrice: number
proratedLinePriceWithTax: number
proratedLineTax: number
activeItems: OrderItem[]
firstItem: OrderItem | undefined
clearAdjustments(type?: AdjustmentType) => ;
}
Extends
Implements
- HasCustomFields
Members
constructor
(input?: DeepPartial<OrderLine>) => OrderLine
productVariant
ProductVariant
taxCategory
TaxCategory
featuredAsset
Asset
items
OrderItem[]
order
Order
customFields
CustomOrderLineFields
unitPrice
number
unitPriceWithTax
number
unitPriceChangeSinceAdded
number
unitPrice
has changed since it was initially added to Order.
unitPriceWithTaxChangeSinceAdded
number
unitPriceWithTax
has changed since it was initially added to Order.
discountedUnitPrice
number
The price of a single unit including discounts, excluding tax.
If Order-level discounts have been applied, this will not be the
actual taxable unit price (see proratedUnitPrice
), but is generally the
correct price to display to customers to avoid confusion
about the internal handling of distributed Order-level discounts.
discountedUnitPriceWithTax
number
proratedUnitPrice
number
proratedUnitPriceWithTax
number
proratedUnitPrice
including tax.
quantity
number
adjustments
Adjustment[]
taxLines
TaxLine[]
taxRate
number
linePrice
number
linePriceWithTax
number
discountedLinePrice
number
discountedLinePriceWithTax
number
discounts
Discount[]
lineTax
number
proratedLinePrice
number
proratedLinePriceWithTax
number
proratedLinePrice
including tax.
proratedLineTax
number
activeItems
OrderItem[]
firstItem
OrderItem | undefined
clearAdjustments
(type?: AdjustmentType) =>