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
AgentResponsesErrorResponseModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Agent
;
10
11
use
Commercetools\Api\Models\Error\ErrorObjectCollection
;
12
use
Commercetools\Api\Models\Error\ErrorResponse
;
13
use
Commercetools\Api\Models\Error\ErrorResponseModel
;
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
AgentResponsesErrorResponseModel
extends
JsonObjectModel
implements
AgentResponsesErrorResponse
24
{
29
protected
$statusCode
;
30
35
protected
$message
;
36
41
protected
$errors
;
42
47
protected
$threadId
;
48
49
53
public
function
__construct
(
54
?
int
$statusCode
=
null
,
55
?
string
$message
=
null
,
56
?
ErrorObjectCollection
$errors
=
null
,
57
?
string
$threadId
=
null
58
) {
59
$this->statusCode =
$statusCode
;
60
$this->message =
$message
;
61
$this->errors =
$errors
;
62
$this->threadId =
$threadId
;
63
}
64
71
public
function
getStatusCode
()
72
{
73
if
(is_null($this->statusCode)) {
75
$data = $this->
raw
(self::FIELD_STATUS_CODE);
76
if
(is_null($data)) {
77
return
null
;
78
}
79
$this->statusCode = (int) $data;
80
}
81
82
return
$this->statusCode
;
83
}
84
91
public
function
getMessage
()
92
{
93
if
(is_null($this->message)) {
95
$data = $this->
raw
(self::FIELD_MESSAGE);
96
if
(is_null($data)) {
97
return
null
;
98
}
99
$this->message = (string) $data;
100
}
101
102
return
$this->message
;
103
}
104
112
public
function
getErrors
()
113
{
114
if
(is_null($this->errors)) {
116
$data = $this->
raw
(self::FIELD_ERRORS);
117
if
(is_null($data)) {
118
return
null
;
119
}
120
$this->errors = ErrorObjectCollection::fromArray($data);
121
}
122
123
return
$this->errors
;
124
}
125
132
public
function
getThreadId
()
133
{
134
if
(is_null($this->threadId)) {
136
$data = $this->
raw
(self::FIELD_THREAD_ID);
137
if
(is_null($data)) {
138
return
null
;
139
}
140
$this->threadId = (string) $data;
141
}
142
143
return
$this->threadId
;
144
}
145
146
150
public
function
setStatusCode
(?
int
$statusCode
): void
151
{
152
$this->statusCode =
$statusCode
;
153
}
154
158
public
function
setMessage
(?
string
$message
): void
159
{
160
$this->message =
$message
;
161
}
162
166
public
function
setErrors
(?
ErrorObjectCollection
$errors
): void
167
{
168
$this->errors =
$errors
;
169
}
170
174
public
function
setThreadId
(?
string
$threadId
): void
175
{
176
$this->threadId =
$threadId
;
177
}
178
}
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel
Definition
AgentResponsesErrorResponseModel.php:24
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\setThreadId
setThreadId(?string $threadId)
Definition
AgentResponsesErrorResponseModel.php:174
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\getErrors
getErrors()
Definition
AgentResponsesErrorResponseModel.php:112
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\$threadId
$threadId
Definition
AgentResponsesErrorResponseModel.php:47
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\getThreadId
getThreadId()
Definition
AgentResponsesErrorResponseModel.php:132
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\$message
$message
Definition
AgentResponsesErrorResponseModel.php:35
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\__construct
__construct(?int $statusCode=null, ?string $message=null, ?ErrorObjectCollection $errors=null, ?string $threadId=null)
Definition
AgentResponsesErrorResponseModel.php:53
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\setMessage
setMessage(?string $message)
Definition
AgentResponsesErrorResponseModel.php:158
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\getMessage
getMessage()
Definition
AgentResponsesErrorResponseModel.php:91
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\$statusCode
$statusCode
Definition
AgentResponsesErrorResponseModel.php:29
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\$errors
$errors
Definition
AgentResponsesErrorResponseModel.php:41
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\setErrors
setErrors(?ErrorObjectCollection $errors)
Definition
AgentResponsesErrorResponseModel.php:166
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\setStatusCode
setStatusCode(?int $statusCode)
Definition
AgentResponsesErrorResponseModel.php:150
Commercetools\Api\Models\Agent\AgentResponsesErrorResponseModel\getStatusCode
getStatusCode()
Definition
AgentResponsesErrorResponseModel.php:71
Commercetools\Api\Models\Error\ErrorObjectCollection
Definition
ErrorObjectCollection.php:26
Commercetools\Api\Models\Error\ErrorResponseModel
Definition
ErrorResponseModel.php:27
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\AgentResponsesErrorResponse
Definition
AgentResponsesErrorResponse.php:17
Commercetools\Api\Models\Error\ErrorResponse
Definition
ErrorResponse.php:18
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Agent
Definition
AgentBusinessUnitAmbiguousError.php:9
Generated by
1.9.8