Skip to main content

ShippingLine

ShippingLine

A ShippingLine is created when a ShippingMethod is applied to an Order. It contains information about the price of the shipping method, any discounts that were applied, and the resulting tax on the shipping method.

Signature
class ShippingLine extends VendureEntity {
constructor(input?: DeepPartial<ShippingLine>)
@EntityId()
shippingMethodId: ID | null;
@Index()
@ManyToOne(type => ShippingMethod)
shippingMethod: ShippingMethod;
@Index()
@ManyToOne(type => Order, order => order.shippingLines, { onDelete: 'CASCADE' })
order: Order;
@Money()
listPrice: number;
@Column()
listPriceIncludesTax: boolean;
@Column('simple-json')
adjustments: Adjustment[];
@Column('simple-json')
taxLines: TaxLine[];
@OneToMany(type => OrderLine, orderLine => orderLine.shippingLine)
orderLines: OrderLine[];
price: number
priceWithTax: number
discountedPrice: number
discountedPriceWithTax: number
taxRate: number
discounts: Discount[]
addAdjustment(adjustment: Adjustment) => ;
clearAdjustments() => ;
}

constructor

method
(input?: DeepPartial<ShippingLine>) => ShippingLine

shippingMethodId

property
ID | null

shippingMethod

order

property

listPrice

property
number

listPriceIncludesTax

property
boolean

adjustments

property
Adjustment[]

taxLines

property
TaxLine[]

orderLines

property

price

property
number

priceWithTax

property
number

discountedPrice

property
number

discountedPriceWithTax

property
number

taxRate

property
number

discounts

property
Discount[]

addAdjustment

method
(adjustment: Adjustment) =>

clearAdjustments

method
() =>