diff --git a/src/Model/Product/ProductVariant.php b/src/Model/Product/ProductVariant.php index dc8951ff07..93b00268d6 100644 --- a/src/Model/Product/ProductVariant.php +++ b/src/Model/Product/ProductVariant.php @@ -10,6 +10,7 @@ use Commercetools\Core\Model\Common\JsonObject; use Commercetools\Core\Model\Common\LocalizedString; use Commercetools\Core\Model\Common\PriceCollection; +use Commercetools\Core\Model\Common\Price; /** * @package Commercetools\Core\Model\Product @@ -26,6 +27,8 @@ * @method ProductVariant setImages(ImageCollection $images = null) * @method LocalizedString getAvailability() * @method ProductVariant setAvailability(LocalizedString $availability = null) + * @method Price getPrice() + * @method ProductVariant setPrice(Price $price = null) */ class ProductVariant extends JsonObject { @@ -35,6 +38,7 @@ public function fieldDefinitions() 'id' => [static::TYPE => 'string'], 'sku' => [static::TYPE => 'int'], 'prices' => [static::TYPE => '\Commercetools\Core\Model\Common\PriceCollection'], + 'price' => [static::TYPE => '\Commercetools\Core\Model\Common\Price'], 'attributes' => [static::TYPE => '\Commercetools\Core\Model\Common\AttributeCollection'], 'images' => [static::TYPE => '\Commercetools\Core\Model\Common\ImageCollection'], 'availability' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], diff --git a/src/Request/Products/Command/ProductChangePriceAction.php b/src/Request/Products/Command/ProductChangePriceAction.php index b24efbb22e..4f84d2ee6b 100644 --- a/src/Request/Products/Command/ProductChangePriceAction.php +++ b/src/Request/Products/Command/ProductChangePriceAction.php @@ -18,8 +18,8 @@ * @method ProductChangePriceAction setPrice(PriceDraft $price = null) * @method bool getStaged() * @method ProductChangePriceAction setStaged(bool $staged = null) - * @method int getPriceId() - * @method ProductChangePriceAction setPriceId(int $priceId = null) + * @method string getPriceId() + * @method ProductChangePriceAction setPriceId(string $priceId = null) */ class ProductChangePriceAction extends AbstractAction { diff --git a/src/Request/Products/Command/ProductSetPriceCustomFieldAction.php b/src/Request/Products/Command/ProductSetPriceCustomFieldAction.php index f8d96573c4..c5f27ce8dc 100644 --- a/src/Request/Products/Command/ProductSetPriceCustomFieldAction.php +++ b/src/Request/Products/Command/ProductSetPriceCustomFieldAction.php @@ -13,7 +13,7 @@ * * @method string getAction() * @method ProductSetPriceCustomFieldAction setAction(string $action = null) - * @method int getPriceId() + * @method string getPriceId() * @method ProductSetPriceCustomFieldAction setPriceId(string $priceId = null) * @method bool getStaged() * @method ProductSetPriceCustomFieldAction setStaged(bool $staged = null) diff --git a/src/Request/Products/Command/ProductSetPriceCustomTypeAction.php b/src/Request/Products/Command/ProductSetPriceCustomTypeAction.php index 6348142f57..0e892d8b7c 100644 --- a/src/Request/Products/Command/ProductSetPriceCustomTypeAction.php +++ b/src/Request/Products/Command/ProductSetPriceCustomTypeAction.php @@ -18,7 +18,7 @@ * @method ProductSetPriceCustomTypeAction setTypeId(string $typeId = null) * @method string getTypeKey() * @method ProductSetPriceCustomTypeAction setTypeKey(string $typeKey = null) - * @method int getPriceId() + * @method string getPriceId() * @method ProductSetPriceCustomTypeAction setPriceId(string $priceId = null) * @method bool getStaged() * @method ProductSetPriceCustomTypeAction setStaged(bool $staged = null) diff --git a/tests/fixtures/models.yaml b/tests/fixtures/models.yaml index ea3574b319..75d15b55dd 100644 --- a/tests/fixtures/models.yaml +++ b/tests/fixtures/models.yaml @@ -507,6 +507,7 @@ productVariant: - id - sku - prices + - price - attributes - images - availability