From 0ba9911a4e7a7866e2d0ea5793dfdee9abf9803a Mon Sep 17 00:00:00 2001 From: Ronald Gerssen Date: Mon, 26 Jun 2023 09:36:41 +0200 Subject: [PATCH] Add moneybird_payments_mandate field and getPaymentsMandate method --- src/Picqer/Financials/Moneybird/Entities/Contact.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Picqer/Financials/Moneybird/Entities/Contact.php b/src/Picqer/Financials/Moneybird/Entities/Contact.php index e4e69b6..88dfed3 100644 --- a/src/Picqer/Financials/Moneybird/Entities/Contact.php +++ b/src/Picqer/Financials/Moneybird/Entities/Contact.php @@ -45,6 +45,7 @@ class Contact extends Model 'tax_number', 'chamber_of_commerce', 'bank_account', + 'moneybird_payments_mandate', 'send_invoices_to_attention', 'send_invoices_to_email', 'send_estimates_to_attention', @@ -112,4 +113,14 @@ public function findByCustomerId($customerId) return $this->makeFromResponse($result); } + + /** + * @throws ApiException + */ + public function getPaymentsMandate(): array + { + return $this->connection()->get( + $this->getEndpoint() . '/' . $this->id . '/moneybird_payments_mandate' + ); + } }