toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['id'] = this.id;
  data['cartId'] = this.cartId;
  data['invoiceId'] = this.invoiceId;
  data['transactionId'] = this.transactionId;
  data['comment'] = this.comment;
  if (this.mode != null) {
    data['mode'] = this.mode!.toJson();
  }
  data['amount'] = this.amount;
  data['currency'] = this.currency;
  data['status'] = this.status;
  data['action'] = this.action;
  if (this.attributesMapping != null) {
    data['attributesMapping'] =
        this.attributesMapping!.map((v) => v.toJson()).toList();
  }
  return data;
}