commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetDeliveryAddressChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
24{
29 private $change;
30
35 private $previousValue;
36
41 private $nextValue;
42
47 private $deliveryId;
48
53 public function getChange()
54 {
55 return $this->change;
56 }
57
64 public function getPreviousValue()
65 {
66 return $this->previousValue instanceof AddressBuilder ? $this->previousValue->build() : $this->previousValue;
67 }
68
75 public function getNextValue()
76 {
77 return $this->nextValue instanceof AddressBuilder ? $this->nextValue->build() : $this->nextValue;
78 }
79
86 public function getDeliveryId()
87 {
88 return $this->deliveryId;
89 }
90
95 public function withChange(?string $change)
96 {
97 $this->change = $change;
98
99 return $this;
100 }
101
106 public function withPreviousValue(?Address $previousValue)
107 {
108 $this->previousValue = $previousValue;
109
110 return $this;
111 }
112
117 public function withNextValue(?Address $nextValue)
118 {
119 $this->nextValue = $nextValue;
120
121 return $this;
122 }
123
128 public function withDeliveryId(?string $deliveryId)
129 {
130 $this->deliveryId = $deliveryId;
131
132 return $this;
133 }
134
139 public function withPreviousValueBuilder(?AddressBuilder $previousValue)
140 {
141 $this->previousValue = $previousValue;
142
143 return $this;
144 }
145
150 public function withNextValueBuilder(?AddressBuilder $nextValue)
151 {
152 $this->nextValue = $nextValue;
153
154 return $this;
155 }
156
158 {
160 $this->change,
161 $this->previousValue instanceof AddressBuilder ? $this->previousValue->build() : $this->previousValue,
162 $this->nextValue instanceof AddressBuilder ? $this->nextValue->build() : $this->nextValue,
163 $this->deliveryId
164 );
165 }
166
167 public static function of(): SetDeliveryAddressChangeBuilder
168 {
169 return new self();
170 }
171}