commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Change
SetParcelItemsChangeBuilder.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\DeliveryItemCollection
;
20
24
final
class
SetParcelItemsChangeBuilder
implements
Builder
25
{
30
private
$change;
31
36
private
$previousValue;
37
42
private
$nextValue;
43
48
private
$parcel;
49
54
public
function
getChange
()
55
{
56
return
$this->change;
57
}
58
65
public
function
getPreviousValue
()
66
{
67
return
$this->previousValue;
68
}
69
76
public
function
getNextValue
()
77
{
78
return
$this->nextValue;
79
}
80
87
public
function
getParcel
()
88
{
89
return
$this->parcel instanceof
ParcelChangeValueBuilder
? $this->parcel->
build
() : $this->parcel;
90
}
91
96
public
function
withChange
(?
string
$change)
97
{
98
$this->change = $change;
99
100
return
$this;
101
}
102
107
public
function
withPreviousValue
(?
DeliveryItemCollection
$previousValue)
108
{
109
$this->previousValue = $previousValue;
110
111
return
$this;
112
}
113
118
public
function
withNextValue
(?
DeliveryItemCollection
$nextValue)
119
{
120
$this->nextValue = $nextValue;
121
122
return
$this;
123
}
124
129
public
function
withParcel
(?
ParcelChangeValue
$parcel)
130
{
131
$this->parcel = $parcel;
132
133
return
$this;
134
}
135
140
public
function
withParcelBuilder
(?
ParcelChangeValueBuilder
$parcel)
141
{
142
$this->parcel = $parcel;
143
144
return
$this;
145
}
146
147
public
function
build
():
SetParcelItemsChange
148
{
149
return
new
SetParcelItemsChangeModel
(
150
$this->change,
151
$this->previousValue,
152
$this->nextValue,
153
$this->parcel instanceof
ParcelChangeValueBuilder
? $this->parcel->
build
() : $this->parcel
154
);
155
}
156
157
public
static
function
of
():
SetParcelItemsChangeBuilder
158
{
159
return
new
self
();
160
}
161
}
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\SetParcelItemsChangeBuilder
Definition:
SetParcelItemsChangeBuilder.php:25
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\withParcelBuilder
withParcelBuilder(?ParcelChangeValueBuilder $parcel)
Definition:
SetParcelItemsChangeBuilder.php:140
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\getNextValue
getNextValue()
Definition:
SetParcelItemsChangeBuilder.php:76
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\getParcel
getParcel()
Definition:
SetParcelItemsChangeBuilder.php:87
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\withChange
withChange(?string $change)
Definition:
SetParcelItemsChangeBuilder.php:96
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\withNextValue
withNextValue(?DeliveryItemCollection $nextValue)
Definition:
SetParcelItemsChangeBuilder.php:118
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\of
static of()
Definition:
SetParcelItemsChangeBuilder.php:157
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\build
build()
Definition:
SetParcelItemsChangeBuilder.php:147
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\getPreviousValue
getPreviousValue()
Definition:
SetParcelItemsChangeBuilder.php:65
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\withPreviousValue
withPreviousValue(?DeliveryItemCollection $previousValue)
Definition:
SetParcelItemsChangeBuilder.php:107
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\getChange
getChange()
Definition:
SetParcelItemsChangeBuilder.php:54
Commercetools\History\Models\Change\SetParcelItemsChangeBuilder\withParcel
withParcel(?ParcelChangeValue $parcel)
Definition:
SetParcelItemsChangeBuilder.php:129
Commercetools\History\Models\Change\SetParcelItemsChangeModel
Definition:
SetParcelItemsChangeModel.php:24
Commercetools\History\Models\ChangeValue\ParcelChangeValueBuilder
Definition:
ParcelChangeValueBuilder.php:22
Commercetools\History\Models\ChangeValue\ParcelChangeValueBuilder\build
build()
Definition:
ParcelChangeValueBuilder.php:80
Commercetools\History\Models\Common\DeliveryItemCollection
Definition:
DeliveryItemCollection.php:22
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Change\SetParcelItemsChange
Definition:
SetParcelItemsChange.php:17
Commercetools\History\Models\ChangeValue\ParcelChangeValue
Definition:
ParcelChangeValue.php:15
Commercetools\History\Models\Change
Definition:
AddAddressChange.php:9
Generated by
1.9.1