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
SetDiscountedPriceChangeBuilder.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\DiscountedPrice
;
18
use
Commercetools\History\Models\Common\DiscountedPriceBuilder
;
19
use
Commercetools\History\Models\Common\Price
;
20
use
Commercetools\History\Models\Common\PriceBuilder
;
21
25
final
class
SetDiscountedPriceChangeBuilder
implements
Builder
26
{
31
private
$change;
32
37
private
$previousValue;
38
43
private
$nextValue;
44
49
private
$catalogData;
50
55
private
$variant;
56
61
private
$priceId;
62
67
private
$price;
68
73
public
function
getChange
()
74
{
75
return
$this->change;
76
}
77
84
public
function
getPreviousValue
()
85
{
86
return
$this->previousValue instanceof
DiscountedPriceBuilder
? $this->previousValue->
build
() : $this->previousValue;
87
}
88
95
public
function
getNextValue
()
96
{
97
return
$this->nextValue instanceof
DiscountedPriceBuilder
? $this->nextValue->
build
() : $this->nextValue;
98
}
99
110
public
function
getCatalogData
()
111
{
112
return
$this->catalogData;
113
}
114
122
public
function
getVariant
()
123
{
124
return
$this->variant;
125
}
126
133
public
function
getPriceId
()
134
{
135
return
$this->priceId;
136
}
137
144
public
function
getPrice
()
145
{
146
return
$this->price instanceof
PriceBuilder
? $this->price->
build
() : $this->price;
147
}
148
153
public
function
withChange
(?
string
$change)
154
{
155
$this->change = $change;
156
157
return
$this;
158
}
159
164
public
function
withPreviousValue
(?
DiscountedPrice
$previousValue)
165
{
166
$this->previousValue = $previousValue;
167
168
return
$this;
169
}
170
175
public
function
withNextValue
(?
DiscountedPrice
$nextValue)
176
{
177
$this->nextValue = $nextValue;
178
179
return
$this;
180
}
181
186
public
function
withCatalogData
(?
string
$catalogData)
187
{
188
$this->catalogData = $catalogData;
189
190
return
$this;
191
}
192
197
public
function
withVariant
(?
string
$variant)
198
{
199
$this->variant = $variant;
200
201
return
$this;
202
}
203
208
public
function
withPriceId
(?
string
$priceId)
209
{
210
$this->priceId = $priceId;
211
212
return
$this;
213
}
214
219
public
function
withPrice
(?
Price
$price)
220
{
221
$this->price = $price;
222
223
return
$this;
224
}
225
230
public
function
withPreviousValueBuilder
(?
DiscountedPriceBuilder
$previousValue)
231
{
232
$this->previousValue = $previousValue;
233
234
return
$this;
235
}
236
241
public
function
withNextValueBuilder
(?
DiscountedPriceBuilder
$nextValue)
242
{
243
$this->nextValue = $nextValue;
244
245
return
$this;
246
}
247
252
public
function
withPriceBuilder
(?
PriceBuilder
$price)
253
{
254
$this->price = $price;
255
256
return
$this;
257
}
258
259
public
function
build
():
SetDiscountedPriceChange
260
{
261
return
new
SetDiscountedPriceChangeModel
(
262
$this->change,
263
$this->previousValue instanceof
DiscountedPriceBuilder
? $this->previousValue->
build
() : $this->previousValue,
264
$this->nextValue instanceof
DiscountedPriceBuilder
? $this->nextValue->
build
() : $this->nextValue,
265
$this->catalogData,
266
$this->variant,
267
$this->priceId,
268
$this->price instanceof
PriceBuilder
? $this->price->
build
() : $this->price
269
);
270
}
271
272
public
static
function
of
():
SetDiscountedPriceChangeBuilder
273
{
274
return
new
self
();
275
}
276
}
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\SetDiscountedPriceChangeBuilder
Definition
SetDiscountedPriceChangeBuilder.php:26
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withNextValueBuilder
withNextValueBuilder(?DiscountedPriceBuilder $nextValue)
Definition
SetDiscountedPriceChangeBuilder.php:241
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getNextValue
getNextValue()
Definition
SetDiscountedPriceChangeBuilder.php:95
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getChange
getChange()
Definition
SetDiscountedPriceChangeBuilder.php:73
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPrice
withPrice(?Price $price)
Definition
SetDiscountedPriceChangeBuilder.php:219
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\of
static of()
Definition
SetDiscountedPriceChangeBuilder.php:272
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withChange
withChange(?string $change)
Definition
SetDiscountedPriceChangeBuilder.php:153
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\build
build()
Definition
SetDiscountedPriceChangeBuilder.php:259
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?DiscountedPriceBuilder $previousValue)
Definition
SetDiscountedPriceChangeBuilder.php:230
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPreviousValue
withPreviousValue(?DiscountedPrice $previousValue)
Definition
SetDiscountedPriceChangeBuilder.php:164
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getPrice
getPrice()
Definition
SetDiscountedPriceChangeBuilder.php:144
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withNextValue
withNextValue(?DiscountedPrice $nextValue)
Definition
SetDiscountedPriceChangeBuilder.php:175
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
SetDiscountedPriceChangeBuilder.php:186
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPriceId
withPriceId(?string $priceId)
Definition
SetDiscountedPriceChangeBuilder.php:208
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getCatalogData
getCatalogData()
Definition
SetDiscountedPriceChangeBuilder.php:110
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withVariant
withVariant(?string $variant)
Definition
SetDiscountedPriceChangeBuilder.php:197
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getVariant
getVariant()
Definition
SetDiscountedPriceChangeBuilder.php:122
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPriceBuilder
withPriceBuilder(?PriceBuilder $price)
Definition
SetDiscountedPriceChangeBuilder.php:252
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getPriceId
getPriceId()
Definition
SetDiscountedPriceChangeBuilder.php:133
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetDiscountedPriceChangeBuilder.php:84
Commercetools\History\Models\Change\SetDiscountedPriceChangeModel
Definition
SetDiscountedPriceChangeModel.php:25
Commercetools\History\Models\Common\DiscountedPriceBuilder
Definition
DiscountedPriceBuilder.php:22
Commercetools\History\Models\Common\DiscountedPriceBuilder\build
build()
Definition
DiscountedPriceBuilder.php:101
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\SetDiscountedPriceChange
Definition
SetDiscountedPriceChange.php:17
Commercetools\History\Models\Common\DiscountedPrice
Definition
DiscountedPrice.php:15
Commercetools\History\Models\Common\Price
Definition
Price.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8