commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
ChangeValueExternalChangeValueModel.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
ChangeValueExternalChangeValueModel
extends
JsonObjectModel
implements
ChangeValueExternalChangeValue
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'external'
;
28
protected
$type
;
29
30
34
public
function
__construct
(
35
?
string
$type
=
null
36
) {
37
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
38
}
39
44
public
function
getType
()
45
{
46
if
(is_null($this->type)) {
48
$data = $this->
raw
(self::FIELD_TYPE);
49
if
(is_null($data)) {
50
return
null
;
51
}
52
$this->type = (string) $data;
53
}
54
55
return
$this->type
;
56
}
57
58
59
60
61
62
}
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\ChangeValueExternalChangeValueModel
Definition:
ChangeValueExternalChangeValueModel.php:21
Commercetools\History\Models\ChangeValue\ChangeValueExternalChangeValueModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
ChangeValueExternalChangeValueModel.php:23
Commercetools\History\Models\ChangeValue\ChangeValueExternalChangeValueModel\__construct
__construct(?string $type=null)
Definition:
ChangeValueExternalChangeValueModel.php:34
Commercetools\History\Models\ChangeValue\ChangeValueExternalChangeValueModel\getType
getType()
Definition:
ChangeValueExternalChangeValueModel.php:44
Commercetools\History\Models\ChangeValue\ChangeValueExternalChangeValueModel\$type
$type
Definition:
ChangeValueExternalChangeValueModel.php:28
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\ChangeValueExternalChangeValue
Definition:
ChangeValueExternalChangeValue.php:15
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1