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
ChangeLineItemQuantityChangeBuilder.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\LocalizedString
;
18
use
Commercetools\History\Models\Common\LocalizedStringBuilder
;
19
23
final
class
ChangeLineItemQuantityChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$lineItem;
48
53
private
$lineItemId;
54
59
public
function
getChange
()
60
{
61
return
$this->change;
62
}
63
70
public
function
getPreviousValue
()
71
{
72
return
$this->previousValue;
73
}
74
81
public
function
getNextValue
()
82
{
83
return
$this->nextValue;
84
}
85
92
public
function
getLineItem
()
93
{
94
return
$this->lineItem instanceof
LocalizedStringBuilder
? $this->lineItem->
build
() : $this->lineItem;
95
}
96
103
public
function
getLineItemId
()
104
{
105
return
$this->lineItemId;
106
}
107
112
public
function
withChange
(?
string
$change)
113
{
114
$this->change = $change;
115
116
return
$this;
117
}
118
123
public
function
withPreviousValue
(?
int
$previousValue)
124
{
125
$this->previousValue = $previousValue;
126
127
return
$this;
128
}
129
134
public
function
withNextValue
(?
int
$nextValue)
135
{
136
$this->nextValue = $nextValue;
137
138
return
$this;
139
}
140
145
public
function
withLineItem
(?
LocalizedString
$lineItem)
146
{
147
$this->lineItem = $lineItem;
148
149
return
$this;
150
}
151
156
public
function
withLineItemId
(?
string
$lineItemId)
157
{
158
$this->lineItemId = $lineItemId;
159
160
return
$this;
161
}
162
167
public
function
withLineItemBuilder
(?
LocalizedStringBuilder
$lineItem)
168
{
169
$this->lineItem = $lineItem;
170
171
return
$this;
172
}
173
174
public
function
build
():
ChangeLineItemQuantityChange
175
{
176
return
new
ChangeLineItemQuantityChangeModel
(
177
$this->change,
178
$this->previousValue,
179
$this->nextValue,
180
$this->lineItem instanceof
LocalizedStringBuilder
? $this->lineItem->
build
() : $this->lineItem,
181
$this->lineItemId
182
);
183
}
184
185
public
static
function
of
():
ChangeLineItemQuantityChangeBuilder
186
{
187
return
new
self
();
188
}
189
}
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\ChangeLineItemQuantityChangeBuilder
Definition
ChangeLineItemQuantityChangeBuilder.php:24
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\withChange
withChange(?string $change)
Definition
ChangeLineItemQuantityChangeBuilder.php:112
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\of
static of()
Definition
ChangeLineItemQuantityChangeBuilder.php:185
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\withNextValue
withNextValue(?int $nextValue)
Definition
ChangeLineItemQuantityChangeBuilder.php:134
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\withPreviousValue
withPreviousValue(?int $previousValue)
Definition
ChangeLineItemQuantityChangeBuilder.php:123
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\getNextValue
getNextValue()
Definition
ChangeLineItemQuantityChangeBuilder.php:81
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\withLineItemBuilder
withLineItemBuilder(?LocalizedStringBuilder $lineItem)
Definition
ChangeLineItemQuantityChangeBuilder.php:167
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\withLineItemId
withLineItemId(?string $lineItemId)
Definition
ChangeLineItemQuantityChangeBuilder.php:156
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\getChange
getChange()
Definition
ChangeLineItemQuantityChangeBuilder.php:59
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\getLineItemId
getLineItemId()
Definition
ChangeLineItemQuantityChangeBuilder.php:103
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\withLineItem
withLineItem(?LocalizedString $lineItem)
Definition
ChangeLineItemQuantityChangeBuilder.php:145
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\build
build()
Definition
ChangeLineItemQuantityChangeBuilder.php:174
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\getLineItem
getLineItem()
Definition
ChangeLineItemQuantityChangeBuilder.php:92
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeBuilder\getPreviousValue
getPreviousValue()
Definition
ChangeLineItemQuantityChangeBuilder.php:70
Commercetools\History\Models\Change\ChangeLineItemQuantityChangeModel
Definition
ChangeLineItemQuantityChangeModel.php:23
Commercetools\History\Models\Common\LocalizedStringBuilder
Definition
LocalizedStringBuilder.php:20
Commercetools\History\Models\Common\LocalizedStringBuilder\build
build()
Definition
LocalizedStringBuilder.php:42
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\ChangeLineItemQuantityChange
Definition
ChangeLineItemQuantityChange.php:16
Commercetools\History\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8