commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Customer
CustomerSetCustomerGroupActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
10
11
use
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifier
;
12
use
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifierBuilder
;
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
CustomerSetCustomerGroupActionBuilder
implements
Builder
24
{
29
private
$customerGroup;
30
38
public
function
getCustomerGroup
()
39
{
40
return
$this->customerGroup instanceof
CustomerGroupResourceIdentifierBuilder
? $this->customerGroup->
build
() : $this->customerGroup;
41
}
42
47
public
function
withCustomerGroup
(?
CustomerGroupResourceIdentifier
$customerGroup)
48
{
49
$this->customerGroup = $customerGroup;
50
51
return
$this;
52
}
53
58
public
function
withCustomerGroupBuilder
(?
CustomerGroupResourceIdentifierBuilder
$customerGroup)
59
{
60
$this->customerGroup = $customerGroup;
61
62
return
$this;
63
}
64
65
public
function
build
():
CustomerSetCustomerGroupAction
66
{
67
return
new
CustomerSetCustomerGroupActionModel
(
68
$this->customerGroup instanceof
CustomerGroupResourceIdentifierBuilder
? $this->customerGroup->
build
() : $this->customerGroup
69
);
70
}
71
72
public
static
function
of
():
CustomerSetCustomerGroupActionBuilder
73
{
74
return
new
self
();
75
}
76
}
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionBuilder
Definition:
CustomerSetCustomerGroupActionBuilder.php:24
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionBuilder\of
static of()
Definition:
CustomerSetCustomerGroupActionBuilder.php:72
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionBuilder\withCustomerGroupBuilder
withCustomerGroupBuilder(?CustomerGroupResourceIdentifierBuilder $customerGroup)
Definition:
CustomerSetCustomerGroupActionBuilder.php:58
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionBuilder\build
build()
Definition:
CustomerSetCustomerGroupActionBuilder.php:65
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionBuilder\getCustomerGroup
getCustomerGroup()
Definition:
CustomerSetCustomerGroupActionBuilder.php:38
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionBuilder\withCustomerGroup
withCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup)
Definition:
CustomerSetCustomerGroupActionBuilder.php:47
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupActionModel
Definition:
CustomerSetCustomerGroupActionModel.php:23
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifierBuilder
Definition:
CustomerGroupResourceIdentifierBuilder.php:24
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifierBuilder\build
build()
Definition:
CustomerGroupResourceIdentifierBuilder.php:82
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Customer\CustomerSetCustomerGroupAction
Definition:
CustomerSetCustomerGroupAction.php:16
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifier
Definition:
CustomerGroupResourceIdentifier.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition:
Customer.php:9
Generated by
1.9.1