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
public
function
getChange
()
60
{
61
return
$this->change;
62
}
63
70
public
function
getPreviousValue
()
71
{
72
return
$this->previousValue instanceof
PriceBuilder
? $this->previousValue->
build
() : $this->previousValue;
73
}
74
81
public
function
getNextValue
()
82
{
83
return
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue;
84
}
85
95
public
function
getCatalogData
()
96
{
97
return
$this->catalogData;
98
}
99
106
public
function
getPriceId
()
107
{
108
return
$this->priceId;
109
}
110
115
public
function
withChange
(?
string
$change)
116
{
117
$this->change = $change;
118
119
return
$this;
120
}
121
126
public
function
withPreviousValue
(?
Price
$previousValue)
127
{
128
$this->previousValue = $previousValue;
129
130
return
$this;
131
}
132
137
public
function
withNextValue
(?
Price
$nextValue)
138
{
139
$this->nextValue = $nextValue;
140
141
return
$this;
142
}
143
148
public
function
withCatalogData
(?
string
$catalogData)
149
{
150
$this->catalogData = $catalogData;
151
152
return
$this;
153
}
154
159
public
function
withPriceId
(?
string
$priceId)
160
{
161
$this->priceId = $priceId;
162
163
return
$this;
164
}
165
170
public
function
withPreviousValueBuilder
(?
PriceBuilder
$previousValue)
171
{
172
$this->previousValue = $previousValue;
173
174
return
$this;
175
}
176
181
public
function
withNextValueBuilder
(?
PriceBuilder
$nextValue)
182
{
183
$this->nextValue = $nextValue;
184
185
return
$this;
186
}
187
188
public
function
build
():
ChangePriceChange
189
{
190
return
new
ChangePriceChangeModel
(
191
$this->change,
192
$this->previousValue instanceof
PriceBuilder
? $this->previousValue->
build
() : $this->previousValue,
193
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue,
194
$this->catalogData,
195
$this->priceId
196
);
197
}
198
199
public
static
function
of
():
ChangePriceChangeBuilder
200
{
201
return
new
self
();
202
}
203
}
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:81
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withPriceId
withPriceId(?string $priceId)
Definition
ChangePriceChangeBuilder.php:159
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withNextValue
withNextValue(?Price $nextValue)
Definition
ChangePriceChangeBuilder.php:137
Commercetools\History\Models\Change\ChangePriceChangeBuilder\build
build()
Definition
ChangePriceChangeBuilder.php:188
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getCatalogData
getCatalogData()
Definition
ChangePriceChangeBuilder.php:95
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getPriceId
getPriceId()
Definition
ChangePriceChangeBuilder.php:106
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?PriceBuilder $previousValue)
Definition
ChangePriceChangeBuilder.php:170
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
ChangePriceChangeBuilder.php:148
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withPreviousValue
withPreviousValue(?Price $previousValue)
Definition
ChangePriceChangeBuilder.php:126
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getPreviousValue
getPreviousValue()
Definition
ChangePriceChangeBuilder.php:70
Commercetools\History\Models\Change\ChangePriceChangeBuilder\getChange
getChange()
Definition
ChangePriceChangeBuilder.php:59
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withNextValueBuilder
withNextValueBuilder(?PriceBuilder $nextValue)
Definition
ChangePriceChangeBuilder.php:181
Commercetools\History\Models\Change\ChangePriceChangeBuilder\of
static of()
Definition
ChangePriceChangeBuilder.php:199
Commercetools\History\Models\Change\ChangePriceChangeBuilder\withChange
withChange(?string $change)
Definition
ChangePriceChangeBuilder.php:115
Commercetools\History\Models\Change\ChangePriceChangeModel
Definition
ChangePriceChangeModel.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\ChangePriceChange
Definition
ChangePriceChange.php:16
Commercetools\History\Models\Common\Price
Definition
Price.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8