commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
All Classes Namespaces Functions Variables Pages
BusinessUnitAssociateResponseBuilder.php
1<?php
2
3declare(strict_types=1);
10
19use stdClass;
20
25{
30 private $customer;
31
36 private $associateRoles;
37
42 private $inheritedAssociateRoles;
43
48 private $permissions;
49
56 public function getCustomer()
57 {
58 return $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer;
59 }
60
67 public function getAssociateRoles()
68 {
69 return $this->associateRoles;
70 }
71
79 {
80 return $this->inheritedAssociateRoles;
81 }
82
89 public function getPermissions()
90 {
91 return $this->permissions;
92 }
93
98 public function withCustomer(?CustomerReference $customer)
99 {
100 $this->customer = $customer;
101
102 return $this;
103 }
104
109 public function withAssociateRoles(?AssociateRoleCollection $associateRoles)
110 {
111 $this->associateRoles = $associateRoles;
112
113 return $this;
114 }
115
120 public function withInheritedAssociateRoles(?AssociateRoleCollection $inheritedAssociateRoles)
121 {
122 $this->inheritedAssociateRoles = $inheritedAssociateRoles;
123
124 return $this;
125 }
126
131 public function withPermissions(?array $permissions)
132 {
133 $this->permissions = $permissions;
134
135 return $this;
136 }
137
143 {
144 $this->customer = $customer;
145
146 return $this;
147 }
148
150 {
152 $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer,
153 $this->associateRoles,
154 $this->inheritedAssociateRoles,
155 $this->permissions
156 );
157 }
158
159 public static function of(): BusinessUnitAssociateResponseBuilder
160 {
161 return new self();
162 }
163}