commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Change
AddShippingAddressIdChangeBuilder.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
AddShippingAddressIdChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$address;
48
53
public
function
getChange
()
54
{
55
return
$this->change;
56
}
57
64
public
function
getPreviousValue
()
65
{
66
return
$this->previousValue;
67
}
68
75
public
function
getNextValue
()
76
{
77
return
$this->nextValue;
78
}
79
86
public
function
getAddress
()
87
{
88
return
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address;
89
}
90
95
public
function
withChange
(?
string
$change)
96
{
97
$this->change = $change;
98
99
return
$this;
100
}
101
106
public
function
withPreviousValue
(?array $previousValue)
107
{
108
$this->previousValue = $previousValue;
109
110
return
$this;
111
}
112
117
public
function
withNextValue
(?array $nextValue)
118
{
119
$this->nextValue = $nextValue;
120
121
return
$this;
122
}
123
128
public
function
withAddress
(?
Address
$address)
129
{
130
$this->address = $address;
131
132
return
$this;
133
}
134
139
public
function
withAddressBuilder
(?
AddressBuilder
$address)
140
{
141
$this->address = $address;
142
143
return
$this;
144
}
145
146
public
function
build
():
AddShippingAddressIdChange
147
{
148
return
new
AddShippingAddressIdChangeModel
(
149
$this->change,
150
$this->previousValue,
151
$this->nextValue,
152
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address
153
);
154
}
155
156
public
static
function
of
():
AddShippingAddressIdChangeBuilder
157
{
158
return
new
self
();
159
}
160
}
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\AddShippingAddressIdChangeBuilder
Definition:
AddShippingAddressIdChangeBuilder.php:24
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\of
static of()
Definition:
AddShippingAddressIdChangeBuilder.php:156
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\build
build()
Definition:
AddShippingAddressIdChangeBuilder.php:146
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\withAddress
withAddress(?Address $address)
Definition:
AddShippingAddressIdChangeBuilder.php:128
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\withAddressBuilder
withAddressBuilder(?AddressBuilder $address)
Definition:
AddShippingAddressIdChangeBuilder.php:139
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\getPreviousValue
getPreviousValue()
Definition:
AddShippingAddressIdChangeBuilder.php:64
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\withChange
withChange(?string $change)
Definition:
AddShippingAddressIdChangeBuilder.php:95
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\getNextValue
getNextValue()
Definition:
AddShippingAddressIdChangeBuilder.php:75
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\withPreviousValue
withPreviousValue(?array $previousValue)
Definition:
AddShippingAddressIdChangeBuilder.php:106
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\getChange
getChange()
Definition:
AddShippingAddressIdChangeBuilder.php:53
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\withNextValue
withNextValue(?array $nextValue)
Definition:
AddShippingAddressIdChangeBuilder.php:117
Commercetools\History\Models\Change\AddShippingAddressIdChangeBuilder\getAddress
getAddress()
Definition:
AddShippingAddressIdChangeBuilder.php:86
Commercetools\History\Models\Change\AddShippingAddressIdChangeModel
Definition:
AddShippingAddressIdChangeModel.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\AddShippingAddressIdChange
Definition:
AddShippingAddressIdChange.php:16
Commercetools\History\Models\Common\Address
Definition:
Address.php:15
Commercetools\History\Models\Change
Definition:
AddAddressChange.php:9
Generated by
1.9.1