commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
ShippingMethodChangeValueModel.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
ShippingMethodChangeValueModel
extends
JsonObjectModel
implements
ShippingMethodChangeValue
21
{
22
23
28
protected
$id
;
29
34
protected
$name
;
35
36
40
public
function
__construct
(
41
?
string
$id
=
null
,
42
?
string
$name
=
null
43
) {
44
$this->
id
=
$id
;
45
$this->name =
$name
;
46
47
}
48
55
public
function
getId
()
56
{
57
if
(is_null($this->
id
)) {
59
$data = $this->
raw
(self::FIELD_ID);
60
if
(is_null($data)) {
61
return
null
;
62
}
63
$this->
id
= (string) $data;
64
}
65
66
return
$this->id
;
67
}
68
75
public
function
getName
()
76
{
77
if
(is_null($this->name)) {
79
$data = $this->
raw
(self::FIELD_NAME);
80
if
(is_null($data)) {
81
return
null
;
82
}
83
$this->name = (string) $data;
84
}
85
86
return
$this->name
;
87
}
88
89
93
public
function
setId
(?
string
$id
): void
94
{
95
$this->
id
=
$id
;
96
}
97
101
public
function
setName
(?
string
$name
): void
102
{
103
$this->name =
$name
;
104
}
105
106
107
108
}
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\ShippingMethodChangeValueModel
Definition:
ShippingMethodChangeValueModel.php:21
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\getName
getName()
Definition:
ShippingMethodChangeValueModel.php:75
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\getId
getId()
Definition:
ShippingMethodChangeValueModel.php:55
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\__construct
__construct(?string $id=null, ?string $name=null)
Definition:
ShippingMethodChangeValueModel.php:40
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\$name
$name
Definition:
ShippingMethodChangeValueModel.php:34
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\setName
setName(?string $name)
Definition:
ShippingMethodChangeValueModel.php:101
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\$id
$id
Definition:
ShippingMethodChangeValueModel.php:28
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueModel\setId
setId(?string $id)
Definition:
ShippingMethodChangeValueModel.php:93
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValue
Definition:
ShippingMethodChangeValue.php:15
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1