commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetCountriesChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
18
22final class SetCountriesChangeBuilder implements Builder
23{
28 private $change;
29
34 private $previousValue;
35
40 private $nextValue;
41
46 private $addedItems;
47
52 private $removedItems;
53
58 public function getChange()
59 {
60 return $this->change;
61 }
62
69 public function getPreviousValue()
70 {
71 return $this->previousValue;
72 }
73
80 public function getNextValue()
81 {
82 return $this->nextValue;
83 }
84
91 public function getAddedItems()
92 {
93 return $this->addedItems;
94 }
95
102 public function getRemovedItems()
103 {
104 return $this->removedItems;
105 }
106
111 public function withChange(?string $change)
112 {
113 $this->change = $change;
114
115 return $this;
116 }
117
122 public function withPreviousValue(?StoreCountryCollection $previousValue)
123 {
124 $this->previousValue = $previousValue;
125
126 return $this;
127 }
128
133 public function withNextValue(?StoreCountryCollection $nextValue)
134 {
135 $this->nextValue = $nextValue;
136
137 return $this;
138 }
139
144 public function withAddedItems(?StoreCountryCollection $addedItems)
145 {
146 $this->addedItems = $addedItems;
147
148 return $this;
149 }
150
155 public function withRemovedItems(?StoreCountryCollection $removedItems)
156 {
157 $this->removedItems = $removedItems;
158
159 return $this;
160 }
161
162
163 public function build(): SetCountriesChange
164 {
165 return new SetCountriesChangeModel(
166 $this->change,
167 $this->previousValue,
168 $this->nextValue,
169 $this->addedItems,
170 $this->removedItems
171 );
172 }
173
174 public static function of(): SetCountriesChangeBuilder
175 {
176 return new self();
177 }
178}