diff --git a/docs/de-de/invoice.md b/docs/de-de/invoice.md index f1b5c23..4d23135 100644 --- a/docs/de-de/invoice.md +++ b/docs/de-de/invoice.md @@ -93,6 +93,14 @@ $items = [ $sevdeskApi->invoice()->create($customerId, $items, $parameters); ``` +## Zahlungserinnerung erstellen + +Um eine Zahlungserinnerung zu erstellen, verwende die Funktion `createReminder()` und übergebe die SevDesk `invoiceId`. + +```php +$sevdeskApi->invoice()->createReminder($invoiceId); +``` + ## Rechnung herunterladen Um eine Rechnung runterzuladen, rufe die Funktion `download()` auf mit der Rechnungs ID `$invoiceId` als Parameter. diff --git a/docs/invoice.md b/docs/invoice.md index 61daf91..32166c9 100644 --- a/docs/invoice.md +++ b/docs/invoice.md @@ -92,6 +92,15 @@ $items = [ $sevdeskApi->invoice()->create($customerId, $items, $parameters); ``` +## Create Reminder + +To create an invoice use the `createReminder()` function and pass the SevDesk `invoiceId`. + +```php +$sevdeskApi->invoice()->createReminder($invoiceId); +``` + + ## Download Invoice To download pdf file of the giving `$invoiceId`. diff --git a/src/Api/Invoice.php b/src/Api/Invoice.php index 3f20adb..bda53b2 100644 --- a/src/Api/Invoice.php +++ b/src/Api/Invoice.php @@ -157,6 +157,24 @@ public function create($contactId, $items, array $parameters = []): SevInvoice return $sevInvoice; } + // =========================== create reminder ==================================== + + /** + * Create invoice reminder. + * + * @param $invoiceId + * @return array + * @throws Exception + */ + public function createReminder($invoiceId): array + { + return $this->_post(Routes::CREATE_REMINDER, [ + 'invoice' => [ + 'id' => $invoiceId, + "objectName" => "Invoice" + ] + ]); + } // ======================================================================= diff --git a/src/Api/Utils/Routes.php b/src/Api/Utils/Routes.php index ce3393e..99d0185 100644 --- a/src/Api/Utils/Routes.php +++ b/src/Api/Utils/Routes.php @@ -20,6 +20,7 @@ class Routes const INVOICE = 'Invoice'; const SEV_USER = 'SevUser'; const CREATE_INVOICE = self::INVOICE . '/Factory/saveInvoice'; + const CREATE_REMINDER = self::INVOICE . '/Factory/createInvoiceReminder'; const STATIC_COUNTRY = 'StaticCountry'; const SEQUENCE = 'SevSequence/Factory/getByType'; }