ChargeResponseData.fromJson constructor

ChargeResponseData.fromJson(
  1. Map<String, dynamic> json
)

Implementation

ChargeResponseData.fromJson(Map<String, dynamic> json) {
  this.id = json['id'].toString();
  this.txRef = json['tx_ref'];
  this.flwRef = json['flw_ref'];
  this.deviceFingerprint = json['device_fingerprint'];
  this.amount = json['amount'].toString();
  this.chargedAmount = json['charged_amount'].toString();
  this.appFee = json['app_fee'].toString();
  this.merchantFee = json['merchant_fee'].toString();
  this.processorResponse = json['processor_response'];
  this.authModel = json['auth_model'];
  this.currency = json['currency'];
  this.ip = json['ip'];
  this.narration = json['narration'];
  this.status = json['status'];
  this.authUrl = json['auth_url'];
  this.paymentType = json['payment_type'];
  this.fraudStatus = json['fraud_status'];
  this.paymentCode = json['payment_code'];
  this.chargeType = json['charge_type'];
  this.createdAt = json['created_at'];
  this.accountId = json['account_id'].toString();
  this.customer = json['customer'] != null
      ? new ChargeCardResponseCustomer.fromJson(json['customer'])
      : null;
  this.card = json['card'] != null
      ? new ChargeCardResponseCard.fromJson(json['card'])
      : null;
}