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