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
ChangePriceChangeBuilder.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\Common\Price
;
18
use
Commercetools\History\Models\Common\PriceBuilder
;
19
23
final
class
ChangePriceChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$catalogData;
48
53
private
$priceId;
54
59
private
$variant;
60
65
public
function
getChange
()
66
{
67
return
$this->change;
68
}
69
76
public
function
getPreviousValue
()
77
{
78
return
$this->previousValue instanceof
PriceBuilder
? $this->previousValue->
build
() : $this->previousValue;
79
}
80
87
public
function
getNextValue
()
88
{
89
return
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue;
90
}
91
102
public
function
getCatalogData
()
103
{
104
return
$this->catalogData;
105
}
106
113
public
function
getPriceId
()
114
{
115
return
$this->priceId;
116
}
117
125
public
function
getVariant
()
126
{
127
return
$this->variant;
128
}
129
134
public
function
withChange
(?
string
$change)
135
{
136
$this->change = $change;
137
138
return
$this;
139
}
140
145
public
function
withPreviousValue
(?
Price
$previousValue)
146
{
147
$this->previousValue = $previousValue;
148
149
return
$this;
150
}
151
156
public
function
withNextValue
(?
Price
$nextValue)
157
{
158
$this->nextValue = $nextValue;
159
160
return
$this;
161
}
162
167
public
function
withCatalogData
(?
string
$catalogData)
168
{
169
$this->catalogData = $catalogData;
170
171
return
$this;
172
}
173
178
public
function
withPriceId
(?
string
$priceId)
179
{
180
$this->priceId = $priceId;
181
182
return
$this;
183
}
184
189
public
function
withVariant
(?
string
$variant)
190
{
191
$this->variant = $variant;
192
193
return
$this;
194
}
195
200
public
function
withPreviousValueBuilder
(?
PriceBuilder
$previousValue)
201
{
202
$this->previousValue = $previousValue;
203
204
return
$this;
205
}
206
211
public
function
withNextValueBuilder
(?
PriceBuilder
$nextValue)
212
{
213
$this->nextValue = $nextValue;
214
215
return
$this;
216
}
217
218
public
function
build
():
ChangePriceChange
219
{
220
return
new
ChangePriceChangeModel
(
221
$this->change,
222
$this->previousValue instanceof
PriceBuilder
? $this->previousValue->
build
() : $this->previousValue,
223
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue,
224
$this->catalogData,
225
$this->priceId,
226
$this->variant
227
);
228
}
229
230
public
static
function
of
():
ChangePriceChangeBuilder
231
{
232
return
new
self
();
233
}
234
}
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\ChangePriceChangeBuilder
Definition
ChangePriceChangeBuilder.php:24
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getNextValue
getNextValue()
Definition
ChangePriceChangeBuilder.php:87
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getVariant
getVariant()
Definition
ChangePriceChangeBuilder.php:125
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withPriceId
withPriceId(?string $priceId)
Definition
ChangePriceChangeBuilder.php:178
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withNextValue
withNextValue(?Price $nextValue)
Definition
ChangePriceChangeBuilder.php:156
Commercetools\History\Models\Change\ChangePriceChangeBuilder\build
build()
Definition
ChangePriceChangeBuilder.php:218
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getCatalogData
getCatalogData()
Definition
ChangePriceChangeBuilder.php:102
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getPriceId
getPriceId()
Definition
ChangePriceChangeBuilder.php:113
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?PriceBuilder $previousValue)
Definition
ChangePriceChangeBuilder.php:200
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
ChangePriceChangeBuilder.php:167
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withPreviousValue
withPreviousValue(?Price $previousValue)
Definition
ChangePriceChangeBuilder.php:145
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getPreviousValue
getPreviousValue()
Definition
ChangePriceChangeBuilder.php:76
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getChange
getChange()
Definition
ChangePriceChangeBuilder.php:65
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withVariant
withVariant(?string $variant)
Definition
ChangePriceChangeBuilder.php:189
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withNextValueBuilder
withNextValueBuilder(?PriceBuilder $nextValue)
Definition
ChangePriceChangeBuilder.php:211
Commercetools\History\Models\Change\ChangePriceChangeBuilder\of
static of()
Definition
ChangePriceChangeBuilder.php:230
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withChange
withChange(?string $change)
Definition
ChangePriceChangeBuilder.php:134
Commercetools\History\Models\Change\ChangePriceChangeModel
Definition
ChangePriceChangeModel.php:23
Commercetools\History\Models\Common\PriceBuilder
Definition
PriceBuilder.php:23
Commercetools\History\Models\Common\PriceBuilder\build
build()
Definition
PriceBuilder.php:429
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\ChangePriceChange
Definition
ChangePriceChange.php:16
Commercetools\History\Models\Common\Price
Definition
Price.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8