commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Label
CustomerLabelBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
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
21
final
class
CustomerLabelBuilder
implements
Builder
22
{
27
private
$firstName;
28
33
private
$lastName;
34
39
private
$customerNumber;
40
47
public
function
getFirstName
()
48
{
49
return
$this->firstName;
50
}
51
58
public
function
getLastName
()
59
{
60
return
$this->lastName;
61
}
62
69
public
function
getCustomerNumber
()
70
{
71
return
$this->customerNumber;
72
}
73
78
public
function
withFirstName
(?
string
$firstName)
79
{
80
$this->firstName = $firstName;
81
82
return
$this;
83
}
84
89
public
function
withLastName
(?
string
$lastName)
90
{
91
$this->lastName = $lastName;
92
93
return
$this;
94
}
95
100
public
function
withCustomerNumber
(?
string
$customerNumber)
101
{
102
$this->customerNumber = $customerNumber;
103
104
return
$this;
105
}
106
107
108
public
function
build
():
CustomerLabel
109
{
110
return
new
CustomerLabelModel
(
111
$this->firstName,
112
$this->lastName,
113
$this->customerNumber
114
);
115
}
116
117
public
static
function
of
():
CustomerLabelBuilder
118
{
119
return
new
self
();
120
}
121
}
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\CustomerLabelBuilder
Definition:
CustomerLabelBuilder.php:22
Commercetools\History\Models\Label\CustomerLabelBuilder\withCustomerNumber
withCustomerNumber(?string $customerNumber)
Definition:
CustomerLabelBuilder.php:100
Commercetools\History\Models\Label\CustomerLabelBuilder\withLastName
withLastName(?string $lastName)
Definition:
CustomerLabelBuilder.php:89
Commercetools\History\Models\Label\CustomerLabelBuilder\getCustomerNumber
getCustomerNumber()
Definition:
CustomerLabelBuilder.php:69
Commercetools\History\Models\Label\CustomerLabelBuilder\getFirstName
getFirstName()
Definition:
CustomerLabelBuilder.php:47
Commercetools\History\Models\Label\CustomerLabelBuilder\build
build()
Definition:
CustomerLabelBuilder.php:108
Commercetools\History\Models\Label\CustomerLabelBuilder\withFirstName
withFirstName(?string $firstName)
Definition:
CustomerLabelBuilder.php:78
Commercetools\History\Models\Label\CustomerLabelBuilder\getLastName
getLastName()
Definition:
CustomerLabelBuilder.php:58
Commercetools\History\Models\Label\CustomerLabelBuilder\of
static of()
Definition:
CustomerLabelBuilder.php:117
Commercetools\History\Models\Label\CustomerLabelModel
Definition:
CustomerLabelModel.php:21
Commercetools\Base\Builder
Definition:
Builder.php:16
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.1