Skip to content

Commit

Permalink
Adding more examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeet committed Nov 5, 2024
1 parent 3f7450b commit fb03d5f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/get_invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

0 comments on commit fb03d5f

Please sign in to comment.