toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['amount_per_unit'] = this.amountPerUnit;
  data['description'] = this.description;

  data['discount'] = this.discount;
  data['name'] = this.name;

  data['quantity'] = this.quantity.toJson();

  if (this.taxes != null) {
    data['taxes'] = this.taxes!.map((v) => v.toJson()).toList();
  }

  data['total_amount'] = this.totalAmount;

  return data;
}