Skip to content

Commit

Permalink
Merge pull request #229 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored Sep 2, 2024
2 parents 7f08444 + 0941cc7 commit af52ad9
Show file tree
Hide file tree
Showing 49 changed files with 131 additions and 130 deletions.
32 changes: 16 additions & 16 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
**Api changes**

<details>
<summary>Removed Method(s)</summary>

- :warning: removed method `$apiRoot->withProjectKey()->me()->businessUnits()->withId()->delete()`
- :warning: removed method `$apiRoot->withProjectKey()->me()->businessUnits()->withKey()->delete()`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `applicationMode` to type `CartDiscountValueAbsolute`
- added property `applicationMode` to type `CartDiscountValueAbsoluteDraft`
</details>


<details>
<summary>Added Type(s)</summary>

Expand All @@ -16,22 +32,6 @@
- added type `DeliveryCustomTypeSetMessagePayload`
</details>


<details>
<summary>Removed Method(s)</summary>

- :warning: removed method `$apiRoot->withProjectKey()->me()->businessUnits()->withId()->delete()`
- :warning: removed method `$apiRoot->withProjectKey()->me()->businessUnits()->withKey()->delete()`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `applicationMode` to type `CartDiscountValueAbsolute`
- added property `applicationMode` to type `CartDiscountValueAbsoluteDraft`
</details>

**Import changes**

<details>
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Cart/CartDraftModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ public function getShippingRateInput()
if (is_null($data)) {
return null;
}

$this->shippingRateInput = ShippingRateInputDraftModel::of($data);
$className = ShippingRateInputDraftModel::resolveDiscriminatorClass($data);
$this->shippingRateInput = $className::of($data);
}

return $this->shippingRateInput;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Cart/CartModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,8 @@ public function getShippingRateInput()
if (is_null($data)) {
return null;
}

$this->shippingRateInput = ShippingRateInputModel::of($data);
$className = ShippingRateInputModel::resolveDiscriminatorClass($data);
$this->shippingRateInput = $className::of($data);
}

return $this->shippingRateInput;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Cart/CustomLineItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ public function getMoney()
if (is_null($data)) {
return null;
}

$this->money = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->money = $className::of($data);
}

return $this->money;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ public function getShippingRateInput()
if (is_null($data)) {
return null;
}

$this->shippingRateInput = ShippingRateInputDraftModel::of($data);
$className = ShippingRateInputDraftModel::resolveDiscriminatorClass($data);
$this->shippingRateInput = $className::of($data);
}

return $this->shippingRateInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public function getDiscountedAmount()
if (is_null($data)) {
return null;
}

$this->discountedAmount = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->discountedAmount = $className::of($data);
}

return $this->discountedAmount;
Expand Down Expand Up @@ -117,8 +117,8 @@ public function getDiscountedNetAmount()
if (is_null($data)) {
return null;
}

$this->discountedNetAmount = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->discountedNetAmount = $className::of($data);
}

return $this->discountedNetAmount;
Expand All @@ -139,8 +139,8 @@ public function getDiscountedGrossAmount()
if (is_null($data)) {
return null;
}

$this->discountedGrossAmount = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->discountedGrossAmount = $className::of($data);
}

return $this->discountedGrossAmount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function getDiscount()
if (is_null($data)) {
return null;
}

$this->discount = ReferenceModel::of($data);
$className = ReferenceModel::resolveDiscriminatorClass($data);
$this->discount = $className::of($data);
}

return $this->discount;
Expand All @@ -82,8 +82,8 @@ public function getDiscountedAmount()
if (is_null($data)) {
return null;
}

$this->discountedAmount = TypedMoneyDraftModel::of($data);
$className = TypedMoneyDraftModel::resolveDiscriminatorClass($data);
$this->discountedAmount = $className::of($data);
}

return $this->discountedAmount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function getDiscount()
if (is_null($data)) {
return null;
}

$this->discount = ReferenceModel::of($data);
$className = ReferenceModel::resolveDiscriminatorClass($data);
$this->discount = $className::of($data);
}

return $this->discount;
Expand All @@ -82,8 +82,8 @@ public function getDiscountedAmount()
if (is_null($data)) {
return null;
}

$this->discountedAmount = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->discountedAmount = $className::of($data);
}

return $this->discountedAmount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function getDiscountedAmount()
if (is_null($data)) {
return null;
}

$this->discountedAmount = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->discountedAmount = $className::of($data);
}

