getCouponById method

Future<WooCoupon> getCouponById(
  1. int id
)

Returns a WooCoupon object with the specified id.

Implementation

Future<WooCoupon> getCouponById(int id) async {
  _setApiResourceUrl(path: 'coupons/' + id.toString());
  final response = await get(queryUri.toString());
  return WooCoupon.fromJson(response);
}