Skip to content

Commit

Permalink
Merge pull request #116 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 Jan 31, 2024
2 parents d91be46 + bc5695b commit aab03e6
Show file tree
Hide file tree
Showing 63 changed files with 385 additions and 629 deletions.
444 changes: 2 additions & 442 deletions changes.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions lib/commercetools-api/src/Models/Cart/CartAddLineItemAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface CartAddLineItemAction extends CartUpdateAction
public const FIELD_EXTERNAL_PRICE = 'externalPrice';
public const FIELD_EXTERNAL_TOTAL_PRICE = 'externalTotalPrice';
public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate';
public const FIELD_PER_METHOD_EXTERNAL_TAX_RATE = 'perMethodExternalTaxRate';
public const FIELD_INVENTORY_MODE = 'inventoryMode';
public const FIELD_SHIPPING_DETAILS = 'shippingDetails';
public const FIELD_CUSTOM = 'custom';
Expand Down Expand Up @@ -129,6 +130,14 @@ public function getExternalTotalPrice();
*/
public function getExternalTaxRate();

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> <a href="ctp:api:type:TaxMode">TaxMode</a> and <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
*
* @return null|MethodExternalTaxRateDraftCollection
*/
public function getPerMethodExternalTaxRate();

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item.
* Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the <a href="ctp:api:type:Cart">Cart</a>.</p>
Expand Down Expand Up @@ -209,6 +218,11 @@ public function setExternalTotalPrice(?ExternalLineItemTotalPrice $externalTotal
*/
public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void;

/**
* @param ?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate
*/
public function setPerMethodExternalTaxRate(?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate): void;

/**
* @param ?string $inventoryMode
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ final class CartAddLineItemActionBuilder implements Builder
*/
private $externalTaxRate;

/**
* @var ?MethodExternalTaxRateDraftCollection
*/
private $perMethodExternalTaxRate;

/**
* @var ?string
Expand Down Expand Up @@ -241,6 +247,17 @@ public function getExternalTaxRate()
return $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> <a href="ctp:api:type:TaxMode">TaxMode</a> and <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
*
* @return null|MethodExternalTaxRateDraftCollection
*/
public function getPerMethodExternalTaxRate()
{
return $this->perMethodExternalTaxRate;
}

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item.
* Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the <a href="ctp:api:type:Cart">Cart</a>.</p>
Expand Down Expand Up @@ -396,6 +413,17 @@ public function withExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate)
return $this;
}

/**
* @param ?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate
* @return $this
*/
public function withPerMethodExternalTaxRate(?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate)
{
$this->perMethodExternalTaxRate = $perMethodExternalTaxRate;

return $this;
}

/**
* @param ?string $inventoryMode
* @return $this
Expand Down Expand Up @@ -520,6 +548,7 @@ public function build(): CartAddLineItemAction
$this->externalPrice instanceof MoneyBuilder ? $this->externalPrice->build() : $this->externalPrice,
$this->externalTotalPrice instanceof ExternalLineItemTotalPriceBuilder ? $this->externalTotalPrice->build() : $this->externalTotalPrice,
$this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate,
$this->perMethodExternalTaxRate,
$this->inventoryMode,
$this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails,
$this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ final class CartAddLineItemActionModel extends JsonObjectModel implements CartAd
*/
protected $externalTaxRate;

/**
*
* @var ?MethodExternalTaxRateDraftCollection
*/
protected $perMethodExternalTaxRate;

/**
*
* @var ?string
Expand Down Expand Up @@ -133,6 +139,7 @@ public function __construct(
?Money $externalPrice = null,
?ExternalLineItemTotalPrice $externalTotalPrice = null,
?ExternalTaxRateDraft $externalTaxRate = null,
?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate = null,
?string $inventoryMode = null,
?ItemShippingDetailsDraft $shippingDetails = null,
?CustomFieldsDraft $custom = null,
Expand All @@ -149,6 +156,7 @@ public function __construct(
$this->externalPrice = $externalPrice;
$this->externalTotalPrice = $externalTotalPrice;
$this->externalTaxRate = $externalTaxRate;
$this->perMethodExternalTaxRate = $perMethodExternalTaxRate;
$this->inventoryMode = $inventoryMode;
$this->shippingDetails = $shippingDetails;
$this->custom = $custom;
Expand Down Expand Up @@ -411,6 +419,26 @@ public function getExternalTaxRate()
return $this->externalTaxRate;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> <a href="ctp:api:type:TaxMode">TaxMode</a> and <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
*
*
* @return null|MethodExternalTaxRateDraftCollection
*/
public function getPerMethodExternalTaxRate()
{
if (is_null($this->perMethodExternalTaxRate)) {
/** @psalm-var ?list<stdClass> $data */
$data = $this->raw(self::FIELD_PER_METHOD_EXTERNAL_TAX_RATE);
if (is_null($data)) {
return null;
}
$this->perMethodExternalTaxRate = MethodExternalTaxRateDraftCollection::fromArray($data);
}

return $this->perMethodExternalTaxRate;
}

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item.
* Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the <a href="ctp:api:type:Cart">Cart</a>.</p>
Expand Down Expand Up @@ -563,6 +591,14 @@ public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void
$this->externalTaxRate = $externalTaxRate;
}

