commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
AssociateMissingPermissionErrorBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
20 use stdClass;
21 
26 {
31  private $message;
32 
37  private $associate;
38 
43  private $businessUnit;
44 
49  private $associateOnBehalf;
50 
55  private $permissions;
56 
67  public function getMessage()
68  {
69  return $this->message;
70  }
71 
78  public function getAssociate()
79  {
80  return $this->associate instanceof CustomerResourceIdentifierBuilder ? $this->associate->build() : $this->associate;
81  }
82 
89  public function getBusinessUnit()
90  {
91  return $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit;
92  }
93 
100  public function getAssociateOnBehalf()
101  {
102  return $this->associateOnBehalf instanceof CustomerResourceIdentifierBuilder ? $this->associateOnBehalf->build() : $this->associateOnBehalf;
103  }
104 
111  public function getPermissions()
112  {
113  return $this->permissions;
114  }
115 
120  public function withMessage(?string $message)
121  {
122  $this->message = $message;
123 
124  return $this;
125  }
126 
131  public function withAssociate(?CustomerResourceIdentifier $associate)
132  {
133  $this->associate = $associate;
134 
135  return $this;
136  }
137 
142  public function withBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit)
143  {
144  $this->businessUnit = $businessUnit;
145 
146  return $this;
147  }
148 
153  public function withAssociateOnBehalf(?CustomerResourceIdentifier $associateOnBehalf)
154  {
155  $this->associateOnBehalf = $associateOnBehalf;
156 
157  return $this;
158  }
159 
164  public function withPermissions(?array $permissions)
165  {
166  $this->permissions = $permissions;
167 
168  return $this;
169  }
170 
176  {
177  $this->associate = $associate;
178 
179  return $this;
180  }
181 
187  {
188  $this->businessUnit = $businessUnit;
189 
190  return $this;
191  }
192 
198  {
199  $this->associateOnBehalf = $associateOnBehalf;
200 
201  return $this;
202  }
203 
205  {
207  $this->message,
208  $this->associate instanceof CustomerResourceIdentifierBuilder ? $this->associate->build() : $this->associate,
209  $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit,
210  $this->associateOnBehalf instanceof CustomerResourceIdentifierBuilder ? $this->associateOnBehalf->build() : $this->associateOnBehalf,
211  $this->permissions
212  );
213  }
214 
215  public static function of(): AssociateMissingPermissionErrorBuilder
216  {
217  return new self();
218  }
219 }