commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ApprovalRule
RuleApproverModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ApprovalRule
;
10
11
use
Commercetools\Api\Models\AssociateRole\AssociateRoleKeyReference
;
12
use
Commercetools\Api\Models\AssociateRole\AssociateRoleKeyReferenceModel
;
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
RuleApproverModel
extends
JsonObjectModel
implements
RuleApprover
23
{
28
protected
$associateRole
;
29
30
34
public
function
__construct
(
35
?
AssociateRoleKeyReference
$associateRole
=
null
36
) {
37
$this->associateRole =
$associateRole
;
38
}
39
46
public
function
getAssociateRole
()
47
{
48
if
(is_null($this->associateRole)) {
50
$data = $this->
raw
(self::FIELD_ASSOCIATE_ROLE);
51
if
(is_null($data)) {
52
return
null
;
53
}
54
55
$this->associateRole =
AssociateRoleKeyReferenceModel::of
($data);
56
}
57
58
return
$this->associateRole
;
59
}
60
61
65
public
function
setAssociateRole
(?
AssociateRoleKeyReference
$associateRole
): void
66
{
67
$this->associateRole =
$associateRole
;
68
}
69
}
Commercetools\Api\Models\ApprovalRule\RuleApproverModel
Definition:
RuleApproverModel.php:23
Commercetools\Api\Models\ApprovalRule\RuleApproverModel\__construct
__construct(?AssociateRoleKeyReference $associateRole=null)
Definition:
RuleApproverModel.php:34
Commercetools\Api\Models\ApprovalRule\RuleApproverModel\$associateRole
$associateRole
Definition:
RuleApproverModel.php:28
Commercetools\Api\Models\ApprovalRule\RuleApproverModel\getAssociateRole
getAssociateRole()
Definition:
RuleApproverModel.php:46
Commercetools\Api\Models\ApprovalRule\RuleApproverModel\setAssociateRole
setAssociateRole(?AssociateRoleKeyReference $associateRole)
Definition:
RuleApproverModel.php:65
Commercetools\Api\Models\AssociateRole\AssociateRoleKeyReferenceModel
Definition:
AssociateRoleKeyReferenceModel.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\Api\Models\ApprovalRule\RuleApprover
Definition:
RuleApprover.php:16
Commercetools\Api\Models\AssociateRole\AssociateRoleKeyReference
Definition:
AssociateRoleKeyReference.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ApprovalRule
Definition:
ApprovalRule.php:9
Generated by
1.9.1