OrderLine

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)
    items: OrderItem[];
  @ManyToOne(type => Order, order => order.lines, { onDelete: 'CASCADE' })
    order: Order;
  @Column(type => CustomOrderLineFields)
    customFields: CustomOrderLineFields;
  unitPrice: number
  unitPriceWithTax: number
  quantity: number
  totalPrice: number
  adjustments: Adjustment[]
  lineTax: number
  activeItems: OrderItem[]
  setUnitPriceIncludesTax(includesTax: boolean) => ;
  setTaxRate(taxRate: number) => ;
  clearAdjustments(type?: AdjustmentType) => ;
}

Members

constructor

method
type:
(input?: DeepPartial<OrderLine>) => OrderLine

productVariant

property

taxCategory

property
type:
TaxCategory

featuredAsset

property
type:
Asset

items

property
type:
OrderItem[]

order

property
type:
Order

customFields

property
type:
CustomOrderLineFields

unitPrice

property
type:
number

unitPriceWithTax

property
type:
number

quantity

property
type:
number

totalPrice

property
type:
number

adjustments

property
type:
Adjustment[]

lineTax

property
type:
number

activeItems

property
type:
OrderItem[]

setUnitPriceIncludesTax

method
type:
(includesTax: boolean) =>

setTaxRate

method
type:
(taxRate: number) =>

clearAdjustments

method
type:
(type?: AdjustmentType) =>