commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
QuoteTransitionStateActionBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
18 use stdClass;
19 
24 {
29  private $state;
30 
35  private $force;
36 
44  public function getState()
45  {
46  return $this->state instanceof StateResourceIdentifierBuilder ? $this->state->build() : $this->state;
47  }
48 
55  public function getForce()
56  {
57  return $this->force;
58  }
59 
64  public function withState(?StateResourceIdentifier $state)
65  {
66  $this->state = $state;
67 
68  return $this;
69  }
70 
75  public function withForce(?bool $force)
76  {
77  $this->force = $force;
78 
79  return $this;
80  }
81 
87  {
88  $this->state = $state;
89 
90  return $this;
91  }
92 
93  public function build(): QuoteTransitionStateAction
94  {
96  $this->state instanceof StateResourceIdentifierBuilder ? $this->state->build() : $this->state,
97  $this->force
98  );
99  }
100 
101  public static function of(): QuoteTransitionStateActionBuilder
102  {
103  return new self();
104  }
105 }