commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Error
ExtensionErrorBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Error
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
ExtensionErrorBuilder
implements
Builder
22
{
27
private
$code;
28
33
private
$message;
34
39
private
$extensionId;
40
45
private
$extensionKey;
46
53
public
function
getCode
()
54
{
55
return
$this->code;
56
}
57
64
public
function
getMessage
()
65
{
66
return
$this->message;
67
}
68
75
public
function
getExtensionId
()
76
{
77
return
$this->extensionId;
78
}
79
86
public
function
getExtensionKey
()
87
{
88
return
$this->extensionKey;
89
}
90
95
public
function
withCode
(?
string
$code)
96
{
97
$this->code = $code;
98
99
return
$this;
100
}
101
106
public
function
withMessage
(?
string
$message)
107
{
108
$this->message = $message;
109
110
return
$this;
111
}
112
117
public
function
withExtensionId
(?
string
$extensionId)
118
{
119
$this->extensionId = $extensionId;
120
121
return
$this;
122
}
123
128
public
function
withExtensionKey
(?
string
$extensionKey)
129
{
130
$this->extensionKey = $extensionKey;
131
132
return
$this;
133
}
134
135
136
public
function
build
():
ExtensionError
137
{
138
return
new
ExtensionErrorModel
(
139
$this->code,
140
$this->message,
141
$this->extensionId,
142
$this->extensionKey
143
);
144
}
145
146
public
static
function
of
():
ExtensionErrorBuilder
147
{
148
return
new
self
();
149
}
150
}
Commercetools\Api\Models\Error\ExtensionErrorBuilder
Definition:
ExtensionErrorBuilder.php:22
Commercetools\Api\Models\Error\ExtensionErrorBuilder\withExtensionId
withExtensionId(?string $extensionId)
Definition:
ExtensionErrorBuilder.php:117
Commercetools\Api\Models\Error\ExtensionErrorBuilder\getExtensionId
getExtensionId()
Definition:
ExtensionErrorBuilder.php:75
Commercetools\Api\Models\Error\ExtensionErrorBuilder\withCode
withCode(?string $code)
Definition:
ExtensionErrorBuilder.php:95
Commercetools\Api\Models\Error\ExtensionErrorBuilder\getCode
getCode()
Definition:
ExtensionErrorBuilder.php:53
Commercetools\Api\Models\Error\ExtensionErrorBuilder\of
static of()
Definition:
ExtensionErrorBuilder.php:146
Commercetools\Api\Models\Error\ExtensionErrorBuilder\getMessage
getMessage()
Definition:
ExtensionErrorBuilder.php:64
Commercetools\Api\Models\Error\ExtensionErrorBuilder\getExtensionKey
getExtensionKey()
Definition:
ExtensionErrorBuilder.php:86
Commercetools\Api\Models\Error\ExtensionErrorBuilder\withMessage
withMessage(?string $message)
Definition:
ExtensionErrorBuilder.php:106
Commercetools\Api\Models\Error\ExtensionErrorBuilder\withExtensionKey
withExtensionKey(?string $extensionKey)
Definition:
ExtensionErrorBuilder.php:128
Commercetools\Api\Models\Error\ExtensionErrorBuilder\build
build()
Definition:
ExtensionErrorBuilder.php:136
Commercetools\Api\Models\Error\ExtensionErrorModel
Definition:
ExtensionErrorModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Error\ExtensionError
Definition:
ExtensionError.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Error
Definition:
AnonymousIdAlreadyInUseError.php:9
Generated by
1.9.1