commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-import
src
Models
OrderPatches
OrderFieldBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\OrderPatches
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
OrderFieldBuilder
implements
Builder
22
{
27
private
$addReturnInfo;
28
33
private
$addParcelToDelivery;
34
39
private
$addDeliveries;
40
45
private
$removeDelivery;
46
51
private
$removeParcelFromDelivery;
52
57
private
$setDeliveryAddress;
58
63
private
$setParcelMeasurements;
64
69
private
$setParcelTrackingData;
70
75
private
$setParcelItems;
76
83
public
function
getAddReturnInfo
()
84
{
85
return
$this->addReturnInfo instanceof
ReturnInfoBuilder
? $this->addReturnInfo->
build
() : $this->addReturnInfo;
86
}
87
94
public
function
getAddParcelToDelivery
()
95
{
96
return
$this->addParcelToDelivery instanceof
DeliveryParcelBuilder
? $this->addParcelToDelivery->
build
() : $this->addParcelToDelivery;
97
}
98
105
public
function
getAddDeliveries
()
106
{
107
return
$this->addDeliveries;
108
}
109
116
public
function
getRemoveDelivery
()
117
{
118
return
$this->removeDelivery instanceof
RemoveDeliveryDraftBuilder
? $this->removeDelivery->
build
() : $this->removeDelivery;
119
}
120
127
public
function
getRemoveParcelFromDelivery
()
128
{
129
return
$this->removeParcelFromDelivery instanceof
RemoveParcelFromDeliveryDraftBuilder
? $this->removeParcelFromDelivery->
build
() : $this->removeParcelFromDelivery;
130
}
131
138
public
function
getSetDeliveryAddress
()
139
{
140
return
$this->setDeliveryAddress instanceof
DeliveryAddressDraftBuilder
? $this->setDeliveryAddress->
build
() : $this->setDeliveryAddress;
141
}
142
149
public
function
getSetParcelMeasurements
()
150
{
151
return
$this->setParcelMeasurements instanceof
ParcelMeasurementDraftBuilder
? $this->setParcelMeasurements->
build
() : $this->setParcelMeasurements;
152
}
153
160
public
function
getSetParcelTrackingData
()
161
{
162
return
$this->setParcelTrackingData instanceof
ParcelTrackingDataBuilder
? $this->setParcelTrackingData->
build
() : $this->setParcelTrackingData;
163
}
164
171
public
function
getSetParcelItems
()
172
{
173
return
$this->setParcelItems;
174
}
175
180
public
function
withAddReturnInfo
(?
ReturnInfo
$addReturnInfo)
181
{
182
$this->addReturnInfo = $addReturnInfo;
183
184
return
$this;
185
}
186
191
public
function
withAddParcelToDelivery
(?
DeliveryParcel
$addParcelToDelivery)
192
{
193
$this->addParcelToDelivery = $addParcelToDelivery;
194
195
return
$this;
196
}
197
202
public
function
withAddDeliveries
(?
DeliveryDraftCollection
$addDeliveries)
203
{
204
$this->addDeliveries = $addDeliveries;
205
206
return
$this;
207
}
208
213
public
function
withRemoveDelivery
(?
RemoveDeliveryDraft
$removeDelivery)
214
{
215
$this->removeDelivery = $removeDelivery;
216
217
return
$this;
218
}
219
224
public
function
withRemoveParcelFromDelivery
(?
RemoveParcelFromDeliveryDraft
$removeParcelFromDelivery)
225
{
226
$this->removeParcelFromDelivery = $removeParcelFromDelivery;
227
228
return
$this;
229
}
230
235
public
function
withSetDeliveryAddress
(?
DeliveryAddressDraft
$setDeliveryAddress)
236
{
237
$this->setDeliveryAddress = $setDeliveryAddress;
238
239
return
$this;
240
}
241
246
public
function
withSetParcelMeasurements
(?
ParcelMeasurementDraft
$setParcelMeasurements)
247
{
248
$this->setParcelMeasurements = $setParcelMeasurements;
249
250
return
$this;
251
}
252
257
public
function
withSetParcelTrackingData
(?
ParcelTrackingData
$setParcelTrackingData)
258
{
259
$this->setParcelTrackingData = $setParcelTrackingData;
260
261
return
$this;
262
}
263
268
public
function
withSetParcelItems
(?
ParcelItemsCollection
$setParcelItems)
269
{
270
$this->setParcelItems = $setParcelItems;
271
272
return
$this;
273
}
274
279
public
function
withAddReturnInfoBuilder
(?
ReturnInfoBuilder
$addReturnInfo)
280
{
281
$this->addReturnInfo = $addReturnInfo;
282
283
return
$this;
284
}
285
290
public
function
withAddParcelToDeliveryBuilder
(?
DeliveryParcelBuilder
$addParcelToDelivery)
291
{
292
$this->addParcelToDelivery = $addParcelToDelivery;
293
294
return
$this;
295
}
296
301
public
function
withRemoveDeliveryBuilder
(?
RemoveDeliveryDraftBuilder
$removeDelivery)
302
{
303
$this->removeDelivery = $removeDelivery;
304
305
return
$this;
306
}
307
312
public
function
withRemoveParcelFromDeliveryBuilder
(?
RemoveParcelFromDeliveryDraftBuilder
$removeParcelFromDelivery)
313
{
314
$this->removeParcelFromDelivery = $removeParcelFromDelivery;
315
316
return
$this;
317
}
318
323
public
function
withSetDeliveryAddressBuilder
(?
DeliveryAddressDraftBuilder
$setDeliveryAddress)
324
{
325
$this->setDeliveryAddress = $setDeliveryAddress;
326
327
return
$this;
328
}
329
334
public
function
withSetParcelMeasurementsBuilder
(?
ParcelMeasurementDraftBuilder
$setParcelMeasurements)
335
{
336
$this->setParcelMeasurements = $setParcelMeasurements;
337
338
return
$this;
339
}
340
345
public
function
withSetParcelTrackingDataBuilder
(?
ParcelTrackingDataBuilder
$setParcelTrackingData)
346
{
347
$this->setParcelTrackingData = $setParcelTrackingData;
348
349
return
$this;
350
}
351
352
public
function
build
():
OrderField
353
{
354
return
new
OrderFieldModel
(
355
$this->addReturnInfo instanceof
ReturnInfoBuilder
? $this->addReturnInfo->
build
() : $this->addReturnInfo,
356
$this->addParcelToDelivery instanceof
DeliveryParcelBuilder
? $this->addParcelToDelivery->
build
() : $this->addParcelToDelivery,
357
$this->addDeliveries,
358
$this->removeDelivery instanceof
RemoveDeliveryDraftBuilder
? $this->removeDelivery->
build
() : $this->removeDelivery,
359
$this->removeParcelFromDelivery instanceof
RemoveParcelFromDeliveryDraftBuilder
? $this->removeParcelFromDelivery->
build
() : $this->removeParcelFromDelivery,
360
$this->setDeliveryAddress instanceof
DeliveryAddressDraftBuilder
? $this->setDeliveryAddress->
build
() : $this->setDeliveryAddress,
361
$this->setParcelMeasurements instanceof
ParcelMeasurementDraftBuilder
? $this->setParcelMeasurements->
build
() : $this->setParcelMeasurements,
362
$this->setParcelTrackingData instanceof
ParcelTrackingDataBuilder
? $this->setParcelTrackingData->
build
() : $this->setParcelTrackingData,
363
$this->setParcelItems
364
);
365
}
366
367
public
static
function
of
():
OrderFieldBuilder
368
{
369
return
new
self
();
370
}
371
}
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder
Definition
DeliveryAddressDraftBuilder.php:24
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\build
build()
Definition
DeliveryAddressDraftBuilder.php:88
Commercetools\Import\Models\OrderPatches\DeliveryDraftCollection
Definition
DeliveryDraftCollection.php:22
Commercetools\Import\Models\OrderPatches\DeliveryParcelBuilder
Definition
DeliveryParcelBuilder.php:27
Commercetools\Import\Models\OrderPatches\DeliveryParcelBuilder\build
build()
Definition
DeliveryParcelBuilder.php:154
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder
Definition
OrderFieldBuilder.php:22
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getRemoveParcelFromDelivery
getRemoveParcelFromDelivery()
Definition
OrderFieldBuilder.php:127
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetDeliveryAddressBuilder
withSetDeliveryAddressBuilder(?DeliveryAddressDraftBuilder $setDeliveryAddress)
Definition
OrderFieldBuilder.php:323
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetParcelTrackingData
withSetParcelTrackingData(?ParcelTrackingData $setParcelTrackingData)
Definition
OrderFieldBuilder.php:257
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getAddDeliveries
getAddDeliveries()
Definition
OrderFieldBuilder.php:105
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getSetParcelTrackingData
getSetParcelTrackingData()
Definition
OrderFieldBuilder.php:160
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withAddReturnInfo
withAddReturnInfo(?ReturnInfo $addReturnInfo)
Definition
OrderFieldBuilder.php:180
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getRemoveDelivery
getRemoveDelivery()
Definition
OrderFieldBuilder.php:116
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withRemoveDeliveryBuilder
withRemoveDeliveryBuilder(?RemoveDeliveryDraftBuilder $removeDelivery)
Definition
OrderFieldBuilder.php:301
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withAddParcelToDeliveryBuilder
withAddParcelToDeliveryBuilder(?DeliveryParcelBuilder $addParcelToDelivery)
Definition
OrderFieldBuilder.php:290
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\build
build()
Definition
OrderFieldBuilder.php:352
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getAddReturnInfo
getAddReturnInfo()
Definition
OrderFieldBuilder.php:83
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getSetDeliveryAddress
getSetDeliveryAddress()
Definition
OrderFieldBuilder.php:138
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getSetParcelItems
getSetParcelItems()
Definition
OrderFieldBuilder.php:171
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetParcelTrackingDataBuilder
withSetParcelTrackingDataBuilder(?ParcelTrackingDataBuilder $setParcelTrackingData)
Definition
OrderFieldBuilder.php:345
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withRemoveParcelFromDeliveryBuilder
withRemoveParcelFromDeliveryBuilder(?RemoveParcelFromDeliveryDraftBuilder $removeParcelFromDelivery)
Definition
OrderFieldBuilder.php:312
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\of
static of()
Definition
OrderFieldBuilder.php:367
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetParcelItems
withSetParcelItems(?ParcelItemsCollection $setParcelItems)
Definition
OrderFieldBuilder.php:268
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getSetParcelMeasurements
getSetParcelMeasurements()
Definition
OrderFieldBuilder.php:149
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withAddReturnInfoBuilder
withAddReturnInfoBuilder(?ReturnInfoBuilder $addReturnInfo)
Definition
OrderFieldBuilder.php:279
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withRemoveDelivery
withRemoveDelivery(?RemoveDeliveryDraft $removeDelivery)
Definition
OrderFieldBuilder.php:213
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetParcelMeasurements
withSetParcelMeasurements(?ParcelMeasurementDraft $setParcelMeasurements)
Definition
OrderFieldBuilder.php:246
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withAddDeliveries
withAddDeliveries(?DeliveryDraftCollection $addDeliveries)
Definition
OrderFieldBuilder.php:202
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\getAddParcelToDelivery
getAddParcelToDelivery()
Definition
OrderFieldBuilder.php:94
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withAddParcelToDelivery
withAddParcelToDelivery(?DeliveryParcel $addParcelToDelivery)
Definition
OrderFieldBuilder.php:191
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withRemoveParcelFromDelivery
withRemoveParcelFromDelivery(?RemoveParcelFromDeliveryDraft $removeParcelFromDelivery)
Definition
OrderFieldBuilder.php:224
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetParcelMeasurementsBuilder
withSetParcelMeasurementsBuilder(?ParcelMeasurementDraftBuilder $setParcelMeasurements)
Definition
OrderFieldBuilder.php:334
Commercetools\Import\Models\OrderPatches\OrderFieldBuilder\withSetDeliveryAddress
withSetDeliveryAddress(?DeliveryAddressDraft $setDeliveryAddress)
Definition
OrderFieldBuilder.php:235
Commercetools\Import\Models\OrderPatches\OrderFieldModel
Definition
OrderFieldModel.php:21
Commercetools\Import\Models\OrderPatches\ParcelItemsCollection
Definition
ParcelItemsCollection.php:22
Commercetools\Import\Models\OrderPatches\ParcelMeasurementDraftBuilder
Definition
ParcelMeasurementDraftBuilder.php:24
Commercetools\Import\Models\OrderPatches\ParcelMeasurementDraftBuilder\build
build()
Definition
ParcelMeasurementDraftBuilder.php:88
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder
Definition
ParcelTrackingDataBuilder.php:24
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\build
build()
Definition
ParcelTrackingDataBuilder.php:88
Commercetools\Import\Models\OrderPatches\RemoveDeliveryDraftBuilder
Definition
RemoveDeliveryDraftBuilder.php:22
Commercetools\Import\Models\OrderPatches\RemoveDeliveryDraftBuilder\build
build()
Definition
RemoveDeliveryDraftBuilder.php:50
Commercetools\Import\Models\OrderPatches\RemoveParcelFromDeliveryDraftBuilder
Definition
RemoveParcelFromDeliveryDraftBuilder.php:22
Commercetools\Import\Models\OrderPatches\RemoveParcelFromDeliveryDraftBuilder\build
build()
Definition
RemoveParcelFromDeliveryDraftBuilder.php:50
Commercetools\Import\Models\OrderPatches\ReturnInfoBuilder
Definition
ReturnInfoBuilder.php:23
Commercetools\Import\Models\OrderPatches\ReturnInfoBuilder\build
build()
Definition
ReturnInfoBuilder.php:107
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraft
Definition
DeliveryAddressDraft.php:16
Commercetools\Import\Models\OrderPatches\DeliveryParcel
Definition
DeliveryParcel.php:18
Commercetools\Import\Models\OrderPatches\OrderField
Definition
OrderField.php:15
Commercetools\Import\Models\OrderPatches\ParcelMeasurementDraft
Definition
ParcelMeasurementDraft.php:16
Commercetools\Import\Models\OrderPatches\ParcelTrackingData
Definition
ParcelTrackingData.php:16
Commercetools\Import\Models\OrderPatches\RemoveDeliveryDraft
Definition
RemoveDeliveryDraft.php:15
Commercetools\Import\Models\OrderPatches\RemoveParcelFromDeliveryDraft
Definition
RemoveParcelFromDeliveryDraft.php:15
Commercetools\Import\Models\OrderPatches\ReturnInfo
Definition
ReturnInfo.php:16
Commercetools\Import\Models\OrderPatches
Definition
DeliveryAddressDraft.php:9
Generated by
1.9.8