OrderItem

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;
  readonly @Column() readonly unitPrice: number;
  @Column() unitPriceIncludesTax: boolean;
  @Column() taxRate: number;
  @Column('simple-json') pendingAdjustments: Adjustment[];
  @ManyToOne(type => Fulfillment)
    fulfillment: Fulfillment;
  @Column({ type: idType(), nullable: true })
    fulfillmentId: ID | null;
  @ManyToOne(type => Refund)
    refund: Refund;
  @Column({ type: idType(), nullable: true })
    refundId: ID | null;
  @OneToOne(type => Cancellation, cancellation => cancellation.orderItem)
    cancellation: Cancellation;
  @RelationId('cancellation')
    cancellationId: ID | null;
  cancelled: boolean
  unitPriceWithTax: number
  adjustments: Adjustment[]
  unitPriceWithPromotionsAndTax: number
  unitTax: number
  promotionAdjustmentsTotal: number
  unitPriceWithPromotions: number
  clearAdjustments(type?: AdjustmentType) => ;
}

Members

constructor

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

line

property
type:
OrderLine

unitPrice

readonly property
type:
number

unitPriceIncludesTax

property
type:
boolean

taxRate

property
type:
number

pendingAdjustments

property
type:
Adjustment[]

fulfillment

property
type:
Fulfillment

fulfillmentId

property
type:
ID | null

refund

property
type:
Refund

refundId

property
type:
ID | null

cancellation

property
type:
Cancellation

cancellationId

property
type:
ID | null

cancelled

property
type:
boolean

unitPriceWithTax

property
type:
number

adjustments

property
type:
Adjustment[]

unitPriceWithPromotionsAndTax

property
type:
number

unitTax

property
type:
number

promotionAdjustmentsTotal

property
type:
number

unitPriceWithPromotions

property
type:
number

clearAdjustments

method
type:
(type?: AdjustmentType) =>