commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ShippingMethod
ShippingMethodUpdateModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ShippingMethod
;
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
ShippingMethodUpdateModel
extends
JsonObjectModel
implements
ShippingMethodUpdate
21
{
26
protected
$version
;
27
32
protected
$actions
;
33
34
38
public
function
__construct
(
39
?
int
$version
=
null
,
40
?
ShippingMethodUpdateActionCollection
$actions
=
null
41
) {
42
$this->version =
$version
;
43
$this->actions =
$actions
;
44
}
45
52
public
function
getVersion
()
53
{
54
if
(is_null($this->version)) {
56
$data = $this->
raw
(self::FIELD_VERSION);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->version = (int) $data;
61
}
62
63
return
$this->version
;
64
}
65
72
public
function
getActions
()
73
{
74
if
(is_null($this->actions)) {
76
$data = $this->
raw
(self::FIELD_ACTIONS);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->actions =
ShippingMethodUpdateActionCollection::fromArray
($data);
81
}
82
83
return
$this->actions
;
84
}
85
86
90
public
function
setVersion
(?
int
$version
): void
91
{
92
$this->version =
$version
;
93
}
94
98
public
function
setActions
(?
ShippingMethodUpdateActionCollection
$actions
): void
99
{
100
$this->actions =
$actions
;
101
}
102
}
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateActionCollection
Definition:
ShippingMethodUpdateActionCollection.php:26
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel
Definition:
ShippingMethodUpdateModel.php:21
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\$version
$version
Definition:
ShippingMethodUpdateModel.php:26
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\getVersion
getVersion()
Definition:
ShippingMethodUpdateModel.php:52
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\__construct
__construct(?int $version=null, ?ShippingMethodUpdateActionCollection $actions=null)
Definition:
ShippingMethodUpdateModel.php:38
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\setActions
setActions(?ShippingMethodUpdateActionCollection $actions)
Definition:
ShippingMethodUpdateModel.php:98
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\setVersion
setVersion(?int $version)
Definition:
ShippingMethodUpdateModel.php:90
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\$actions
$actions
Definition:
ShippingMethodUpdateModel.php:32
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdateModel\getActions
getActions()
Definition:
ShippingMethodUpdateModel.php:72
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\Base\MapperSequence\fromArray
static fromArray(array $data)
Definition:
MapperSequence.php:56
Commercetools\Api\Models\ShippingMethod\ShippingMethodUpdate
Definition:
ShippingMethodUpdate.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ShippingMethod
Definition:
CartClassificationTier.php:9
Generated by
1.9.1