commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Importcontainers
ImportContainerDraftModel.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
ImportContainerDraftModel
extends
JsonObjectModel
implements
ImportContainerDraft
21
{
26
protected
$key
;
27
32
protected
$resourceType
;
33
34
38
public
function
__construct
(
39
?
string
$key
=
null
,
40
?
string
$resourceType
=
null
41
) {
42
$this->key =
$key
;
43
$this->resourceType =
$resourceType
;
44
}
45
53
public
function
getKey
()
54
{
55
if
(is_null($this->key)) {
57
$data = $this->
raw
(self::FIELD_KEY);
58
if
(is_null($data)) {
59
return
null
;
60
}
61
$this->key = (string) $data;
62
}
63
64
return
$this->key
;
65
}
66
74
public
function
getResourceType
()
75
{
76
if
(is_null($this->resourceType)) {
78
$data = $this->
raw
(self::FIELD_RESOURCE_TYPE);
79
if
(is_null($data)) {
80
return
null
;
81
}
82
$this->resourceType = (string) $data;
83
}
84
85
return
$this->resourceType
;
86
}
87
88
92
public
function
setKey
(?
string
$key
): void
93
{
94
$this->key =
$key
;
95
}
96
100
public
function
setResourceType
(?
string
$resourceType
): void
101
{
102
$this->resourceType =
$resourceType
;
103
}
104
}
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\ImportContainerDraftModel
Definition:
ImportContainerDraftModel.php:21
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\setKey
setKey(?string $key)
Definition:
ImportContainerDraftModel.php:92
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\$resourceType
$resourceType
Definition:
ImportContainerDraftModel.php:32
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\__construct
__construct(?string $key=null, ?string $resourceType=null)
Definition:
ImportContainerDraftModel.php:38
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\getKey
getKey()
Definition:
ImportContainerDraftModel.php:53
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\$key
$key
Definition:
ImportContainerDraftModel.php:26
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\setResourceType
setResourceType(?string $resourceType)
Definition:
ImportContainerDraftModel.php:100
Commercetools\Import\Models\Importcontainers\ImportContainerDraftModel\getResourceType
getResourceType()
Definition:
ImportContainerDraftModel.php:74
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Importcontainers\ImportContainerDraft
Definition:
ImportContainerDraft.php:15
Commercetools\Import\Models\Importcontainers
Definition:
ImportContainer.php:9
Generated by
1.9.1