commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantSkuSetMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 private $product;
30
35 private $sku;
36
41 private $oldSku;
42
47 private $staged;
48
55 public function getProduct()
56 {
57 return $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product;
58 }
59
66 public function getSku()
67 {
68 return $this->sku;
69 }
70
77 public function getOldSku()
78 {
79 return $this->oldSku;
80 }
81
88 public function getStaged()
89 {
90 return $this->staged;
91 }
92
97 public function withProduct(?ProductReference $product)
98 {
99 $this->product = $product;
100
101 return $this;
102 }
103
108 public function withSku(?string $sku)
109 {
110 $this->sku = $sku;
111
112 return $this;
113 }
114
119 public function withOldSku(?string $oldSku)
120 {
121 $this->oldSku = $oldSku;
122
123 return $this;
124 }
125
130 public function withStaged(?bool $staged)
131 {
132 $this->staged = $staged;
133
134 return $this;
135 }
136
142 {
143 $this->product = $product;
144
145 return $this;
146 }
147
149 {
151 $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product,
152 $this->sku,
153 $this->oldSku,
154 $this->staged
155 );
156 }
157
158 public static function of(): VariantSkuSetMessagePayloadBuilder
159 {
160 return new self();
161 }
162}