/**
* @param ?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate
*/
public function setPerMethodExternalTaxRate(?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate): void
{
$this->perMethodExternalTaxRate = $perMethodExternalTaxRate;
}

/**
* @param ?string $inventoryMode
*/
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/CartDraft.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public function getInventoryMode();
public function getBillingAddress();

/**
* <p>Shipping address for a Cart with <code>Single</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>. Determines eligible <a href="ctp:api:type:ShippingMethod">ShippingMethod</a> rates and Tax Rates of Line Items.</p>
* <p>Shipping address for a Cart with <code>Single</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>. Determines eligible <a href="ctp:api:type:ShippingMethod">ShippingMethod</a> rates and Tax Rates of Line Items.
* Must be one of the <code>itemShippingAddresses</code> when that field is also provided.</p>
*
* @return null|BaseAddress
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/CartDraftBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ public function getBillingAddress()
}

/**
* <p>Shipping address for a Cart with <code>Single</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>. Determines eligible <a href="ctp:api:type:ShippingMethod">ShippingMethod</a> rates and Tax Rates of Line Items.</p>
* <p>Shipping address for a Cart with <code>Single</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>. Determines eligible <a href="ctp:api:type:ShippingMethod">ShippingMethod</a> rates and Tax Rates of Line Items.
* Must be one of the <code>itemShippingAddresses</code> when that field is also provided.</p>
*
* @return null|BaseAddress
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/CartDraftModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ public function getBillingAddress()
}

/**
* <p>Shipping address for a Cart with <code>Single</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>. Determines eligible <a href="ctp:api:type:ShippingMethod">ShippingMethod</a> rates and Tax Rates of Line Items.</p>
* <p>Shipping address for a Cart with <code>Single</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>. Determines eligible <a href="ctp:api:type:ShippingMethod">ShippingMethod</a> rates and Tax Rates of Line Items.
* Must be one of the <code>itemShippingAddresses</code> when that field is also provided.</p>
*
*
* @return null|BaseAddress
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/CustomLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public function getMoney();
public function getTaxedPrice();

/**
* <p>Taxed price of the Shipping Method that is automatically set after <code>perMethodTaxRate</code> is set.</p>
* <p>Total taxed prices based on the quantity of the Custom Line Item assigned to each <a href="ctp:api:type:ShippingMethod">Shipping Method</a>. Only applicable for Carts with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.
* Automatically set after <code>perMethodTaxRate</code> is set.</p>
*
* @return null|MethodTaxedPriceCollection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ public function getTaxedPrice()
}

/**
* <p>Taxed price of the Shipping Method that is automatically set after <code>perMethodTaxRate</code> is set.</p>
* <p>Total taxed prices based on the quantity of the Custom Line Item assigned to each <a href="ctp:api:type:ShippingMethod">Shipping Method</a>. Only applicable for Carts with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.
* Automatically set after <code>perMethodTaxRate</code> is set.</p>
*
* @return null|MethodTaxedPriceCollection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ public function getTaxedPrice()
}

/**
* <p>Taxed price of the Shipping Method that is automatically set after <code>perMethodTaxRate</code> is set.</p>
* <p>Total taxed prices based on the quantity of the Custom Line Item assigned to each <a href="ctp:api:type:ShippingMethod">Shipping Method</a>. Only applicable for Carts with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.
* Automatically set after <code>perMethodTaxRate</code> is set.</p>
*
*
* @return null|MethodTaxedPriceCollection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function getQuantity();

/**
* <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
* <p>It connects Line Item quantities with individual shipping addresses.</p>
* <p>It connects Line Item or Custom Line Item quantities with individual Shipping Methods.</p>
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getQuantity()

/**
* <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
* <p>It connects Line Item quantities with individual shipping addresses.</p>
* <p>It connects Line Item or Custom Line Item quantities with individual Shipping Methods.</p>
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function getQuantity()

/**
* <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
* <p>It connects Line Item quantities with individual shipping addresses.</p>
* <p>It connects Line Item or Custom Line Item quantities with individual Shipping Methods.</p>
*
*
* @return null|string
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ public function getDiscountedPricePerQuantity();
public function getTaxedPrice();

/**
* <p>Taxed price of the Shipping Method that is automatically set after <code>perMethodTaxRate</code> is set.</p>
* <p>Total taxed prices based on the quantity of Line Item assigned to each <a href="ctp:api:type:ShippingMethod">Shipping Method</a>. Only applicable for Carts with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.
* Automatically set after <code>perMethodTaxRate</code> is set.</p>
*
* @return null|MethodTaxedPriceCollection
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/LineItemBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ public function getTaxedPrice()
}

/**
* <p>Taxed price of the Shipping Method that is automatically set after <code>perMethodTaxRate</code> is set.</p>
* <p>Total taxed prices based on the quantity of Line Item assigned to each <a href="ctp:api:type:ShippingMethod">Shipping Method</a>. Only applicable for Carts with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.
* Automatically set after <code>perMethodTaxRate</code> is set.</p>
*
* @return null|MethodTaxedPriceCollection
Expand Down
3 changes: 2 additions & 1 deletion lib/commercetools-api/src/Models/Cart/LineItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ public function getTaxedPrice()
}

/**
* <p>Taxed price of the Shipping Method that is automatically set after <code>perMethodTaxRate</code> is set.</p>
* <p>Total taxed prices based on the quantity of Line Item assigned to each <a href="ctp:api:type:ShippingMethod">Shipping Method</a>. Only applicable for Carts with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.
* Automatically set after <code>perMethodTaxRate</code> is set.</p>
*
*
* @return null|MethodTaxedPriceCollection
Expand Down
4 changes: 2 additions & 2 deletions lib/commercetools-api/src/Models/Cart/MethodTaxedPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ interface MethodTaxedPrice extends JsonObject
public const FIELD_TAXED_PRICE = 'taxedPrice';

/**
* <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
* <p>User-defined unique identifier of the <a href="ctp:api:type:ShippingMethod">Shipping Method</a> in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
*
* @return null|string
*/
public function getShippingMethodKey();

