commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
BusinessUnit
BusinessUnitChangeAddressActionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\BusinessUnit
;
10
11
use
Commercetools\Api\Models\Common\BaseAddress
;
12
use
Commercetools\Api\Models\Common\BaseAddressModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
BusinessUnitChangeAddressActionModel
extends
JsonObjectModel
implements
BusinessUnitChangeAddressAction
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'changeAddress'
;
29
protected
$action
;
30
35
protected
$addressId
;
36
41
protected
$addressKey
;
42
47
protected
$address
;
48
49
53
public
function
__construct
(
54
?
string
$addressId
=
null
,
55
?
string
$addressKey
=
null
,
56
?
BaseAddress
$address
=
null
,
57
?
string
$action
=
null
58
) {
59
$this->addressId =
$addressId
;
60
$this->addressKey =
$addressKey
;
61
$this->address =
$address
;
62
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
63
}
64
69
public
function
getAction
()
70
{
71
if
(is_null($this->action)) {
73
$data = $this->
raw
(self::FIELD_ACTION);
74
if
(is_null($data)) {
75
return
null
;
76
}
77
$this->action = (string) $data;
78
}
79
80
return
$this->action
;
81
}
82
89
public
function
getAddressId
()
90
{
91
if
(is_null($this->addressId)) {
93
$data = $this->
raw
(self::FIELD_ADDRESS_ID);
94
if
(is_null($data)) {
95
return
null
;
96
}
97
$this->addressId = (string) $data;
98
}
99
100
return
$this->addressId
;
101
}
102
109
public
function
getAddressKey
()
110
{
111
if
(is_null($this->addressKey)) {
113
$data = $this->
raw
(self::FIELD_ADDRESS_KEY);
114
if
(is_null($data)) {
115
return
null
;
116
}
117
$this->addressKey = (string) $data;
118
}
119
120
return
$this->addressKey
;
121
}
122
129
public
function
getAddress
()
130
{
131
if
(is_null($this->address)) {
133
$data = $this->
raw
(self::FIELD_ADDRESS);
134
if
(is_null($data)) {
135
return
null
;
136
}
137
138
$this->address = BaseAddressModel::of($data);
139
}
140
141
return
$this->address
;
142
}
143
144
148
public
function
setAddressId
(?
string
$addressId
): void
149
{
150
$this->addressId =
$addressId
;
151
}
152
156
public
function
setAddressKey
(?
string
$addressKey
): void
157
{
158
$this->addressKey =
$addressKey
;
159
}
160
164
public
function
setAddress
(?
BaseAddress
$address
): void
165
{
166
$this->address =
$address
;
167
}
168
}
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel
Definition
BusinessUnitChangeAddressActionModel.php:23
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\setAddressKey
setAddressKey(?string $addressKey)
Definition
BusinessUnitChangeAddressActionModel.php:156
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\$action
$action
Definition
BusinessUnitChangeAddressActionModel.php:29
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
BusinessUnitChangeAddressActionModel.php:24
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\getAddress
getAddress()
Definition
BusinessUnitChangeAddressActionModel.php:129
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\getAction
getAction()
Definition
BusinessUnitChangeAddressActionModel.php:69
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\$address
$address
Definition
BusinessUnitChangeAddressActionModel.php:47
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\getAddressId
getAddressId()
Definition
BusinessUnitChangeAddressActionModel.php:89
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\__construct
__construct(?string $addressId=null, ?string $addressKey=null, ?BaseAddress $address=null, ?string $action=null)
Definition
BusinessUnitChangeAddressActionModel.php:53
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\$addressId
$addressId
Definition
BusinessUnitChangeAddressActionModel.php:35
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\setAddress
setAddress(?BaseAddress $address)
Definition
BusinessUnitChangeAddressActionModel.php:164
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\setAddressId
setAddressId(?string $addressId)
Definition
BusinessUnitChangeAddressActionModel.php:148
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\getAddressKey
getAddressKey()
Definition
BusinessUnitChangeAddressActionModel.php:109
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressActionModel\$addressKey
$addressKey
Definition
BusinessUnitChangeAddressActionModel.php:41
Commercetools\Api\Models\Common\BaseAddressModel
Definition
BaseAddressModel.php:21
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\BusinessUnit\BusinessUnitChangeAddressAction
Definition
BusinessUnitChangeAddressAction.php:16
Commercetools\Api\Models\Common\BaseAddress
Definition
BaseAddress.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\BusinessUnit
Definition
Associate.php:9
Generated by
1.9.8