PaymentMethod.fromJson constructor
Implementation
factory PaymentMethod.fromJson(Map<String, Object?> json) => PaymentMethod(
active: json["active"] as bool,
archivedAt: json["archived_at"] == null
? null
: decodeDateTime(json["archived_at"]),
bankAccount: json["bank_account"] == null
? null
: BankAccount.fromJson(
(json["bank_account"] as Map).cast<String, Object?>(),
),
card: json["card"] == null
? null
: Card.fromJson(
(json["card"] as Map).cast<String, Object?>(),
),
createdAt: decodeDateTime(json["created_at"]),
customData: json["custom_data"] == null
? null
: core.CustomData.fromJson(json["custom_data"]),
customerId: json["customer_id"] as String,
ephemeral: json["ephemeral"] == null ? null : json["ephemeral"] as bool,
expiresOn: json["expires_on"] == null
? null
: decodeDateTime(json["expires_on"]),
fingerprint: json["fingerprint"] as String,
id: json["id"] as String,
mobileMoney: json["mobile_money"] == null
? null
: MobileMoney.fromJson(
(json["mobile_money"] as Map).cast<String, Object?>(),
),
owner: json["owner"] == null
? null
: Owner.fromJson(
(json["owner"] as Map).cast<String, Object?>(),
),
type: Type.fromJson(json["type"]),
supplied: json["supplied"] == null
? null
: Supplied.fromJson(
(json["supplied"] as Map).cast<String, Object?>(),
),
verification: json["verification"] == null
? null
: Verification.fromJson(
(json["verification"] as Map).cast<String, Object?>(),
),
verifiedAt: json["verified_at"] == null
? null
: decodeDateTime(json["verified_at"]),
);