Skip to content

Commit

Permalink
Merge pull request #111 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
salander85 authored Jul 3, 2023
2 parents cf43e75 + 3d88da4 commit 2df533f
Show file tree
Hide file tree
Showing 1,307 changed files with 38,759 additions and 12,280 deletions.
326 changes: 304 additions & 22 deletions changes.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface BusinessUnitChangeParentUnitAction extends BusinessUnitUpdateAction
public const FIELD_PARENT_UNIT = 'parentUnit';

/**
* <p>New parent unit of the <a href="ctp:api:type:BusinessUnit">Business Unit</a>.</p>
* <p>New parent unit of the <a href="ctp:api:type:BusinessUnit">Business Unit</a>. The new parent unit must have the same top-level unit as the old parent unit.</p>
*
* @return null|BusinessUnitResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class BusinessUnitChangeParentUnitActionBuilder implements Builder
private $parentUnit;

/**
* <p>New parent unit of the <a href="ctp:api:type:BusinessUnit">Business Unit</a>.</p>
* <p>New parent unit of the <a href="ctp:api:type:BusinessUnit">Business Unit</a>. The new parent unit must have the same top-level unit as the old parent unit.</p>
*
* @return null|BusinessUnitResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getAction()
}

/**
* <p>New parent unit of the <a href="ctp:api:type:BusinessUnit">Business Unit</a>.</p>
* <p>New parent unit of the <a href="ctp:api:type:BusinessUnit">Business Unit</a>. The new parent unit must have the same top-level unit as the old parent unit.</p>
*
*
* @return null|BusinessUnitResourceIdentifier
Expand Down
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 @@ -17,6 +17,7 @@

interface CartAddLineItemAction extends CartUpdateAction
{
public const FIELD_KEY = 'key';
public const FIELD_PRODUCT_ID = 'productId';
public const FIELD_VARIANT_ID = 'variantId';
public const FIELD_SKU = 'sku';
Expand All @@ -31,6 +32,14 @@ interface CartAddLineItemAction extends CartUpdateAction
public const FIELD_SHIPPING_DETAILS = 'shippingDetails';
public const FIELD_CUSTOM = 'custom';

/**
* <p>User-defined unique identifier of the LineItem.</p>
*
* @return null|string
*/
public function getKey();

/**
* <p><code>id</code> of the published <a href="ctp:api:type:Product">Product</a>.</p>
* <p>Either the <code>productId</code> and <code>variantId</code>, or <code>sku</code> must be provided.</p>
Expand Down Expand Up @@ -145,6 +154,11 @@ public function getShippingDetails();
*/
public function getCustom();

/**
* @param ?string $key
*/
public function setKey(?string $key): void;

