commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
BusinessUnit
AssociateDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\BusinessUnit
;
10
11
use
Commercetools\Api\Models\Customer\CustomerResourceIdentifier
;
12
use
Commercetools\Api\Models\Customer\CustomerResourceIdentifierBuilder
;
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
AssociateDraftBuilder
implements
Builder
24
{
29
private
$associateRoleAssignments;
30
35
private
$customer;
36
43
public
function
getAssociateRoleAssignments
()
44
{
45
return
$this->associateRoleAssignments;
46
}
47
54
public
function
getCustomer
()
55
{
56
return
$this->customer instanceof
CustomerResourceIdentifierBuilder
? $this->customer->
build
() : $this->customer;
57
}
58
63
public
function
withAssociateRoleAssignments
(?
AssociateRoleAssignmentDraftCollection
$associateRoleAssignments)
64
{
65
$this->associateRoleAssignments = $associateRoleAssignments;
66
67
return
$this;
68
}
69
74
public
function
withCustomer
(?
CustomerResourceIdentifier
$customer)
75
{
76
$this->customer = $customer;
77
78
return
$this;
79
}
80
85
public
function
withCustomerBuilder
(?
CustomerResourceIdentifierBuilder
$customer)
86
{
87
$this->customer = $customer;
88
89
return
$this;
90
}
91
92
public
function
build
():
AssociateDraft
93
{
94
return
new
AssociateDraftModel
(
95
$this->associateRoleAssignments,
96
$this->customer instanceof
CustomerResourceIdentifierBuilder
? $this->customer->
build
() : $this->customer
97
);
98
}
99
100
public
static
function
of
():
AssociateDraftBuilder
101
{
102
return
new
self
();
103
}
104
}
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder
Definition:
AssociateDraftBuilder.php:24
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\withAssociateRoleAssignments
withAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments)
Definition:
AssociateDraftBuilder.php:63
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\getAssociateRoleAssignments
getAssociateRoleAssignments()
Definition:
AssociateDraftBuilder.php:43
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\withCustomerBuilder
withCustomerBuilder(?CustomerResourceIdentifierBuilder $customer)
Definition:
AssociateDraftBuilder.php:85
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\withCustomer
withCustomer(?CustomerResourceIdentifier $customer)
Definition:
AssociateDraftBuilder.php:74
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\build
build()
Definition:
AssociateDraftBuilder.php:92
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\getCustomer
getCustomer()
Definition:
AssociateDraftBuilder.php:54
Commercetools\Api\Models\BusinessUnit\AssociateDraftBuilder\of
static of()
Definition:
AssociateDraftBuilder.php:100
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel
Definition:
AssociateDraftModel.php:23
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftCollection
Definition:
AssociateRoleAssignmentDraftCollection.php:22
Commercetools\Api\Models\Customer\CustomerResourceIdentifierBuilder
Definition:
CustomerResourceIdentifierBuilder.php:24
Commercetools\Api\Models\Customer\CustomerResourceIdentifierBuilder\build
build()
Definition:
CustomerResourceIdentifierBuilder.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\BusinessUnit\AssociateDraft
Definition:
AssociateDraft.php:16
Commercetools\Api\Models\Customer\CustomerResourceIdentifier
Definition:
CustomerResourceIdentifier.php:16
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