commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Change
UnpublishChangeModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
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
UnpublishChangeModel
extends
JsonObjectModel
implements
UnpublishChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'UnpublishChange'
;
28
protected
$type
;
29
34
protected
$change
;
35
36
40
public
function
__construct
(
41
?
string
$change
=
null
,
42
?
string
$type
=
null
43
) {
44
$this->change =
$change
;
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
70
public
function
getChange
()
71
{
72
if
(is_null($this->change)) {
74
$data = $this->
raw
(self::FIELD_CHANGE);
75
if
(is_null($data)) {
76
return
null
;
77
}
78
$this->change = (string) $data;
79
}
80
81
return
$this->change
;
82
}
83
84
88
public
function
setChange
(?
string
$change
): void
89
{
90
$this->change =
$change
;
91
}
92
93
94
95
}
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\Change\UnpublishChangeModel
Definition:
UnpublishChangeModel.php:21
Commercetools\History\Models\Change\UnpublishChangeModel\$change
$change
Definition:
UnpublishChangeModel.php:34
Commercetools\History\Models\Change\UnpublishChangeModel\getChange
getChange()
Definition:
UnpublishChangeModel.php:70
Commercetools\History\Models\Change\UnpublishChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
UnpublishChangeModel.php:23
Commercetools\History\Models\Change\UnpublishChangeModel\setChange
setChange(?string $change)
Definition:
UnpublishChangeModel.php:88
Commercetools\History\Models\Change\UnpublishChangeModel\__construct
__construct(?string $change=null, ?string $type=null)
Definition:
UnpublishChangeModel.php:40
Commercetools\History\Models\Change\UnpublishChangeModel\getType
getType()
Definition:
UnpublishChangeModel.php:52
Commercetools\History\Models\Change\UnpublishChangeModel\$type
$type
Definition:
UnpublishChangeModel.php:28
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Change\UnpublishChange
Definition:
UnpublishChange.php:15
Commercetools\History\Models\Change
Definition:
AddAddressChange.php:9
Generated by
1.9.1