commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-history
src
Models
Change
SetParcelMeasurementsChangeBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
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
use
Commercetools\History\Models\ChangeValue\ParcelChangeValue
;
18
use
Commercetools\History\Models\ChangeValue\ParcelChangeValueBuilder
;
19
use
Commercetools\History\Models\Common\ParcelMeasurements
;
20
use
Commercetools\History\Models\Common\ParcelMeasurementsBuilder
;
21
25
final
class
SetParcelMeasurementsChangeBuilder
implements
Builder
26
{
31
private
$change;
32
37
private
$previousValue;
38
43
private
$nextValue;
44
49
private
$parcel;
50
55
public
function
getChange
()
56
{
57
return
$this->change;
58
}
59
66
public
function
getPreviousValue
()
67
{
68
return
$this->previousValue instanceof
ParcelMeasurementsBuilder
? $this->previousValue->
build
() : $this->previousValue;
69
}
70
77
public
function
getNextValue
()
78
{
79
return
$this->nextValue instanceof
ParcelMeasurementsBuilder
? $this->nextValue->
build
() : $this->nextValue;
80
}
81
88
public
function
getParcel
()
89
{
90
return
$this->parcel instanceof
ParcelChangeValueBuilder
? $this->parcel->
build
() : $this->parcel;
91
}
92
97
public
function
withChange
(?
string
$change)
98
{
99
$this->change = $change;
100
101
return
$this;
102
}
103
108
public
function
withPreviousValue
(?
ParcelMeasurements
$previousValue)
109
{
110
$this->previousValue = $previousValue;
111
112
return
$this;
113
}
114
119
public
function
withNextValue
(?
ParcelMeasurements
$nextValue)
120
{
121
$this->nextValue = $nextValue;
122
123
return
$this;
124
}
125
130
public
function
withParcel
(?
ParcelChangeValue
$parcel)
131
{
132
$this->parcel = $parcel;
133
134
return
$this;
135
}
136
141
public
function
withPreviousValueBuilder
(?
ParcelMeasurementsBuilder
$previousValue)
142
{
143
$this->previousValue = $previousValue;
144
145
return
$this;
146
}
147
152
public
function
withNextValueBuilder
(?
ParcelMeasurementsBuilder
$nextValue)
153
{
154
$this->nextValue = $nextValue;
155
156
return
$this;
157
}
158
163
public
function
withParcelBuilder
(?
ParcelChangeValueBuilder
$parcel)
164
{
165
$this->parcel = $parcel;
166
167
return
$this;
168
}
169
170
public
function
build
():
SetParcelMeasurementsChange
171
{
172
return
new
SetParcelMeasurementsChangeModel
(
173
$this->change,
174
$this->previousValue instanceof
ParcelMeasurementsBuilder
? $this->previousValue->
build
() : $this->previousValue,
175
$this->nextValue instanceof
ParcelMeasurementsBuilder
? $this->nextValue->
build
() : $this->nextValue,
176
$this->parcel instanceof
ParcelChangeValueBuilder
? $this->parcel->
build
() : $this->parcel
177
);
178
}
179
180
public
static
function
of
():
SetParcelMeasurementsChangeBuilder
181
{
182
return
new
self
();
183
}
184
}
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder
Definition
SetParcelMeasurementsChangeBuilder.php:26
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\build
build()
Definition
SetParcelMeasurementsChangeBuilder.php:170
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\of
static of()
Definition
SetParcelMeasurementsChangeBuilder.php:180
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withPreviousValue
withPreviousValue(?ParcelMeasurements $previousValue)
Definition
SetParcelMeasurementsChangeBuilder.php:108
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withNextValue
withNextValue(?ParcelMeasurements $nextValue)
Definition
SetParcelMeasurementsChangeBuilder.php:119
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetParcelMeasurementsChangeBuilder.php:66
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\getNextValue
getNextValue()
Definition
SetParcelMeasurementsChangeBuilder.php:77
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\getChange
getChange()
Definition
SetParcelMeasurementsChangeBuilder.php:55
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\getParcel
getParcel()
Definition
SetParcelMeasurementsChangeBuilder.php:88
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?ParcelMeasurementsBuilder $previousValue)
Definition
SetParcelMeasurementsChangeBuilder.php:141
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withChange
withChange(?string $change)
Definition
SetParcelMeasurementsChangeBuilder.php:97
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withParcel
withParcel(?ParcelChangeValue $parcel)
Definition
SetParcelMeasurementsChangeBuilder.php:130
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withParcelBuilder
withParcelBuilder(?ParcelChangeValueBuilder $parcel)
Definition
SetParcelMeasurementsChangeBuilder.php:163
Commercetools\History\Models\Change\SetParcelMeasurementsChangeBuilder\withNextValueBuilder
withNextValueBuilder(?ParcelMeasurementsBuilder $nextValue)
Definition
SetParcelMeasurementsChangeBuilder.php:152
Commercetools\History\Models\Change\SetParcelMeasurementsChangeModel
Definition
SetParcelMeasurementsChangeModel.php:25
Commercetools\History\Models\ChangeValue\ParcelChangeValueBuilder
Definition
ParcelChangeValueBuilder.php:22
Commercetools\History\Models\ChangeValue\ParcelChangeValueBuilder\build
build()
Definition
ParcelChangeValueBuilder.php:80
Commercetools\History\Models\Common\ParcelMeasurementsBuilder
Definition
ParcelMeasurementsBuilder.php:22
Commercetools\History\Models\Common\ParcelMeasurementsBuilder\build
build()
Definition
ParcelMeasurementsBuilder.php:128
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetParcelMeasurementsChange
Definition
SetParcelMeasurementsChange.php:17
Commercetools\History\Models\ChangeValue\ParcelChangeValue
Definition
ParcelChangeValue.php:15
Commercetools\History\Models\Common\ParcelMeasurements
Definition
ParcelMeasurements.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8