From f8701098e5bdb5c01102974c76d3e38e1063c91b Mon Sep 17 00:00:00 2001 From: Jens Schulze Date: Wed, 24 Oct 2018 09:35:27 +0200 Subject: [PATCH] fix(Money): fix fraction digits type Closes #429 --- composer.json | 2 +- src/Core/Model/Common/CentPrecisionMoney.php | 6 +++--- src/Core/Model/Common/HighPrecisionMoney.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 00a2078d54..b2c23a0acc 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ "cache/filesystem-adapter": "^1.0", "cache/void-adapter": "^1.0", "incenteev/composer-parameter-handler": "^2.1", - "commercetools/commercetools-api-reference": "dev-master" + "commercetools/commercetools-api-reference": "dev-master#646973bdc9a5da9216fa8ae774ed51110186e3fa" }, "replaces": { "commercetools/commons": "*" diff --git a/src/Core/Model/Common/CentPrecisionMoney.php b/src/Core/Model/Common/CentPrecisionMoney.php index 24955495d7..98e19e24fb 100644 --- a/src/Core/Model/Common/CentPrecisionMoney.php +++ b/src/Core/Model/Common/CentPrecisionMoney.php @@ -13,8 +13,8 @@ * @method CentPrecisionMoney setCentAmount(int $centAmount = null) * @method string getType() * @method CentPrecisionMoney setType(string $type = null) - * @method string getFractionDigits() - * @method CentPrecisionMoney setFractionDigits(string $fractionDigits = null) + * @method int getFractionDigits() + * @method CentPrecisionMoney setFractionDigits(int $fractionDigits = null) */ class CentPrecisionMoney extends Money { @@ -33,7 +33,7 @@ public function fieldDefinitions() static::CURRENCY_CODE => [self::TYPE => 'string'], static::CENT_AMOUNT => [self::TYPE => 'int'], static::TYPE => [self::TYPE => 'string'], - static::FRACTION_DIGITS => [self::TYPE => 'string'] + static::FRACTION_DIGITS => [self::TYPE => 'int'] ]; } diff --git a/src/Core/Model/Common/HighPrecisionMoney.php b/src/Core/Model/Common/HighPrecisionMoney.php index bdc24954a3..ad775276f9 100644 --- a/src/Core/Model/Common/HighPrecisionMoney.php +++ b/src/Core/Model/Common/HighPrecisionMoney.php @@ -13,8 +13,8 @@ * @method HighPrecisionMoney setCentAmount(int $centAmount = null) * @method string getType() * @method HighPrecisionMoney setType(string $type = null) - * @method string getFractionDigits() - * @method HighPrecisionMoney setFractionDigits(string $fractionDigits = null) + * @method int getFractionDigits() + * @method HighPrecisionMoney setFractionDigits(int $fractionDigits = null) * @method int getPreciseAmount() * @method HighPrecisionMoney setPreciseAmount(int $preciseAmount = null) * @method string getHighPrecision() @@ -39,7 +39,7 @@ public function fieldDefinitions() static::CURRENCY_CODE => [self::TYPE => 'string'], static::CENT_AMOUNT => [self::TYPE => 'int'], static::TYPE => [self::TYPE => 'string'], - static::FRACTION_DIGITS => [self::TYPE => 'string'], + static::FRACTION_DIGITS => [self::TYPE => 'int'], static::PRECISE_AMOUNT => [self::TYPE => 'int'], ]; }