FincraTransaction.fromMap constructor

FincraTransaction.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory FincraTransaction.fromMap(Map<String, dynamic> json) => FincraTransaction(
  id: json["id"],
  businessId: json["businessId"],
  paymentLinkId: json["paymentLinkId"],
  amount: json["amount"],
  currency: json["currency"],
  convertedAmount: json["convertedAmount"],
  amountReceived: json["amountReceived"],
  convertedCurrency: json["convertedCurrency"],
  paymentMethods: json["paymentMethods"] == null ? [] : List<String>.from(json["paymentMethods"]!.map((x) => x)),
  defaultPaymentMethod: json["defaultPaymentMethod"],
  redirectUrl: json["redirectUrl"],
  customUrl: json["customUrl"],
  successMessage: json["successMessage"],
  settlementDestination: json["settlementDestination"],
  feeBearer: json["feeBearer"],
  reference: json["reference"],
  merchantReference: json["merchantReference"],
  isDisabled: json["isDisabled"],
  metadata: json["metadata"],
  status: json["status"],
  createdAt: json["createdAt"] == null ? null : DateTime.parse(json["createdAt"]),
  updatedAt: json["updatedAt"] == null ? null : DateTime.parse(json["updatedAt"]),
  customer: json["customer"] == null ? null : Customer.fromMap(json["customer"]),
  business: json["business"] == null ? null : Business.fromMap(json["business"]),
);