commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
DeliveryRemovedMessagePayloadModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Order\Delivery
;
12
use
Commercetools\Api\Models\Order\DeliveryModel
;
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
DeliveryRemovedMessagePayloadModel
extends
JsonObjectModel
implements
DeliveryRemovedMessagePayload
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'DeliveryRemoved'
;
29
protected
$type
;
30
35
protected
$delivery
;
36
41
protected
$shippingKey
;
42
43
47
public
function
__construct
(
48
?
Delivery
$delivery
=
null
,
49
?
string
$shippingKey
=
null
,
50
?
string
$type
=
null
51
) {
52
$this->delivery =
$delivery
;
53
$this->shippingKey =
$shippingKey
;
54
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
55
}
56
61
public
function
getType
()
62
{
63
if
(is_null($this->type)) {
65
$data = $this->
raw
(self::FIELD_TYPE);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->type = (string) $data;
70
}
71
72
return
$this->type
;
73
}
74
81
public
function
getDelivery
()
82
{
83
if
(is_null($this->delivery)) {
85
$data = $this->
raw
(self::FIELD_DELIVERY);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
90
$this->delivery =
DeliveryModel::of
($data);
91
}
92
93
return
$this->delivery
;
94
}
95
102
public
function
getShippingKey
()
103
{
104
if
(is_null($this->shippingKey)) {
106
$data = $this->
raw
(self::FIELD_SHIPPING_KEY);
107
if
(is_null($data)) {
108
return
null
;
109
}
110
$this->shippingKey = (string) $data;
111
}
112
113
return
$this->shippingKey
;
114
}
115
116
120
public
function
setDelivery
(?
Delivery
$delivery
): void
121
{
122
$this->delivery =
$delivery
;
123
}
124
128
public
function
setShippingKey
(?
string
$shippingKey
): void
129
{
130
$this->shippingKey =
$shippingKey
;
131
}
132
}
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel
Definition:
DeliveryRemovedMessagePayloadModel.php:23
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\$delivery
$delivery
Definition:
DeliveryRemovedMessagePayloadModel.php:35
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\__construct
__construct(?Delivery $delivery=null, ?string $shippingKey=null, ?string $type=null)
Definition:
DeliveryRemovedMessagePayloadModel.php:47
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\getShippingKey
getShippingKey()
Definition:
DeliveryRemovedMessagePayloadModel.php:102
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
DeliveryRemovedMessagePayloadModel.php:24
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\getDelivery
getDelivery()
Definition:
DeliveryRemovedMessagePayloadModel.php:81
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\$shippingKey
$shippingKey
Definition:
DeliveryRemovedMessagePayloadModel.php:41
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\setDelivery
setDelivery(?Delivery $delivery)
Definition:
DeliveryRemovedMessagePayloadModel.php:120
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\getType
getType()
Definition:
DeliveryRemovedMessagePayloadModel.php:61
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\$type
$type
Definition:
DeliveryRemovedMessagePayloadModel.php:29
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayloadModel\setShippingKey
setShippingKey(?string $shippingKey)
Definition:
DeliveryRemovedMessagePayloadModel.php:128
Commercetools\Api\Models\Order\DeliveryModel
Definition:
DeliveryModel.php:26
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Message\DeliveryRemovedMessagePayload
Definition:
DeliveryRemovedMessagePayload.php:16
Commercetools\Api\Models\Order\Delivery
Definition:
Delivery.php:18
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Message
Definition:
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.1