commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
BusinessUnit
AssociateRoleAssignmentDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\BusinessUnit
;
10
11
use
Commercetools\Api\Models\AssociateRole\AssociateRoleResourceIdentifier
;
12
use
Commercetools\Api\Models\AssociateRole\AssociateRoleResourceIdentifierModel
;
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
AssociateRoleAssignmentDraftModel
extends
JsonObjectModel
implements
AssociateRoleAssignmentDraft
23
{
28
protected
$associateRole
;
29
34
protected
$inheritance
;
35
36
40
public
function
__construct
(
41
?
AssociateRoleResourceIdentifier
$associateRole
=
null
,
42
?
string
$inheritance
=
null
43
) {
44
$this->associateRole =
$associateRole
;
45
$this->inheritance =
$inheritance
;
46
}
47
54
public
function
getAssociateRole
()
55
{
56
if
(is_null($this->associateRole)) {
58
$data = $this->
raw
(self::FIELD_ASSOCIATE_ROLE);
59
if
(is_null($data)) {
60
return
null
;
61
}
62
63
$this->associateRole =
AssociateRoleResourceIdentifierModel::of
($data);
64
}
65
66
return
$this->associateRole
;
67
}
68
75
public
function
getInheritance
()
76
{
77
if
(is_null($this->inheritance)) {
79
$data = $this->
raw
(self::FIELD_INHERITANCE);
80
if
(is_null($data)) {
81
return
null
;
82
}
83
$this->inheritance = (string) $data;
84
}
85
86
return
$this->inheritance
;
87
}
88
89
93
public
function
setAssociateRole
(?
AssociateRoleResourceIdentifier
$associateRole
): void
94
{
95
$this->associateRole =
$associateRole
;
96
}
97
101
public
function
setInheritance
(?
string
$inheritance
): void
102
{
103
$this->inheritance =
$inheritance
;
104
}
105
}
Commercetools\Api\Models\AssociateRole\AssociateRoleResourceIdentifierModel
Definition:
AssociateRoleResourceIdentifierModel.php:23
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel
Definition:
AssociateRoleAssignmentDraftModel.php:23
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\getInheritance
getInheritance()
Definition:
AssociateRoleAssignmentDraftModel.php:75
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\getAssociateRole
getAssociateRole()
Definition:
AssociateRoleAssignmentDraftModel.php:54
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\setInheritance
setInheritance(?string $inheritance)
Definition:
AssociateRoleAssignmentDraftModel.php:101
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\$associateRole
$associateRole
Definition:
AssociateRoleAssignmentDraftModel.php:28
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\$inheritance
$inheritance
Definition:
AssociateRoleAssignmentDraftModel.php:34
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\setAssociateRole
setAssociateRole(?AssociateRoleResourceIdentifier $associateRole)
Definition:
AssociateRoleAssignmentDraftModel.php:93
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraftModel\__construct
__construct(?AssociateRoleResourceIdentifier $associateRole=null, ?string $inheritance=null)
Definition:
AssociateRoleAssignmentDraftModel.php:40
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\AssociateRole\AssociateRoleResourceIdentifier
Definition:
AssociateRoleResourceIdentifier.php:16
Commercetools\Api\Models\BusinessUnit\AssociateRoleAssignmentDraft
Definition:
AssociateRoleAssignmentDraft.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\BusinessUnit
Definition:
Associate.php:9
Generated by
1.9.1