getPaymentGateways method
Returns a list of all WooPaymentGateway object.
Related endpoint: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-payment-gateways.
Implementation
Future<List<WooPaymentGateway>> getPaymentGateways() async {
List<WooPaymentGateway> gateways = [];
_setApiResourceUrl(path: 'payment_gateways');
final response = await get(queryUri.toString());
for (var g in response) {
var sMethod = WooPaymentGateway.fromJson(g);
_printToLog(
'shipping zone locations gotten here : ' + sMethod.toString());
gateways.add(sMethod);
}
return gateways;
}