commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Inventory
InventoryEntryResourceIdentifierModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Inventory
;
10
11
use
Commercetools\Api\Models\Common\ResourceIdentifier
;
12
use
Commercetools\Api\Models\Common\ResourceIdentifierModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
InventoryEntryResourceIdentifierModel
extends
JsonObjectModel
implements
InventoryEntryResourceIdentifier
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'inventory-entry'
;
29
protected
$typeId
;
30
35
protected
$id
;
36
41
protected
$key
;
42
43
47
public
function
__construct
(
48
?
string
$id
=
null
,
49
?
string
$key
=
null
,
50
?
string
$typeId
=
null
51
) {
52
$this->
id
=
$id
;
53
$this->key =
$key
;
54
$this->typeId =
$typeId
??
self::DISCRIMINATOR_VALUE
;
55
}
56
61
public
function
getTypeId
()
62
{
63
if
(is_null($this->typeId)) {
65
$data = $this->
raw
(self::FIELD_TYPE_ID);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->typeId = (string) $data;
70
}
71
72
return
$this->typeId
;
73
}
74
81
public
function
getId
()
82
{
83
if
(is_null($this->
id
)) {
85
$data = $this->
raw
(self::FIELD_ID);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
$this->
id
= (string) $data;
90
}
91
92
return
$this->id
;
93
}
94
101
public
function
getKey
()
102
{
103
if
(is_null($this->key)) {
105
$data = $this->
raw
(self::FIELD_KEY);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
$this->key = (string) $data;
110
}
111
112
return
$this->key
;
113
}
114
115
119
public
function
setId
(?
string
$id
): void
120
{
121
$this->
id
=
$id
;
122
}
123
127
public
function
setKey
(?
string
$key
): void
128
{
129
$this->key =
$key
;
130
}
131
}
Commercetools\Api\Models\Common\ResourceIdentifierModel
Definition
ResourceIdentifierModel.php:91
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel
Definition
InventoryEntryResourceIdentifierModel.php:23
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\setId
setId(?string $id)
Definition
InventoryEntryResourceIdentifierModel.php:119
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\getTypeId
getTypeId()
Definition
InventoryEntryResourceIdentifierModel.php:61
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\getKey
getKey()
Definition
InventoryEntryResourceIdentifierModel.php:101
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\setKey
setKey(?string $key)
Definition
InventoryEntryResourceIdentifierModel.php:127
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\$typeId
$typeId
Definition
InventoryEntryResourceIdentifierModel.php:29
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\$key
$key
Definition
InventoryEntryResourceIdentifierModel.php:41
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\$id
$id
Definition
InventoryEntryResourceIdentifierModel.php:35
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\getId
getId()
Definition
InventoryEntryResourceIdentifierModel.php:81
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
InventoryEntryResourceIdentifierModel.php:24
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifierModel\__construct
__construct(?string $id=null, ?string $key=null, ?string $typeId=null)
Definition
InventoryEntryResourceIdentifierModel.php:47
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\Api\Models\Common\ResourceIdentifier
Definition
ResourceIdentifier.php:50
Commercetools\Api\Models\Inventory\InventoryEntryResourceIdentifier
Definition
InventoryEntryResourceIdentifier.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Inventory
Definition
InventoryEntry.php:9
Generated by
1.9.8