Data.fromJson constructor
Implementation
factory Data.fromJson(Map<String, dynamic> json) => Data(
id: json["id"],
clientReferenceId: json["client_reference_id"],
amount: json["amount"],
currency: json["currency"],
paymentMethod: json["payment_method"],
nextAction: json["next_action"],
status: json["status"],
metadata: json["metadata"] == null
? null
: Metadata.fromJson(json["metadata"]),
createdAt: json["created_at"] == null
? null
: DateTime.parse(json["created_at"]),
expireAt: json["expire_at"] == null
? null
: DateTime.parse(json["expire_at"]),
);