commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetStoresChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
23final class SetStoresChangeBuilder implements Builder
24{
29 private $change;
30
35 private $previousValue;
36
41 private $nextValue;
42
47 private $addedItems;
48
53 private $removedItems;
54
59 public function getChange()
60 {
61 return $this->change;
62 }
63
70 public function getPreviousValue()
71 {
72 return $this->previousValue;
73 }
74
81 public function getNextValue()
82 {
83 return $this->nextValue;
84 }
85
92 public function getAddedItems()
93 {
94 return $this->addedItems;
95 }
96
103 public function getRemovedItems()
104 {
105 return $this->removedItems;
106 }
107
112 public function withChange(?string $change)
113 {
114 $this->change = $change;
115
116 return $this;
117 }
118
123 public function withPreviousValue(?ReferenceCollection $previousValue)
124 {
125 $this->previousValue = $previousValue;
126
127 return $this;
128 }
129
134 public function withNextValue(?ReferenceCollection $nextValue)
135 {
136 $this->nextValue = $nextValue;
137
138 return $this;
139 }
140
145 public function withAddedItems(?KeyReferenceCollection $addedItems)
146 {
147 $this->addedItems = $addedItems;
148
149 return $this;
150 }
151
156 public function withRemovedItems(?KeyReferenceCollection $removedItems)
157 {
158 $this->removedItems = $removedItems;
159
160 return $this;
161 }
162
163
164 public function build(): SetStoresChange
165 {
166 return new SetStoresChangeModel(
167 $this->change,
168 $this->previousValue,
169 $this->nextValue,
170 $this->addedItems,
171 $this->removedItems
172 );
173 }
174
175 public static function of(): SetStoresChangeBuilder
176 {
177 return new self();
178 }
179}