commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Me
MyBusinessUnitAssociateDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Me
;
10
11
use
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftCollection
;
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
MyBusinessUnitAssociateDraftModel
extends
JsonObjectModel
implements
MyBusinessUnitAssociateDraft
22
{
27
protected
$version
;
28
33
protected
$customer
;
34
39
protected
$associateRoleAssignments
;
40
41
45
public
function
__construct
(
46
?
int
$version
=
null
,
47
?
MyCustomerDraft
$customer
=
null
,
48
?
AssociateRoleAssignmentDraftCollection
$associateRoleAssignments
=
null
49
) {
50
$this->version =
$version
;
51
$this->customer =
$customer
;
52
$this->associateRoleAssignments =
$associateRoleAssignments
;
53
}
54
62
public
function
getVersion
()
63
{
64
if
(is_null($this->version)) {
66
$data = $this->
raw
(self::FIELD_VERSION);
67
if
(is_null($data)) {
68
return
null
;
69
}
70
$this->version = (int) $data;
71
}
72
73
return
$this->version
;
74
}
75
82
public
function
getCustomer
()
83
{
84
if
(is_null($this->customer)) {
86
$data = $this->
raw
(self::FIELD_CUSTOMER);
87
if
(is_null($data)) {
88
return
null
;
89
}
90
91
$this->customer =
MyCustomerDraftModel::of
($data);
92
}
93
94
return
$this->customer
;
95
}
96
103
public
function
getAssociateRoleAssignments
()
104
{
105
if
(is_null($this->associateRoleAssignments)) {
107
$data = $this->
raw
(self::FIELD_ASSOCIATE_ROLE_ASSIGNMENTS);
108
if
(is_null($data)) {
109
return
null
;
110
}
111
$this->associateRoleAssignments = AssociateRoleAssignmentDraftCollection::fromArray($data);
112
}
113
114
return
$this->associateRoleAssignments
;
115
}
116
117
121
public
function
setVersion
(?
int
$version
): void
122
{
123
$this->version =
$version
;
124
}
125
129
public
function
setCustomer
(?
MyCustomerDraft
$customer
): void
130
{
131
$this->customer =
$customer
;
132
}
133
137
public
function
setAssociateRoleAssignments
(?
AssociateRoleAssignmentDraftCollection
$associateRoleAssignments
): void
138
{
139
$this->associateRoleAssignments =
$associateRoleAssignments
;
140
}
141
}
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftCollection
Definition
AssociateRoleAssignmentDraftCollection.php:22
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel
Definition
MyBusinessUnitAssociateDraftModel.php:22
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\setVersion
setVersion(?int $version)
Definition
MyBusinessUnitAssociateDraftModel.php:121
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\$customer
$customer
Definition
MyBusinessUnitAssociateDraftModel.php:33
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\getAssociateRoleAssignments
getAssociateRoleAssignments()
Definition
MyBusinessUnitAssociateDraftModel.php:103
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\$version
$version
Definition
MyBusinessUnitAssociateDraftModel.php:27
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\setAssociateRoleAssignments
setAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments)
Definition
MyBusinessUnitAssociateDraftModel.php:137
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\__construct
__construct(?int $version=null, ?MyCustomerDraft $customer=null, ?AssociateRoleAssignmentDraftCollection $associateRoleAssignments=null)
Definition
MyBusinessUnitAssociateDraftModel.php:45
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\getVersion
getVersion()
Definition
MyBusinessUnitAssociateDraftModel.php:62
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\setCustomer
setCustomer(?MyCustomerDraft $customer)
Definition
MyBusinessUnitAssociateDraftModel.php:129
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\getCustomer
getCustomer()
Definition
MyBusinessUnitAssociateDraftModel.php:82
Commercetools\Api\Models\Me\MyBusinessUnitAssociateDraftModel\$associateRoleAssignments
$associateRoleAssignments
Definition
MyBusinessUnitAssociateDraftModel.php:39
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\Api\Models\Me\MyBusinessUnitAssociateDraft
Definition
MyBusinessUnitAssociateDraft.php:16
Commercetools\Api\Models\Me\MyCustomerDraft
Definition
MyCustomerDraft.php:19
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Me
Definition
MyBusinessUnitAddAddressAction.php:9
Generated by
1.9.8