commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
BusinessUnit
BusinessUnitAddAssociateActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\BusinessUnit
;
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
BusinessUnitAddAssociateActionBuilder
implements
Builder
22
{
27
private
$associate;
28
35
public
function
getAssociate
()
36
{
37
return
$this->associate instanceof
AssociateDraftBuilder
? $this->associate->
build
() : $this->associate;
38
}
39
44
public
function
withAssociate
(?
AssociateDraft
$associate)
45
{
46
$this->associate = $associate;
47
48
return
$this;
49
}
50
55
public
function
withAssociateBuilder
(?
AssociateDraftBuilder
$associate)
56
{
57
$this->associate = $associate;
58
59
return
$this;
60
}
61
62
public
function
build
():
BusinessUnitAddAssociateAction
63
{
64
return
new
BusinessUnitAddAssociateActionModel
(
65
$this->associate instanceof
AssociateDraftBuilder
? $this->associate->
build
() : $this->associate
66
);
67
}
68
69
public
static
function
of
():
BusinessUnitAddAssociateActionBuilder
70
{
71
return
new
self
();
72
}
73
}
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder
Definition:
AssociateDraftBuilder.php:24
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\build
build()
Definition:
AssociateDraftBuilder.php:92
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionBuilder
Definition:
BusinessUnitAddAssociateActionBuilder.php:22
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionBuilder\build
build()
Definition:
BusinessUnitAddAssociateActionBuilder.php:62
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionBuilder\withAssociateBuilder
withAssociateBuilder(?AssociateDraftBuilder $associate)
Definition:
BusinessUnitAddAssociateActionBuilder.php:55
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionBuilder\withAssociate
withAssociate(?AssociateDraft $associate)
Definition:
BusinessUnitAddAssociateActionBuilder.php:44
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionBuilder\getAssociate
getAssociate()
Definition:
BusinessUnitAddAssociateActionBuilder.php:35
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionBuilder\of
static of()
Definition:
BusinessUnitAddAssociateActionBuilder.php:69
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateActionModel
Definition:
BusinessUnitAddAssociateActionModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\BusinessUnit\AssociateDraft
Definition:
AssociateDraft.php:16
Commercetools\Api\Models\BusinessUnit\BusinessUnitAddAssociateAction
Definition:
BusinessUnitAddAssociateAction.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\BusinessUnit
Definition:
Associate.php:9
Generated by
1.9.1