-
Notifications
You must be signed in to change notification settings - Fork 36
Coupons
Gilbert Kimutai edited this page Feb 20, 2019
·
1 revision
val coupon = Coupon()
coupon.code = code
coupon.description = description
woocommerce.CouponRepository().create(coupon).enqueue(object : Callback<Coupon> {
override fun onResponse(call: Call<Coupon>, response: Response<Coupon>) {
val couponResponse = response.body()
stopShowingLoading()
finish()
}
override fun onFailure(call: Call<Coupon>, t: Throwable) {
stopShowingLoading()
}
})