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
SetDeliveryAddressChangeBuilder.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\Address
;
18
use
Commercetools\History\Models\Common\AddressBuilder
;
19
23
final
class
SetDeliveryAddressChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$deliveryId;
48
53
public
function
getChange
()
54
{
55
return
$this->change;
56
}
57
64
public
function
getPreviousValue
()
65
{
66
return
$this->previousValue instanceof
AddressBuilder
? $this->previousValue->
build
() : $this->previousValue;
67
}
68
75
public
function
getNextValue
()
76
{
77
return
$this->nextValue instanceof
AddressBuilder
? $this->nextValue->
build
() : $this->nextValue;
78
}
79
86
public
function
getDeliveryId
()
87
{
88
return
$this->deliveryId;
89
}
90
95
public
function
withChange
(?
string
$change)
96
{
97
$this->change = $change;
98
99
return
$this;
100
}
101
106
public
function
withPreviousValue
(?
Address
$previousValue)
107
{
108
$this->previousValue = $previousValue;
109
110
return
$this;
111
}
112
117
public
function
withNextValue
(?
Address
$nextValue)
118
{
119
$this->nextValue = $nextValue;
120
121
return
$this;
122
}
123
128
public
function
withDeliveryId
(?
string
$deliveryId)
129
{
130
$this->deliveryId = $deliveryId;
131
132
return
$this;
133
}
134
139
public
function
withPreviousValueBuilder
(?
AddressBuilder
$previousValue)
140
{
141
$this->previousValue = $previousValue;
142
143
return
$this;
144
}
145
150
public
function
withNextValueBuilder
(?
AddressBuilder
$nextValue)
151
{
152
$this->nextValue = $nextValue;
153
154
return
$this;
155
}
156
157
public
function
build
():
SetDeliveryAddressChange
158
{
159
return
new
SetDeliveryAddressChangeModel
(
160
$this->change,
161
$this->previousValue instanceof
AddressBuilder
? $this->previousValue->
build
() : $this->previousValue,
162
$this->nextValue instanceof
AddressBuilder
? $this->nextValue->
build
() : $this->nextValue,
163
$this->deliveryId
164
);
165
}
166
167
public
static
function
of
():
SetDeliveryAddressChangeBuilder
168
{
169
return
new
self
();
170
}
171
}
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\SetDeliveryAddressChangeBuilder
Definition
SetDeliveryAddressChangeBuilder.php:24
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\withDeliveryId
withDeliveryId(?string $deliveryId)
Definition
SetDeliveryAddressChangeBuilder.php:128
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\getNextValue
getNextValue()
Definition
SetDeliveryAddressChangeBuilder.php:75
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\withChange
withChange(?string $change)
Definition
SetDeliveryAddressChangeBuilder.php:95
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?AddressBuilder $previousValue)
Definition
SetDeliveryAddressChangeBuilder.php:139
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\build
build()
Definition
SetDeliveryAddressChangeBuilder.php:157
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\withNextValueBuilder
withNextValueBuilder(?AddressBuilder $nextValue)
Definition
SetDeliveryAddressChangeBuilder.php:150
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\getChange
getChange()
Definition
SetDeliveryAddressChangeBuilder.php:53
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\getDeliveryId
getDeliveryId()
Definition
SetDeliveryAddressChangeBuilder.php:86
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetDeliveryAddressChangeBuilder.php:64
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\of
static of()
Definition
SetDeliveryAddressChangeBuilder.php:167
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\withNextValue
withNextValue(?Address $nextValue)
Definition
SetDeliveryAddressChangeBuilder.php:117
Commercetools\History\Models\Change\SetDeliveryAddressChangeBuilder\withPreviousValue
withPreviousValue(?Address $previousValue)
Definition
SetDeliveryAddressChangeBuilder.php:106
Commercetools\History\Models\Change\SetDeliveryAddressChangeModel
Definition
SetDeliveryAddressChangeModel.php:23
Commercetools\History\Models\Common\AddressBuilder
Definition
AddressBuilder.php:22
Commercetools\History\Models\Common\AddressBuilder\build
build()
Definition
AddressBuilder.php:678
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetDeliveryAddressChange
Definition
SetDeliveryAddressChange.php:16
Commercetools\History\Models\Common\Address
Definition
Address.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8