commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
BusinessUnit
AssociateDraftModel.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\CustomerResourceIdentifierModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
AssociateDraftModel
extends
JsonObjectModel
implements
AssociateDraft
23
{
28
protected
$associateRoleAssignments
;
29
34
protected
$customer
;
35
36
40
public
function
__construct
(
41
?
AssociateRoleAssignmentDraftCollection
$associateRoleAssignments
=
null
,
42
?
CustomerResourceIdentifier
$customer
=
null
43
) {
44
$this->associateRoleAssignments =
$associateRoleAssignments
;
45
$this->customer =
$customer
;
46
}
47
54
public
function
getAssociateRoleAssignments
()
55
{
56
if
(is_null($this->associateRoleAssignments)) {
58
$data = $this->
raw
(self::FIELD_ASSOCIATE_ROLE_ASSIGNMENTS);
59
if
(is_null($data)) {
60
return
null
;
61
}
62
$this->associateRoleAssignments =
AssociateRoleAssignmentDraftCollection::fromArray
($data);
63
}
64
65
return
$this->associateRoleAssignments
;
66
}
67
74
public
function
getCustomer
()
75
{
76
if
(is_null($this->customer)) {
78
$data = $this->
raw
(self::FIELD_CUSTOMER);
79
if
(is_null($data)) {
80
return
null
;
81
}
82
83
$this->customer =
CustomerResourceIdentifierModel::of
($data);
84
}
85
86
return
$this->customer
;
87
}
88
89
93
public
function
setAssociateRoleAssignments
(?
AssociateRoleAssignmentDraftCollection
$associateRoleAssignments
): void
94
{
95
$this->associateRoleAssignments =
$associateRoleAssignments
;
96
}
97
101
public
function
setCustomer
(?
CustomerResourceIdentifier
$customer
): void
102
{
103
$this->customer =
$customer
;
104
}
105
}
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel
Definition:
AssociateDraftModel.php:23
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\$associateRoleAssignments
$associateRoleAssignments
Definition:
AssociateDraftModel.php:28
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\__construct
__construct(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments=null, ?CustomerResourceIdentifier $customer=null)
Definition:
AssociateDraftModel.php:40
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\getAssociateRoleAssignments
getAssociateRoleAssignments()
Definition:
AssociateDraftModel.php:54
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\getCustomer
getCustomer()
Definition:
AssociateDraftModel.php:74
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\setAssociateRoleAssignments
setAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments)
Definition:
AssociateDraftModel.php:93
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\$customer
$customer
Definition:
AssociateDraftModel.php:34
Commercetools\Api\Models\BusinessUnit\AssociateDraftModel\setCustomer
setCustomer(?CustomerResourceIdentifier $customer)
Definition:
AssociateDraftModel.php:101
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftCollection
Definition:
AssociateRoleAssignmentDraftCollection.php:22
Commercetools\Api\Models\Customer\CustomerResourceIdentifierModel
Definition:
CustomerResourceIdentifierModel.php:23
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Base\MapperSequence\fromArray
static fromArray(array $data)
Definition:
MapperSequence.php:56
Commercetools\Api\Models\BusinessUnit\AssociateDraft
Definition:
AssociateDraft.php:16
Commercetools\Api\Models\Customer\CustomerResourceIdentifier
Definition:
CustomerResourceIdentifier.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\BusinessUnit
Definition:
Associate.php:9
Generated by
1.9.1