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
Order
OrderAddDeliveryActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
10
11
use
Commercetools\Api\Models\Common\BaseAddress
;
12
use
Commercetools\Api\Models\Common\BaseAddressBuilder
;
13
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
14
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
15
use
Commercetools\Base\Builder
;
16
use
Commercetools\Base\DateTimeImmutableCollection
;
17
use
Commercetools\Base\JsonObject
;
18
use
Commercetools\Base\JsonObjectModel
;
19
use
Commercetools\Base\MapperFactory
;
20
use stdClass;
21
25
final
class
OrderAddDeliveryActionBuilder
implements
Builder
26
{
31
private
$deliveryKey;
32
37
private
$shippingKey;
38
43
private
$items;
44
49
private
$address;
50
55
private
$parcels;
56
61
private
$custom;
62
69
public
function
getDeliveryKey
()
70
{
71
return
$this->deliveryKey;
72
}
73
80
public
function
getShippingKey
()
81
{
82
return
$this->shippingKey;
83
}
84
91
public
function
getItems
()
92
{
93
return
$this->items;
94
}
95
102
public
function
getAddress
()
103
{
104
return
$this->address instanceof
BaseAddressBuilder
? $this->address->
build
() : $this->address;
105
}
106
114
public
function
getParcels
()
115
{
116
return
$this->parcels;
117
}
118
125
public
function
getCustom
()
126
{
127
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
128
}
129
134
public
function
withDeliveryKey
(?
string
$deliveryKey)
135
{
136
$this->deliveryKey = $deliveryKey;
137
138
return
$this;
139
}
140
145
public
function
withShippingKey
(?
string
$shippingKey)
146
{
147
$this->shippingKey = $shippingKey;
148
149
return
$this;
150
}
151
156
public
function
withItems
(?
DeliveryItemCollection
$items)
157
{
158
$this->items = $items;
159
160
return
$this;
161
}
162
167
public
function
withAddress
(?
BaseAddress
$address)
168
{
169
$this->address = $address;
170
171
return
$this;
172
}
173
178
public
function
withParcels
(?
ParcelDraftCollection
$parcels)
179
{
180
$this->parcels = $parcels;
181
182
return
$this;
183
}
184
189
public
function
withCustom
(?
CustomFieldsDraft
$custom)
190
{
191
$this->custom = $custom;
192
193
return
$this;
194
}
195
200
public
function
withAddressBuilder
(?
BaseAddressBuilder
$address)
201
{
202
$this->address = $address;
203
204
return
$this;
205
}
206
211
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
212
{
213
$this->custom = $custom;
214
215
return
$this;
216
}
217
218
public
function
build
():
OrderAddDeliveryAction
219
{
220
return
new
OrderAddDeliveryActionModel
(
221
$this->deliveryKey,
222
$this->shippingKey,
223
$this->items,
224
$this->address instanceof
BaseAddressBuilder
? $this->address->
build
() : $this->address,
225
$this->parcels,
226
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom
227
);
228
}
229
230
public
static
function
of
():
OrderAddDeliveryActionBuilder
231
{
232
return
new
self
();
233
}
234
}
Commercetools\Api\Models\Common\BaseAddressBuilder
Definition
BaseAddressBuilder.php:22
Commercetools\Api\Models\Common\BaseAddressBuilder\build
build()
Definition
BaseAddressBuilder.php:726
Commercetools\Api\Models\Order\DeliveryItemCollection
Definition
DeliveryItemCollection.php:22
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder
Definition
OrderAddDeliveryActionBuilder.php:26
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withAddressBuilder
withAddressBuilder(?BaseAddressBuilder $address)
Definition
OrderAddDeliveryActionBuilder.php:200
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withAddress
withAddress(?BaseAddress $address)
Definition
OrderAddDeliveryActionBuilder.php:167
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\getCustom
getCustom()
Definition
OrderAddDeliveryActionBuilder.php:125
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\of
static of()
Definition
OrderAddDeliveryActionBuilder.php:230
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\getItems
getItems()
Definition
OrderAddDeliveryActionBuilder.php:91
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withShippingKey
withShippingKey(?string $shippingKey)
Definition
OrderAddDeliveryActionBuilder.php:145
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\getAddress
getAddress()
Definition
OrderAddDeliveryActionBuilder.php:102
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\getShippingKey
getShippingKey()
Definition
OrderAddDeliveryActionBuilder.php:80
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\getDeliveryKey
getDeliveryKey()
Definition
OrderAddDeliveryActionBuilder.php:69
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\getParcels
getParcels()
Definition
OrderAddDeliveryActionBuilder.php:114
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\build
build()
Definition
OrderAddDeliveryActionBuilder.php:218
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
OrderAddDeliveryActionBuilder.php:189
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withItems
withItems(?DeliveryItemCollection $items)
Definition
OrderAddDeliveryActionBuilder.php:156
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withParcels
withParcels(?ParcelDraftCollection $parcels)
Definition
OrderAddDeliveryActionBuilder.php:178
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withDeliveryKey
withDeliveryKey(?string $deliveryKey)
Definition
OrderAddDeliveryActionBuilder.php:134
Commercetools\Api\Models\Order\OrderAddDeliveryActionBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
OrderAddDeliveryActionBuilder.php:211
Commercetools\Api\Models\Order\OrderAddDeliveryActionModel
Definition
OrderAddDeliveryActionModel.php:25
Commercetools\Api\Models\Order\ParcelDraftCollection
Definition
ParcelDraftCollection.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition
CustomFieldsDraftBuilder.php:101
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\BaseAddress
Definition
BaseAddress.php:15
Commercetools\Api\Models\Order\OrderAddDeliveryAction
Definition
OrderAddDeliveryAction.php:17
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition
CustomFieldsDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Order
Definition
CustomLineItemImportDraft.php:9
Generated by
1.9.8