# ProductVariation

class ProductVariation extends DataModel

ProductVariation Model. Each product defines its own variations, that means variations are not global in contrast to specifics.

## Constants

TYPE_RADIO |
TYPE_SELECT |
TYPE_TEXTBOX |
TYPE_FREE_TEXT |
TYPE_FREE_TEXT_OBLIGATORY |
TYPE_IMAGE_SWATCHES |

## Properties

protected array | $fields |  | from DataModel
protected boolean | $isEncrypted |  | from DataModel
protected Identity | $id |  |
protected Identity | $productId |  |
protected integer | $sort |  |
protected string | $type |  |
protected ProductVariationI18n[] | $i18ns |  |
protected ProductVariationInvisibility[] | $invisibilities |  |
protected ProductVariationValue[] | $values |  |

## Methods

__construct()

Constructor

multitype:
getProperties()

Get the Model Properties

from Model
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
DataType
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
ProductVariation
setId(Identity $id)

No description

Identity
getId()

No description

ProductVariation
setProductId(Identity $productId)

No description

Identity
getProductId()

No description

ProductVariation
setSort(integer $sort)

No description

integer
getSort()

No description

ProductVariation
setType(string $type)

No description

string
getType()

No description

ProductVariation
addI18n(ProductVariationI18n $i18n)

No description

ProductVariation
setI18ns(array $i18ns)

No description

ProductVariationI18n[]
getI18ns()

No description

ProductVariation
clearI18ns()

No description

ProductVariation
addInvisibility(ProductVariationInvisibility $invisibility)

No description

ProductVariation
setInvisibilities(array $invisibilities)

No description

ProductVariationInvisibility[]
getInvisibilities()

No description

ProductVariation
clearInvisibilities()

No description

ProductVariation
addValue(ProductVariationValue $value)

No description

ProductVariation
setValues(array $values)

No description

ProductVariationValue[]
getValues()

No description

ProductVariation
clearValues()

No description

## Details

###
at line 107
`__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 118
`ProductVariation setId(Identity $id)`

#### Parameters

Identity | $id | Unique productVariation id

#### Return Value

ProductVariation |

#### Exceptions

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

###
at line 126
`Identity getId()`

#### Return Value

Identity | Unique productVariation id

###
at line 136
`ProductVariation setProductId(Identity $productId)`

#### Parameters

Identity | $productId | Reference to product

#### Return Value

ProductVariation |

#### Exceptions

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

###
at line 144
`Identity getProductId()`

#### Return Value

Identity | Reference to product

###
at line 153
`ProductVariation setSort(integer $sort)`

#### Parameters

integer | $sort | Optional sort number

#### Return Value

ProductVariation |

###
at line 161
`integer getSort()`

#### Return Value

integer | Optional sort number

###
at line 170
`ProductVariation setType(string $type)`

#### Parameters

string | $type |

#### Return Value

ProductVariation |

###
at line 178
`string getType()`

#### Return Value

string |

###
at line 187
`ProductVariation addI18n(ProductVariationI18n $i18n)`

#### Parameters

ProductVariationI18n | $i18n |

#### Return Value

ProductVariation |

###
at line 197
`ProductVariation setI18ns(array $i18ns)`

#### Parameters

array | $i18ns |

#### Return Value

ProductVariation |

###
at line 206
`ProductVariationI18n[] getI18ns()`

#### Return Value

ProductVariationI18n[] |

###
at line 214
`ProductVariation clearI18ns()`

#### Return Value

ProductVariation |

###
at line 224
`ProductVariation addInvisibility(ProductVariationInvisibility $invisibility)`

#### Parameters

ProductVariationInvisibility | $invisibility |

#### Return Value

ProductVariation |

###
at line 234
`ProductVariation setInvisibilities(array $invisibilities)`

#### Parameters

array | $invisibilities |

#### Return Value

ProductVariation |

###
at line 243
`ProductVariationInvisibility[] getInvisibilities()`

#### Return Value

ProductVariationInvisibility[] |

###
at line 251
`ProductVariation clearInvisibilities()`

#### Return Value

ProductVariation |

###
at line 261
`ProductVariation addValue(ProductVariationValue $value)`

#### Parameters

ProductVariationValue | $value |

#### Return Value

ProductVariation |

###
at line 271
`ProductVariation setValues(array $values)`

#### Parameters

array | $values |

#### Return Value

ProductVariation |

###
at line 280
`ProductVariationValue[] getValues()`

#### Return Value

ProductVariationValue[] |

###
at line 288
`ProductVariation clearValues()`

#### Return Value

ProductVariation |