We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6093511 commit 107cb6aCopy full SHA for 107cb6a
src/ApiPlatform/Resources/CartRule.php
@@ -22,6 +22,7 @@
22
23
namespace PrestaShop\Module\APIResources\ApiPlatform\Resources;
24
25
+use ApiPlatform\Metadata\ApiProperty;
26
use ApiPlatform\Metadata\ApiResource;
27
use PrestaShop\PrestaShop\Core\Domain\CartRule\Command\EditCartRuleCommand;
28
use PrestaShopBundle\ApiPlatform\Metadata\CQRSUpdate;
@@ -30,7 +31,7 @@
30
31
#[ApiResource(
32
operations: [
33
new CQRSUpdate(
- uriTemplate: '/cart-rule',
34
+ uriTemplate: '/cart-rule/{cartRuleId}',
35
CQRSCommand: EditCartRuleCommand::class,
36
scopes: [
37
'cart_rule_write',
@@ -41,6 +42,7 @@
41
42
)]
43
class CartRule
44
{
45
+ #[ApiProperty(identifier: true)]
46
public int $cartRuleId;
47
48
public string $description;
0 commit comments