From fb03d5fbbde498b15dd0c8cbcd939c8e6c768cac Mon Sep 17 00:00:00 2001 From: ndeet Date: Tue, 5 Nov 2024 21:40:58 +0100 Subject: [PATCH] Adding more examples. --- examples/get_invoice.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/get_invoice.php b/examples/get_invoice.php index 72d7cbd..e68231f 100644 --- a/examples/get_invoice.php +++ b/examples/get_invoice.php @@ -31,3 +31,13 @@ } catch (\Throwable $e) { echo "Error: " . $e->getMessage(); } + +// Get newer/equal than 2024-10-20 +try { + echo 'Get invoices newer/equal than 2024-10-20:' . PHP_EOL; + $date = new DateTime('2024-10-20'); + $client = new Invoice($host, $apiKey); + var_dump($client->getAllInvoicesWithFilter($storeId, null, null, null, $date->getTimestamp())); +} catch (\Throwable $e) { + echo "Error: " . $e->getMessage(); +}