commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ExcludeProductChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
21
26{
31 private $change;
32
37 private $variantExclusion;
38
43 private $nextValue;
44
49 public function getChange()
50 {
51 return $this->change;
52 }
53
60 public function getVariantExclusion()
61 {
62 return $this->variantExclusion instanceof ProductVariantExclusionBuilder ? $this->variantExclusion->build() : $this->variantExclusion;
63 }
64
71 public function getNextValue()
72 {
73 return $this->nextValue instanceof ReferenceBuilder ? $this->nextValue->build() : $this->nextValue;
74 }
75
80 public function withChange(?string $change)
81 {
82 $this->change = $change;
83
84 return $this;
85 }
86
91 public function withVariantExclusion(?ProductVariantExclusion $variantExclusion)
92 {
93 $this->variantExclusion = $variantExclusion;
94
95 return $this;
96 }
97
102 public function withNextValue(?Reference $nextValue)
103 {
104 $this->nextValue = $nextValue;
105
106 return $this;
107 }
108
114 {
115 $this->variantExclusion = $variantExclusion;
116
117 return $this;
118 }
119
124 public function withNextValueBuilder(?ReferenceBuilder $nextValue)
125 {
126 $this->nextValue = $nextValue;
127
128 return $this;
129 }
130
131 public function build(): ExcludeProductChange
132 {
133 return new ExcludeProductChangeModel(
134 $this->change,
135 $this->variantExclusion instanceof ProductVariantExclusionBuilder ? $this->variantExclusion->build() : $this->variantExclusion,
136 $this->nextValue instanceof ReferenceBuilder ? $this->nextValue->build() : $this->nextValue
137 );
138 }
139
140 public static function of(): ExcludeProductChangeBuilder
141 {
142 return new self();
143 }
144}
withVariantExclusionBuilder(?ProductVariantExclusionBuilder $variantExclusion)