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
RemoveVariantChangeBuilder.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\Variant
;
18
use
Commercetools\History\Models\Common\VariantBuilder
;
19
23
final
class
RemoveVariantChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$catalogData;
48
53
public
function
getChange
()
54
{
55
return
$this->change;
56
}
57
64
public
function
getPreviousValue
()
65
{
66
return
$this->previousValue instanceof
VariantBuilder
? $this->previousValue->
build
() : $this->previousValue;
67
}
68
75
public
function
getNextValue
()
76
{
77
return
$this->nextValue instanceof
VariantBuilder
? $this->nextValue->
build
() : $this->nextValue;
78
}
79
89
public
function
getCatalogData
()
90
{
91
return
$this->catalogData;
92
}
93
98
public
function
withChange
(?
string
$change)
99
{
100
$this->change = $change;
101
102
return
$this;
103
}
104
109
public
function
withPreviousValue
(?
Variant
$previousValue)
110
{
111
$this->previousValue = $previousValue;
112
113
return
$this;
114
}
115
120
public
function
withNextValue
(?
Variant
$nextValue)
121
{
122
$this->nextValue = $nextValue;
123
124
return
$this;
125
}
126
131
public
function
withCatalogData
(?
string
$catalogData)
132
{
133
$this->catalogData = $catalogData;
134
135
return
$this;
136
}
137
142
public
function
withPreviousValueBuilder
(?
VariantBuilder
$previousValue)
143
{
144
$this->previousValue = $previousValue;
145
146
return
$this;
147
}
148
153
public
function
withNextValueBuilder
(?
VariantBuilder
$nextValue)
154
{
155
$this->nextValue = $nextValue;
156
157
return
$this;
158
}
159
160
public
function
build
():
RemoveVariantChange
161
{
162
return
new
RemoveVariantChangeModel
(
163
$this->change,
164
$this->previousValue instanceof
VariantBuilder
? $this->previousValue->
build
() : $this->previousValue,
165
$this->nextValue instanceof
VariantBuilder
? $this->nextValue->
build
() : $this->nextValue,
166
$this->catalogData
167
);
168
}
169
170
public
static
function
of
():
RemoveVariantChangeBuilder
171
{
172
return
new
self
();
173
}
174
}
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\RemoveVariantChangeBuilder
Definition
RemoveVariantChangeBuilder.php:24
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
RemoveVariantChangeBuilder.php:131
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\withChange
withChange(?string $change)
Definition
RemoveVariantChangeBuilder.php:98
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\of
static of()
Definition
RemoveVariantChangeBuilder.php:170
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\withPreviousValue
withPreviousValue(?Variant $previousValue)
Definition
RemoveVariantChangeBuilder.php:109
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\withNextValue
withNextValue(?Variant $nextValue)
Definition
RemoveVariantChangeBuilder.php:120
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\getCatalogData
getCatalogData()
Definition
RemoveVariantChangeBuilder.php:89
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\getChange
getChange()
Definition
RemoveVariantChangeBuilder.php:53
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\build
build()
Definition
RemoveVariantChangeBuilder.php:160
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\getNextValue
getNextValue()
Definition
RemoveVariantChangeBuilder.php:75
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\getPreviousValue
getPreviousValue()
Definition
RemoveVariantChangeBuilder.php:64
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\withNextValueBuilder
withNextValueBuilder(?VariantBuilder $nextValue)
Definition
RemoveVariantChangeBuilder.php:153
Commercetools\History\Models\Change\RemoveVariantChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?VariantBuilder $previousValue)
Definition
RemoveVariantChangeBuilder.php:142
Commercetools\History\Models\Change\RemoveVariantChangeModel
Definition
RemoveVariantChangeModel.php:23
Commercetools\History\Models\Common\VariantBuilder
Definition
VariantBuilder.php:22
Commercetools\History\Models\Common\VariantBuilder\build
build()
Definition
VariantBuilder.php:102
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\RemoveVariantChange
Definition
RemoveVariantChange.php:16
Commercetools\History\Models\Common\Variant
Definition
Variant.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8