Skip to content

Commit 37e9ca0

Browse files
committed
type fix in Store and StoreTest
1 parent 2310b3b commit 37e9ca0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ResourceGroup/Store.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ public function productBatchEdit(ProductBatchEditRequest $request): ProductBatch
629629
* use RetailCrm\Api\Model\Request\Store\ProductsBatchCreateRequest;
630630
* use RetailCrm\Api\Factory\SimpleClientFactory;
631631
* use RetailCrm\Api\Interfaces\ApiExceptionInterface;
632+
* use RetailCrm\Api\Enum\Product\ProductType;
632633
*
633634
* $client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
634635
*
@@ -646,7 +647,7 @@ public function productBatchEdit(ProductBatchEditRequest $request): ProductBatch
646647
* $productInput->popular = true;
647648
* $productInput->recommended = true;
648649
* $productInput->stock = true;
649-
* $productInput->type = 'product';
650+
* $productInput->type = ProductType::PRODUCT;
650651
* $productEditGroupInput = new ProductEditGroupInput();
651652
* $productEditGroupInput->externalId = 'testExternalId';
652653
* $productEditGroupInput->id = 10;

tests/src/ResourceGroup/StoreTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use RetailCrm\Api\Component\Transformer\DateTimeTransformer;
1313
use RetailCrm\Api\Enum\NumericBoolean;
14+
use RetailCrm\Api\Enum\Product\ProductType;
1415
use RetailCrm\Api\Enum\RequestMethod;
1516
use RetailCrm\Api\Model\Entity\Store\Inventory;
1617
use RetailCrm\Api\Model\Entity\Store\Offer;
@@ -700,7 +701,7 @@ public function testProductBatchCreate(): void
700701
$productInput->popular = true;
701702
$productInput->recommended = true;
702703
$productInput->stock = true;
703-
$productInput->type = 'product';
704+
$productInput->type = ProductType::PRODUCT;
704705

705706
$productEditGroupInput = new ProductEditGroupInput();
706707
$productEditGroupInput->id = 9717;

0 commit comments

Comments
 (0)