From 9e5b7234e3a2d72af37cf81d4825abf5e014e8ae Mon Sep 17 00:00:00 2001 From: Matthew Poulter Date: Sun, 13 Oct 2024 13:16:26 +0200 Subject: [PATCH] Add soft deletes to Payment Types --- src/TwoZero/Requests/PaymentTypes/ListPaymentTypes.php | 2 ++ src/TwoZero/Resources/PaymentTypes.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TwoZero/Requests/PaymentTypes/ListPaymentTypes.php b/src/TwoZero/Requests/PaymentTypes/ListPaymentTypes.php index d150c43..daceaa4 100644 --- a/src/TwoZero/Requests/PaymentTypes/ListPaymentTypes.php +++ b/src/TwoZero/Requests/PaymentTypes/ListPaymentTypes.php @@ -18,6 +18,7 @@ public function resolveEndpoint(): string public function __construct( protected ?int $after = null, protected ?int $before = null, + protected ?bool $deleted = null, protected ?int $pageSize = null, ) { } @@ -27,6 +28,7 @@ public function defaultQuery(): array return array_filter([ 'after' => $this->after, 'before' => $this->before, + 'deleted' => $this->deleted, 'page_size' => $this->pageSize, ]); } diff --git a/src/TwoZero/Resources/PaymentTypes.php b/src/TwoZero/Resources/PaymentTypes.php index 18df21c..5fd5042 100644 --- a/src/TwoZero/Resources/PaymentTypes.php +++ b/src/TwoZero/Resources/PaymentTypes.php @@ -11,8 +11,9 @@ class PaymentTypes extends BaseResource public function listPaymentTypes( ?int $after = null, ?int $before = null, + ?bool $deleted = null, ?int $pageSize = null, ): Response { - return $this->connector->send(new ListPaymentTypes($after, $before, $pageSize)); + return $this->connector->send(new ListPaymentTypes($after, $before, $deleted, $pageSize)); } }