commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Importcontainers
ImportContainerUpdateDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Importcontainers
;
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
ImportContainerUpdateDraftModel
extends
JsonObjectModel
implements
ImportContainerUpdateDraft
21
{
26
protected
$version
;
27
32
protected
$resourceType
;
33
34
38
public
function
__construct
(
39
?
int
$version
=
null
,
40
?
string
$resourceType
=
null
41
) {
42
$this->version =
$version
;
43
$this->resourceType =
$resourceType
;
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
73
public
function
getResourceType
()
74
{
75
if
(is_null($this->resourceType)) {
77
$data = $this->
raw
(self::FIELD_RESOURCE_TYPE);
78
if
(is_null($data)) {
79
return
null
;
80
}
81
$this->resourceType = (string) $data;
82
}
83
84
return
$this->resourceType
;
85
}
86
87
91
public
function
setVersion
(?
int
$version
): void
92
{
93
$this->version =
$version
;
94
}
95
99
public
function
setResourceType
(?
string
$resourceType
): void
100
{
101
$this->resourceType =
$resourceType
;
102
}
103
}
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\Import\Models\Importcontainers\ImportContainerUpdateDraftModel
Definition:
ImportContainerUpdateDraftModel.php:21
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\getResourceType
getResourceType()
Definition:
ImportContainerUpdateDraftModel.php:73
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\getVersion
getVersion()
Definition:
ImportContainerUpdateDraftModel.php:52
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\$resourceType
$resourceType
Definition:
ImportContainerUpdateDraftModel.php:32
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\$version
$version
Definition:
ImportContainerUpdateDraftModel.php:26
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\setResourceType
setResourceType(?string $resourceType)
Definition:
ImportContainerUpdateDraftModel.php:99
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\__construct
__construct(?int $version=null, ?string $resourceType=null)
Definition:
ImportContainerUpdateDraftModel.php:38
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraftModel\setVersion
setVersion(?int $version)
Definition:
ImportContainerUpdateDraftModel.php:91
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Importcontainers\ImportContainerUpdateDraft
Definition:
ImportContainerUpdateDraft.php:15
Commercetools\Import\Models\Importcontainers
Definition:
ImportContainer.php:9
Generated by
1.9.1