commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetAddressCustomFieldChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
24{
29 private $change;
30
35 private $address;
36
41 private $name;
42
47 private $customTypeId;
48
53 private $previousValue;
54
59 private $nextValue;
60
65 public function getChange()
66 {
67 return $this->change;
68 }
69
76 public function getAddress()
77 {
78 return $this->address instanceof AddressBuilder ? $this->address->build() : $this->address;
79 }
80
87 public function getName()
88 {
89 return $this->name;
90 }
91
98 public function getCustomTypeId()
99 {
100 return $this->customTypeId;
101 }
102
109 public function getPreviousValue()
110 {
111 return $this->previousValue;
112 }
113
120 public function getNextValue()
121 {
122 return $this->nextValue;
123 }
124
129 public function withChange(?string $change)
130 {
131 $this->change = $change;
132
133 return $this;
134 }
135
140 public function withAddress(?Address $address)
141 {
142 $this->address = $address;
143
144 return $this;
145 }
146
151 public function withName(?string $name)
152 {
153 $this->name = $name;
154
155 return $this;
156 }
157
162 public function withCustomTypeId(?string $customTypeId)
163 {
164 $this->customTypeId = $customTypeId;
165
166 return $this;
167 }
168
173 public function withPreviousValue( $previousValue)
174 {
175 $this->previousValue = $previousValue;
176
177 return $this;
178 }
179
184 public function withNextValue( $nextValue)
185 {
186 $this->nextValue = $nextValue;
187
188 return $this;
189 }
190
195 public function withAddressBuilder(?AddressBuilder $address)
196 {
197 $this->address = $address;
198
199 return $this;
200 }
201
203 {
205 $this->change,
206 $this->address instanceof AddressBuilder ? $this->address->build() : $this->address,
207 $this->name,
208 $this->customTypeId,
209 $this->previousValue,
210 $this->nextValue
211 );
212 }
213
214 public static function of(): SetAddressCustomFieldChangeBuilder
215 {
216 return new self();
217 }
218}