commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Agent
AgentResponsesAuthErrorModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Agent
;
10
11
use
Commercetools\Api\Models\Error\AuthErrorResponse
;
12
use
Commercetools\Api\Models\Error\AuthErrorResponseModel
;
13
use
Commercetools\Api\Models\Error\ErrorObjectCollection
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
AgentResponsesAuthErrorModel
extends
JsonObjectModel
implements
AgentResponsesAuthError
24
{
29
protected
$statusCode
;
30
35
protected
$message
;
36
41
protected
$errors
;
42
47
protected
$error
;
48
53
protected
$error_description
;
54
55
59
public
function
__construct
(
60
?
int
$statusCode
=
null
,
61
?
string
$message
=
null
,
62
?
ErrorObjectCollection
$errors
=
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
170
return
$this->error_description
;
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
193
public
function
setErrors
(?
ErrorObjectCollection
$errors
): void
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
}
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel
Definition
AgentResponsesAuthErrorModel.php:24
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\$error
$error
Definition
AgentResponsesAuthErrorModel.php:47
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\setStatusCode
setStatusCode(?int $statusCode)
Definition
AgentResponsesAuthErrorModel.php:177
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\setError
setError(?string $error)
Definition
AgentResponsesAuthErrorModel.php:201
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\__construct
__construct(?int $statusCode=null, ?string $message=null, ?ErrorObjectCollection $errors=null, ?string $error=null, ?string $error_description=null)
Definition
AgentResponsesAuthErrorModel.php:59
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\getMessage
getMessage()
Definition
AgentResponsesAuthErrorModel.php:99
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\$error_description
$error_description
Definition
AgentResponsesAuthErrorModel.php:53
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\getStatusCode
getStatusCode()
Definition
AgentResponsesAuthErrorModel.php:79
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\getError_description
getError_description()
Definition
AgentResponsesAuthErrorModel.php:159
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\setError_description
setError_description(?string $error_description)
Definition
AgentResponsesAuthErrorModel.php:209
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\$errors
$errors
Definition
AgentResponsesAuthErrorModel.php:41
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\$statusCode
$statusCode
Definition
AgentResponsesAuthErrorModel.php:29
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\getErrors
getErrors()
Definition
AgentResponsesAuthErrorModel.php:119
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\setMessage
setMessage(?string $message)
Definition
AgentResponsesAuthErrorModel.php:185
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\getError
getError()
Definition
AgentResponsesAuthErrorModel.php:139
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\$message
$message
Definition
AgentResponsesAuthErrorModel.php:35
Commercetools\Api\Models\Agent\AgentResponsesAuthErrorModel\setErrors
setErrors(?ErrorObjectCollection $errors)
Definition
AgentResponsesAuthErrorModel.php:193
Commercetools\Api\Models\Error\AuthErrorResponseModel
Definition
AuthErrorResponseModel.php:23
Commercetools\Api\Models\Error\ErrorObjectCollection
Definition
ErrorObjectCollection.php:26
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Agent\AgentResponsesAuthError
Definition
AgentResponsesAuthError.php:16
Commercetools\Api\Models\Error\AuthErrorResponse
Definition
AuthErrorResponse.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Agent
Definition
AgentBusinessUnitAmbiguousError.php:9
Generated by
1.9.8