commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
DivisionDraftBuilder.php
1<?php
2
3declare(strict_types=1);
10
21use stdClass;
22
26final class DivisionDraftBuilder implements Builder
27{
32 private $key;
33
38 private $status;
39
44 private $stores;
45
50 private $storeMode;
51
56 private $name;
57
62 private $contactEmail;
63
68 private $associateMode;
69
74 private $associates;
75
80 private $approvalRuleMode;
81
86 private $addresses;
87
92 private $shippingAddresses;
93
98 private $defaultShippingAddress;
99
104 private $billingAddresses;
105
110 private $defaultBillingAddress;
111
116 private $custom;
117
122 private $customerGroupAssignments;
123
128 private $parentUnit;
129
136 public function getKey()
137 {
138 return $this->key;
139 }
140
147 public function getStatus()
148 {
149 return $this->status;
150 }
151
161 public function getStores()
162 {
163 return $this->stores;
164 }
165
173 public function getStoreMode()
174 {
175 return $this->storeMode;
176 }
177
184 public function getName()
185 {
186 return $this->name;
187 }
188
195 public function getContactEmail()
196 {
197 return $this->contactEmail;
198 }
199
206 public function getAssociateMode()
207 {
208 return $this->associateMode;
209 }
210
217 public function getAssociates()
218 {
219 return $this->associates;
220 }
221
228 public function getApprovalRuleMode()
229 {
230 return $this->approvalRuleMode;
231 }
232
239 public function getAddresses()
240 {
241 return $this->addresses;
242 }
243
251 public function getShippingAddresses()
252 {
253 return $this->shippingAddresses;
254 }
255
263 {
264 return $this->defaultShippingAddress;
265 }
266
274 public function getBillingAddresses()
275 {
276 return $this->billingAddresses;
277 }
278
285 public function getDefaultBillingAddress()
286 {
287 return $this->defaultBillingAddress;
288 }
289
296 public function getCustom()
297 {
298 return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom;
299 }
300
309 {
310 return $this->customerGroupAssignments;
311 }
312
319 public function getParentUnit()
320 {
321 return $this->parentUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->parentUnit->build() : $this->parentUnit;
322 }
323
328 public function withKey(?string $key)
329 {
330 $this->key = $key;
331
332 return $this;
333 }
334
339 public function withStatus(?string $status)
340 {
341 $this->status = $status;
342
343 return $this;
344 }
345
351 {
352 $this->stores = $stores;
353
354 return $this;
355 }
356
361 public function withStoreMode(?string $storeMode)
362 {
363 $this->storeMode = $storeMode;
364
365 return $this;
366 }
367
372 public function withName(?string $name)
373 {
374 $this->name = $name;
375
376 return $this;
377 }
378
383 public function withContactEmail(?string $contactEmail)
384 {
385 $this->contactEmail = $contactEmail;
386
387 return $this;
388 }
389
394 public function withAssociateMode(?string $associateMode)
395 {
396 $this->associateMode = $associateMode;
397
398 return $this;
399 }
400
405 public function withAssociates(?AssociateDraftCollection $associates)
406 {
407 $this->associates = $associates;
408
409 return $this;
410 }
411
416 public function withApprovalRuleMode(?string $approvalRuleMode)
417 {
418 $this->approvalRuleMode = $approvalRuleMode;
419
420 return $this;
421 }
422
427 public function withAddresses(?BaseAddressCollection $addresses)
428 {
429 $this->addresses = $addresses;
430
431 return $this;
432 }
433
438 public function withShippingAddresses(?array $shippingAddresses)
439 {
440 $this->shippingAddresses = $shippingAddresses;
441
442 return $this;
443 }
444
449 public function withDefaultShippingAddress(?int $defaultShippingAddress)
450 {
451 $this->defaultShippingAddress = $defaultShippingAddress;
452
453 return $this;
454 }
455
460 public function withBillingAddresses(?array $billingAddresses)
461 {
462 $this->billingAddresses = $billingAddresses;
463
464 return $this;
465 }
466
471 public function withDefaultBillingAddress(?int $defaultBillingAddress)
472 {
473 $this->defaultBillingAddress = $defaultBillingAddress;
474
475 return $this;
476 }
477
482 public function withCustom(?CustomFieldsDraft $custom)
483 {
484 $this->custom = $custom;
485
486 return $this;
487 }
488
494 {
495 $this->customerGroupAssignments = $customerGroupAssignments;
496
497 return $this;
498 }
499
504 public function withParentUnit(?BusinessUnitResourceIdentifier $parentUnit)
505 {
506 $this->parentUnit = $parentUnit;
507
508 return $this;
509 }
510
516 {
517 $this->custom = $custom;
518
519 return $this;
520 }
521
527 {
528 $this->parentUnit = $parentUnit;
529
530 return $this;
531 }
532
533 public function build(): DivisionDraft
534 {
535 return new DivisionDraftModel(
536 $this->key,
537 $this->status,
538 $this->stores,
539 $this->storeMode,
540 $this->name,
541 $this->contactEmail,
542 $this->associateMode,
543 $this->associates,
544 $this->approvalRuleMode,
545 $this->addresses,
546 $this->shippingAddresses,
547 $this->defaultShippingAddress,
548 $this->billingAddresses,
549 $this->defaultBillingAddress,
550 $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom,
551 $this->customerGroupAssignments,
552 $this->parentUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->parentUnit->build() : $this->parentUnit
553 );
554 }
555
556 public static function of(): DivisionDraftBuilder
557 {
558 return new self();
559 }
560}
withStores(?StoreResourceIdentifierCollection $stores)
withCustomerGroupAssignments(?CustomerGroupAssignmentDraftCollection $customerGroupAssignments)
withParentUnit(?BusinessUnitResourceIdentifier $parentUnit)
withParentUnitBuilder(?BusinessUnitResourceIdentifierBuilder $parentUnit)