Skip to content

Commit c28ce97

Browse files
author
Myron
committed
Added RequestInterface
1 parent 39eb471 commit c28ce97

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

Api/RequestInterface.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Copyright Elgentos BV. All rights reserved.
4+
* https://www.elgentos.nl/
5+
*/
6+
7+
namespace MageOS\CatalogDataAI\Api;
8+
9+
interface RequestInterface
10+
{
11+
/**
12+
* Retrieve products id.
13+
* @return int
14+
*/
15+
public function getId(): int;
16+
17+
/**
18+
* Retrieve overwrite flag.
19+
* @return bool
20+
*/
21+
public function getOverwrite(): bool;
22+
}

Model/Product/Request.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33

44
namespace MageOS\CatalogDataAI\Model\Product;
55

6+
use MageOS\CatalogDataAI\Api\RequestInterface;
7+
68
/**
79
* Data model for enrichment message queue.
810
*/
9-
class Request
11+
class Request implements RequestInterface
1012
{
1113
public function __construct(
1214
private readonly int $id,
@@ -15,15 +17,15 @@ public function __construct(
1517
}
1618

1719
/**
18-
* Retrieve products id.
20+
* @inheritDoc
1921
*/
2022
public function getId(): int
2123
{
2224
return $this->id;
2325
}
2426

2527
/**
26-
* Retrieve overwrite flag.
28+
* @inheritDoc
2729
*/
2830
public function getOverwrite(): bool
2931
{

0 commit comments

Comments
 (0)