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
SetVariantAvailabilityChangeBuilder.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\ProductVariantAvailability
;
18
use
Commercetools\History\Models\Common\ProductVariantAvailabilityBuilder
;
19
23
final
class
SetVariantAvailabilityChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$catalogData;
48
53
private
$variant;
54
59
public
function
getChange
()
60
{
61
return
$this->change;
62
}
63
70
public
function
getPreviousValue
()
71
{
72
return
$this->previousValue instanceof
ProductVariantAvailabilityBuilder
? $this->previousValue->
build
() : $this->previousValue;
73
}
74
81
public
function
getNextValue
()
82
{
83
return
$this->nextValue instanceof
ProductVariantAvailabilityBuilder
? $this->nextValue->
build
() : $this->nextValue;
84
}
85
95
public
function
getCatalogData
()
96
{
97
return
$this->catalogData;
98
}
99
106
public
function
getVariant
()
107
{
108
return
$this->variant;
109
}
110
115
public
function
withChange
(?
string
$change)
116
{
117
$this->change = $change;
118
119
return
$this;
120
}
121
126
public
function
withPreviousValue
(?
ProductVariantAvailability
$previousValue)
127
{
128
$this->previousValue = $previousValue;
129
130
return
$this;
131
}
132
137
public
function
withNextValue
(?
ProductVariantAvailability
$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
withVariant
(?
string
$variant)
160
{
161
$this->variant = $variant;
162
163
return
$this;
164
}
165
170
public
function
withPreviousValueBuilder
(?
ProductVariantAvailabilityBuilder
$previousValue)
171
{
172
$this->previousValue = $previousValue;
173
174
return
$this;
175
}
176
181
public
function
withNextValueBuilder
(?
ProductVariantAvailabilityBuilder
$nextValue)
182
{
183
$this->nextValue = $nextValue;
184
185
return
$this;
186
}
187
188
public
function
build
():
SetVariantAvailabilityChange
189
{
190
return
new
SetVariantAvailabilityChangeModel
(
191
$this->change,
192
$this->previousValue instanceof
ProductVariantAvailabilityBuilder
? $this->previousValue->
build
() : $this->previousValue,
193
$this->nextValue instanceof
ProductVariantAvailabilityBuilder
? $this->nextValue->
build
() : $this->nextValue,
194
$this->catalogData,
195
$this->variant
196
);
197
}
198
199
public
static
function
of
():
SetVariantAvailabilityChangeBuilder
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\SetVariantAvailabilityChangeBuilder
Definition
SetVariantAvailabilityChangeBuilder.php:24
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withNextValue
withNextValue(?ProductVariantAvailability $nextValue)
Definition
SetVariantAvailabilityChangeBuilder.php:137
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withChange
withChange(?string $change)
Definition
SetVariantAvailabilityChangeBuilder.php:115
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\getChange
getChange()
Definition
SetVariantAvailabilityChangeBuilder.php:59
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withNextValueBuilder
withNextValueBuilder(?ProductVariantAvailabilityBuilder $nextValue)
Definition
SetVariantAvailabilityChangeBuilder.php:181
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\build
build()
Definition
SetVariantAvailabilityChangeBuilder.php:188
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\getNextValue
getNextValue()
Definition
SetVariantAvailabilityChangeBuilder.php:81
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
SetVariantAvailabilityChangeBuilder.php:148
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?ProductVariantAvailabilityBuilder $previousValue)
Definition
SetVariantAvailabilityChangeBuilder.php:170
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\of
static of()
Definition
SetVariantAvailabilityChangeBuilder.php:199
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\getVariant
getVariant()
Definition
SetVariantAvailabilityChangeBuilder.php:106
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withVariant
withVariant(?string $variant)
Definition
SetVariantAvailabilityChangeBuilder.php:159
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\withPreviousValue
withPreviousValue(?ProductVariantAvailability $previousValue)
Definition
SetVariantAvailabilityChangeBuilder.php:126
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\getCatalogData
getCatalogData()
Definition
SetVariantAvailabilityChangeBuilder.php:95
Commercetools\History\Models\Change\SetVariantAvailabilityChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetVariantAvailabilityChangeBuilder.php:70
Commercetools\History\Models\Change\SetVariantAvailabilityChangeModel
Definition
SetVariantAvailabilityChangeModel.php:23
Commercetools\History\Models\Common\ProductVariantAvailabilityBuilder
Definition
ProductVariantAvailabilityBuilder.php:22
Commercetools\History\Models\Common\ProductVariantAvailabilityBuilder\build
build()
Definition
ProductVariantAvailabilityBuilder.php:138
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetVariantAvailabilityChange
Definition
SetVariantAvailabilityChange.php:16
Commercetools\History\Models\Common\ProductVariantAvailability
Definition
ProductVariantAvailability.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8