class Ifsc {
  final String ifscCode;
  final String bankName;
  final String branchName;

  Ifsc({
    required this.ifscCode,
    required this.bankName,
    required this.branchName,
  });

  factory Ifsc.fromJson(Map<String, dynamic> json) {
    return Ifsc(
      ifscCode: json['ifsc_code'] ?? '',
      bankName: json['bank_name'] ?? '',
      branchName: json['branch_name'] ?? '',
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'ifsc_code': ifscCode,
      'bank_name': bankName,
      'branch_name': branchName,
    };
  }

  @override
  String toString() {
    return 'IFSC(ifscCode: $ifscCode, bankName: $bankName, branchName: $branchName)';
  }
}
