-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc122ab
commit 87433de
Showing
4 changed files
with
76 additions
and
21 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
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,47 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mollie\Api\Endpoints; | ||
|
||
use Mollie\Api\Resources\Refund; | ||
use Mollie\Api\Resources\RefundCollection; | ||
|
||
class SettlementRefundEndpoint extends CollectionEndpointAbstract | ||
{ | ||
protected $resourcePath = "settlements_refunds"; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected function getResourceCollectionObject($count, $_links) | ||
{ | ||
return new RefundCollection($this->client, $count, $_links); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected function getResourceObject() | ||
{ | ||
return new Refund($this->client); | ||
} | ||
|
||
/** | ||
* Retrieves a collection of Settlement Refunds from Mollie. | ||
* | ||
* @param string $settlementId | ||
* @param string|null $from The first refund ID you want to include in your list. | ||
* @param int|null $limit | ||
* @param array $parameters | ||
* | ||
* @return mixed | ||
* @throws \Mollie\Api\Exceptions\ApiException | ||
*/ | ||
public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = []) | ||
{ | ||
$this->parentId = $settlementId; | ||
|
||
return $this->rest_list($from, $limit, $parameters); | ||
} | ||
} |
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
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