commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
All Classes Namespaces Functions Variables Pages
BusinessUnitAssociateResponseModel.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 protected $customer;
30
35 protected $associateRoles;
36
42
47 protected $permissions;
48
49
53 public function __construct(
57 ?array $permissions = null
58 ) {
59 $this->customer = $customer;
60 $this->associateRoles = $associateRoles;
61 $this->inheritedAssociateRoles = $inheritedAssociateRoles;
62 $this->permissions = $permissions;
63 }
64
71 public function getCustomer()
72 {
73 if (is_null($this->customer)) {
75 $data = $this->raw(self::FIELD_CUSTOMER);
76 if (is_null($data)) {
77 return null;
78 }
79
80 $this->customer = CustomerReferenceModel::of($data);
81 }
82
83 return $this->customer;
84 }
85
92 public function getAssociateRoles()
93 {
94 if (is_null($this->associateRoles)) {
96 $data = $this->raw(self::FIELD_ASSOCIATE_ROLES);
97 if (is_null($data)) {
98 return null;
99 }
100 $this->associateRoles = AssociateRoleCollection::fromArray($data);
101 }
102
104 }
105
113 {
114 if (is_null($this->inheritedAssociateRoles)) {
116 $data = $this->raw(self::FIELD_INHERITED_ASSOCIATE_ROLES);
117 if (is_null($data)) {
118 return null;
119 }
120 $this->inheritedAssociateRoles = AssociateRoleCollection::fromArray($data);
121 }
122
124 }
125
132 public function getPermissions()
133 {
134 if (is_null($this->permissions)) {
136 $data = $this->raw(self::FIELD_PERMISSIONS);
137 if (is_null($data)) {
138 return null;
139 }
140 $this->permissions = $data;
141 }
142
143 return $this->permissions;
144 }
145
146
151 {
152 $this->customer = $customer;
153 }
154
159 {
160 $this->associateRoles = $associateRoles;
161 }
162
167 {
168 $this->inheritedAssociateRoles = $inheritedAssociateRoles;
169 }
170
174 public function setPermissions(?array $permissions): void
175 {
176 $this->permissions = $permissions;
177 }
178}
__construct(?CustomerReference $customer=null, ?AssociateRoleCollection $associateRoles=null, ?AssociateRoleCollection $inheritedAssociateRoles=null, ?array $permissions=null)