toJson method

Map<String, dynamic> toJson ()

Implementation

Map<String, dynamic> toJson() {
  final flow = {
    'from': this.from.toJson(),
    'to': this.to.toJson(),
    'amount': this.amount.toJson(),
    'at': this.at.toTimestampSinceEpoch(),
  };

  return {
    'id': this.id.toString(),
    'transaction': {
      'flow': flow,
      'txType': this.type,
      'meta': this.meta,
    },
  };
}