BillDiscountDto class
Discounts applied to the bill.
Constructors
-
BillDiscountDto({String? id, String? barcode, BillDiscountBarcodeType? barcodeType, String? name, String? additionalText, double? value, required BillDiscountType type, List<
BillDiscountVatAmountDto> ? vatAmounts, double? fullAmountInclVat, String? equivalentValue}) -
BillDiscountDto.fromJson(Map<
String, dynamic> json) -
factory
Properties
- additionalText ↔ String?
-
Additional text to describe the discount.
E.g. 'Only applies to organic bananas of type x'.
read / write
- barcode ↔ String?
-
Barcode of the discount.
read / write
- barcodeType ↔ BillDiscountBarcodeType?
-
read / write
- equivalentValue ↔ String?
-
Equivalent value of the amount, which is optionally displayed.
read / write
- fullAmountInclVat ↔ double?
-
The total gross amount of the discount.
A precision of 2 decimal places is used.
read / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- id ↔ String?
-
Id of the bill discount. Used to reference this discount.
read / write
- name ↔ String?
-
Name of the bill discount.
E.g. '20 % off bananas'.
read / write
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
read-onlyoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.read-onlyinherited - type ↔ BillDiscountType
-
read / write
- value ↔ double?
-
Value of the discount.
E.g. '20' for 20 % off or '5' for a 5 € discount.
read / write
-
vatAmounts
↔ List<
BillDiscountVatAmountDto> ? -
The total reduced amounts for this discount divided according to tax rates.
Different tax rates may be applied, e.g. if a compilation of products (menu) from meals and
drinks and is sold "outside the home".
Must be unique by the percentage.
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited