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
SetShippingMethodChangeBuilder.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\ChangeValue\ShippingMethodChangeValue
;
18
use
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueBuilder
;
19
23
final
class
SetShippingMethodChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
public
function
getChange
()
48
{
49
return
$this->change;
50
}
51
58
public
function
getPreviousValue
()
59
{
60
return
$this->previousValue instanceof
ShippingMethodChangeValueBuilder
? $this->previousValue->
build
() : $this->previousValue;
61
}
62
69
public
function
getNextValue
()
70
{
71
return
$this->nextValue instanceof
ShippingMethodChangeValueBuilder
? $this->nextValue->
build
() : $this->nextValue;
72
}
73
78
public
function
withChange
(?
string
$change)
79
{
80
$this->change = $change;
81
82
return
$this;
83
}
84
89
public
function
withPreviousValue
(?
ShippingMethodChangeValue
$previousValue)
90
{
91
$this->previousValue = $previousValue;
92
93
return
$this;
94
}
95
100
public
function
withNextValue
(?
ShippingMethodChangeValue
$nextValue)
101
{
102
$this->nextValue = $nextValue;
103
104
return
$this;
105
}
106
111
public
function
withPreviousValueBuilder
(?
ShippingMethodChangeValueBuilder
$previousValue)
112
{
113
$this->previousValue = $previousValue;
114
115
return
$this;
116
}
117
122
public
function
withNextValueBuilder
(?
ShippingMethodChangeValueBuilder
$nextValue)
123
{
124
$this->nextValue = $nextValue;
125
126
return
$this;
127
}
128
129
public
function
build
():
SetShippingMethodChange
130
{
131
return
new
SetShippingMethodChangeModel
(
132
$this->change,
133
$this->previousValue instanceof
ShippingMethodChangeValueBuilder
? $this->previousValue->
build
() : $this->previousValue,
134
$this->nextValue instanceof
ShippingMethodChangeValueBuilder
? $this->nextValue->
build
() : $this->nextValue
135
);
136
}
137
138
public
static
function
of
():
SetShippingMethodChangeBuilder
139
{
140
return
new
self
();
141
}
142
}
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\SetShippingMethodChangeBuilder
Definition
SetShippingMethodChangeBuilder.php:24
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\withPreviousValue
withPreviousValue(?ShippingMethodChangeValue $previousValue)
Definition
SetShippingMethodChangeBuilder.php:89
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\withNextValue
withNextValue(?ShippingMethodChangeValue $nextValue)
Definition
SetShippingMethodChangeBuilder.php:100
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\withNextValueBuilder
withNextValueBuilder(?ShippingMethodChangeValueBuilder $nextValue)
Definition
SetShippingMethodChangeBuilder.php:122
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\getNextValue
getNextValue()
Definition
SetShippingMethodChangeBuilder.php:69
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\build
build()
Definition
SetShippingMethodChangeBuilder.php:129
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\of
static of()
Definition
SetShippingMethodChangeBuilder.php:138
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\withChange
withChange(?string $change)
Definition
SetShippingMethodChangeBuilder.php:78
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetShippingMethodChangeBuilder.php:58
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?ShippingMethodChangeValueBuilder $previousValue)
Definition
SetShippingMethodChangeBuilder.php:111
Commercetools\History\Models\Change\SetShippingMethodChangeBuilder\getChange
getChange()
Definition
SetShippingMethodChangeBuilder.php:47
Commercetools\History\Models\Change\SetShippingMethodChangeModel
Definition
SetShippingMethodChangeModel.php:23
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueBuilder
Definition
ShippingMethodChangeValueBuilder.php:22
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValueBuilder\build
build()
Definition
ShippingMethodChangeValueBuilder.php:80
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetShippingMethodChange
Definition
SetShippingMethodChange.php:16
Commercetools\History\Models\ChangeValue\ShippingMethodChangeValue
Definition
ShippingMethodChangeValue.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8