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
DeliveryAddressSetMessagePayloadBuilder.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\AddressBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
DeliveryAddressSetMessagePayloadBuilder
implements
Builder
24
{
29
private
$deliveryId;
30
35
private
$address;
36
41
private
$oldAddress;
42
47
private
$shippingKey;
48
55
public
function
getDeliveryId
()
56
{
57
return
$this->deliveryId;
58
}
59
66
public
function
getAddress
()
67
{
68
return
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address;
69
}
70
77
public
function
getOldAddress
()
78
{
79
return
$this->oldAddress instanceof
AddressBuilder
? $this->oldAddress->
build
() : $this->oldAddress;
80
}
81
88
public
function
getShippingKey
()
89
{
90
return
$this->shippingKey;
91
}
92
97
public
function
withDeliveryId
(?
string
$deliveryId)
98
{
99
$this->deliveryId = $deliveryId;
100
101
return
$this;
102
}
103
108
public
function
withAddress
(?
Address
$address)
109
{
110
$this->address = $address;
111
112
return
$this;
113
}
114
119
public
function
withOldAddress
(?
Address
$oldAddress)
120
{
121
$this->oldAddress = $oldAddress;
122
123
return
$this;
124
}
125
130
public
function
withShippingKey
(?
string
$shippingKey)
131
{
132
$this->shippingKey = $shippingKey;
133
134
return
$this;
135
}
136
141
public
function
withAddressBuilder
(?
AddressBuilder
$address)
142
{
143
$this->address = $address;
144
145
return
$this;
146
}
147
152
public
function
withOldAddressBuilder
(?
AddressBuilder
$oldAddress)
153
{
154
$this->oldAddress = $oldAddress;
155
156
return
$this;
157
}
158
159
public
function
build
():
DeliveryAddressSetMessagePayload
160
{
161
return
new
DeliveryAddressSetMessagePayloadModel
(
162
$this->deliveryId,
163
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address,
164
$this->oldAddress instanceof
AddressBuilder
? $this->oldAddress->
build
() : $this->oldAddress,
165
$this->shippingKey
166
);
167
}
168
169
public
static
function
of
():
DeliveryAddressSetMessagePayloadBuilder
170
{
171
return
new
self
();
172
}
173
}
Commercetools\Api\Models\Common\AddressBuilder
Definition
AddressBuilder.php:24
Commercetools\Api\Models\Common\AddressBuilder\build
build()
Definition
AddressBuilder.php:766
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder
Definition
DeliveryAddressSetMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\withAddressBuilder
withAddressBuilder(?AddressBuilder $address)
Definition
DeliveryAddressSetMessagePayloadBuilder.php:141
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\withOldAddress
withOldAddress(?Address $oldAddress)
Definition
DeliveryAddressSetMessagePayloadBuilder.php:119
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\getShippingKey
getShippingKey()
Definition
DeliveryAddressSetMessagePayloadBuilder.php:88
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\withShippingKey
withShippingKey(?string $shippingKey)
Definition
DeliveryAddressSetMessagePayloadBuilder.php:130
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\getDeliveryId
getDeliveryId()
Definition
DeliveryAddressSetMessagePayloadBuilder.php:55
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\getOldAddress
getOldAddress()
Definition
DeliveryAddressSetMessagePayloadBuilder.php:77
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\withDeliveryId
withDeliveryId(?string $deliveryId)
Definition
DeliveryAddressSetMessagePayloadBuilder.php:97
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\of
static of()
Definition
DeliveryAddressSetMessagePayloadBuilder.php:169
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\getAddress
getAddress()
Definition
DeliveryAddressSetMessagePayloadBuilder.php:66
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\withAddress
withAddress(?Address $address)
Definition
DeliveryAddressSetMessagePayloadBuilder.php:108
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\build
build()
Definition
DeliveryAddressSetMessagePayloadBuilder.php:159
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadBuilder\withOldAddressBuilder
withOldAddressBuilder(?AddressBuilder $oldAddress)
Definition
DeliveryAddressSetMessagePayloadBuilder.php:152
Commercetools\Api\Models\Message\DeliveryAddressSetMessagePayloadModel
Definition
DeliveryAddressSetMessagePayloadModel.php:23
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\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8