getBanks method
Implementation
@override
Future<Either<Failure, GetBanksResponseEntity>> getBanks({
required String token,
}) async {
try {
final response = await httpClient.get(
'/payment/pse/banks',
options: Options(
headers: {
'Authorization': 'Bearer $token',
},
),
);
return Right(
GetBanksResponse.fromJson(
response.data,
),
);
} catch (e) {
return Left(
Failure(
message: e.toString(),
),
);
}
}