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['tx_ref'] = this.txRef;
  data['flw_ref'] = this.flwRef;
  data['device_fingerprint'] = this.deviceFingerprint;
  data['amount'] = this.amount;
  data['charged_amount'] = this.chargedAmount;
  data['app_fee'] = this.appFee;
  data['merchant_fee'] = this.merchantFee;
  data['processor_response'] = this.processorResponse;
  data['auth_model'] = this.authModel;
  data['currency'] = this.currency;
  data['ip'] = this.ip;
  data['narration'] = this.narration;
  data['status'] = this.status;
  data['auth_url'] = this.authUrl;
  data['payment_type'] = this.paymentType;
  data['fraud_status'] = this.fraudStatus;
  data['payment_code'] = this.paymentCode;
  data['charge_type'] = this.chargeType;
  data['created_at'] = this.createdAt;
  data['account_id'] = this.accountId;
  if (this.customer != null) {
    data['customer'] = this.customer?.toJson();
  }
  if (this.card != null) {
    data['card'] = this.card?.toJson();
  }
  return data;
}