return $this->discountedAmount;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Cart/ShippingDraftModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ public function getShippingRateInput()
if (is_null($data)) {
return null;
}

$this->shippingRateInput = ShippingRateInputDraftModel::of($data);
$className = ShippingRateInputDraftModel::resolveDiscriminatorClass($data);
$this->shippingRateInput = $className::of($data);
}

return $this->shippingRateInput;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Cart/ShippingModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public function getShippingRateInput()
if (is_null($data)) {
return null;
}

$this->shippingRateInput = ShippingRateInputModel::of($data);
$className = ShippingRateInputModel::resolveDiscriminatorClass($data);
$this->shippingRateInput = $className::of($data);
}

return $this->shippingRateInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public function getTotalTax()
if (is_null($data)) {
return null;
}

$this->totalTax = TypedMoneyDraftModel::of($data);
$className = TypedMoneyDraftModel::resolveDiscriminatorClass($data);
$this->totalTax = $className::of($data);
}

return $this->totalTax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = CartDiscountValueDraftModel::of($data);
$className = CartDiscountValueDraftModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand Down Expand Up @@ -263,8 +263,8 @@ public function getTarget()
if (is_null($data)) {
return null;
}

$this->target = CartDiscountTargetModel::of($data);
$className = CartDiscountTargetModel::resolveDiscriminatorClass($data);
$this->target = $className::of($data);
}

return $this->target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = CartDiscountValueModel::of($data);
$className = CartDiscountValueModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand Down Expand Up @@ -456,8 +456,8 @@ public function getTarget()
if (is_null($data)) {
return null;
}

$this->target = CartDiscountTargetModel::of($data);
$className = CartDiscountTargetModel::resolveDiscriminatorClass($data);
$this->target = $className::of($data);
}

return $this->target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ public function getGeoLocation()
if (is_null($data)) {
return null;
}

$this->geoLocation = GeoJsonModel::of($data);
$className = GeoJsonModel::resolveDiscriminatorClass($data);
$this->geoLocation = $className::of($data);
}

return $this->geoLocation;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Channel/ChannelModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ public function getGeoLocation()
if (is_null($data)) {
return null;
}

$this->geoLocation = GeoJsonModel::of($data);
$className = GeoJsonModel::resolveDiscriminatorClass($data);
$this->geoLocation = $className::of($data);
}

return $this->geoLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function getGeoLocation()
if (is_null($data)) {
return null;
}

$this->geoLocation = GeoJsonModel::of($data);
$className = GeoJsonModel::resolveDiscriminatorClass($data);
$this->geoLocation = $className::of($data);
}

return $this->geoLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Common/PriceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Common/PriceTierModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand Down
8 changes: 4 additions & 4 deletions lib/commercetools-api/src/Models/Common/ScopedPriceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public function getValue()
if (is_null($data)) {
return null;
}

$this->value = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->value = $className::of($data);
}

return $this->value;
Expand All @@ -169,8 +169,8 @@ public function getCurrentValue()
if (is_null($data)) {
return null;
}

$this->currentValue = TypedMoneyModel::of($data);
$className = TypedMoneyModel::resolveDiscriminatorClass($data);
$this->currentValue = $className::of($data);
}

return $this->currentValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public function getExistingVariantSelection()
if (is_null($data)) {
return null;
}

$this->existingVariantSelection = ProductVariantSelectionModel::of($data);
$className = ProductVariantSelectionModel::resolveDiscriminatorClass($data);
$this->existingVariantSelection = $className::of($data);
}

return $this->existingVariantSelection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public function getExistingVariantSelection()
if (is_null($data)) {
return null;
}

$this->existingVariantSelection = ProductVariantSelectionModel::of($data);
$className = ProductVariantSelectionModel::resolveDiscriminatorClass($data);
$this->existingVariantSelection = $className::of($data);
}

return $this->existingVariantSelection;
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Extension/ExtensionModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ public function getDestination()
if (is_null($data)) {
return null;
}

$this->destination = ExtensionDestinationModel::of($data);
$className = ExtensionDestinationModel::resolveDiscriminatorClass($data);
$this->destination = $className::of($data);
}

return $this->destination;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public function getAuthentication()
if (is_null($data)) {
return null;
}

$this->authentication = HttpDestinationAuthenticationModel::of($data);
$className = HttpDestinationAuthenticationModel::resolveDiscriminatorClass($data);
$this->authentication = $className::of($data);
}

return $this->authentication;
Expand Down
Loading

0 comments on commit af52ad9

Please sign in to comment.