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