commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
InvalidStateTransitionErrorBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
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 
107  {
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 }