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
public
function
getChange
()
54
{
55
return
$this->change;
56
}
57
64
public
function
getNextValue
()
65
{
66
return
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue;
67
}
68
78
public
function
getCatalogData
()
79
{
80
return
$this->catalogData;
81
}
82
89
public
function
getPriceId
()
90
{
91
return
$this->priceId;
92
}
93
98
public
function
withChange
(?
string
$change)
99
{
100
$this->change = $change;
101
102
return
$this;
103
}
104
109
public
function
withNextValue
(?
Price
$nextValue)
110
{
111
$this->nextValue = $nextValue;
112
113
return
$this;
114
}
115
120
public
function
withCatalogData
(?
string
$catalogData)
121
{
122
$this->catalogData = $catalogData;
123
124
return
$this;
125
}
126
131
public
function
withPriceId
(?
string
$priceId)
132
{
133
$this->priceId = $priceId;
134
135
return
$this;
136
}
137
142
public
function
withNextValueBuilder
(?
PriceBuilder
$nextValue)
143
{
144
$this->nextValue = $nextValue;
145
146
return
$this;
147
}
148
149
public
function
build
():
AddPriceChange
150
{
151
return
new
AddPriceChangeModel
(
152
$this->change,
153
$this->nextValue instanceof
PriceBuilder
? $this->nextValue->
build
() : $this->nextValue,
154
$this->catalogData,
155
$this->priceId
156
);
157
}
158
159
public
static
function
of
():
AddPriceChangeBuilder
160
{
161
return
new
self
();
162
}
163
}
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:149
Commercetools\History\Models\Change\AddPriceChangeBuilder\getPriceId
getPriceId()
Definition
AddPriceChangeBuilder.php:89
Commercetools\History\Models\Change\AddPriceChangeBuilder\withNextValue
withNextValue(?Price $nextValue)
Definition
AddPriceChangeBuilder.php:109
Commercetools\History\Models\Change\AddPriceChangeBuilder\getChange
getChange()
Definition
AddPriceChangeBuilder.php:53
Commercetools\History\Models\Change\AddPriceChangeBuilder\withChange
withChange(?string $change)
Definition
AddPriceChangeBuilder.php:98
Commercetools\History\Models\Change\AddPriceChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
AddPriceChangeBuilder.php:120
Commercetools\History\Models\Change\AddPriceChangeBuilder\withPriceId
withPriceId(?string $priceId)
Definition
AddPriceChangeBuilder.php:131
Commercetools\History\Models\Change\AddPriceChangeBuilder\getNextValue
getNextValue()
Definition
AddPriceChangeBuilder.php:64
Commercetools\History\Models\Change\AddPriceChangeBuilder\of
static of()
Definition
AddPriceChangeBuilder.php:159
Commercetools\History\Models\Change\AddPriceChangeBuilder\getCatalogData
getCatalogData()
Definition
AddPriceChangeBuilder.php:78
Commercetools\History\Models\Change\AddPriceChangeBuilder\withNextValueBuilder
withNextValueBuilder(?PriceBuilder $nextValue)
Definition
AddPriceChangeBuilder.php:142
Commercetools\History\Models\Change\AddPriceChangeModel
Definition
AddPriceChangeModel.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\AddPriceChange
Definition
AddPriceChange.php:16
Commercetools\History\Models\Common\Price
Definition
Price.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8