class ProductSpecialPrice extends DataModel

Special product price properties to specify date and stock limits.

Properties

protected array $fields from DataModel
protected boolean $isEncrypted from DataModel
protected Identity $id
protected Identity $productId
protected DateTime $activeFromDate
protected DateTime $activeUntilDate
protected boolean $considerDateLimit
protected boolean $considerStockLimit
protected boolean $isActive
protected integer $stockLimit
protected ProductSpecialPriceItem[] $items

Methods

__construct()

Constructor

multitype:
getProperties()

Get the Model Properties

from Model
setOptions(stdClass $object = null, array $options = null)

Sets Properties with matching Array Values

from DataModel
stdClass
getPublic(array $publics = array('fields', 'isEncrypted', 'identities', '_type'))

Convert the Model into stdClass Object

from DataModel
toJson()

No description

from Model
mixed:string
getFields()

Fields Getter

from DataModel
validate()

Object Validation

from DataModel
mixed:string|NULL
getField(boolean $toWawi = false, string $key)

Get a Model Member Name

from DataModel
map(boolean $toWawi = false, stdClass $obj = null)

Object Mapping

from DataModel
getModelType()

No description

from DataModel
boolean
isEncrypted()

Encrypted Status

from DataModel
setIdentity(string $propertyName, string|null $endpoint = null, int|null $host = null)

No description

from DataModel
setProperty($name, $value, $type)

No description

from DataModel
validateType($value, $type)

No description

from DataModel
setId(Identity $id)

No description

getId()

No description

setProductId(Identity $productId)

No description

getProductId()

No description

setActiveFromDate(DateTime $activeFromDate = null)

No description

getActiveFromDate()

No description

setActiveUntilDate(DateTime $activeUntilDate = null)

No description

getActiveUntilDate()

No description

setConsiderDateLimit(boolean $considerDateLimit)

No description

boolean
getConsiderDateLimit()

No description

setConsiderStockLimit(boolean $considerStockLimit)

No description

boolean
getConsiderStockLimit()

No description

setIsActive(boolean $isActive)

No description

boolean
getIsActive()

No description

setStockLimit(integer $stockLimit)

No description

integer
getStockLimit()

No description

setItems(array $items)

No description

getItems()

No description

clearItems()

No description

Details

at line 99
__construct()

Constructor

in Model at line 33
multitype: getProperties()

Get the Model Properties

Return Value

multitype: string

in DataModel at line 172
Model setOptions(stdClass $object = null, array $options = null)

Sets Properties with matching Array Values

Parameters

stdClass $object
array $options

Return Value

Model

in DataModel at line 70
stdClass getPublic(array $publics = array('fields', 'isEncrypted', 'identities', '_type'))

Convert the Model into stdClass Object

Parameters

array $publics

Return Value

stdClass $object

in Model at line 115
toJson()

in DataModel at line 35
mixed:string getFields()

Fields Getter

Return Value

mixed:string

in DataModel at line 45
validate()

Object Validation

Exceptions

SchemaException

in DataModel at line 59
mixed:string|NULL getField(boolean $toWawi = false, string $key)

Get a Model Member Name

Parameters

boolean $toWawi
string $key

Return Value

mixed:string|NULL

in DataModel at line 81
map(boolean $toWawi = false, stdClass $obj = null)

Object Mapping

Parameters

boolean $toWawi
stdClass $obj Object to map

in DataModel at line 42
DataType getModelType()

Return Value

DataType

in DataModel at line 59
boolean isEncrypted()

Encrypted Status

Return Value

boolean

in DataModel at line 123
setIdentity(string $propertyName, string|null $endpoint = null, int|null $host = null)

Parameters

string $propertyName
string|null $endpoint
int|null $host

in DataModel at line 179
protected setProperty($name, $value, $type)

Parameters

$name
$value
$type

in DataModel at line 190
protected validateType($value, $type)

Parameters

$value
$type

at line 110
ProductSpecialPrice setId(Identity $id)

Parameters

Identity $id Unique productSpecialPrice id

Return Value

ProductSpecialPrice

Exceptions

InvalidArgumentException if the provided argument is not of type 'Identity'.

at line 118
Identity getId()

Return Value

Identity Unique productSpecialPrice id

at line 128
ProductSpecialPrice setProductId(Identity $productId)

Parameters

Identity $productId Reference to product

Return Value

ProductSpecialPrice

Exceptions

InvalidArgumentException if the provided argument is not of type 'Identity'.

at line 136
Identity getProductId()

Return Value

Identity Reference to product

at line 146
ProductSpecialPrice setActiveFromDate(DateTime $activeFromDate = null)

Parameters

DateTime $activeFromDate Optional: Activate special price from date

Return Value

ProductSpecialPrice

Exceptions

InvalidArgumentException if the provided argument is not of type 'DateTime'.

at line 154
DateTime getActiveFromDate()

Return Value

DateTime Optional: Activate special price from date

at line 164
ProductSpecialPrice setActiveUntilDate(DateTime $activeUntilDate = null)

Parameters

DateTime $activeUntilDate Optional: Special price active until date

Return Value

ProductSpecialPrice

Exceptions

InvalidArgumentException if the provided argument is not of type 'DateTime'.

at line 172
DateTime getActiveUntilDate()

Return Value

DateTime Optional: Special price active until date

at line 181
ProductSpecialPrice setConsiderDateLimit(boolean $considerDateLimit)

Parameters

boolean $considerDateLimit Optional: Consider activeFrom/activeUntil date range. If true, specialPrice will get active from activeFrom-date and will stop after activeUntil-date.

Return Value

ProductSpecialPrice

at line 189
boolean getConsiderDateLimit()

Return Value

boolean Optional: Consider activeFrom/activeUntil date range. If true, specialPrice will get active from activeFrom-date and will stop after activeUntil-date.

at line 198
ProductSpecialPrice setConsiderStockLimit(boolean $considerStockLimit)

Parameters

boolean $considerStockLimit Optional: Consider stockLimit value. If true, specialPrice will be only active until product stockLevel is greater or equal stockLimit.

Return Value

ProductSpecialPrice

at line 206
boolean getConsiderStockLimit()

Return Value

boolean Optional: Consider stockLimit value. If true, specialPrice will be only active until product stockLevel is greater or equal stockLimit.

at line 215
ProductSpecialPrice setIsActive(boolean $isActive)

Parameters

boolean $isActive Special price is active? Default true, to activate specialPrice. Special price can still be inactivated, if date or stock Limitations do not match.

Return Value

ProductSpecialPrice

at line 223
boolean getIsActive()

Return Value

boolean Special price is active? Default true, to activate specialPrice. Special price can still be inactivated, if date or stock Limitations do not match.

at line 232
ProductSpecialPrice setStockLimit(integer $stockLimit)

Parameters

integer $stockLimit Optional: SpecialPrice active until stock level quantity

Return Value

ProductSpecialPrice

at line 240
integer getStockLimit()

Return Value

integer Optional: SpecialPrice active until stock level quantity

at line 249
ProductSpecialPrice addItem(ProductSpecialPriceItem $item)

Parameters

ProductSpecialPriceItem $item

Return Value

ProductSpecialPrice

at line 259
ProductSpecialPrice setItems(array $items)

Parameters

array $items

Return Value

ProductSpecialPrice

at line 268
ProductSpecialPriceItem[] getItems()

Return Value

ProductSpecialPriceItem[]

at line 276
ProductSpecialPrice clearItems()

Return Value

ProductSpecialPrice