commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ChangeLineItemNameChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
21
26{
31 private $change;
32
37 private $lineItem;
38
43 private $previousValue;
44
49 private $nextValue;
50
55 public function getChange()
56 {
57 return $this->change;
58 }
59
66 public function getLineItem()
67 {
68 return $this->lineItem instanceof ShoppingListLineItemValueBuilder ? $this->lineItem->build() : $this->lineItem;
69 }
70
77 public function getPreviousValue()
78 {
79 return $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue;
80 }
81
88 public function getNextValue()
89 {
90 return $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue;
91 }
92
97 public function withChange(?string $change)
98 {
99 $this->change = $change;
100
101 return $this;
102 }
103
108 public function withLineItem(?ShoppingListLineItemValue $lineItem)
109 {
110 $this->lineItem = $lineItem;
111
112 return $this;
113 }
114
119 public function withPreviousValue(?LocalizedString $previousValue)
120 {
121 $this->previousValue = $previousValue;
122
123 return $this;
124 }
125
130 public function withNextValue(?LocalizedString $nextValue)
131 {
132 $this->nextValue = $nextValue;
133
134 return $this;
135 }
136
142 {
143 $this->lineItem = $lineItem;
144
145 return $this;
146 }
147
152 public function withPreviousValueBuilder(?LocalizedStringBuilder $previousValue)
153 {
154 $this->previousValue = $previousValue;
155
156 return $this;
157 }
158
163 public function withNextValueBuilder(?LocalizedStringBuilder $nextValue)
164 {
165 $this->nextValue = $nextValue;
166
167 return $this;
168 }
169
171 {
173 $this->change,
174 $this->lineItem instanceof ShoppingListLineItemValueBuilder ? $this->lineItem->build() : $this->lineItem,
175 $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue,
176 $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue
177 );
178 }
179
180 public static function of(): ChangeLineItemNameChangeBuilder
181 {
182 return new self();
183 }
184}