-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ECP-9489] Implement AdyenCreditmemoRepository and deprecated old met…
…hods
- Loading branch information
Can Demiralp
committed
Jan 15, 2025
1 parent
46b299a
commit 4203483
Showing
5 changed files
with
294 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
/** | ||
* | ||
* Adyen Payment Module | ||
* | ||
* Copyright (c) 2025 Adyen N.V. | ||
* This file is open source and available under the MIT license. | ||
* See the LICENSE file for more info. | ||
* | ||
* Author: Adyen <[email protected]> | ||
*/ | ||
|
||
namespace Adyen\Payment\Api\Repository; | ||
|
||
use Adyen\Payment\Api\Data\CreditmemoInterface; | ||
use Adyen\Payment\Api\Data\NotificationInterface; | ||
use Magento\Framework\Api\SearchCriteriaInterface; | ||
use Magento\Framework\Api\SearchResultsInterface; | ||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\Exception\NoSuchEntityException; | ||
|
||
interface AdyenCreditmemoRepositoryInterface | ||
{ | ||
/** | ||
* Retrieve adyen_creditmemo entity by the ID. | ||
* | ||
* @param int $entityId | ||
* @return CreditmemoInterface Gift message. | ||
* @throws NoSuchEntityException | ||
*/ | ||
public function get(int $entityId): CreditmemoInterface; | ||
|
||
/** | ||
* Retrieve adyen_creditmemo entities by `adyen_order_payment_id`. | ||
* | ||
* @param int $adyenOrderPaymentId | ||
* @return CreditmemoInterface[]|null | ||
*/ | ||
public function getByAdyenOrderPaymentId(int $adyenOrderPaymentId): ?array; | ||
|
||
/** | ||
* Retrieve adyen_creditmemo entity by the given notification using the `pspreference` column. | ||
* | ||
* @param NotificationInterface $notification | ||
* @return CreditmemoInterface|null | ||
*/ | ||
public function getByRefundWebhook(NotificationInterface $notification): ?CreditmemoInterface; | ||
|
||
/** | ||
* Retrieve adyen_creditmemo entities which match a specified criteria. | ||
* | ||
* @param SearchCriteriaInterface $searchCriteria | ||
* @return SearchResultsInterface | ||
* | ||
* @throws LocalizedException | ||
*/ | ||
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultsInterface; | ||
|
||
/** | ||
* Performs persist operations for a specified adyen_creditmemo. | ||
* | ||
* @param CreditmemoInterface $entity adyen_creditmemo entity. | ||
* @return CreditmemoInterface | ||
*/ | ||
public function save(CreditmemoInterface $entity): CreditmemoInterface; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.