commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
RemoveTextLineItemChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
19 
24 {
29  private $change;
30 
35  private $previousValue;
36 
41  private $nextValue;
42 
47  public function getChange()
48  {
49  return $this->change;
50  }
51 
58  public function getPreviousValue()
59  {
60  return $this->previousValue instanceof TextLineItemBuilder ? $this->previousValue->build() : $this->previousValue;
61  }
62 
69  public function getNextValue()
70  {
71  return $this->nextValue instanceof TextLineItemBuilder ? $this->nextValue->build() : $this->nextValue;
72  }
73 
78  public function withChange(?string $change)
79  {
80  $this->change = $change;
81 
82  return $this;
83  }
84 
89  public function withPreviousValue(?TextLineItem $previousValue)
90  {
91  $this->previousValue = $previousValue;
92 
93  return $this;
94  }
95 
100  public function withNextValue(?TextLineItem $nextValue)
101  {
102  $this->nextValue = $nextValue;
103 
104  return $this;
105  }
106 
111  public function withPreviousValueBuilder(?TextLineItemBuilder $previousValue)
112  {
113  $this->previousValue = $previousValue;
114 
115  return $this;
116  }
117 
122  public function withNextValueBuilder(?TextLineItemBuilder $nextValue)
123  {
124  $this->nextValue = $nextValue;
125 
126  return $this;
127  }
128 
129  public function build(): RemoveTextLineItemChange
130  {
132  $this->change,
133  $this->previousValue instanceof TextLineItemBuilder ? $this->previousValue->build() : $this->previousValue,
134  $this->nextValue instanceof TextLineItemBuilder ? $this->nextValue->build() : $this->nextValue
135  );
136  }
137 
138  public static function of(): RemoveTextLineItemChangeBuilder
139  {
140  return new self();
141  }
142 }