From c3501879641a9c2146650ca117187fc315dbab89 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Fri, 13 Oct 2023 15:28:33 +0200 Subject: [PATCH 1/9] Settlement.captures endpoint --- src/Endpoints/SettlementCaptureEndpoint.php | 44 +++++++++++++++++++++ src/MollieApiClient.php | 9 +++++ src/Resources/Settlement.php | 18 +++------ 3 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 src/Endpoints/SettlementCaptureEndpoint.php diff --git a/src/Endpoints/SettlementCaptureEndpoint.php b/src/Endpoints/SettlementCaptureEndpoint.php new file mode 100644 index 00000000..98dded78 --- /dev/null +++ b/src/Endpoints/SettlementCaptureEndpoint.php @@ -0,0 +1,44 @@ +client); + } + + protected function getResourceCollectionObject($count, $_links) + { + return new CaptureCollection($this->client, $count, $_links); + } + + /** + * Retrieves a collection of Settlement Captures from Mollie. + * + * @param string $settlementId + * @param string|null $from The first capture 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); + } +} \ No newline at end of file diff --git a/src/MollieApiClient.php b/src/MollieApiClient.php index 545d4006..425e0608 100644 --- a/src/MollieApiClient.php +++ b/src/MollieApiClient.php @@ -30,6 +30,7 @@ use Mollie\Api\Endpoints\ProfileEndpoint; use Mollie\Api\Endpoints\ProfileMethodEndpoint; use Mollie\Api\Endpoints\RefundEndpoint; +use Mollie\Api\Endpoints\SettlementCaptureEndpoint; use Mollie\Api\Endpoints\SettlementPaymentEndpoint; use Mollie\Api\Endpoints\SettlementsEndpoint; use Mollie\Api\Endpoints\ShipmentEndpoint; @@ -117,6 +118,13 @@ class MollieApiClient */ public $settlements; + /** + * RESTful Settlement capture resource. + * + * @var \Mollie\Api\Endpoints\SettlementCaptureEndpoint + */ + public $settlementCaptures; + /** * RESTful Settlement payment resource. * @@ -365,6 +373,7 @@ public function initializeEndpoints() $this->profileMethods = new ProfileMethodEndpoint($this); $this->customers = new CustomerEndpoint($this); $this->settlements = new SettlementsEndpoint($this); + $this->settlementCaptures = new SettlementCaptureEndpoint($this); $this->settlementPayments = new SettlementPaymentEndpoint($this); $this->subscriptions = new SubscriptionEndpoint($this); $this->customerPayments = new CustomerPaymentsEndpoint($this); diff --git a/src/Resources/Settlement.php b/src/Resources/Settlement.php index 8bdef55a..eb23378b 100644 --- a/src/Resources/Settlement.php +++ b/src/Resources/Settlement.php @@ -174,19 +174,13 @@ public function chargebacks() * @return CaptureCollection * @throws ApiException */ - public function captures() + public function captures(int $limit = null, array $parameters = []) { - if (! isset($this->_links->captures->href)) { - return new CaptureCollection($this->client, 0, null); - } - - $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->captures->href); - - return ResourceFactory::createCursorResourceCollection( - $this->client, - $result->_embedded->captures, - Capture::class, - $result->_links + return $this->client->settlementCaptures->pageForId( + $this->id, + null, + $limit, + $parameters ); } } From bc122ab9209402f48e7ef56136b6cc7c2405b480 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Fri, 13 Oct 2023 15:36:12 +0200 Subject: [PATCH 2/9] SettlementChargebackEndpoint --- .../SettlementChargebackEndpoint.php | 49 +++++++++++++++++++ src/MollieApiClient.php | 9 ++++ src/Resources/Settlement.php | 24 +++++---- 3 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 src/Endpoints/SettlementChargebackEndpoint.php diff --git a/src/Endpoints/SettlementChargebackEndpoint.php b/src/Endpoints/SettlementChargebackEndpoint.php new file mode 100644 index 00000000..acd97b36 --- /dev/null +++ b/src/Endpoints/SettlementChargebackEndpoint.php @@ -0,0 +1,49 @@ +client); + } + + /** + * @inheritDoc + */ + protected function getResourceCollectionObject($count, $_links) + { + return new ChargebackCollection($this->client, $count, $_links); + } + + /** + * Retrieves a collection of Settlement Chargebacks from Mollie. + * + * @param string $settlementId + * @param string|null $from The first chargeback 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); + } +} \ No newline at end of file diff --git a/src/MollieApiClient.php b/src/MollieApiClient.php index 425e0608..dd7a8876 100644 --- a/src/MollieApiClient.php +++ b/src/MollieApiClient.php @@ -31,6 +31,7 @@ use Mollie\Api\Endpoints\ProfileMethodEndpoint; use Mollie\Api\Endpoints\RefundEndpoint; use Mollie\Api\Endpoints\SettlementCaptureEndpoint; +use Mollie\Api\Endpoints\SettlementChargebackEndpoint; use Mollie\Api\Endpoints\SettlementPaymentEndpoint; use Mollie\Api\Endpoints\SettlementsEndpoint; use Mollie\Api\Endpoints\ShipmentEndpoint; @@ -125,6 +126,13 @@ class MollieApiClient */ public $settlementCaptures; + /** + * RESTful Settlement chargeback resource. + * + * @var \Mollie\Api\Endpoints\SettlementChargebackEndpoint + */ + public $settlementChargebacks; + /** * RESTful Settlement payment resource. * @@ -374,6 +382,7 @@ public function initializeEndpoints() $this->customers = new CustomerEndpoint($this); $this->settlements = new SettlementsEndpoint($this); $this->settlementCaptures = new SettlementCaptureEndpoint($this); + $this->settlementChargebacks = new SettlementChargebackEndpoint($this); $this->settlementPayments = new SettlementPaymentEndpoint($this); $this->subscriptions = new SubscriptionEndpoint($this); $this->customerPayments = new CustomerPaymentsEndpoint($this); diff --git a/src/Resources/Settlement.php b/src/Resources/Settlement.php index eb23378b..fef8af25 100644 --- a/src/Resources/Settlement.php +++ b/src/Resources/Settlement.php @@ -112,7 +112,7 @@ public function isFailed() } /** - * Retrieves all payments associated with this settlement + * Retrieves the first page of payments associated with this settlement. * * @param int|null $limit * @param array $parameters @@ -149,28 +149,26 @@ public function refunds() /** * Retrieves all chargebacks associated with this settlement * + * @param int|null $limit + * @param array $parameters * @return ChargebackCollection * @throws ApiException */ - public function chargebacks() + public function chargebacks(int $limit = null, array $parameters = []) { - if (! isset($this->_links->chargebacks->href)) { - return new ChargebackCollection($this->client, 0, null); - } - - $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href); - - return ResourceFactory::createCursorResourceCollection( - $this->client, - $result->_embedded->chargebacks, - Chargeback::class, - $result->_links + return $this->client->settlementChargebacks->pageForId( + $this->id, + null, + $limit, + $parameters ); } /** * Retrieves all captures associated with this settlement * + * @param int|null $limit + * @param array $parameters * @return CaptureCollection * @throws ApiException */ From 87433dec9d519fcb21a7b926d850bbcc203c9d34 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Fri, 13 Oct 2023 15:41:58 +0200 Subject: [PATCH 3/9] SettlementRefundEndpoint --- .../SettlementChargebackEndpoint.php | 2 - src/Endpoints/SettlementRefundEndpoint.php | 47 +++++++++++++++++++ src/MollieApiClient.php | 9 ++++ src/Resources/Settlement.php | 39 +++++++-------- 4 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 src/Endpoints/SettlementRefundEndpoint.php diff --git a/src/Endpoints/SettlementChargebackEndpoint.php b/src/Endpoints/SettlementChargebackEndpoint.php index acd97b36..088f5250 100644 --- a/src/Endpoints/SettlementChargebackEndpoint.php +++ b/src/Endpoints/SettlementChargebackEndpoint.php @@ -4,8 +4,6 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\BaseCollection; -use Mollie\Api\Resources\BaseResource; use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; diff --git a/src/Endpoints/SettlementRefundEndpoint.php b/src/Endpoints/SettlementRefundEndpoint.php new file mode 100644 index 00000000..84cfcd62 --- /dev/null +++ b/src/Endpoints/SettlementRefundEndpoint.php @@ -0,0 +1,47 @@ +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); + } +} \ No newline at end of file diff --git a/src/MollieApiClient.php b/src/MollieApiClient.php index dd7a8876..bdd079cb 100644 --- a/src/MollieApiClient.php +++ b/src/MollieApiClient.php @@ -33,6 +33,7 @@ use Mollie\Api\Endpoints\SettlementCaptureEndpoint; use Mollie\Api\Endpoints\SettlementChargebackEndpoint; use Mollie\Api\Endpoints\SettlementPaymentEndpoint; +use Mollie\Api\Endpoints\SettlementRefundEndpoint; use Mollie\Api\Endpoints\SettlementsEndpoint; use Mollie\Api\Endpoints\ShipmentEndpoint; use Mollie\Api\Endpoints\SubscriptionEndpoint; @@ -140,6 +141,13 @@ class MollieApiClient */ public $settlementPayments; + /** + * RESTful Settlement refund resource. + * + * @var \Mollie\Api\Endpoints\SettlementRefundEndpoint + */ + public $settlementRefunds; + /** * RESTful Subscription resource. * @@ -384,6 +392,7 @@ public function initializeEndpoints() $this->settlementCaptures = new SettlementCaptureEndpoint($this); $this->settlementChargebacks = new SettlementChargebackEndpoint($this); $this->settlementPayments = new SettlementPaymentEndpoint($this); + $this->settlementRefunds = new SettlementRefundEndpoint($this); $this->subscriptions = new SubscriptionEndpoint($this); $this->customerPayments = new CustomerPaymentsEndpoint($this); $this->mandates = new MandateEndpoint($this); diff --git a/src/Resources/Settlement.php b/src/Resources/Settlement.php index fef8af25..b598fd25 100644 --- a/src/Resources/Settlement.php +++ b/src/Resources/Settlement.php @@ -92,7 +92,7 @@ public function isPending() } /** - * Is this settlement paidout? + * Is this settlement paid out? * * @return bool */ @@ -102,7 +102,7 @@ public function isPaidout() } /** - * Is this settlement failed? + * Has this settlement failed? * * @return bool */ @@ -112,7 +112,7 @@ public function isFailed() } /** - * Retrieves the first page of payments associated with this settlement. + * Retrieve the first page of payments associated with this settlement. * * @param int|null $limit * @param array $parameters @@ -121,33 +121,34 @@ public function isFailed() */ public function payments(int $limit = null, array $parameters = []): PaymentCollection { - return $this->client->settlementPayments->pageForId($this->id, null, $limit, $parameters); + return $this->client->settlementPayments->pageForId( + $this->id, + null, + $limit, + $parameters + ); } /** - * Retrieves all refunds associated with this settlement + * Retrieve the first page of refunds associated with this settlement. * + * @param int|null $limit + * @param array $parameters * @return RefundCollection * @throws ApiException */ - public function refunds() + public function refunds(int $limit = null, array $parameters = []) { - if (! isset($this->_links->refunds->href)) { - return new RefundCollection($this->client, 0, null); - } - - $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href); - - return ResourceFactory::createCursorResourceCollection( - $this->client, - $result->_embedded->refunds, - Refund::class, - $result->_links + return $this->client->settlementRefunds->pageForId( + $this->id, + null, + $limit, + $parameters ); } /** - * Retrieves all chargebacks associated with this settlement + * Retrieve the first page of chargebacks associated with this settlement. * * @param int|null $limit * @param array $parameters @@ -165,7 +166,7 @@ public function chargebacks(int $limit = null, array $parameters = []) } /** - * Retrieves all captures associated with this settlement + * Retrieve the first page of cap associated with this settlement. * * @param int|null $limit * @param array $parameters From d12742d83f89de3bab6493ee48b04c9928b21920 Mon Sep 17 00:00:00 2001 From: sandervanhooft Date: Fri, 13 Oct 2023 13:42:39 +0000 Subject: [PATCH 4/9] Fix styling --- src/Endpoints/SettlementCaptureEndpoint.php | 2 +- src/Endpoints/SettlementChargebackEndpoint.php | 2 +- src/Endpoints/SettlementRefundEndpoint.php | 2 +- src/Resources/Settlement.php | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Endpoints/SettlementCaptureEndpoint.php b/src/Endpoints/SettlementCaptureEndpoint.php index 98dded78..0c46d330 100644 --- a/src/Endpoints/SettlementCaptureEndpoint.php +++ b/src/Endpoints/SettlementCaptureEndpoint.php @@ -41,4 +41,4 @@ public function pageForId(string $settlementId, string $from = null, int $limit return $this->rest_list($from, $limit, $parameters); } -} \ No newline at end of file +} diff --git a/src/Endpoints/SettlementChargebackEndpoint.php b/src/Endpoints/SettlementChargebackEndpoint.php index 088f5250..850d0256 100644 --- a/src/Endpoints/SettlementChargebackEndpoint.php +++ b/src/Endpoints/SettlementChargebackEndpoint.php @@ -44,4 +44,4 @@ public function pageForId(string $settlementId, string $from = null, int $limit return $this->rest_list($from, $limit, $parameters); } -} \ No newline at end of file +} diff --git a/src/Endpoints/SettlementRefundEndpoint.php b/src/Endpoints/SettlementRefundEndpoint.php index 84cfcd62..31e9c1d1 100644 --- a/src/Endpoints/SettlementRefundEndpoint.php +++ b/src/Endpoints/SettlementRefundEndpoint.php @@ -44,4 +44,4 @@ public function pageForId(string $settlementId, string $from = null, int $limit return $this->rest_list($from, $limit, $parameters); } -} \ No newline at end of file +} diff --git a/src/Resources/Settlement.php b/src/Resources/Settlement.php index b598fd25..54f71cd2 100644 --- a/src/Resources/Settlement.php +++ b/src/Resources/Settlement.php @@ -3,7 +3,6 @@ namespace Mollie\Api\Resources; use Mollie\Api\Exceptions\ApiException; -use Mollie\Api\MollieApiClient; use Mollie\Api\Types\SettlementStatus; class Settlement extends BaseResource From d007b205b451823576fb1e4cd11efef9d7d954f1 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 23 Oct 2023 13:03:50 +0200 Subject: [PATCH 5/9] SettlementCaptureEndpointTest --- .../SettlementCaptureEndpointTest.php | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php diff --git a/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php b/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php new file mode 100644 index 00000000..338c0f3a --- /dev/null +++ b/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php @@ -0,0 +1,98 @@ +mockApiCall( + new Request( + 'GET', + '/v2/settlements/stl_jDk30akdN/captures?limit=5&foo=bar' + ), + new Response( + 200, + [], + '{ + "_embedded": { + "captures": [ + { + "resource": "capture", + "id": "cpt_4qqhO89gsT", + "mode": "live", + "amount": { + "value": "1027.99", + "currency": "EUR" + }, + "settlementAmount": { + "value": "399.00", + "currency": "EUR" + }, + "paymentId": "tr_WDqYK6vllg", + "shipmentId": "shp_3wmsgCJN4U", + "settlementId": "stl_jDk30akdN", + "createdAt": "2018-08-02T09:29:56+00:00", + "_links": { + "self": { + "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg/captures/cpt_4qqhO89gsT", + "type": "application/hal+json" + }, + "payment": { + "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg", + "type": "application/hal+json" + }, + "shipment": { + "href": "https://api.mollie.com/v2/orders/ord_8wmqcHMN4U/shipments/shp_3wmsgCJN4U", + "type": "application/hal+json" + }, + "settlement": { + "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN", + "type": "application/hal+json" + }, + "documentation": { + "href": "https://docs.mollie.com/reference/v2/captures-api/get-capture", + "type": "text/html" + } + } + } + ] + }, + "count": 1, + "_links": { + "documentation": { + "href": "https://docs.mollie.com/reference/v2/settlements-api/list-settlement-captures", + "type": "text/html" + }, + "self": { + "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/captures?limit=50", + "type": "application/hal+json" + }, + "previous": null, + "next": null + } + }' + ) + ); + + $settlement = new Settlement($this->apiClient); + $settlement->id = 'stl_jDk30akdN'; + + $captures = $settlement->captures(5, ['foo' => 'bar']); + + $this->assertInstanceOf(CaptureCollection::class, $captures); + $this->assertCount(1, $captures); + + $capture = $captures[0]; + $this->assertInstanceOf(Capture::class, $capture); + $this->assertEquals("cpt_4qqhO89gsT", $capture->id); + } +} \ No newline at end of file From da2382276bd6195803b49a7586373167a1499fa0 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 23 Oct 2023 13:07:46 +0200 Subject: [PATCH 6/9] wip --- tests/SettlementRefundEndpointTest.php | 91 ++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 tests/SettlementRefundEndpointTest.php diff --git a/tests/SettlementRefundEndpointTest.php b/tests/SettlementRefundEndpointTest.php new file mode 100644 index 00000000..15cd656b --- /dev/null +++ b/tests/SettlementRefundEndpointTest.php @@ -0,0 +1,91 @@ +mockApiCall( + new Request( + 'GET', + '/v2/settlements/stl_jDk30akdN/refunds?limit=5&foo=bar' + ), + new Response( + 200, + [], + '{ + "_embedded": { + "refunds": [ + { + "resource": "refund", + "id": "re_3aKhkUNigy", + "amount": { + "value": "10.00", + "currency": "EUR" + }, + "status": "refunded", + "createdAt": "2018-08-30T07:59:02+00:00", + "description": "Order #33", + "paymentId": "tr_maJaG2j8OM", + "settlementAmount": { + "value": "-10.00", + "currency": "EUR" + }, + "settlementId": "stl_jDk30akdN", + "_links": { + "self": { + "href": "https://api.mollie.com/v2/payments/tr_maJaG2j8OM/refunds/re_3aKhkUNigy", + "type": "application/hal+json" + }, + "payment": { + "href": "https://api.mollie.com/v2/payments/tr_maJaG2j8OM", + "type": "application/hal+json" + }, + "settlement": { + "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN", + "type": "application/hal+json" + } + } + }, + { } + ] + }, + "count": 1, + "_links": { + "documentation": { + "href": "https://docs.mollie.com/reference/v2/settlements-api/list-settlement-refunds", + "type": "text/html" + }, + "self": { + "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/refunds?limit=50", + "type": "application/hal+json" + }, + "previous": null, + "next": null + } + }' + ) + ); + + $settlement = new Settlement($this->apiClient); + $settlement->id = 'stl_jDk30akdN'; + + $refunds = $settlement->refunds(5, ['foo' => 'bar']); + + $this->assertInstanceOf(RefundCollection::class, $refunds); + $this->assertCount(2, $refunds); + + $refund = $refunds[0]; + $this->assertInstanceOf(Refund::class, $refund); + $this->assertEquals("re_3aKhkUNigy", $refund->id); + } +} \ No newline at end of file From a9e44b3ff0a10c9ef90467170090da8cc3e636f5 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 23 Oct 2023 13:11:55 +0200 Subject: [PATCH 7/9] wip --- .../SettlementChargebackEndpointTest.php | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php diff --git a/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php b/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php new file mode 100644 index 00000000..cdafc483 --- /dev/null +++ b/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php @@ -0,0 +1,88 @@ +mockApiCall( + new Request( + 'GET', + '/v2/settlements/stl_jDk30akdN/chargebacks?limit=5&foo=bar' + ), + new Response( + 200, + [], + '{ + "count": 1, + "_embedded": { + "chargebacks": [ + { + "resource": "chargeback", + "id": "chb_n9z0tp", + "amount": { + "value": "43.38", + "currency": "USD" + }, + "settlementAmount": { + "value": "-37.14", + "currency": "EUR" + }, + "createdAt": "2018-03-14T17:00:52.0Z", + "reversedAt": null, + "paymentId": "tr_WDqYK6vllg", + "settlementId": "stl_jDk30akdN", + "_links": { + "self": { + "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg/chargebacks/chb_n9z0tp", + "type": "application/hal+json" + }, + "payment": { + "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg", + "type": "application/hal+json" + }, + "settlement": { + "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN", + "type": "application/hal+json" + } + } + } + ] + }, + "_links": { + "documentation": { + "href": "https://docs.mollie.com/reference/v2/settlements-api/list-settlement-chargebacks", + "type": "text/html" + }, + "self": { + "href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/chargebacks", + "type": "application/hal+json" + }, + "previous": null, + "next": null + } + }' + ) + ); + + $settlement = new Settlement($this->apiClient); + $settlement->id = 'stl_jDk30akdN'; + + $chargebacks = $settlement->chargebacks(5, ['foo' => 'bar']); + + $this->assertInstanceOf(ChargebackCollection::class, $chargebacks); + $this->assertCount(1, $chargebacks); + + $chargeback = $chargebacks[0]; + $this->assertInstanceOf(Chargeback::class, $chargeback); + $this->assertEquals("chb_n9z0tp", $chargeback->id); + } +} \ No newline at end of file From 8bdb94db6134174a5441eb38fa55b4f40af86ffc Mon Sep 17 00:00:00 2001 From: sandervanhooft Date: Mon, 23 Oct 2023 11:12:57 +0000 Subject: [PATCH 8/9] Fix styling --- tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php | 2 +- tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php | 2 +- tests/SettlementRefundEndpointTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php b/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php index 338c0f3a..4887e274 100644 --- a/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php +++ b/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php @@ -95,4 +95,4 @@ public function testListSettlementCaptures() $this->assertInstanceOf(Capture::class, $capture); $this->assertEquals("cpt_4qqhO89gsT", $capture->id); } -} \ No newline at end of file +} diff --git a/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php b/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php index cdafc483..40289929 100644 --- a/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php +++ b/tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php @@ -85,4 +85,4 @@ public function testListSettlementChargebacks() $this->assertInstanceOf(Chargeback::class, $chargeback); $this->assertEquals("chb_n9z0tp", $chargeback->id); } -} \ No newline at end of file +} diff --git a/tests/SettlementRefundEndpointTest.php b/tests/SettlementRefundEndpointTest.php index 15cd656b..14df7f53 100644 --- a/tests/SettlementRefundEndpointTest.php +++ b/tests/SettlementRefundEndpointTest.php @@ -88,4 +88,4 @@ public function testListSettlementRefunds() $this->assertInstanceOf(Refund::class, $refund); $this->assertEquals("re_3aKhkUNigy", $refund->id); } -} \ No newline at end of file +} From 80aaa236d6d2f038696300a42dead8b5278f04c0 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 23 Oct 2023 13:18:48 +0200 Subject: [PATCH 9/9] wip --- tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php | 2 +- tests/Mollie/API/Endpoints/SettlementChargebackEndpointTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php b/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php index 4887e274..366a66a3 100644 --- a/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php +++ b/tests/Mollie/API/Endpoints/SettlementCaptureEndpointTest.php @@ -1,7 +1,7 @@