commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Label
ProductLabelBuilder.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
use
Commercetools\History\Models\Common\LocalizedString
;
18
use
Commercetools\History\Models\Common\LocalizedStringBuilder
;
19
23
final
class
ProductLabelBuilder
implements
Builder
24
{
29
private
$slug;
30
35
private
$name;
36
43
public
function
getSlug
()
44
{
45
return
$this->slug instanceof
LocalizedStringBuilder
? $this->slug->
build
() : $this->slug;
46
}
47
54
public
function
getName
()
55
{
56
return
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name;
57
}
58
63
public
function
withSlug
(?
LocalizedString
$slug)
64
{
65
$this->slug = $slug;
66
67
return
$this;
68
}
69
74
public
function
withName
(?
LocalizedString
$name)
75
{
76
$this->name = $name;
77
78
return
$this;
79
}
80
85
public
function
withSlugBuilder
(?
LocalizedStringBuilder
$slug)
86
{
87
$this->slug = $slug;
88
89
return
$this;
90
}
91
96
public
function
withNameBuilder
(?
LocalizedStringBuilder
$name)
97
{
98
$this->name = $name;
99
100
return
$this;
101
}
102
103
public
function
build
():
ProductLabel
104
{
105
return
new
ProductLabelModel
(
106
$this->slug instanceof
LocalizedStringBuilder
? $this->slug->
build
() : $this->slug,
107
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name
108
);
109
}
110
111
public
static
function
of
():
ProductLabelBuilder
112
{
113
return
new
self
();
114
}
115
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\Common\LocalizedStringBuilder
Definition:
LocalizedStringBuilder.php:20
Commercetools\History\Models\Common\LocalizedStringBuilder\build
build()
Definition:
LocalizedStringBuilder.php:42
Commercetools\History\Models\Label\ProductLabelBuilder
Definition:
ProductLabelBuilder.php:24
Commercetools\History\Models\Label\ProductLabelBuilder\withSlug
withSlug(?LocalizedString $slug)
Definition:
ProductLabelBuilder.php:63
Commercetools\History\Models\Label\ProductLabelBuilder\withNameBuilder
withNameBuilder(?LocalizedStringBuilder $name)
Definition:
ProductLabelBuilder.php:96
Commercetools\History\Models\Label\ProductLabelBuilder\of
static of()
Definition:
ProductLabelBuilder.php:111
Commercetools\History\Models\Label\ProductLabelBuilder\build
build()
Definition:
ProductLabelBuilder.php:103
Commercetools\History\Models\Label\ProductLabelBuilder\getSlug
getSlug()
Definition:
ProductLabelBuilder.php:43
Commercetools\History\Models\Label\ProductLabelBuilder\withSlugBuilder
withSlugBuilder(?LocalizedStringBuilder $slug)
Definition:
ProductLabelBuilder.php:85
Commercetools\History\Models\Label\ProductLabelBuilder\getName
getName()
Definition:
ProductLabelBuilder.php:54
Commercetools\History\Models\Label\ProductLabelBuilder\withName
withName(?LocalizedString $name)
Definition:
ProductLabelBuilder.php:74
Commercetools\History\Models\Label\ProductLabelModel
Definition:
ProductLabelModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\History\Models\Label\ProductLabel
Definition:
ProductLabel.php:16
Commercetools\History\Models\Label
Definition:
AssociateRoleLabel.php:9
Generated by
1.9.1