Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit b2d704f

Browse files
author
Jens Schulze
committed
fix(Cart): fix addCustomLineItem update action
Closes #154
1 parent ef143e1 commit b2d704f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/Request/Carts/Command/CartAddCustomLineItemAction.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Commercetools\Core\Model\Common\Money;
1111
use Commercetools\Core\Model\TaxCategory\TaxCategory;
1212
use Commercetools\Core\Request\AbstractAction;
13+
use Commercetools\Core\Model\TaxCategory\TaxCategoryReference;
1314

1415
/**
1516
* @package Commercetools\Core\Request\Carts\Command
@@ -24,8 +25,8 @@
2425
* @method CartAddCustomLineItemAction setMoney(Money $money = null)
2526
* @method string getSlug()
2627
* @method CartAddCustomLineItemAction setSlug(string $slug = null)
27-
* @method TaxCategory getTaxCategory()
28-
* @method CartAddCustomLineItemAction setTaxCategory(TaxCategory $taxCategory = null)
28+
* @method TaxCategoryReference getTaxCategory()
29+
* @method CartAddCustomLineItemAction setTaxCategory(TaxCategoryReference $taxCategory = null)
2930
*/
3031
class CartAddCustomLineItemAction extends AbstractAction
3132
{
@@ -37,7 +38,7 @@ public function fieldDefinitions()
3738
'quantity' => [static::TYPE => 'int'],
3839
'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'],
3940
'slug' => [static::TYPE => 'string'],
40-
'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategory'],
41+
'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategoryReference'],
4142
];
4243
}
4344

@@ -65,7 +66,7 @@ public static function ofNameQuantityMoneySlugAndTaxCategory(
6566
$quantity,
6667
Money $money,
6768
$slug,
68-
TaxCategory $taxCategory,
69+
TaxCategoryReference $taxCategory,
6970
$context = null
7071
) {
7172
return static::of($context)

src/Request/Products/Command/ProductRemovePriceAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
* @method ProductRemovePriceAction setPrice(Price $price = null)
1919
* @method bool getStaged()
2020
* @method ProductRemovePriceAction setStaged(bool $staged = null)
21-
* @method int getPriceId()
22-
* @method ProductRemovePriceAction setPriceId(int $priceId = null)
21+
* @method string getPriceId()
22+
* @method ProductRemovePriceAction setPriceId(string $priceId = null)
2323
*/
2424
class ProductRemovePriceAction extends AbstractAction
2525
{

tests/unit/Request/GenericActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ public function actionArgumentProvider()
680680
10,
681681
$this->getInstance('\Commercetools\Core\Model\Common\Money'),
682682
'my-custom-line-item',
683-
$this->getInstance('\Commercetools\Core\Model\TaxCategory\TaxCategory')
683+
$this->getInstance('\Commercetools\Core\Model\TaxCategory\TaxCategoryReference')
684684
]
685685
],
686686
[

0 commit comments

Comments
 (0)