commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
StoreCreatedMessagePayloadBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
23 use stdClass;
24 
29 {
34  private $name;
35 
40  private $languages;
41 
46  private $countries;
47 
52  private $distributionChannels;
53 
58  private $supplyChannels;
59 
64  private $productSelections;
65 
70  private $custom;
71 
78  public function getName()
79  {
80  return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;
81  }
82 
89  public function getLanguages()
90  {
91  return $this->languages;
92  }
93 
100  public function getCountries()
101  {
102  return $this->countries;
103  }
104 
111  public function getDistributionChannels()
112  {
113  return $this->distributionChannels;
114  }
115 
122  public function getSupplyChannels()
123  {
124  return $this->supplyChannels;
125  }
126 
133  public function getProductSelections()
134  {
135  return $this->productSelections;
136  }
137 
144  public function getCustom()
145  {
146  return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom;
147  }
148 
153  public function withName(?LocalizedString $name)
154  {
155  $this->name = $name;
156 
157  return $this;
158  }
159 
164  public function withLanguages(?array $languages)
165  {
166  $this->languages = $languages;
167 
168  return $this;
169  }
170 
175  public function withCountries(?StoreCountryCollection $countries)
176  {
177  $this->countries = $countries;
178 
179  return $this;
180  }
181 
186  public function withDistributionChannels(?ChannelReferenceCollection $distributionChannels)
187  {
188  $this->distributionChannels = $distributionChannels;
189 
190  return $this;
191  }
192 
197  public function withSupplyChannels(?ChannelReferenceCollection $supplyChannels)
198  {
199  $this->supplyChannels = $supplyChannels;
200 
201  return $this;
202  }
203 
208  public function withProductSelections(?ProductSelectionSettingCollection $productSelections)
209  {
210  $this->productSelections = $productSelections;
211 
212  return $this;
213  }
214 
219  public function withCustom(?CustomFields $custom)
220  {
221  $this->custom = $custom;
222 
223  return $this;
224  }
225 
230  public function withNameBuilder(?LocalizedStringBuilder $name)
231  {
232  $this->name = $name;
233 
234  return $this;
235  }
236 
241  public function withCustomBuilder(?CustomFieldsBuilder $custom)
242  {
243  $this->custom = $custom;
244 
245  return $this;
246  }
247 
249  {
251  $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name,
252  $this->languages,
253  $this->countries,
254  $this->distributionChannels,
255  $this->supplyChannels,
256  $this->productSelections,
257  $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom
258  );
259  }
260 
261  public static function of(): StoreCreatedMessagePayloadBuilder
262  {
263  return new self();
264  }
265 }
withProductSelections(?ProductSelectionSettingCollection $productSelections)