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
SetAddressCustomFieldChangeBuilder.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
SetAddressCustomFieldChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$address;
36
41
private
$name;
42
47
private
$customTypeId;
48
53
private
$previousValue;
54
59
private
$nextValue;
60
65
public
function
getChange
()
66
{
67
return
$this->change;
68
}
69
76
public
function
getAddress
()
77
{
78
return
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address;
79
}
80
87
public
function
getName
()
88
{
89
return
$this->name;
90
}
91
98
public
function
getCustomTypeId
()
99
{
100
return
$this->customTypeId;
101
}
102
109
public
function
getPreviousValue
()
110
{
111
return
$this->previousValue;
112
}
113
120
public
function
getNextValue
()
121
{
122
return
$this->nextValue;
123
}
124
129
public
function
withChange
(?
string
$change)
130
{
131
$this->change = $change;
132
133
return
$this;
134
}
135
140
public
function
withAddress
(?
Address
$address)
141
{
142
$this->address = $address;
143
144
return
$this;
145
}
146
151
public
function
withName
(?
string
$name)
152
{
153
$this->name = $name;
154
155
return
$this;
156
}
157
162
public
function
withCustomTypeId
(?
string
$customTypeId)
163
{
164
$this->customTypeId = $customTypeId;
165
166
return
$this;
167
}
168
173
public
function
withPreviousValue
( $previousValue)
174
{
175
$this->previousValue = $previousValue;
176
177
return
$this;
178
}
179
184
public
function
withNextValue
( $nextValue)
185
{
186
$this->nextValue = $nextValue;
187
188
return
$this;
189
}
190
195
public
function
withAddressBuilder
(?
AddressBuilder
$address)
196
{
197
$this->address = $address;
198
199
return
$this;
200
}
201
202
public
function
build
():
SetAddressCustomFieldChange
203
{
204
return
new
SetAddressCustomFieldChangeModel
(
205
$this->change,
206
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address,
207
$this->name,
208
$this->customTypeId,
209
$this->previousValue,
210
$this->nextValue
211
);
212
}
213
214
public
static
function
of
():
SetAddressCustomFieldChangeBuilder
215
{
216
return
new
self
();
217
}
218
}
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\SetAddressCustomFieldChangeBuilder
Definition
SetAddressCustomFieldChangeBuilder.php:24
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\getName
getName()
Definition
SetAddressCustomFieldChangeBuilder.php:87
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withName
withName(?string $name)
Definition
SetAddressCustomFieldChangeBuilder.php:151
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\getAddress
getAddress()
Definition
SetAddressCustomFieldChangeBuilder.php:76
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\build
build()
Definition
SetAddressCustomFieldChangeBuilder.php:202
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\getNextValue
getNextValue()
Definition
SetAddressCustomFieldChangeBuilder.php:120
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\getChange
getChange()
Definition
SetAddressCustomFieldChangeBuilder.php:65
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withNextValue
withNextValue( $nextValue)
Definition
SetAddressCustomFieldChangeBuilder.php:184
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\getCustomTypeId
getCustomTypeId()
Definition
SetAddressCustomFieldChangeBuilder.php:98
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withChange
withChange(?string $change)
Definition
SetAddressCustomFieldChangeBuilder.php:129
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withCustomTypeId
withCustomTypeId(?string $customTypeId)
Definition
SetAddressCustomFieldChangeBuilder.php:162
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetAddressCustomFieldChangeBuilder.php:109
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\of
static of()
Definition
SetAddressCustomFieldChangeBuilder.php:214
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withPreviousValue
withPreviousValue( $previousValue)
Definition
SetAddressCustomFieldChangeBuilder.php:173
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withAddressBuilder
withAddressBuilder(?AddressBuilder $address)
Definition
SetAddressCustomFieldChangeBuilder.php:195
Commercetools\History\Models\Change\SetAddressCustomFieldChangeBuilder\withAddress
withAddress(?Address $address)
Definition
SetAddressCustomFieldChangeBuilder.php:140
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel
Definition
SetAddressCustomFieldChangeModel.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\SetAddressCustomFieldChange
Definition
SetAddressCustomFieldChange.php:16
Commercetools\History\Models\Common\Address
Definition
Address.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8