The createCoupon()
method takes a CreateCouponRequest
object as its only parameter.
$request = $stripe->coupons->createCouponRequest("once")->setPercentOff(50);
$stripe->coupons->createCoupon($request);
$coupon = $stripe->coupons->getCoupon("coupon_id");
$stripe->coupons->deleteCoupon("coupon_id");
$coupons = $stripe->coupons->listCoupons();