commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
ChangeValueRelativeChangeValueModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
ChangeValueRelativeChangeValueModel
extends
JsonObjectModel
implements
ChangeValueRelativeChangeValue
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'relative'
;
28
protected
$type
;
29
34
protected
$permyriad
;
35
36
40
public
function
__construct
(
41
?
int
$permyriad
=
null
,
42
?
string
$type
=
null
43
) {
44
$this->permyriad =
$permyriad
;
45
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
46
}
47
52
public
function
getType
()
53
{
54
if
(is_null($this->type)) {
56
$data = $this->
raw
(self::FIELD_TYPE);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->type = (string) $data;
61
}
62
63
return
$this->type
;
64
}
65
72
public
function
getPermyriad
()
73
{
74
if
(is_null($this->permyriad)) {
76
$data = $this->
raw
(self::FIELD_PERMYRIAD);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->permyriad = (int) $data;
81
}
82
83
return
$this->permyriad
;
84
}
85
86
90
public
function
setPermyriad
(?
int
$permyriad
): void
91
{
92
$this->permyriad =
$permyriad
;
93
}
94
95
96
97
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel
Definition:
ChangeValueRelativeChangeValueModel.php:21
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\$type
$type
Definition:
ChangeValueRelativeChangeValueModel.php:28
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
ChangeValueRelativeChangeValueModel.php:23
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\$permyriad
$permyriad
Definition:
ChangeValueRelativeChangeValueModel.php:34
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\getType
getType()
Definition:
ChangeValueRelativeChangeValueModel.php:52
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\setPermyriad
setPermyriad(?int $permyriad)
Definition:
ChangeValueRelativeChangeValueModel.php:90
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\getPermyriad
getPermyriad()
Definition:
ChangeValueRelativeChangeValueModel.php:72
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValueModel\__construct
__construct(?int $permyriad=null, ?string $type=null)
Definition:
ChangeValueRelativeChangeValueModel.php:40
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\ChangeValueRelativeChangeValue
Definition:
ChangeValueRelativeChangeValue.php:15
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1