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
AddPriceChangeBuilder.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
AddPriceChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$nextValue;
36
41
private
$catalogData;
42
47
private
$priceId;
48
53
private
$variant;
54
59
public
function
getChange
()
60
{
61
return
$this->change;
62
}
63
70
public
function
getNextValue
()
71
{
72
return
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue;
73
}
74
85
public
function
getCatalogData
()
86
{
87
return
$this->catalogData;
88
}
89
96
public
function
getPriceId
()
97
{
98
return
$this->priceId;
99
}
100
108
public
function
getVariant
()
109
{
110
return
$this->variant;
111
}
112
117
public
function
withChange
(?
string
$change)
118
{
119
$this->change = $change;
120
121
return
$this;
122
}
123
128
public
function
withNextValue
(?
Price
$nextValue)
129
{
130
$this->nextValue = $nextValue;
131
132
return
$this;
133
}
134
139
public
function
withCatalogData
(?
string
$catalogData)
140
{
141
$this->catalogData = $catalogData;
142
143
return
$this;
144
}
145
150
public
function
withPriceId
(?
string
$priceId)
151
{
152
$this->priceId = $priceId;
153
154
return
$this;
155
}
156
161
public
function
withVariant
(?
string
$variant)
162
{
163
$this->variant = $variant;
164
165
return
$this;
166
}
167
172
public
function
withNextValueBuilder
(?
PriceBuilder
$nextValue)
173
{
174
$this->nextValue = $nextValue;
175
176
return
$this;
177
}
178
179
public
function
build
():
AddPriceChange
180
{
181
return
new
AddPriceChangeModel
(
182
$this->change,
183
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue,
184
$this->catalogData,
185
$this->priceId,
186
$this->variant
187
);
188
}
189
190
public
static
function
of
():
AddPriceChangeBuilder
191
{
192
return
new
self
();
193
}
194
}
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\AddPriceChangeBuilder
Definition
AddPriceChangeBuilder.php:24
Commercetools\History\Models\Change\AddPriceChangeBuilder\build
build()
Definition
AddPriceChangeBuilder.php:179
Commercetools\History\Models\Change\AddPriceChangeBuilder\getPriceId
getPriceId()
Definition
AddPriceChangeBuilder.php:96
Commercetools\History\Models\Change\AddPriceChangeBuilder\withNextValue
withNextValue(?Price $nextValue)
Definition
AddPriceChangeBuilder.php:128
Commercetools\History\Models\Change\AddPriceChangeBuilder\getChange
getChange()
Definition
AddPriceChangeBuilder.php:59
Commercetools\History\Models\Change\AddPriceChangeBuilder\withChange
withChange(?string $change)
Definition
AddPriceChangeBuilder.php:117
Commercetools\History\Models\Change\AddPriceChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
AddPriceChangeBuilder.php:139
Commercetools\History\Models\Change\AddPriceChangeBuilder\withPriceId
withPriceId(?string $priceId)
Definition
AddPriceChangeBuilder.php:150
Commercetools\History\Models\Change\AddPriceChangeBuilder\getVariant
getVariant()
Definition
AddPriceChangeBuilder.php:108
Commercetools\History\Models\Change\AddPriceChangeBuilder\withVariant
withVariant(?string $variant)
Definition
AddPriceChangeBuilder.php:161
Commercetools\History\Models\Change\AddPriceChangeBuilder\getNextValue
getNextValue()
Definition
AddPriceChangeBuilder.php:70
Commercetools\History\Models\Change\AddPriceChangeBuilder\of
static of()
Definition
AddPriceChangeBuilder.php:190
Commercetools\History\Models\Change\AddPriceChangeBuilder\getCatalogData
getCatalogData()
Definition
AddPriceChangeBuilder.php:85
Commercetools\History\Models\Change\AddPriceChangeBuilder\withNextValueBuilder
withNextValueBuilder(?PriceBuilder $nextValue)
Definition
AddPriceChangeBuilder.php:172
Commercetools\History\Models\Change\AddPriceChangeModel
Definition
AddPriceChangeModel.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\AddPriceChange
Definition
AddPriceChange.php:16
Commercetools\History\Models\Common\Price
Definition
Price.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8