. */ namespace Storefront\BTCPay\Api; use Magento\Framework\Api\SearchCriteriaInterface; interface InvoiceRepositoryInterface { /** * Save Invoice * @param \Storefront\BTCPay\Api\Data\InvoiceInterface $invoice * @return \Storefront\BTCPay\Api\Data\InvoiceInterface * @throws \Magento\Framework\Exception\LocalizedException */ public function save( \Storefront\BTCPay\Api\Data\InvoiceInterface $invoice ); /** * Retrieve Invoice * @param string $invoiceId * @return \Storefront\BTCPay\Api\Data\InvoiceInterface * @throws \Magento\Framework\Exception\LocalizedException */ public function getById($invoiceId); /** * Retrieve Invoice matching the specified criteria. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Storefront\BTCPay\Api\Data\InvoiceSearchResultsInterface * @throws \Magento\Framework\Exception\LocalizedException */ public function getList( \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria ); /** * Delete Invoice * @param \Storefront\BTCPay\Api\Data\InvoiceInterface $invoice * @return bool true on success * @throws \Magento\Framework\Exception\LocalizedException */ public function delete( \Storefront\BTCPay\Api\Data\InvoiceInterface $invoice ); /** * Delete Invoice by ID * @param string $invoiceId * @return bool true on success * @throws \Magento\Framework\Exception\NoSuchEntityException * @throws \Magento\Framework\Exception\LocalizedException */ public function deleteById($invoiceId); }