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
Label
CustomerLabelModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
CustomerLabelModel
extends
JsonObjectModel
implements
CustomerLabel
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'CustomerLabel'
;
28
protected
$type
;
29
34
protected
$firstName
;
35
40
protected
$lastName
;
41
46
protected
$customerNumber
;
47
48
52
public
function
__construct
(
53
?
string
$firstName
=
null
,
54
?
string
$lastName
=
null
,
55
?
string
$customerNumber
=
null
,
56
?
string
$type
=
null
57
) {
58
$this->firstName =
$firstName
;
59
$this->lastName =
$lastName
;
60
$this->customerNumber =
$customerNumber
;
61
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
62
}
63
68
public
function
getType
()
69
{
70
if
(is_null($this->type)) {
72
$data = $this->
raw
(self::FIELD_TYPE);
73
if
(is_null($data)) {
74
return
null
;
75
}
76
$this->type = (string) $data;
77
}
78
79
return
$this->type
;
80
}
81
88
public
function
getFirstName
()
89
{
90
if
(is_null($this->firstName)) {
92
$data = $this->
raw
(self::FIELD_FIRST_NAME);
93
if
(is_null($data)) {
94
return
null
;
95
}
96
$this->firstName = (string) $data;
97
}
98
99
return
$this->firstName
;
100
}
101
108
public
function
getLastName
()
109
{
110
if
(is_null($this->lastName)) {
112
$data = $this->
raw
(self::FIELD_LAST_NAME);
113
if
(is_null($data)) {
114
return
null
;
115
}
116
$this->lastName = (string) $data;
117
}
118
119
return
$this->lastName
;
120
}
121
128
public
function
getCustomerNumber
()
129
{
130
if
(is_null($this->customerNumber)) {
132
$data = $this->
raw
(self::FIELD_CUSTOMER_NUMBER);
133
if
(is_null($data)) {
134
return
null
;
135
}
136
$this->customerNumber = (string) $data;
137
}
138
139
return
$this->customerNumber
;
140
}
141
142
146
public
function
setFirstName
(?
string
$firstName
): void
147
{
148
$this->firstName =
$firstName
;
149
}
150
154
public
function
setLastName
(?
string
$lastName
): void
155
{
156
$this->lastName =
$lastName
;
157
}
158
162
public
function
setCustomerNumber
(?
string
$customerNumber
): void
163
{
164
$this->customerNumber =
$customerNumber
;
165
}
166
167
168
169
}
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\History\Models\Label\CustomerLabelModel
Definition
CustomerLabelModel.php:21
Commercetools\History\Models\Label\CustomerLabelModel\getLastName
getLastName()
Definition
CustomerLabelModel.php:108
Commercetools\History\Models\Label\CustomerLabelModel\getCustomerNumber
getCustomerNumber()
Definition
CustomerLabelModel.php:128
Commercetools\History\Models\Label\CustomerLabelModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
CustomerLabelModel.php:23
Commercetools\History\Models\Label\CustomerLabelModel\setCustomerNumber
setCustomerNumber(?string $customerNumber)
Definition
CustomerLabelModel.php:162
Commercetools\History\Models\Label\CustomerLabelModel\$firstName
$firstName
Definition
CustomerLabelModel.php:34
Commercetools\History\Models\Label\CustomerLabelModel\getType
getType()
Definition
CustomerLabelModel.php:68
Commercetools\History\Models\Label\CustomerLabelModel\__construct
__construct(?string $firstName=null, ?string $lastName=null, ?string $customerNumber=null, ?string $type=null)
Definition
CustomerLabelModel.php:52
Commercetools\History\Models\Label\CustomerLabelModel\$type
$type
Definition
CustomerLabelModel.php:28
Commercetools\History\Models\Label\CustomerLabelModel\getFirstName
getFirstName()
Definition
CustomerLabelModel.php:88
Commercetools\History\Models\Label\CustomerLabelModel\$lastName
$lastName
Definition
CustomerLabelModel.php:40
Commercetools\History\Models\Label\CustomerLabelModel\setLastName
setLastName(?string $lastName)
Definition
CustomerLabelModel.php:154
Commercetools\History\Models\Label\CustomerLabelModel\setFirstName
setFirstName(?string $firstName)
Definition
CustomerLabelModel.php:146
Commercetools\History\Models\Label\CustomerLabelModel\$customerNumber
$customerNumber
Definition
CustomerLabelModel.php:46
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Label\CustomerLabel
Definition
CustomerLabel.php:15
Commercetools\History\Models\Label
Definition
AssociateRoleLabel.php:9
Generated by
1.9.8