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() => ;
}
- Extends:
VendureEntity
constructor
method
(input?: DeepPartial<ShippingLine>) => ShippingLineshippingMethodId
property
ID | nullshippingMethod
property
order
property
listPrice
property
numberlistPriceIncludesTax
property
booleanadjustments
property
Adjustment[]taxLines
property
TaxLine[]orderLines
property
price
property
numberpriceWithTax
property
numberdiscountedPrice
property
numberdiscountedPriceWithTax
property
numbertaxRate
property
numberdiscounts
property
Discount[]addAdjustment
method
(adjustment: Adjustment) => clearAdjustments
method
() =>