commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
CustomerGroup
CustomerGroupDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\CustomerGroup
;
10
11
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
12
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
CustomerGroupDraftBuilder
implements
Builder
24
{
29
private
$key;
30
35
private
$groupName;
36
41
private
$custom;
42
49
public
function
getKey
()
50
{
51
return
$this->key;
52
}
53
61
public
function
getGroupName
()
62
{
63
return
$this->groupName;
64
}
65
72
public
function
getCustom
()
73
{
74
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
75
}
76
81
public
function
withKey
(?
string
$key)
82
{
83
$this->key = $key;
84
85
return
$this;
86
}
87
92
public
function
withGroupName
(?
string
$groupName)
93
{
94
$this->groupName = $groupName;
95
96
return
$this;
97
}
98
103
public
function
withCustom
(?
CustomFieldsDraft
$custom)
104
{
105
$this->custom = $custom;
106
107
return
$this;
108
}
109
114
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
115
{
116
$this->custom = $custom;
117
118
return
$this;
119
}
120
121
public
function
build
():
CustomerGroupDraft
122
{
123
return
new
CustomerGroupDraftModel
(
124
$this->key,
125
$this->groupName,
126
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom
127
);
128
}
129
130
public
static
function
of
():
CustomerGroupDraftBuilder
131
{
132
return
new
self
();
133
}
134
}
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder
Definition:
CustomerGroupDraftBuilder.php:24
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition:
CustomerGroupDraftBuilder.php:103
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\withKey
withKey(?string $key)
Definition:
CustomerGroupDraftBuilder.php:81
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition:
CustomerGroupDraftBuilder.php:114
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\getGroupName
getGroupName()
Definition:
CustomerGroupDraftBuilder.php:61
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\withGroupName
withGroupName(?string $groupName)
Definition:
CustomerGroupDraftBuilder.php:92
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\of
static of()
Definition:
CustomerGroupDraftBuilder.php:130
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\getKey
getKey()
Definition:
CustomerGroupDraftBuilder.php:49
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\build
build()
Definition:
CustomerGroupDraftBuilder.php:121
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftBuilder\getCustom
getCustom()
Definition:
CustomerGroupDraftBuilder.php:72
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraftModel
Definition:
CustomerGroupDraftModel.php:23
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition:
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition:
CustomFieldsDraftBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\CustomerGroup\CustomerGroupDraft
Definition:
CustomerGroupDraft.php:16
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition:
CustomFieldsDraft.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\CustomerGroup
Definition:
CustomerGroup.php:9
Generated by
1.9.1