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
Warning
CannotCreateReservationWarningModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Warning
;
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
CannotCreateReservationWarningModel
extends
JsonObjectModel
implements
CannotCreateReservationWarning
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'CannotCreateReservation'
;
27
protected
$code
;
28
33
protected
$message
;
34
39
protected
$productId
;
40
45
protected
$sku
;
46
51
protected
$supplyChannel
;
52
57
protected
$quantity
;
58
59
63
public
function
__construct
(
64
?
string
$message
=
null
,
65
?
string
$productId
=
null
,
66
?
string
$sku
=
null
,
67
?
string
$supplyChannel
=
null
,
68
?
float
$quantity
=
null
,
69
?
string
$code
=
null
70
) {
71
$this->message =
$message
;
72
$this->productId =
$productId
;
73
$this->sku =
$sku
;
74
$this->supplyChannel =
$supplyChannel
;
75
$this->quantity =
$quantity
;
76
$this->code =
$code
??
self::DISCRIMINATOR_VALUE
;
77
}
78
83
public
function
getCode
()
84
{
85
if
(is_null($this->code)) {
87
$data = $this->
raw
(self::FIELD_CODE);
88
if
(is_null($data)) {
89
return
null
;
90
}
91
$this->code = (string) $data;
92
}
93
94
return
$this->code
;
95
}
96
103
public
function
getMessage
()
104
{
105
if
(is_null($this->message)) {
107
$data = $this->
raw
(self::FIELD_MESSAGE);
108
if
(is_null($data)) {
109
return
null
;
110
}
111
$this->message = (string) $data;
112
}
113
114
return
$this->message
;
115
}
116
123
public
function
getProductId
()
124
{
125
if
(is_null($this->productId)) {
127
$data = $this->
raw
(self::FIELD_PRODUCT_ID);
128
if
(is_null($data)) {
129
return
null
;
130
}
131
$this->productId = (string) $data;
132
}
133
134
return
$this->productId
;
135
}
136
143
public
function
getSku
()
144
{
145
if
(is_null($this->sku)) {
147
$data = $this->
raw
(self::FIELD_SKU);
148
if
(is_null($data)) {
149
return
null
;
150
}
151
$this->sku = (string) $data;
152
}
153
154
return
$this->sku
;
155
}
156
163
public
function
getSupplyChannel
()
164
{
165
if
(is_null($this->supplyChannel)) {
167
$data = $this->
raw
(self::FIELD_SUPPLY_CHANNEL);
168
if
(is_null($data)) {
169
return
null
;
170
}
171
$this->supplyChannel = (string) $data;
172
}
173
174
return
$this->supplyChannel
;
175
}
176
183
public
function
getQuantity
()
184
{
185
if
(is_null($this->quantity)) {
187
$data = $this->
raw
(self::FIELD_QUANTITY);
188
if
(is_null($data)) {
189
return
null
;
190
}
191
$this->quantity = (float) $data;
192
}
193
194
return
$this->quantity
;
195
}
196
197
201
public
function
setMessage
(?
string
$message
): void
202
{
203
$this->message =
$message
;
204
}
205
209
public
function
setProductId
(?
string
$productId
): void
210
{
211
$this->productId =
$productId
;
212
}
213
217
public
function
setSku
(?
string
$sku
): void
218
{
219
$this->sku =
$sku
;
220
}
221
225
public
function
setSupplyChannel
(?
string
$supplyChannel
): void
226
{
227
$this->supplyChannel =
$supplyChannel
;
228
}
229
233
public
function
setQuantity
(?
float
$quantity
): void
234
{
235
$this->quantity =
$quantity
;
236
}
237
}
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel
Definition
CannotCreateReservationWarningModel.php:21
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\setProductId
setProductId(?string $productId)
Definition
CannotCreateReservationWarningModel.php:209
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\$productId
$productId
Definition
CannotCreateReservationWarningModel.php:39
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\setSupplyChannel
setSupplyChannel(?string $supplyChannel)
Definition
CannotCreateReservationWarningModel.php:225
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\$sku
$sku
Definition
CannotCreateReservationWarningModel.php:45
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\getSupplyChannel
getSupplyChannel()
Definition
CannotCreateReservationWarningModel.php:163
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\$message
$message
Definition
CannotCreateReservationWarningModel.php:33
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\setSku
setSku(?string $sku)
Definition
CannotCreateReservationWarningModel.php:217
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\getCode
getCode()
Definition
CannotCreateReservationWarningModel.php:83
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\getMessage
getMessage()
Definition
CannotCreateReservationWarningModel.php:103
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\setMessage
setMessage(?string $message)
Definition
CannotCreateReservationWarningModel.php:201
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\setQuantity
setQuantity(?float $quantity)
Definition
CannotCreateReservationWarningModel.php:233
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\$quantity
$quantity
Definition
CannotCreateReservationWarningModel.php:57
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\getProductId
getProductId()
Definition
CannotCreateReservationWarningModel.php:123
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\$supplyChannel
$supplyChannel
Definition
CannotCreateReservationWarningModel.php:51
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\$code
$code
Definition
CannotCreateReservationWarningModel.php:27
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\getQuantity
getQuantity()
Definition
CannotCreateReservationWarningModel.php:183
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
CannotCreateReservationWarningModel.php:22
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\__construct
__construct(?string $message=null, ?string $productId=null, ?string $sku=null, ?string $supplyChannel=null, ?float $quantity=null, ?string $code=null)
Definition
CannotCreateReservationWarningModel.php:63
Commercetools\Api\Models\Warning\CannotCreateReservationWarningModel\getSku
getSku()
Definition
CannotCreateReservationWarningModel.php:143
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\Warning\CannotCreateReservationWarning
Definition
CannotCreateReservationWarning.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Warning
Definition
CannotChangeReservationExpiryWarning.php:9
Generated by
1.9.8