Skip to content

Commit f0808b7

Browse files
Merge pull request #399 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents 3ffc329 + b1c7b1b commit f0808b7

File tree

63 files changed

+1960
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1960
-44
lines changed

changes.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878
- added type `OrderBusinessUnitSetMessagePayload`
7979
- added type `StagedOrderSetBusinessUnitAction`
8080
- added type `OrderSetBusinessUnitAction`
81+
- added type `ProductTailoringSetProductAttributeAction`
82+
- added type `AttributeLevelEnum`
83+
- added type `ProductSetProductAttributeAction`
8184
- added type `ShoppingListSetBusinessUnitAction`
8285
- added type `EventDeliveryPayload`
8386
- added type `EventSubscription`
@@ -176,14 +179,24 @@
176179
- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessage`
177180
- added property `value` to type `CustomerPasswordTokenCreatedMessage`
178181
- added property `invalidateOlderTokens` to type `CustomerPasswordTokenCreatedMessage`
182+
- added property `attributes` to type `ProductTailoringCreatedMessage`
179183
- added property `value` to type `CustomerEmailTokenCreatedMessagePayload`
180184
- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessagePayload`
181185
- added property `value` to type `CustomerPasswordTokenCreatedMessagePayload`
182186
- added property `invalidateOlderTokens` to type `CustomerPasswordTokenCreatedMessagePayload`
187+
- added property `attributes` to type `ProductTailoringCreatedMessagePayload`
183188
- added property `discountTypeCombination` to type `StagedOrder`
184189
- added property `discountTypeCombination` to type `Order`
185190
- added property `priceCustomerGroupAssignments` to type `ProductSearchProjectionParams`
191+
- added property `attributes` to type `ProductTailoringData`
192+
- added property `attributes` to type `ProductTailoringDraft`
193+
- added property `attributes` to type `ProductTailoringInStoreDraft`
194+
- added property `level` to type `AttributeDefinition`
195+
- added property `level` to type `AttributeDefinitionDraft`
186196
- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `CategoryOrderHints`
197+
- added property `attributes` to type `ProductData`
198+
- added property `attributes` to type `ProductDraft`
199+
- added property `attributes` to type `ProductProjection`
187200
- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap`
188201
- added property `businessUnit` to type `ShoppingList`
189202
- added property `businessUnit` to type `ShoppingListDraft`
@@ -280,6 +293,13 @@
280293

281294
**Import changes**
282295

296+
<details>
297+
<summary>Added Type(s)</summary>
298+
299+
- added type `AttributeLevel`
300+
</details>
301+
302+
283303
<details>
284304
<summary>Removed Property(s)</summary>
285305

@@ -292,6 +312,9 @@
292312
<summary>Added Property(s)</summary>
293313

294314
- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `SearchKeywords`
315+
- added property `attributes` to type `ProductImport`
316+
- added property `attributes` to type `ProductDraftImport`
317+
- added property `level` to type `AttributeDefinition`
295318
- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `LocalizedString`
296319
</details>
297320

lib/commercetools-api/src/Models/Cart/CartRecalculateAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ interface CartRecalculateAction extends CartUpdateAction
1717

1818
/**
1919
* <ul>
20-
* <li>Leave empty or set to <code>false</code> to only update the Prices and TaxRates of the Line Items.</li>
21-
* <li>Set to <code>true</code> to update the Line Items' product data (like <code>name</code>, <code>variant</code> and <code>productType</code>) also.</li>
20+
* <li>Leave empty or set as <code>false</code> to update only the Prices and TaxRates of the Line Items.</li>
21+
* <li>Set as <code>true</code> to update the Product data (such as <code>name</code>, <code>variant</code>, <code>productType</code>, and Product Attributes) of the Line Items.</li>
2222
* </ul>
2323
*
2424

lib/commercetools-api/src/Models/Cart/CartRecalculateActionBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ final class CartRecalculateActionBuilder implements Builder
2828

2929
/**
3030
* <ul>
31-
* <li>Leave empty or set to <code>false</code> to only update the Prices and TaxRates of the Line Items.</li>
32-
* <li>Set to <code>true</code> to update the Line Items' product data (like <code>name</code>, <code>variant</code> and <code>productType</code>) also.</li>
31+
* <li>Leave empty or set as <code>false</code> to update only the Prices and TaxRates of the Line Items.</li>
32+
* <li>Set as <code>true</code> to update the Product data (such as <code>name</code>, <code>variant</code>, <code>productType</code>, and Product Attributes) of the Line Items.</li>
3333
* </ul>
3434
*
3535

lib/commercetools-api/src/Models/Cart/CartRecalculateActionModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function getAction()
6464

6565
/**
6666
* <ul>
67-
* <li>Leave empty or set to <code>false</code> to only update the Prices and TaxRates of the Line Items.</li>
68-
* <li>Set to <code>true</code> to update the Line Items' product data (like <code>name</code>, <code>variant</code> and <code>productType</code>) also.</li>
67+
* <li>Leave empty or set as <code>false</code> to update only the Prices and TaxRates of the Line Items.</li>
68+
* <li>Set as <code>true</code> to update the Product data (such as <code>name</code>, <code>variant</code>, <code>productType</code>, and Product Attributes) of the Line Items.</li>
6969
* </ul>
7070
*
7171
*

lib/commercetools-api/src/Models/Message/ProductTailoringCreatedMessage.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use Commercetools\Api\Models\Common\LocalizedString;
1212
use Commercetools\Api\Models\Product\ProductReference;
13+
use Commercetools\Api\Models\ProductTailoring\ProductTailoringAttributeCollection;
1314
use Commercetools\Api\Models\ProductTailoring\ProductVariantTailoringCollection;
1415
use Commercetools\Api\Models\Store\StoreKeyReference;
1516
use Commercetools\Base\DateTimeImmutableCollection;
@@ -28,6 +29,7 @@ interface ProductTailoringCreatedMessage extends Message
2829
public const FIELD_META_DESCRIPTION = 'metaDescription';
2930
public const FIELD_META_KEYWORDS = 'metaKeywords';
3031
public const FIELD_VARIANTS = 'variants';
32+
public const FIELD_ATTRIBUTES = 'attributes';
3133
public const FIELD_PUBLISHED = 'published';
3234

3335
/**
@@ -118,6 +120,15 @@ public function getMetaKeywords();
118120
*/
119121
public function getVariants();
120122

123+
/**
124+
* <p>Attributes of the tailored Product.
125+
* If available, these Attributes are selectively merged into the <code>attributes</code> of the corresponding <a href="ctp:api:type:Product">Product</a>. If the Product contains an Attribute with the same <code>name</code>, then its <code>value</code> is overwritten. Otherwise, the Attribute and its <code>value</code> are added to the Product.</p>
126+
*
127+
128+
* @return null|ProductTailoringAttributeCollection
129+
*/
130+
public function getAttributes();
131+
121132
/**
122133
* <p><code>true</code> if the ProductTailoring is published.</p>
123134
*
@@ -181,6 +192,11 @@ public function setMetaKeywords(?LocalizedString $metaKeywords): void;
181192
*/
182193
public function setVariants(?ProductVariantTailoringCollection $variants): void;
183194

195+
/**
196+
* @param ?ProductTailoringAttributeCollection $attributes
197+
*/
198+
public function setAttributes(?ProductTailoringAttributeCollection $attributes): void;
199+
184200
/**
185201
* @param ?bool $published
186202
*/

lib/commercetools-api/src/Models/Message/ProductTailoringCreatedMessageBuilder.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Commercetools\Api\Models\Common\ReferenceBuilder;
1919
use Commercetools\Api\Models\Product\ProductReference;
2020
use Commercetools\Api\Models\Product\ProductReferenceBuilder;
21+
use Commercetools\Api\Models\ProductTailoring\ProductTailoringAttributeCollection;
2122
use Commercetools\Api\Models\ProductTailoring\ProductVariantTailoringCollection;
2223
use Commercetools\Api\Models\Store\StoreKeyReference;
2324
use Commercetools\Api\Models\Store\StoreKeyReferenceBuilder;
@@ -160,6 +161,12 @@ final class ProductTailoringCreatedMessageBuilder implements Builder
160161
*/
161162
private $variants;
162163

164+
/**
165+
166+
* @var ?ProductTailoringAttributeCollection
167+
*/
168+
private $attributes;
169+
163170
/**
164171
165172
* @var ?bool
@@ -398,6 +405,18 @@ public function getVariants()
398405
return $this->variants;
399406
}
400407

408+
/**
409+
* <p>Attributes of the tailored Product.
410+
* If available, these Attributes are selectively merged into the <code>attributes</code> of the corresponding <a href="ctp:api:type:Product">Product</a>. If the Product contains an Attribute with the same <code>name</code>, then its <code>value</code> is overwritten. Otherwise, the Attribute and its <code>value</code> are added to the Product.</p>
411+
*
412+
413+
* @return null|ProductTailoringAttributeCollection
414+
*/
415+
public function getAttributes()
416+
{
417+
return $this->attributes;
418+
}
419+
401420
/**
402421
* <p><code>true</code> if the ProductTailoring is published.</p>
403422
*
@@ -640,6 +659,17 @@ public function withVariants(?ProductVariantTailoringCollection $variants)
640659
return $this;
641660
}
642661

662+
/**
663+
* @param ?ProductTailoringAttributeCollection $attributes
664+
* @return $this
665+
*/
666+
public function withAttributes(?ProductTailoringAttributeCollection $attributes)
667+
{
668+
$this->attributes = $attributes;
669+
670+
return $this;
671+
}
672+
643673
/**
644674
* @param ?bool $published
645675
* @return $this
@@ -807,6 +837,7 @@ public function build(): ProductTailoringCreatedMessage
807837
$this->metaDescription instanceof LocalizedStringBuilder ? $this->metaDescription->build() : $this->metaDescription,
808838
$this->metaKeywords instanceof LocalizedStringBuilder ? $this->metaKeywords->build() : $this->metaKeywords,
809839
$this->variants,
840+
$this->attributes,
810841
$this->published
811842
);
812843
}

lib/commercetools-api/src/Models/Message/ProductTailoringCreatedMessageModel.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Commercetools\Api\Models\Common\ReferenceModel;
1919
use Commercetools\Api\Models\Product\ProductReference;
2020
use Commercetools\Api\Models\Product\ProductReferenceModel;
21+
use Commercetools\Api\Models\ProductTailoring\ProductTailoringAttributeCollection;
2122
use Commercetools\Api\Models\ProductTailoring\ProductVariantTailoringCollection;
2223
use Commercetools\Api\Models\Store\StoreKeyReference;
2324
use Commercetools\Api\Models\Store\StoreKeyReferenceModel;
@@ -166,6 +167,12 @@ final class ProductTailoringCreatedMessageModel extends JsonObjectModel implemen
166167
*/
167168
protected $variants;
168169

170+
/**
171+
*
172+
* @var ?ProductTailoringAttributeCollection
173+
*/
174+
protected $attributes;
175+
169176
/**
170177
*
171178
* @var ?bool
@@ -198,6 +205,7 @@ public function __construct(
198205
?LocalizedString $metaDescription = null,
199206
?LocalizedString $metaKeywords = null,
200207
?ProductVariantTailoringCollection $variants = null,
208+
?ProductTailoringAttributeCollection $attributes = null,
201209
?bool $published = null,
202210
?string $type = null
203211
) {
@@ -222,6 +230,7 @@ public function __construct(
222230
$this->metaDescription = $metaDescription;
223231
$this->metaKeywords = $metaKeywords;
224232
$this->variants = $variants;
233+
$this->attributes = $attributes;
225234
$this->published = $published;
226235
$this->type = $type ?? self::DISCRIMINATOR_VALUE;
227236
}
@@ -687,6 +696,27 @@ public function getVariants()
687696
return $this->variants;
688697
}
689698

699+
/**
700+
* <p>Attributes of the tailored Product.
701+
* If available, these Attributes are selectively merged into the <code>attributes</code> of the corresponding <a href="ctp:api:type:Product">Product</a>. If the Product contains an Attribute with the same <code>name</code>, then its <code>value</code> is overwritten. Otherwise, the Attribute and its <code>value</code> are added to the Product.</p>
702+
*
703+
*
704+
* @return null|ProductTailoringAttributeCollection
705+
*/
706+
public function getAttributes()
707+
{
708+
if (is_null($this->attributes)) {
709+
/** @psalm-var ?list<stdClass> $data */
710+
$data = $this->raw(self::FIELD_ATTRIBUTES);
711+
if (is_null($data)) {
712+
return null;
713+
}
714+
$this->attributes = ProductTailoringAttributeCollection::fromArray($data);
715+
}
716+
717+
return $this->attributes;
718+
}
719+
690720
/**
691721
* <p><code>true</code> if the ProductTailoring is published.</p>
692722
*
@@ -876,6 +906,14 @@ public function setVariants(?ProductVariantTailoringCollection $variants): void
876906
$this->variants = $variants;
877907
}
878908

909+
/**
910+
* @param ?ProductTailoringAttributeCollection $attributes
911+
*/
912+
public function setAttributes(?ProductTailoringAttributeCollection $attributes): void
913+
{
914+
$this->attributes = $attributes;
915+
}
916+
879917
/**
880918
* @param ?bool $published
881919
*/

lib/commercetools-api/src/Models/Message/ProductTailoringCreatedMessagePayload.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use Commercetools\Api\Models\Common\LocalizedString;
1212
use Commercetools\Api\Models\Product\ProductReference;
13+
use Commercetools\Api\Models\ProductTailoring\ProductTailoringAttributeCollection;
1314
use Commercetools\Api\Models\ProductTailoring\ProductVariantTailoringCollection;
1415
use Commercetools\Api\Models\Store\StoreKeyReference;
1516
use Commercetools\Base\DateTimeImmutableCollection;
@@ -28,6 +29,7 @@ interface ProductTailoringCreatedMessagePayload extends MessagePayload
2829
public const FIELD_META_DESCRIPTION = 'metaDescription';
2930
public const FIELD_META_KEYWORDS = 'metaKeywords';
3031
public const FIELD_VARIANTS = 'variants';
32+
public const FIELD_ATTRIBUTES = 'attributes';
3133
public const FIELD_PUBLISHED = 'published';
3234

3335
/**
@@ -118,6 +120,15 @@ public function getMetaKeywords();
118120
*/
119121
public function getVariants();
120122

123+
/**
124+
* <p>Attributes of the tailored Product.
125+
* If available, these Attributes are selectively merged into the <code>attributes</code> of the corresponding <a href="ctp:api:type:Product">Product</a>. If the Product contains an Attribute with the same <code>name</code>, then its <code>value</code> is overwritten. Otherwise, the Attribute and its <code>value</code> are added to the Product.</p>
126+
*
127+
128+
* @return null|ProductTailoringAttributeCollection
129+
*/
130+
public function getAttributes();
131+
121132
/**
122133
* <p><code>true</code> if the ProductTailoring is published.</p>
123134
*
@@ -181,6 +192,11 @@ public function setMetaKeywords(?LocalizedString $metaKeywords): void;
181192
*/
182193
public function setVariants(?ProductVariantTailoringCollection $variants): void;
183194

195+
/**
196+
* @param ?ProductTailoringAttributeCollection $attributes
197+
*/
198+
public function setAttributes(?ProductTailoringAttributeCollection $attributes): void;
199+
184200
/**
185201
* @param ?bool $published
186202
*/

lib/commercetools-api/src/Models/Message/ProductTailoringCreatedMessagePayloadBuilder.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Commercetools\Api\Models\Common\LocalizedStringBuilder;
1313
use Commercetools\Api\Models\Product\ProductReference;
1414
use Commercetools\Api\Models\Product\ProductReferenceBuilder;
15+
use Commercetools\Api\Models\ProductTailoring\ProductTailoringAttributeCollection;
1516
use Commercetools\Api\Models\ProductTailoring\ProductVariantTailoringCollection;
1617
use Commercetools\Api\Models\Store\StoreKeyReference;
1718
use Commercetools\Api\Models\Store\StoreKeyReferenceBuilder;
@@ -93,6 +94,12 @@ final class ProductTailoringCreatedMessagePayloadBuilder implements Builder
9394
*/
9495
private $variants;
9596

97+
/**
98+
99+
* @var ?ProductTailoringAttributeCollection
100+
*/
101+
private $attributes;
102+
96103
/**
97104
98105
* @var ?bool
@@ -220,6 +227,18 @@ public function getVariants()
220227
return $this->variants;
221228
}
222229

230+
/**
231+
* <p>Attributes of the tailored Product.
232+
* If available, these Attributes are selectively merged into the <code>attributes</code> of the corresponding <a href="ctp:api:type:Product">Product</a>. If the Product contains an Attribute with the same <code>name</code>, then its <code>value</code> is overwritten. Otherwise, the Attribute and its <code>value</code> are added to the Product.</p>
233+
*
234+
235+
* @return null|ProductTailoringAttributeCollection
236+
*/
237+
public function getAttributes()
238+
{
239+
return $this->attributes;
240+
}
241+
223242
/**
224243
* <p><code>true</code> if the ProductTailoring is published.</p>
225244
*
@@ -352,6 +371,17 @@ public function withVariants(?ProductVariantTailoringCollection $variants)
352371
return $this;
353372
}
354373

374+
/**
375+
* @param ?ProductTailoringAttributeCollection $attributes
376+
* @return $this
377+
*/
378+
public function withAttributes(?ProductTailoringAttributeCollection $attributes)
379+
{
380+
$this->attributes = $attributes;
381+
382+
return $this;
383+
}
384+
355385
/**
356386
* @param ?bool $published
357387
* @return $this
@@ -465,6 +495,7 @@ public function build(): ProductTailoringCreatedMessagePayload
465495
$this->metaDescription instanceof LocalizedStringBuilder ? $this->metaDescription->build() : $this->metaDescription,
466496
$this->metaKeywords instanceof LocalizedStringBuilder ? $this->metaKeywords->build() : $this->metaKeywords,
467497
$this->variants,
498+
$this->attributes,
468499
$this->published
469500
);
470501
}

0 commit comments

Comments
 (0)