getShippingZones method
Returns a list of all WooShippingZone.
Related endpoint: https://woocommerce.github.io/woocommerce-rest-api-docs/#shipping-zones.
Implementation
Future<List<WooShippingZone>> getShippingZones() async {
List<WooShippingZone> shippingZones = [];
_setApiResourceUrl(path: 'shipping/zones');
final response = await get(queryUri.toString());
for (var z in response) {
var sZone = WooShippingZone.fromJson(z);
_printToLog('shipping zones gotten here : ' + sZone.toString());
shippingZones.add(sZone);
}
return shippingZones;
}