toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.amount != null) {
json[r'amount'] = this.amount;
} else {
json[r'amount'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.quantity != null) {
json[r'quantity'] = this.quantity;
} else {
json[r'quantity'] = null;
}
if (this.unitPrice != null) {
json[r'unitPrice'] = this.unitPrice;
} else {
json[r'unitPrice'] = null;
}
return json;
}