commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
OrderPatches
ParcelTrackingDataBuilder.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\TrackingData
;
17
use
Commercetools\Import\Models\Orders\TrackingDataBuilder
;
18
use stdClass;
19
23
final
class
ParcelTrackingDataBuilder
implements
Builder
24
{
29
private
$parcelId;
30
35
private
$trackingData;
36
41
public
function
getParcelId
()
42
{
43
return
$this->parcelId;
44
}
45
50
public
function
getTrackingData
()
51
{
52
return
$this->trackingData instanceof
TrackingDataBuilder
? $this->trackingData->
build
() : $this->trackingData;
53
}
54
59
public
function
withParcelId
(?
string
$parcelId)
60
{
61
$this->parcelId = $parcelId;
62
63
return
$this;
64
}
65
70
public
function
withTrackingData
(?
TrackingData
$trackingData)
71
{
72
$this->trackingData = $trackingData;
73
74
return
$this;
75
}
76
81
public
function
withTrackingDataBuilder
(?
TrackingDataBuilder
$trackingData)
82
{
83
$this->trackingData = $trackingData;
84
85
return
$this;
86
}
87
88
public
function
build
():
ParcelTrackingData
89
{
90
return
new
ParcelTrackingDataModel
(
91
$this->parcelId,
92
$this->trackingData instanceof
TrackingDataBuilder
? $this->trackingData->
build
() : $this->trackingData
93
);
94
}
95
96
public
static
function
of
():
ParcelTrackingDataBuilder
97
{
98
return
new
self
();
99
}
100
}
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\ParcelTrackingDataBuilder
Definition:
ParcelTrackingDataBuilder.php:24
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\getTrackingData
getTrackingData()
Definition:
ParcelTrackingDataBuilder.php:50
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\of
static of()
Definition:
ParcelTrackingDataBuilder.php:96
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\withParcelId
withParcelId(?string $parcelId)
Definition:
ParcelTrackingDataBuilder.php:59
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\getParcelId
getParcelId()
Definition:
ParcelTrackingDataBuilder.php:41
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\withTrackingData
withTrackingData(?TrackingData $trackingData)
Definition:
ParcelTrackingDataBuilder.php:70
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\withTrackingDataBuilder
withTrackingDataBuilder(?TrackingDataBuilder $trackingData)
Definition:
ParcelTrackingDataBuilder.php:81
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataBuilder\build
build()
Definition:
ParcelTrackingDataBuilder.php:88
Commercetools\Import\Models\OrderPatches\ParcelTrackingDataModel
Definition:
ParcelTrackingDataModel.php:23
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\ParcelTrackingData
Definition:
ParcelTrackingData.php:16
Commercetools\Import\Models\Orders\TrackingData
Definition:
TrackingData.php:15
Commercetools\Import\Models\OrderPatches
Definition:
DeliveryAddressDraft.php:9
Generated by
1.9.1