commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AssociateRoleAssignmentDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $associateRole;
29
34 protected $inheritance;
35
36
40 public function __construct(
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
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
94 {
95 $this->associateRole = $associateRole;
96 }
97
101 public function setInheritance(?string $inheritance): void
102 {
103 $this->inheritance = $inheritance;
104 }
105}
__construct(?AssociateRoleResourceIdentifier $associateRole=null, ?string $inheritance=null)