IFSC Code Validation and Add Beneficiary Validation API integration
This commit is contained in:
37
lib/data/models/beneficiary.dart
Normal file
37
lib/data/models/beneficiary.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
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)';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user