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
DeliveryParcelDraftBuilder.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
Commercetools\Import\Models\Orders\DeliveryItemCollection
;
17
use
Commercetools\Import\Models\Orders\ParcelMeasurements
;
18
use
Commercetools\Import\Models\Orders\ParcelMeasurementsBuilder
;
19
use
Commercetools\Import\Models\Orders\TrackingData
;
20
use
Commercetools\Import\Models\Orders\TrackingDataBuilder
;
21
use stdClass;
22
26
final
class
DeliveryParcelDraftBuilder
implements
Builder
27
{
32
private
$measurements;
33
38
private
$trackingData;
39
44
private
$items;
45
50
public
function
getMeasurements
()
51
{
52
return
$this->measurements instanceof
ParcelMeasurementsBuilder
? $this->measurements->
build
() : $this->measurements;
53
}
54
59
public
function
getTrackingData
()
60
{
61
return
$this->trackingData instanceof
TrackingDataBuilder
? $this->trackingData->
build
() : $this->trackingData;
62
}
63
68
public
function
getItems
()
69
{
70
return
$this->items;
71
}
72
77
public
function
withMeasurements
(?
ParcelMeasurements
$measurements)
78
{
79
$this->measurements = $measurements;
80
81
return
$this;
82
}
83
88
public
function
withTrackingData
(?
TrackingData
$trackingData)
89
{
90
$this->trackingData = $trackingData;
91
92
return
$this;
93
}
94
99
public
function
withItems
(?
DeliveryItemCollection
$items)
100
{
101
$this->items = $items;
102
103
return
$this;
104
}
105
110
public
function
withMeasurementsBuilder
(?
ParcelMeasurementsBuilder
$measurements)
111
{
112
$this->measurements = $measurements;
113
114
return
$this;
115
}
116
121
public
function
withTrackingDataBuilder
(?
TrackingDataBuilder
$trackingData)
122
{
123
$this->trackingData = $trackingData;
124
125
return
$this;
126
}
127
128
public
function
build
():
DeliveryParcelDraft
129
{
130
return
new
DeliveryParcelDraftModel
(
131
$this->measurements instanceof
ParcelMeasurementsBuilder
? $this->measurements->
build
() : $this->measurements,
132
$this->trackingData instanceof
TrackingDataBuilder
? $this->trackingData->
build
() : $this->trackingData,
133
$this->items
134
);
135
}
136
137
public
static
function
of
():
DeliveryParcelDraftBuilder
138
{
139
return
new
self
();
140
}
141
}
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\DeliveryParcelDraftBuilder
Definition
DeliveryParcelDraftBuilder.php:27
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\of
static of()
Definition
DeliveryParcelDraftBuilder.php:137
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\withTrackingDataBuilder
withTrackingDataBuilder(?TrackingDataBuilder $trackingData)
Definition
DeliveryParcelDraftBuilder.php:121
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\withMeasurements
withMeasurements(?ParcelMeasurements $measurements)
Definition
DeliveryParcelDraftBuilder.php:77
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\withMeasurementsBuilder
withMeasurementsBuilder(?ParcelMeasurementsBuilder $measurements)
Definition
DeliveryParcelDraftBuilder.php:110
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\withItems
withItems(?DeliveryItemCollection $items)
Definition
DeliveryParcelDraftBuilder.php:99
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\getTrackingData
getTrackingData()
Definition
DeliveryParcelDraftBuilder.php:59
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\getItems
getItems()
Definition
DeliveryParcelDraftBuilder.php:68
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\build
build()
Definition
DeliveryParcelDraftBuilder.php:128
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\withTrackingData
withTrackingData(?TrackingData $trackingData)
Definition
DeliveryParcelDraftBuilder.php:88
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftBuilder\getMeasurements
getMeasurements()
Definition
DeliveryParcelDraftBuilder.php:50
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraftModel
Definition
DeliveryParcelDraftModel.php:26
Commercetools\Import\Models\Orders\DeliveryItemCollection
Definition
DeliveryItemCollection.php:22
Commercetools\Import\Models\Orders\ParcelMeasurementsBuilder
Definition
ParcelMeasurementsBuilder.php:22
Commercetools\Import\Models\Orders\ParcelMeasurementsBuilder\build
build()
Definition
ParcelMeasurementsBuilder.php:128
Commercetools\Import\Models\Orders\TrackingDataBuilder
Definition
TrackingDataBuilder.php:22
Commercetools\Import\Models\Orders\TrackingDataBuilder\build
build()
Definition
TrackingDataBuilder.php:154
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Import\Models\OrderPatches\DeliveryParcelDraft
Definition
DeliveryParcelDraft.php:18
Commercetools\Import\Models\Orders\ParcelMeasurements
Definition
ParcelMeasurements.php:15
Commercetools\Import\Models\Orders\TrackingData
Definition
TrackingData.php:15
Commercetools\Import\Models\OrderPatches
Definition
DeliveryAddressDraft.php:9
Generated by
1.9.8