commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-import
src
Models
Errors
InvalidStateTransitionErrorBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Errors
;
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
InvalidStateTransitionErrorBuilder
implements
Builder
22
{
27
private
$message;
28
33
private
$currentState;
34
39
private
$newState;
40
47
public
function
getMessage
()
48
{
49
return
$this->message;
50
}
51
58
public
function
getCurrentState
()
59
{
60
return
$this->currentState;
61
}
62
69
public
function
getNewState
()
70
{
71
return
$this->newState;
72
}
73
78
public
function
withMessage
(?
string
$message)
79
{
80
$this->message = $message;
81
82
return
$this;
83
}
84
89
public
function
withCurrentState
(?
string
$currentState)
90
{
91
$this->currentState = $currentState;
92
93
return
$this;
94
}
95
100
public
function
withNewState
(?
string
$newState)
101
{
102
$this->newState = $newState;
103
104
return
$this;
105
}
106
107
108
public
function
build
():
InvalidStateTransitionError
109
{
110
return
new
InvalidStateTransitionErrorModel
(
111
$this->message,
112
$this->currentState,
113
$this->newState
114
);
115
}
116
117
public
static
function
of
():
InvalidStateTransitionErrorBuilder
118
{
119
return
new
self
();
120
}
121
}
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder
Definition
InvalidStateTransitionErrorBuilder.php:22
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\withCurrentState
withCurrentState(?string $currentState)
Definition
InvalidStateTransitionErrorBuilder.php:89
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\getCurrentState
getCurrentState()
Definition
InvalidStateTransitionErrorBuilder.php:58
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\build
build()
Definition
InvalidStateTransitionErrorBuilder.php:108
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\getMessage
getMessage()
Definition
InvalidStateTransitionErrorBuilder.php:47
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\of
static of()
Definition
InvalidStateTransitionErrorBuilder.php:117
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\withMessage
withMessage(?string $message)
Definition
InvalidStateTransitionErrorBuilder.php:78
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\getNewState
getNewState()
Definition
InvalidStateTransitionErrorBuilder.php:69
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\withNewState
withNewState(?string $newState)
Definition
InvalidStateTransitionErrorBuilder.php:100
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorModel
Definition
InvalidStateTransitionErrorModel.php:21
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Import\Models\Errors\InvalidStateTransitionError
Definition
InvalidStateTransitionError.php:15
Commercetools\Import\Models\Errors
Definition
AccessDeniedError.php:9
Generated by
1.9.8