Skip to content

Commit

Permalink
API model docblocks (#45)
Browse files Browse the repository at this point in the history
* API model docblocks
  • Loading branch information
livca-smile authored Aug 29, 2024
1 parent c0c92a1 commit 14ff029
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
23 changes: 11 additions & 12 deletions Api/RetailerRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

namespace Smile\Retailer\Api;

use Magento\Framework\Api\SearchCriteriaInterface;
use Smile\Retailer\Api\Data\RetailerInterface;
use Smile\Retailer\Api\Data\RetailerSearchResultsInterface;
use Smile\Seller\Api\Data\SellerInterface;

/**
* @api
Expand All @@ -17,18 +14,18 @@ interface RetailerRepositoryInterface
/**
* Create retailer service
*
* @param RetailerInterface|SellerInterface $retailer The retailer
* @return RetailerInterface|SellerInterface
* @param \Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface $retailer The retailer
* @return \Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface
* @throws \Magento\Framework\Exception\CouldNotSaveException
*/
public function save(RetailerInterface|SellerInterface $retailer);
public function save(\Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface $retailer);

/**
* Get info about retailer by retailer id
*
* @param int $retailerId The retailer Id
* @param ?int $storeId The store Id
* @return RetailerInterface|SellerInterface
* @return \Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function get(int $retailerId, ?int $storeId = null);
Expand All @@ -38,29 +35,31 @@ public function get(int $retailerId, ?int $storeId = null);
*
* @param string $retailerCode The retailer Code
* @param ?int $storeId The store Id
* @return RetailerInterface|SellerInterface
* @return \Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getByCode(string $retailerCode, ?int $storeId = null);

/**
* Get relation list
*
* @param SearchCriteriaInterface $criteria Search criterai for collection
* @param \Magento\Framework\Api\SearchCriteriaInterface $criteria Search criterai for collection
* @return RetailerSearchResultsInterface
*/
public function getList(SearchCriteriaInterface $criteria): RetailerSearchResultsInterface;
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria): RetailerSearchResultsInterface;

/**
* Delete retailer by identifier
*
* @param RetailerInterface|SellerInterface $retailer retailer which will deleted
* @param \Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface $retailer to be deleted
* @return bool Will returned True if deleted
* @throws \Magento\Framework\Exception\InputException
* @throws \Magento\Framework\Exception\StateException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function delete(RetailerInterface|SellerInterface $retailer): bool;
public function delete(
\Smile\Retailer\Api\Data\RetailerInterface|\Smile\Seller\Api\Data\SellerInterface $retailer
): bool;

/**
* Delete retailer by identifier
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [2.0.2] - 2024-05-03
[2.0.2]: https://github.com/Smile-SA/magento2-module-retailer/compare/2.0.2...2.0.2

- API model docblocks

## [2.0.1] - 2024-05-03
[2.0.1]: https://github.com/Smile-SA/magento2-module-retailer/compare/2.0.0...2.0.1

Expand Down

0 comments on commit 14ff029

Please sign in to comment.