37 lines
834 B
Dart
37 lines
834 B
Dart
class Beneficiary {
|
|
final String accountNo;
|
|
final String accountType;
|
|
final String name;
|
|
final String ifscCode;
|
|
|
|
|
|
Beneficiary({
|
|
required this.accountNo,
|
|
required this.accountType,
|
|
required this.name,
|
|
required this.ifscCode,
|
|
});
|
|
|
|
factory Beneficiary.fromJson(Map<String, dynamic> json) {
|
|
return Beneficiary(
|
|
accountNo: json['accountNo'] ?? '',
|
|
accountType: json['accountType'] ?? '',
|
|
name: json['name'] ?? '',
|
|
ifscCode: json['ifscCode'] ?? '',
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'accountNo': accountNo,
|
|
'accountType': accountType,
|
|
'name': name,
|
|
'ifscCode' : ifscCode,
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Beneficiary(accountNo: $accountNo, accountType: $accountType, ifscCode: $ifscCode, name: $name)';
|
|
}
|
|
} |