commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ProductVariantDraftImportBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
19 use stdClass;
20 
25 {
30  private $sku;
31 
36  private $key;
37 
42  private $prices;
43 
48  private $attributes;
49 
54  private $images;
55 
60  private $assets;
61 
66  public function getSku()
67  {
68  return $this->sku;
69  }
70 
75  public function getKey()
76  {
77  return $this->key;
78  }
79 
84  public function getPrices()
85  {
86  return $this->prices;
87  }
88 
93  public function getAttributes()
94  {
95  return $this->attributes;
96  }
97 
102  public function getImages()
103  {
104  return $this->images;
105  }
106 
111  public function getAssets()
112  {
113  return $this->assets;
114  }
115 
120  public function withSku(?string $sku)
121  {
122  $this->sku = $sku;
123 
124  return $this;
125  }
126 
131  public function withKey(?string $key)
132  {
133  $this->key = $key;
134 
135  return $this;
136  }
137 
142  public function withPrices(?PriceDraftImportCollection $prices)
143  {
144  $this->prices = $prices;
145 
146  return $this;
147  }
148 
153  public function withAttributes(?AttributeCollection $attributes)
154  {
155  $this->attributes = $attributes;
156 
157  return $this;
158  }
159 
164  public function withImages(?ImageCollection $images)
165  {
166  $this->images = $images;
167 
168  return $this;
169  }
170 
175  public function withAssets(?AssetCollection $assets)
176  {
177  $this->assets = $assets;
178 
179  return $this;
180  }
181 
182 
183  public function build(): ProductVariantDraftImport
184  {
186  $this->sku,
187  $this->key,
188  $this->prices,
189  $this->attributes,
190  $this->images,
191  $this->assets
192  );
193  }
194 
195  public static function of(): ProductVariantDraftImportBuilder
196  {
197  return new self();
198  }
199 }