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
AddVariantChangeBuilder.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
AddVariantChangeBuilder
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
90
public
function
getCatalogData
()
91
{
92
return
$this->catalogData;
93
}
94
99
public
function
withChange
(?
string
$change)
100
{
101
$this->change = $change;
102
103
return
$this;
104
}
105
110
public
function
withPreviousValue
(?
Variant
$previousValue)
111
{
112
$this->previousValue = $previousValue;
113
114
return
$this;
115
}
116
121
public
function
withNextValue
(?
Variant
$nextValue)
122
{
123
$this->nextValue = $nextValue;
124
125
return
$this;
126
}
127
132
public
function
withCatalogData
(?
string
$catalogData)
133
{
134
$this->catalogData = $catalogData;
135
136
return
$this;
137
}
138
143
public
function
withPreviousValueBuilder
(?
VariantBuilder
$previousValue)
144
{
145
$this->previousValue = $previousValue;
146
147
return
$this;
148
}
149
154
public
function
withNextValueBuilder
(?
VariantBuilder
$nextValue)
155
{
156
$this->nextValue = $nextValue;
157
158
return
$this;
159
}
160
161
public
function
build
():
AddVariantChange
162
{
163
return
new
AddVariantChangeModel
(
164
$this->change,
165
$this->previousValue instanceof
VariantBuilder
? $this->previousValue->
build
() : $this->previousValue,
166
$this->nextValue instanceof
VariantBuilder
? $this->nextValue->
build
() : $this->nextValue,
167
$this->catalogData
168
);
169
}
170
171
public
static
function
of
():
AddVariantChangeBuilder
172
{
173
return
new
self
();
174
}
175
}
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\AddVariantChangeBuilder
Definition
AddVariantChangeBuilder.php:24
Commercetools\History\Models\Change\AddVariantChangeBuilder\build
build()
Definition
AddVariantChangeBuilder.php:161
Commercetools\History\Models\Change\AddVariantChangeBuilder\withPreviousValue
withPreviousValue(?Variant $previousValue)
Definition
AddVariantChangeBuilder.php:110
Commercetools\History\Models\Change\AddVariantChangeBuilder\of
static of()
Definition
AddVariantChangeBuilder.php:171
Commercetools\History\Models\Change\AddVariantChangeBuilder\withNextValueBuilder
withNextValueBuilder(?VariantBuilder $nextValue)
Definition
AddVariantChangeBuilder.php:154
Commercetools\History\Models\Change\AddVariantChangeBuilder\withChange
withChange(?string $change)
Definition
AddVariantChangeBuilder.php:99
Commercetools\History\Models\Change\AddVariantChangeBuilder\getPreviousValue
getPreviousValue()
Definition
AddVariantChangeBuilder.php:64
Commercetools\History\Models\Change\AddVariantChangeBuilder\getChange
getChange()
Definition
AddVariantChangeBuilder.php:53
Commercetools\History\Models\Change\AddVariantChangeBuilder\getNextValue
getNextValue()
Definition
AddVariantChangeBuilder.php:75
Commercetools\History\Models\Change\AddVariantChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
AddVariantChangeBuilder.php:132
Commercetools\History\Models\Change\AddVariantChangeBuilder\withNextValue
withNextValue(?Variant $nextValue)
Definition
AddVariantChangeBuilder.php:121
Commercetools\History\Models\Change\AddVariantChangeBuilder\getCatalogData
getCatalogData()
Definition
AddVariantChangeBuilder.php:90
Commercetools\History\Models\Change\AddVariantChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?VariantBuilder $previousValue)
Definition
AddVariantChangeBuilder.php:143
Commercetools\History\Models\Change\AddVariantChangeModel
Definition
AddVariantChangeModel.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\AddVariantChange
Definition
AddVariantChange.php:16
Commercetools\History\Models\Common\Variant
Definition
Variant.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8