You are here

public function Coupon::setUsageLimit in Commerce Core 8.2

Sets the coupon usage limit.

Parameters

int $usage_limit: The coupon usage limit.

Return value

$this

Overrides CouponInterface::setUsageLimit

File

modules/promotion/src/Entity/Coupon.php, line 129

Class

Coupon
Defines the Coupon entity.

Namespace

Drupal\commerce_promotion\Entity

Code

public function setUsageLimit($usage_limit) {
  $this
    ->set('usage_limit', $usage_limit);
  return $this;
}