Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit e6e2ad9e authored by Nicolas's avatar Nicolas
Browse files

Création des interfaces

parent 4734b847
No related branches found
No related tags found
No related merge requests found
<?php
namespace NicolasBejean\Sales\Api\Data;
/**
* Interface OrderExporterInterface
*
* @category PHP
* @package NicolasBejean\Sales\Api\Data
* @author Nicolas Béjean <nicolas@bejean.eu>
* @license https://github.com/nicolasbejean/sales/blob/master/licence.txt BSD Licence
* @link https://www.bejean.eu
*/
interface OrderExporterInterface
{
const ENTITY_ID = 'entity_id';
const ORDER_ID = 'order_id';
const IS_EXPORTED = 'is_exported';
const CREATION_TIME = 'created_at';
const UPDATE_TIME = 'updated_at';
/**
* Get Entity ID
*
* @return mixed
*/
public function getId();
/**
* Get Order ID
*
* @return mixed
*/
public function getOrderId();
/**
* Get Is Exported
*
* @return mixed
*/
public function getIsExported();
/**
* Get Creation Time
*
* @return mixed
*/
public function getCreationTime();
/**
* Get Update Time
*
* @return mixed
*/
public function getUpdateTime();
/**
* Set Entity ID
*
* @param $id
* @return mixed
*/
public function setId($id);
/**
* Set Order ID
*
* @param $orderId
* @return mixed
*/
public function setOrderId($orderId);
/**
* Set Is Exported
*
* @param $isExported
* @return mixed
*/
public function setIsExported($isExported);
/**
* Set Creation Time
*
* @param $creationTime
* @return mixed
*/
public function setCreationTime($creationTime);
/**
* Set Update Time
*
* @param $updateTime
* @return mixed
*/
public function setUpdateTime($updateTime);
}
<?php
namespace NicolasBejean\Sales\Api\Data;
use \Magento\Framework\Api\SearchResultsInterface;
/**
* Interface OrderExporterSearchResultsInterface
*
* @category PHP
* @package NicolasBejean\Sales\Api\Data
* @author Nicolas Béjean <nicolas@bejean.eu>
* @license https://github.com/nicolasbejean/sales/blob/master/licence.txt BSD Licence
* @link https://www.bejean.eu
*/
interface OrderExporterSearchResultsInterface extends SearchResultsInterface
{
/**
* Get Items
*
* @return \NicolasBejean\Sales\Api\Data\OrderExporterInterface[]
*/
public function getItems();
/**
* Set Items
*
* @param \NicolasBejean\Sales\Api\Data\OrderExporterInterface[] $items
* @return $this
*/
public function setItems(array $items);
}
<?php
namespace NicolasBejean\Sales\Api;
use \NicolasBejean\Sales\Api\Data\OrderExporterInterface;
/**
* Interface GetOrderExporterByOrderIdInterface
*
* @category PHP
* @package NicolasBejean\Sales\Api
* @author Nicolas Béjean <nicolas@bejean.eu>
* @license https://github.com/nicolasbejean/sales/blob/master/licence.txt BSD Licence
* @link https://www.bejean.eu
*/
interface GetOrderExporterByOrderIdInterface
{
/**
* Load data by given Order Id.
*
* @param string $orderId
* @return OrderExporterInterface
*/
public function execute(string $orderId) : OrderExporterInterface;
}
<?php
namespace NicolasBejean\Sales\Api;
/**
* Interface OrderExporterRepositoryInterface
*
* @category PHP
* @package NicolasBejean\Sales\Api
* @author Nicolas Béjean <nicolas@bejean.eu>
* @license https://github.com/nicolasbejean/sales/blob/master/licence.txt BSD Licence
* @link https://www.bejean.eu
*/
interface OrderExporterRepositoryInterface
{
/**
* Save Order Exporter
*
* @param \NicolasBejean\Sales\Api\Data\OrderExporterInterface $orderExporter
* @return \NicolasBejean\Sales\Api\Data\OrderExporterInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function save(Data\OrderExporterInterface $orderExporter);
/**
* Get Order Exporter by ID
*
* @param int $id
* @return \NicolasBejean\Sales\Api\Data\OrderExporterInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getById($id);
/**
* Get Order Exporter by list
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \NicolasBejean\Sales\Api\Data\OrderExporterSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
/**
* Delete Order Exporter
*
* @param \NicolasBejean\Sales\Api\Data\OrderExporterInterface $orderExporter
* @return bool true on success
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function delete(Data\OrderExporterInterface $orderExporter);
/**
* Delete Order Exporter by ID
*
* @param int $id
* @return bool true on success
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function deleteById($id);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment