Surcharge
Surcharge
A Surcharge represents an arbitrary extra item on an Order which is not a ProductVariant. It can be used to e.g. represent payment-related surcharges.
Signature
class Surcharge extends VendureEntity {
constructor(input?: DeepPartial<Surcharge>)
@Column() @Column()
description: string;
@Money() @Money()
listPrice: number;
@Column() @Column()
listPriceIncludesTax: boolean;
@Column() @Column()
sku: string;
@Column('simple-json') @Column('simple-json')
taxLines: TaxLine[];
@Index() @ManyToOne(type => Order, order => order.surcharges, { onDelete: 'CASCADE' }) @Index()
@ManyToOne(type => Order, order => order.surcharges, { onDelete: 'CASCADE' })
order: Order;
@Index() @ManyToOne(type => OrderModification, orderModification => orderModification.surcharges) @Index()
@ManyToOne(type => OrderModification, orderModification => orderModification.surcharges)
orderModification: OrderModification;
@Calculated() price: number
@Calculated() priceWithTax: number
@Calculated() taxRate: number
}
Extends
Members
constructor
method
type:
(input?: DeepPartial<Surcharge>) => Surcharge
description
property
type:
string
listPrice
property
type:
number
listPriceIncludesTax
property
type:
boolean
sku
property
type:
string
taxLines
property
type:
TaxLine[]
order
property
type:
Order
orderModification
property
type:
OrderModification
price
property
type:
number
priceWithTax
property
type:
number
taxRate
property
type:
number