/**
* @param ?string $productId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
*/
final class CartAddLineItemActionBuilder implements Builder
{
/**
* @var ?string
*/
private $key;

/**
* @var ?string
Expand Down Expand Up @@ -105,6 +111,17 @@ final class CartAddLineItemActionBuilder implements Builder
*/
private $custom;

/**
* <p>User-defined unique identifier of the LineItem.</p>
*
* @return null|string
*/
public function getKey()
{
return $this->key;
}

/**
* <p><code>id</code> of the published <a href="ctp:api:type:Product">Product</a>.</p>
* <p>Either the <code>productId</code> and <code>variantId</code>, or <code>sku</code> must be provided.</p>
Expand Down Expand Up @@ -258,6 +275,17 @@ public function getCustom()
return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom;
}

/**
* @param ?string $key
* @return $this
*/
public function withKey(?string $key)
{
$this->key = $key;

return $this;
}

/**
* @param ?string $productId
* @return $this
Expand Down Expand Up @@ -481,6 +509,7 @@ public function withCustomBuilder(?CustomFieldsDraftBuilder $custom)
public function build(): CartAddLineItemAction
{
return new CartAddLineItemActionModel(
$this->key,
$this->productId,
$this->variantId,
$this->sku,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ final class CartAddLineItemActionModel extends JsonObjectModel implements CartAd
*/
protected $action;

/**
*
* @var ?string
*/
protected $key;

/**
*
* @var ?string
Expand Down Expand Up @@ -116,6 +122,7 @@ final class CartAddLineItemActionModel extends JsonObjectModel implements CartAd
* @psalm-suppress MissingParamType
*/
public function __construct(
?string $key = null,
?string $productId = null,
?int $variantId = null,
?string $sku = null,
Expand All @@ -131,6 +138,7 @@ public function __construct(
?CustomFieldsDraft $custom = null,
?string $action = null
) {
$this->key = $key;
$this->productId = $productId;
$this->variantId = $variantId;
$this->sku = $sku;
Expand Down Expand Up @@ -165,6 +173,26 @@ public function getAction()
return $this->action;
}

/**
* <p>User-defined unique identifier of the LineItem.</p>
*
*
* @return null|string
*/
public function getKey()
{
if (is_null($this->key)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_KEY);
if (is_null($data)) {
return null;
}
$this->key = (string) $data;
}

return $this->key;
}

/**
* <p><code>id</code> of the published <a href="ctp:api:type:Product">Product</a>.</p>
* <p>Either the <code>productId</code> and <code>variantId</code>, or <code>sku</code> must be provided.</p>
Expand Down Expand Up @@ -447,6 +475,14 @@ public function getCustom()
}


/**
* @param ?string $key
*/
public function setKey(?string $key): void
{
$this->key = $key;
}

/**
* @param ?string $productId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,25 @@
interface CartApplyDeltaToLineItemShippingDetailsTargetsAction extends CartUpdateAction
{
public const FIELD_LINE_ITEM_ID = 'lineItemId';
public const FIELD_LINE_ITEM_KEY = 'lineItemKey';
public const FIELD_TARGETS_DELTA = 'targetsDelta';

/**
* <p><code>id</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update.</p>
* <p><code>id</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update. Either <code>lineItemId</code> or <code>lineItemKey</code> is required.</p>
*
* @return null|string
*/
public function getLineItemId();

/**
* <p><code>key</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update. Either <code>lineItemId</code> or <code>lineItemKey</code> is required.</p>
*
* @return null|string
*/
public function getLineItemKey();

/**
* <p>Using positive or negative quantities increases or decreases the number of items shipped to an address.</p>
*
Expand All @@ -37,6 +46,11 @@ public function getTargetsDelta();
*/
public function setLineItemId(?string $lineItemId): void;

/**
* @param ?string $lineItemKey
*/
public function setLineItemKey(?string $lineItemKey): void;

/**
* @param ?ItemShippingTargetCollection $targetsDelta
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,20 @@ final class CartApplyDeltaToLineItemShippingDetailsTargetsActionBuilder implemen
*/
private $lineItemId;

/**
* @var ?string
*/
private $lineItemKey;

/**
* @var ?ItemShippingTargetCollection
*/
private $targetsDelta;

/**
* <p><code>id</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update.</p>
* <p><code>id</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update. Either <code>lineItemId</code> or <code>lineItemKey</code> is required.</p>
*
* @return null|string
Expand All @@ -43,6 +49,17 @@ public function getLineItemId()
return $this->lineItemId;
}

/**
* <p><code>key</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update. Either <code>lineItemId</code> or <code>lineItemKey</code> is required.</p>
*
* @return null|string
*/
public function getLineItemKey()
{
return $this->lineItemKey;
}

/**
* <p>Using positive or negative quantities increases or decreases the number of items shipped to an address.</p>
*
Expand All @@ -65,6 +82,17 @@ public function withLineItemId(?string $lineItemId)
return $this;
}

/**
* @param ?string $lineItemKey
* @return $this
*/
public function withLineItemKey(?string $lineItemKey)
{
$this->lineItemKey = $lineItemKey;

return $this;
}

/**
* @param ?ItemShippingTargetCollection $targetsDelta
* @return $this
Expand All @@ -81,6 +109,7 @@ public function build(): CartApplyDeltaToLineItemShippingDetailsTargetsAction
{
return new CartApplyDeltaToLineItemShippingDetailsTargetsActionModel(
$this->lineItemId,
$this->lineItemKey,
$this->targetsDelta
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ final class CartApplyDeltaToLineItemShippingDetailsTargetsActionModel extends Js
*/
protected $lineItemId;

/**
*
* @var ?string
*/
protected $lineItemKey;

/**
*
* @var ?ItemShippingTargetCollection
Expand All @@ -44,10 +50,12 @@ final class CartApplyDeltaToLineItemShippingDetailsTargetsActionModel extends Js
*/
public function __construct(
?string $lineItemId = null,
?string $lineItemKey = null,
?ItemShippingTargetCollection $targetsDelta = null,
?string $action = null
) {
$this->lineItemId = $lineItemId;
$this->lineItemKey = $lineItemKey;
$this->targetsDelta = $targetsDelta;
$this->action = $action ?? self::DISCRIMINATOR_VALUE;
}
Expand All @@ -71,7 +79,7 @@ public function getAction()
}

/**
* <p><code>id</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update.</p>
* <p><code>id</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update. Either <code>lineItemId</code> or <code>lineItemKey</code> is required.</p>
*
*
* @return null|string
Expand All @@ -90,6 +98,26 @@ public function getLineItemId()
return $this->lineItemId;
}

/**
* <p><code>key</code> of the <a href="ctp:api:type:LineItem">LineItem</a> to update. Either <code>lineItemId</code> or <code>lineItemKey</code> is required.</p>
*
*
* @return null|string
*/
public function getLineItemKey()
{
if (is_null($this->lineItemKey)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_LINE_ITEM_KEY);
if (is_null($data)) {
return null;
}
$this->lineItemKey = (string) $data;
}

return $this->lineItemKey;
}

/**
* <p>Using positive or negative quantities increases or decreases the number of items shipped to an address.</p>
*
Expand Down Expand Up @@ -119,6 +147,14 @@ public function setLineItemId(?string $lineItemId): void
$this->lineItemId = $lineItemId;
}

/**
* @param ?string $lineItemKey
*/
public function setLineItemKey(?string $lineItemKey): void
{
$this->lineItemKey = $lineItemKey;
}

/**
* @param ?ItemShippingTargetCollection $targetsDelta
*/
Expand Down
Loading

0 comments on commit 2df533f

Please sign in to comment.