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
Message
DeliveryAddressSetMessagePayloadModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Common\Address
;
12
use
Commercetools\Api\Models\Common\AddressModel
;
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
DeliveryAddressSetMessagePayloadModel
extends
JsonObjectModel
implements
DeliveryAddressSetMessagePayload
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'DeliveryAddressSet'
;
29
protected
$type
;
30
35
protected
$deliveryId
;
36
41
protected
$address
;
42
47
protected
$oldAddress
;
48
53
protected
$shippingKey
;
54
55
59
public
function
__construct
(
60
?
string
$deliveryId
=
null
,
61
?
Address
$address
=
null
,
62
?
Address
$oldAddress
=
null
,
63
?
string
$shippingKey
=
null
,
64
?
string
$type
=
null
65
) {
66
$this->deliveryId =
$deliveryId
;
67
$this->address =
$address
;
68
$this->oldAddress =
$oldAddress
;
69
$this->shippingKey =
$shippingKey
;
70
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
71
}
72
77
public
function
getType
()
78
{
79
if
(is_null($this->type)) {
81
$data = $this->
raw
(self::FIELD_TYPE);
82
if
(is_null($data)) {
83
return
null
;
84
}
85
$this->type = (string) $data;
86
}
87
88
return
$this->type
;
89
}
90
97
public
function
getDeliveryId
()
98
{
99
if
(is_null($this->deliveryId)) {
101
$data = $this->
raw
(self::FIELD_DELIVERY_ID);
102
if
(is_null($data)) {
103
return
null
;
104
}
105
$this->deliveryId = (string) $data;
106
}
107
108
return
$this->deliveryId
;
109
}
110
117
public
function
getAddress
()
118
{
119
if
(is_null($this->address)) {
121
$data = $this->
raw
(self::FIELD_ADDRESS);
122
if
(is_null($data)) {
123
return
null
;
124
}
125
126
$this->address = AddressModel::of($data);
127
}
128
129
return
$this->address
;
130
}
131
138
public
function
getOldAddress
()
139
{
140
if
(is_null($this->oldAddress)) {
142
$data = $this->
raw
(self::FIELD_OLD_ADDRESS);
143
if
(is_null($data)) {
144
return
null
;
145
}
146
147
$this->oldAddress = AddressModel::of($data);
148
}
149
150
return
$this->oldAddress
;
151
}
152
159
public
function
getShippingKey
()
160
{
161
if
(is_null($this->shippingKey)) {
163
$data = $this->
raw
(self::FIELD_SHIPPING_KEY);
164
if
(is_null($data)) {
165
return
null
;
166
}
167
$this->shippingKey = (string) $data;
168
}
169
170
return
$this->shippingKey
;
171
}
172
173
177
public
function
setDeliveryId
(?
string
$deliveryId
): void
178
{
179
$this->deliveryId =
$deliveryId
;
180
}
181
185
public
function
setAddress
(?
Address
$address
): void
186
{
187
$this->address =
$address
;
188
}
189
193
public
function
setOldAddress
(?
Address
$oldAddress
): void
194
{
195
$this->oldAddress =
$oldAddress
;
196
}
197
201
public
function
setShippingKey
(?
string
$shippingKey
): void
202
{
203
$this->shippingKey =
$shippingKey
;
204
}
205
}
Commercetools\Api\Models\Common\AddressModel
Definition
AddressModel.php:23
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel
Definition
DeliveryAddressSetMessagePayloadModel.php:23
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\setAddress
setAddress(?Address $address)
Definition
DeliveryAddressSetMessagePayloadModel.php:185
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\setDeliveryId
setDeliveryId(?string $deliveryId)
Definition
DeliveryAddressSetMessagePayloadModel.php:177
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\__construct
__construct(?string $deliveryId=null, ?Address $address=null, ?Address $oldAddress=null, ?string $shippingKey=null, ?string $type=null)
Definition
DeliveryAddressSetMessagePayloadModel.php:59
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
DeliveryAddressSetMessagePayloadModel.php:24
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\getType
getType()
Definition
DeliveryAddressSetMessagePayloadModel.php:77
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\setShippingKey
setShippingKey(?string $shippingKey)
Definition
DeliveryAddressSetMessagePayloadModel.php:201
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\setOldAddress
setOldAddress(?Address $oldAddress)
Definition
DeliveryAddressSetMessagePayloadModel.php:193
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\$deliveryId
$deliveryId
Definition
DeliveryAddressSetMessagePayloadModel.php:35
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\getShippingKey
getShippingKey()
Definition
DeliveryAddressSetMessagePayloadModel.php:159
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\getAddress
getAddress()
Definition
DeliveryAddressSetMessagePayloadModel.php:117
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\getOldAddress
getOldAddress()
Definition
DeliveryAddressSetMessagePayloadModel.php:138
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\$oldAddress
$oldAddress
Definition
DeliveryAddressSetMessagePayloadModel.php:47
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\$address
$address
Definition
DeliveryAddressSetMessagePayloadModel.php:41
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\getDeliveryId
getDeliveryId()
Definition
DeliveryAddressSetMessagePayloadModel.php:97
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\$type
$type
Definition
DeliveryAddressSetMessagePayloadModel.php:29
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel\$shippingKey
$shippingKey
Definition
DeliveryAddressSetMessagePayloadModel.php:53
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\Address
Definition
Address.php:16
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayload
Definition
DeliveryAddressSetMessagePayload.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8