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
Error
AssociateMissingPermissionErrorModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Error
;
10
11
use
Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifier
;
12
use
Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifierModel
;
13
use
Commercetools\Api\Models\Customer\CustomerResourceIdentifier
;
14
use
Commercetools\Api\Models\Customer\CustomerResourceIdentifierModel
;
15
use
Commercetools\Base\DateTimeImmutableCollection
;
16
use
Commercetools\Base\JsonObject
;
17
use
Commercetools\Base\JsonObjectModel
;
18
use
Commercetools\Base\MapperFactory
;
19
use stdClass;
20
24
final
class
AssociateMissingPermissionErrorModel
extends
JsonObjectModel
implements
AssociateMissingPermissionError
25
{
26
public
const
DISCRIMINATOR_VALUE
=
'AssociateMissingPermission'
;
31
protected
$code
;
32
37
protected
$message
;
38
43
protected
$associate
;
44
49
protected
$businessUnit
;
50
55
protected
$associateOnBehalf
;
56
61
protected
$permissions
;
62
63
67
public
function
__construct
(
68
?
string
$message
=
null
,
69
?
CustomerResourceIdentifier
$associate
=
null
,
70
?
BusinessUnitResourceIdentifier
$businessUnit
=
null
,
71
?
CustomerResourceIdentifier
$associateOnBehalf
=
null
,
72
?array
$permissions
=
null
,
73
?
string
$code
=
null
74
) {
75
$this->message =
$message
;
76
$this->associate =
$associate
;
77
$this->businessUnit =
$businessUnit
;
78
$this->associateOnBehalf =
$associateOnBehalf
;
79
$this->permissions =
$permissions
;
80
$this->code =
$code
??
self::DISCRIMINATOR_VALUE
;
81
}
82
87
public
function
getCode
()
88
{
89
if
(is_null($this->code)) {
91
$data = $this->
raw
(self::FIELD_CODE);
92
if
(is_null($data)) {
93
return
null
;
94
}
95
$this->code = (string) $data;
96
}
97
98
return
$this->code
;
99
}
100
111
public
function
getMessage
()
112
{
113
if
(is_null($this->message)) {
115
$data = $this->
raw
(self::FIELD_MESSAGE);
116
if
(is_null($data)) {
117
return
null
;
118
}
119
$this->message = (string) $data;
120
}
121
122
return
$this->message
;
123
}
124
131
public
function
getAssociate
()
132
{
133
if
(is_null($this->associate)) {
135
$data = $this->
raw
(self::FIELD_ASSOCIATE);
136
if
(is_null($data)) {
137
return
null
;
138
}
139
140
$this->associate = CustomerResourceIdentifierModel::of($data);
141
}
142
143
return
$this->associate
;
144
}
145
152
public
function
getBusinessUnit
()
153
{
154
if
(is_null($this->businessUnit)) {
156
$data = $this->
raw
(self::FIELD_BUSINESS_UNIT);
157
if
(is_null($data)) {
158
return
null
;
159
}
160
161
$this->businessUnit = BusinessUnitResourceIdentifierModel::of($data);
162
}
163
164
return
$this->businessUnit
;
165
}
166
173
public
function
getAssociateOnBehalf
()
174
{
175
if
(is_null($this->associateOnBehalf)) {
177
$data = $this->
raw
(self::FIELD_ASSOCIATE_ON_BEHALF);
178
if
(is_null($data)) {
179
return
null
;
180
}
181
182
$this->associateOnBehalf = CustomerResourceIdentifierModel::of($data);
183
}
184
185
return
$this->associateOnBehalf
;
186
}
187
194
public
function
getPermissions
()
195
{
196
if
(is_null($this->permissions)) {
198
$data = $this->
raw
(self::FIELD_PERMISSIONS);
199
if
(is_null($data)) {
200
return
null
;
201
}
202
$this->permissions = $data;
203
}
204
205
return
$this->permissions
;
206
}
207
208
212
public
function
setMessage
(?
string
$message
): void
213
{
214
$this->message =
$message
;
215
}
216
220
public
function
setAssociate
(?
CustomerResourceIdentifier
$associate
): void
221
{
222
$this->associate =
$associate
;
223
}
224
228
public
function
setBusinessUnit
(?
BusinessUnitResourceIdentifier
$businessUnit
): void
229
{
230
$this->businessUnit =
$businessUnit
;
231
}
232
236
public
function
setAssociateOnBehalf
(?
CustomerResourceIdentifier
$associateOnBehalf
): void
237
{
238
$this->associateOnBehalf =
$associateOnBehalf
;
239
}
240
244
public
function
setPermissions
(?array
$permissions
): void
245
{
246
$this->permissions =
$permissions
;
247
}
248
252
public
function
by
(
string
$key)
253
{
254
$data = $this->
raw
($key);
255
if
(is_null($data)) {
256
return
null
;
257
}
258
259
return
$data;
260
}
261
}
Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifierModel
Definition
BusinessUnitResourceIdentifierModel.php:23
Commercetools\Api\Models\Customer\CustomerResourceIdentifierModel
Definition
CustomerResourceIdentifierModel.php:23
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel
Definition
AssociateMissingPermissionErrorModel.php:25
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\$associate
$associate
Definition
AssociateMissingPermissionErrorModel.php:43
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\__construct
__construct(?string $message=null, ?CustomerResourceIdentifier $associate=null, ?BusinessUnitResourceIdentifier $businessUnit=null, ?CustomerResourceIdentifier $associateOnBehalf=null, ?array $permissions=null, ?string $code=null)
Definition
AssociateMissingPermissionErrorModel.php:67
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\getAssociate
getAssociate()
Definition
AssociateMissingPermissionErrorModel.php:131
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\setBusinessUnit
setBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit)
Definition
AssociateMissingPermissionErrorModel.php:228
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\getPermissions
getPermissions()
Definition
AssociateMissingPermissionErrorModel.php:194
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\$permissions
$permissions
Definition
AssociateMissingPermissionErrorModel.php:61
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\getAssociateOnBehalf
getAssociateOnBehalf()
Definition
AssociateMissingPermissionErrorModel.php:173
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\$message
$message
Definition
AssociateMissingPermissionErrorModel.php:37
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\getBusinessUnit
getBusinessUnit()
Definition
AssociateMissingPermissionErrorModel.php:152
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\by
by(string $key)
Definition
AssociateMissingPermissionErrorModel.php:252
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\getCode
getCode()
Definition
AssociateMissingPermissionErrorModel.php:87
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\setAssociate
setAssociate(?CustomerResourceIdentifier $associate)
Definition
AssociateMissingPermissionErrorModel.php:220
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\setAssociateOnBehalf
setAssociateOnBehalf(?CustomerResourceIdentifier $associateOnBehalf)
Definition
AssociateMissingPermissionErrorModel.php:236
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\$code
$code
Definition
AssociateMissingPermissionErrorModel.php:31
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\setMessage
setMessage(?string $message)
Definition
AssociateMissingPermissionErrorModel.php:212
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\getMessage
getMessage()
Definition
AssociateMissingPermissionErrorModel.php:111
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\$businessUnit
$businessUnit
Definition
AssociateMissingPermissionErrorModel.php:49
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\setPermissions
setPermissions(?array $permissions)
Definition
AssociateMissingPermissionErrorModel.php:244
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
AssociateMissingPermissionErrorModel.php:26
Commercetools\Api\Models\Error\AssociateMissingPermissionErrorModel\$associateOnBehalf
$associateOnBehalf
Definition
AssociateMissingPermissionErrorModel.php:55
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\BusinessUnit\BusinessUnitResourceIdentifier
Definition
BusinessUnitResourceIdentifier.php:16
Commercetools\Api\Models\Customer\CustomerResourceIdentifier
Definition
CustomerResourceIdentifier.php:16
Commercetools\Api\Models\Error\AssociateMissingPermissionError
Definition
AssociateMissingPermissionError.php:17
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Error
Definition
AnonymousIdAlreadyInUseError.php:9
Generated by
1.9.8