/home/techb158/immovalet.com/vendor/laravel/cashier/src/Concerns
Edit: /home/techb158/immovalet.com/vendor/laravel/cashier/src/Concerns/AllowsCoupons.php (1584B)
couponId = $couponId;
return $this;
}
/**
* The promotion code ID to apply.
*
* @param string $promotionCodeId
* @return $this
*/
public function withPromotionCode($promotionCodeId)
{
$this->promotionCodeId = $promotionCodeId;
return $this;
}
/**
* Enables user redeemable promotion codes for a Stripe Checkout session.
*
* @return $this
*/
public function allowPromotionCodes()
{
$this->allowPromotionCodes = true;
return $this;
}
/**
* Return the discounts for a Stripe Checkout session.
*
* @return array[]|null
*/
protected function checkoutDiscounts()
{
if ($this->couponId) {
return [['coupon' => $this->couponId]];
}
if ($this->promotionCodeId) {
return [['promotion_code' => $this->promotionCodeId]];
}
}
}