SourceAcceptance.fromJson constructor
SourceAcceptance.fromJson(
- Object? json
Implementation
factory SourceAcceptance.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return SourceAcceptance(
date: map['date'] == null
? null
: DateTime.fromMillisecondsSinceEpoch((map['date'] as int).toInt()),
ip: map['ip'] == null ? null : (map['ip'] as String),
offline: map['offline'] == null
? null
: SourceOffline.fromJson(map['offline']),
online: map['online'] == null
? null
: AccountOwnershipDeclaration.fromJson(map['online']),
status: MandateBacsDebitNetworkStatus.fromJson(map['status']),
type: map['type'] == null
? null
: CustomerAcceptanceType.fromJson(map['type']),
userAgent:
map['user_agent'] == null ? null : (map['user_agent'] as String),
);
}