OrderItem
OrderItem
An individual item of an OrderLine.
Signature
class OrderItem extends VendureEntity {
constructor(input?: DeepPartial<OrderItem>)
@ManyToOne(type => OrderLine, line => line.items, { onDelete: 'CASCADE' })
line: OrderLine;
@EntityId()
lineId: ID;
@Column({ nullable: true })
initialListPrice: number;
@Column()
listPrice: number;
@Column()
listPriceIncludesTax: boolean;
@Column('simple-json')
adjustments: Adjustment[];
@Column('simple-json')
taxLines: TaxLine[];
@ManyToMany(type => Fulfillment, fulfillment => fulfillment.orderItems)
@JoinTable()
fulfillments: Fulfillment[];
@ManyToOne(type => Refund)
refund: Refund;
@EntityId({ nullable: true })
refundId: ID | null;
@OneToOne(type => Cancellation, cancellation => cancellation.orderItem)
cancellation: Cancellation;
@Column({ default: false })
cancelled: boolean;
fulfillment: Fulfillment | undefined
unitPrice: number
unitPriceWithTax: number
taxRate: number
unitTax: number
discountedUnitPrice: number
discountedUnitPriceWithTax: number
proratedUnitPrice: number
proratedUnitPriceWithTax: number
proratedUnitTax: number
addAdjustment(adjustment: Adjustment) => ;
clearAdjustments(type?: AdjustmentType) => ;
}
Extends
Members
constructor
(input?: DeepPartial<OrderItem>) => OrderItem
line
OrderLine
lineId
ID
initialListPrice
number
listPrice
, except when the ProductVariant price has changed in the mean time and a re-calculation of
the Order has been performed.
listPrice
number
listPriceIncludesTax
boolean
adjustments
Adjustment[]
taxLines
TaxLine[]
fulfillments
Fulfillment[]
refund
Refund
refundId
ID | null
cancellation
Cancellation
cancelled
boolean
fulfillment
Fulfillment | undefined
unitPrice
number
unitPriceWithTax
number
taxRate
number
unitTax
number
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.
proratedUnitTax
number
addAdjustment
(adjustment: Adjustment) =>
clearAdjustments
(type?: AdjustmentType) =>