commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
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
45
public
function
getMessage
()
46
{
47
return
$this->message;
48
}
49
56
public
function
getCurrentState
()
57
{
58
return
$this->currentState;
59
}
60
67
public
function
getNewState
()
68
{
69
return
$this->newState;
70
}
71
76
public
function
withMessage
(?
string
$message)
77
{
78
$this->message = $message;
79
80
return
$this;
81
}
82
87
public
function
withCurrentState
(?
string
$currentState)
88
{
89
$this->currentState = $currentState;
90
91
return
$this;
92
}
93
98
public
function
withNewState
(?
string
$newState)
99
{
100
$this->newState = $newState;
101
102
return
$this;
103
}
104
105
106
public
function
build
():
InvalidStateTransitionError
107
{
108
return
new
InvalidStateTransitionErrorModel
(
109
$this->message,
110
$this->currentState,
111
$this->newState
112
);
113
}
114
115
public
static
function
of
():
InvalidStateTransitionErrorBuilder
116
{
117
return
new
self
();
118
}
119
}
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:87
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\getCurrentState
getCurrentState()
Definition:
InvalidStateTransitionErrorBuilder.php:56
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\build
build()
Definition:
InvalidStateTransitionErrorBuilder.php:106
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\getMessage
getMessage()
Definition:
InvalidStateTransitionErrorBuilder.php:45
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\of
static of()
Definition:
InvalidStateTransitionErrorBuilder.php:115
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\withMessage
withMessage(?string $message)
Definition:
InvalidStateTransitionErrorBuilder.php:76
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\getNewState
getNewState()
Definition:
InvalidStateTransitionErrorBuilder.php:67
Commercetools\Import\Models\Errors\InvalidStateTransitionErrorBuilder\withNewState
withNewState(?string $newState)
Definition:
InvalidStateTransitionErrorBuilder.php:98
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.1