listWebhooks method
Implementation
Future<void> listWebhooks({String? storeId}) async {
Options dioOptions = Options(
headers: {
"Authorization": "Bearer $apiKey",
"Accept": "application/vnd.api+json",
"Content-Type": "application/vnd.api+json",
},
);
try {
String url = "https://api.lemonsqueezy.com/v1/webhooks";
if (storeId != null) {
url += "?filter[store_id]=$storeId";
}
Response response = await dio.get(
url,
options: dioOptions,
);
print(response.data);
} catch (e) {
print('Error listing webhooks: $e');
}
}