commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
UnauthorizedErrorBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class UnauthorizedErrorBuilder implements Builder
22{
27 private $message;
28
33 private $storesWithoutPermission;
34
41 public function getMessage()
42 {
43 return $this->message;
44 }
45
54 {
55 return $this->storesWithoutPermission;
56 }
57
62 public function withMessage(?string $message)
63 {
64 $this->message = $message;
65
66 return $this;
67 }
68
73 public function withStoresWithoutPermission(?array $storesWithoutPermission)
74 {
75 $this->storesWithoutPermission = $storesWithoutPermission;
76
77 return $this;
78 }
79
80
81 public function build(): UnauthorizedError
82 {
83 return new UnauthorizedErrorModel(
84 $this->message,
85 $this->storesWithoutPermission
86 );
87 }
88
89 public static function of(): UnauthorizedErrorBuilder
90 {
91 return new self();
92 }
93}