interface CouponInterface

Interface CouponInterface contains base methods for coupon

Methods

string
getCode()

Get code

setCode(string $code)

Set code

integer
getUsageLimit()

Get usage limit

setUsageLimit(integer $usageLimit)

Set usage limit

integer
getUsed()

Get number of times this coupon has been used

setUsed(integer $used)

Set number of times this coupon has been used

incrementUsed()

Increment usage

getPromotion()

Get associated promotion

setPromotion(PromotionInterface $promotion = null)

Set the associated promotion

bool
isValid()

Is this coupon valid

Details

at line 22
string getCode()

Get code

Return Value

string

at line 31
CouponInterface setCode(string $code)

Set code

Parameters

string $code

Return Value

CouponInterface

at line 38
integer getUsageLimit()

Get usage limit

Return Value

integer

at line 47
CouponInterface setUsageLimit(integer $usageLimit)

Set usage limit

Parameters

integer $usageLimit

Return Value

CouponInterface

at line 54
integer getUsed()

Get number of times this coupon has been used

Return Value

integer

at line 63
CouponInterface setUsed(integer $used)

Set number of times this coupon has been used

Parameters

integer $used

Return Value

CouponInterface

at line 70
CouponInterface incrementUsed()

Increment usage

Return Value

CouponInterface

at line 77
PromotionInterface getPromotion()

Get associated promotion

Return Value

PromotionInterface

at line 86
CouponInterface setPromotion(PromotionInterface $promotion = null)

Set the associated promotion

Parameters

PromotionInterface $promotion

Return Value

CouponInterface

at line 94
bool isValid()

Is this coupon valid

Return Value

bool