/**
* <p>Taxed price for the Shipping Method.</p>
* <p>Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by <code>shippingMethodKey</code>.</p>
*
* @return null|TaxedItemPrice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class MethodTaxedPriceBuilder implements Builder
private $taxedPrice;

/**
* <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
* <p>User-defined unique identifier of the <a href="ctp:api:type:ShippingMethod">Shipping Method</a> in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
*
* @return null|string
Expand All @@ -44,7 +44,7 @@ public function getShippingMethodKey()
}

/**
* <p>Taxed price for the Shipping Method.</p>
* <p>Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by <code>shippingMethodKey</code>.</p>
*
* @return null|TaxedItemPrice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(
}

/**
* <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
* <p>User-defined unique identifier of the <a href="ctp:api:type:ShippingMethod">Shipping Method</a> in a Cart with <code>Multiple</code> <a href="ctp:api:type:ShippingMode">ShippingMode</a>.</p>
*
*
* @return null|string
Expand All @@ -64,7 +64,7 @@ public function getShippingMethodKey()
}

/**
* <p>Taxed price for the Shipping Method.</p>
* <p>Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by <code>shippingMethodKey</code>.</p>
*
*
* @return null|TaxedItemPrice
Expand Down
17 changes: 17 additions & 0 deletions lib/commercetools-api/src/Models/Me/MyCartDraft.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface MyCartDraft extends JsonObject
public const FIELD_SHIPPING_ADDRESS = 'shippingAddress';
public const FIELD_SHIPPING_METHOD = 'shippingMethod';
public const FIELD_ITEM_SHIPPING_ADDRESSES = 'itemShippingAddresses';
public const FIELD_SHIPPING_MODE = 'shippingMode';
public const FIELD_DISCOUNT_CODES = 'discountCodes';
public const FIELD_COUNTRY = 'country';
public const FIELD_LOCALE = 'locale';
Expand Down Expand Up @@ -126,6 +127,17 @@ public function getShippingMethod();
*/
public function getItemShippingAddresses();

/**
* <ul>
* <li>If set to <code>Single</code>, only a single Shipping Method can be added to the Cart.</li>
* <li>If set to <code>Multiple</code>, multiple Shipping Methods can be added to the Cart.</li>
* </ul>
*
* @return null|string
*/
public function getShippingMode();

/**
* <p><code>code</code> of the existing <a href="ctp:api:type:DiscountCode">DiscountCodes</a> to add to the Cart.</p>
*
Expand Down Expand Up @@ -225,6 +237,11 @@ public function setShippingMethod(?ShippingMethodResourceIdentifier $shippingMet
*/
public function setItemShippingAddresses(?BaseAddressCollection $itemShippingAddresses): void;

/**
* @param ?string $shippingMode
*/
public function setShippingMode(?string $shippingMode): void;

/**
* @param ?array $discountCodes
*/
Expand Down
Loading

0 comments on commit aab03e6

Please sign in to comment.