[Cakepay] alert iOS availability (#1837)

* feat: alert iOS availability

* feat: use regex, check iOS
This commit is contained in:
Rafael 2024-11-28 13:50:30 -03:00 committed by GitHub
parent 9cd69c4ba3
commit 63f26c034f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 100 additions and 12 deletions

View file

@ -172,14 +172,12 @@ class CakePayApi {
}
/// Get Countries
Future<List<Country>> getCountries(
{required String CSRFToken, required String authorization}) async {
Future<List<Country>> getCountries({required String apiKey}) async {
final uri = Uri.https(baseCakePayUri, countriesPath);
final headers = {
'accept': 'application/json',
'authorization': authorization,
'X-CSRFToken': CSRFToken,
'Authorization': 'Api-Key $apiKey',
};
final response = await http.get(uri, headers: headers);
@ -198,8 +196,7 @@ class CakePayApi {
/// Get Vendors
Future<List<CakePayVendor>> getVendors({
required String CSRFToken,
required String authorization,
required String apiKey,
int? page,
String? country,
String? countryCode,
@ -226,8 +223,7 @@ class CakePayApi {
var headers = {
'accept': 'application/json; charset=UTF-8',
'authorization': authorization,
'X-CSRFToken': CSRFToken,
'Authorization': 'Api-Key $apiKey',
};
var response = await http.get(uri, headers: headers);