Copied!

DiscountStructInterface

DiscountStructInterface.php : 17
Interface

Methods

publicaddCondition()

DiscountStructInterface.php : 69
public addCondition(DiscountConditionInterface $condition) : $this

Parameters

Name Type Default value Description
$condition DiscountConditionInterface - -

Return values

$this

publicgetConditions()

DiscountStructInterface.php : 64
public getConditions() : array<string|int, DiscountConditionInterface>

Return values

array<string|int, DiscountConditionInterface>

publicgetContext()

DiscountStructInterface.php : 106

Returns the discount context.

public getContext() : MapInterface<string, mixed>|null

The context is a set of key-value pairs that can be used to store additional information about the discount.

Return values

MapInterface<string, mixed>|null

publicgetCreatedAt()

DiscountStructInterface.php : 85
public getCreatedAt() : DateTimeInterface|null

Return values

DateTimeInterface|null

publicgetEndDate()

DiscountStructInterface.php : 78
public getEndDate() : DateTimeInterface|null

Return values

DateTimeInterface|null

publicgetIdentifier()

DiscountStructInterface.php : 19
public getIdentifier() : string|null

Return values

string|null

publicgetPriority()

DiscountStructInterface.php : 26
public getPriority() : int|null

Return values

int|null

publicgetRule()

DiscountStructInterface.php : 47
public getRule() : DiscountRuleInterface|null

Return values

DiscountRuleInterface|null

publicgetStartDate()

DiscountStructInterface.php : 54
public getStartDate() : DateTimeInterface|null

Return values

DateTimeInterface|null

publicgetUpdatedAt()

DiscountStructInterface.php : 92
public getUpdatedAt() : DateTimeInterface|null

Return values

DateTimeInterface|null

publicgetUser()

DiscountStructInterface.php : 40
public getUser() : User|null

Return values

User|null

publicisEnabled()

DiscountStructInterface.php : 33
public isEnabled() : bool|null

Return values

bool|null

publicsetConditions()

DiscountStructInterface.php : 76
public setConditions(array<string|int, DiscountConditionInterface$conditions) : $this

Parameters

Name Type Default value Description
$conditions array<string|int, DiscountConditionInterface> - -

Return values

$this

publicsetContext()

DiscountStructInterface.php : 115

Sets the discount context.

public setContext(MapInterface<string, mixed>|null $context) : self

The context is a set of key-value pairs that can be used to store additional information about the discount.

Parameters

Name Type Default value Description
$context MapInterface<string, mixed>|null - -

Return values

self

publicsetCreatedAt()

DiscountStructInterface.php : 90
public setCreatedAt(DateTimeInterface|null $createdAt) : $this

Parameters

Name Type Default value Description
$createdAt DateTimeInterface|null - -

Return values

$this

publicsetEnabled()

DiscountStructInterface.php : 38
public setEnabled(bool $isEnabled) : $this

Parameters

Name Type Default value Description
$isEnabled bool - -

Return values

$this

publicsetEndDate()

DiscountStructInterface.php : 83
public setEndDate(DateTimeInterface|null $endDate) : $this

Parameters

Name Type Default value Description
$endDate DateTimeInterface|null - -

Return values

$this

publicsetIdentifier()

DiscountStructInterface.php : 24
public setIdentifier(string $identifier) : $this

Parameters

Name Type Default value Description
$identifier string - -

Return values

$this

publicsetPriority()

DiscountStructInterface.php : 31
public setPriority(int $priority) : $this

Parameters

Name Type Default value Description
$priority int - -

Return values

$this

publicsetRule()

DiscountStructInterface.php : 52
public setRule(DiscountRuleInterface $rule) : $this

Parameters

Name Type Default value Description
$rule DiscountRuleInterface - -

Return values

$this

publicsetStartDate()

DiscountStructInterface.php : 59
public setStartDate(DateTimeInterface $startDate) : $this

Parameters

Name Type Default value Description
$startDate DateTimeInterface - -

Return values

$this

publicsetUpdatedAt()

DiscountStructInterface.php : 97
public setUpdatedAt(DateTimeInterface|null $updatedAt) : $this

Parameters

Name Type Default value Description
$updatedAt DateTimeInterface|null - -

Return values

$this

publicsetUser()

DiscountStructInterface.php : 45
public setUser(User $user) : $this

Parameters

Name Type Default value Description
$user User - -

Return values

$this