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\Price
;
18
use
Commercetools\History\Models\Common\PriceBuilder
;
19
23
final
class
SetDiscountedPriceChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$catalogData;
48
53
private
$variant;
54
59
private
$priceId;
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
101
public
function
getCatalogData
()
102
{
103
return
$this->catalogData;
104
}
105
112
public
function
getVariant
()
113
{
114
return
$this->variant;
115
}
116
123
public
function
getPriceId
()
124
{
125
return
$this->priceId;
126
}
127
132
public
function
withChange
(?
string
$change)
133
{
134
$this->change = $change;
135
136
return
$this;
137
}
138
143
public
function
withPreviousValue
(?
Price
$previousValue)
144
{
145
$this->previousValue = $previousValue;
146
147
return
$this;
148
}
149
154
public
function
withNextValue
(?
Price
$nextValue)
155
{
156
$this->nextValue = $nextValue;
157
158
return
$this;
159
}
160
165
public
function
withCatalogData
(?
string
$catalogData)
166
{
167
$this->catalogData = $catalogData;
168
169
return
$this;
170
}
171
176
public
function
withVariant
(?
string
$variant)
177
{
178
$this->variant = $variant;
179
180
return
$this;
181
}
182
187
public
function
withPriceId
(?
string
$priceId)
188
{
189
$this->priceId = $priceId;
190
191
return
$this;
192
}
193
198
public
function
withPreviousValueBuilder
(?
PriceBuilder
$previousValue)
199
{
200
$this->previousValue = $previousValue;
201
202
return
$this;
203
}
204
209
public
function
withNextValueBuilder
(?
PriceBuilder
$nextValue)
210
{
211
$this->nextValue = $nextValue;
212
213
return
$this;
214
}
215
216
public
function
build
():
SetDiscountedPriceChange
217
{
218
return
new
SetDiscountedPriceChangeModel
(
219
$this->change,
220
$this->previousValue instanceof
PriceBuilder
? $this->previousValue->
build
() : $this->previousValue,
221
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue,
222
$this->catalogData,
223
$this->variant,
224
$this->priceId
225
);
226
}
227
228
public
static
function
of
():
SetDiscountedPriceChangeBuilder
229
{
230
return
new
self
();
231
}
232
}
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:24
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getNextValue
getNextValue()
Definition
SetDiscountedPriceChangeBuilder.php:87
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withNextValueBuilder
withNextValueBuilder(?PriceBuilder $nextValue)
Definition
SetDiscountedPriceChangeBuilder.php:209
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getChange
getChange()
Definition
SetDiscountedPriceChangeBuilder.php:65
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPreviousValue
withPreviousValue(?Price $previousValue)
Definition
SetDiscountedPriceChangeBuilder.php:143
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\of
static of()
Definition
SetDiscountedPriceChangeBuilder.php:228
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withChange
withChange(?string $change)
Definition
SetDiscountedPriceChangeBuilder.php:132
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\build
build()
Definition
SetDiscountedPriceChangeBuilder.php:216
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?PriceBuilder $previousValue)
Definition
SetDiscountedPriceChangeBuilder.php:198
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
SetDiscountedPriceChangeBuilder.php:165
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withPriceId
withPriceId(?string $priceId)
Definition
SetDiscountedPriceChangeBuilder.php:187
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getCatalogData
getCatalogData()
Definition
SetDiscountedPriceChangeBuilder.php:101
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withVariant
withVariant(?string $variant)
Definition
SetDiscountedPriceChangeBuilder.php:176
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\withNextValue
withNextValue(?Price $nextValue)
Definition
SetDiscountedPriceChangeBuilder.php:154
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getVariant
getVariant()
Definition
SetDiscountedPriceChangeBuilder.php:112
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getPriceId
getPriceId()
Definition
SetDiscountedPriceChangeBuilder.php:123
Commercetools\History\Models\Change\SetDiscountedPriceChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetDiscountedPriceChangeBuilder.php:76
Commercetools\History\Models\Change\SetDiscountedPriceChangeModel
Definition
SetDiscountedPriceChangeModel.php:23
Commercetools\History\Models\Common\PriceBuilder
Definition
PriceBuilder.php:22
Commercetools\History\Models\Common\PriceBuilder\build
build()
Definition
PriceBuilder.php:86
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetDiscountedPriceChange
Definition
SetDiscountedPriceChange.php:16
Commercetools\History\Models\Common\Price
Definition
Price.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8