toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.transferId != null) {
    json[r'transferId'] = this.transferId;
  } else {
    json[r'transferId'] = null;
  }
  if (this.sentAmount != null) {
    json[r'sentAmount'] = this.sentAmount;
  } else {
    json[r'sentAmount'] = null;
  }
  if (this.sentCurrency != null) {
    json[r'sentCurrency'] = this.sentCurrency;
  } else {
    json[r'sentCurrency'] = null;
  }
  if (this.receivedAmount != null) {
    json[r'receivedAmount'] = this.receivedAmount;
  } else {
    json[r'receivedAmount'] = null;
  }
  if (this.receivedCurrency != null) {
    json[r'receivedCurrency'] = this.receivedCurrency;
  } else {
    json[r'receivedCurrency'] = null;
  }
  if (this.conversionRate != null) {
    json[r'conversionRate'] = this.conversionRate;
  } else {
    json[r'conversionRate'] = null;
  }
  if (this.transferDate != null) {
    json[r'transferDate'] = this.transferDate!.toUtc().toIso8601String();
  } else {
    json[r'transferDate'] = null;
  }
  return json;
}