commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AgentResponsesAuthErrorModel.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 protected $statusCode;
30
35 protected $message;
36
41 protected $errors;
42
47 protected $error;
48
54
55
59 public function __construct(
60 ?int $statusCode = null,
61 ?string $message = null,
63 ?string $error = null,
64 ?string $error_description = null
65 ) {
66 $this->statusCode = $statusCode;
67 $this->message = $message;
68 $this->errors = $errors;
69 $this->error = $error;
70 $this->error_description = $error_description;
71 }
72
79 public function getStatusCode()
80 {
81 if (is_null($this->statusCode)) {
83 $data = $this->raw(self::FIELD_STATUS_CODE);
84 if (is_null($data)) {
85 return null;
86 }
87 $this->statusCode = (int) $data;
88 }
89
90 return $this->statusCode;
91 }
92
99 public function getMessage()
100 {
101 if (is_null($this->message)) {
103 $data = $this->raw(self::FIELD_MESSAGE);
104 if (is_null($data)) {
105 return null;
106 }
107 $this->message = (string) $data;
108 }
109
110 return $this->message;
111 }
112
119 public function getErrors()
120 {
121 if (is_null($this->errors)) {
123 $data = $this->raw(self::FIELD_ERRORS);
124 if (is_null($data)) {
125 return null;
126 }
127 $this->errors = ErrorObjectCollection::fromArray($data);
128 }
129
130 return $this->errors;
131 }
132
139 public function getError()
140 {
141 if (is_null($this->error)) {
143 $data = $this->raw(self::FIELD_ERROR);
144 if (is_null($data)) {
145 return null;
146 }
147 $this->error = (string) $data;
148 }
149
150 return $this->error;
151 }
152
159 public function getError_description()
160 {
161 if (is_null($this->error_description)) {
163 $data = $this->raw(self::FIELD_ERROR_DESCRIPTION);
164 if (is_null($data)) {
165 return null;
166 }
167 $this->error_description = (string) $data;
168 }
169
171 }
172
173
177 public function setStatusCode(?int $statusCode): void
178 {
179 $this->statusCode = $statusCode;
180 }
181
185 public function setMessage(?string $message): void
186 {
187 $this->message = $message;
188 }
189
194 {
195 $this->errors = $errors;
196 }
197
201 public function setError(?string $error): void
202 {
203 $this->error = $error;
204 }
205
209 public function setError_description(?string $error_description): void
210 {
211 $this->error_description = $error_description;
212 }
213}
__construct(?int $statusCode=null, ?string $message=null, ?ErrorObjectCollection $errors=null, ?string $error=null, ?string $error_description=null)