-
Notifications
You must be signed in to change notification settings - Fork 53
/
queryInvoiceDigest.php
50 lines (41 loc) · 1.38 KB
/
queryInvoiceDigest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include("config.php");
try {
$config = new NavOnlineInvoice\Config($apiUrl, $userData, $softwareData);
$reporter = new NavOnlineInvoice\Reporter($config);
$invoiceQueryParams = [
"mandatoryQueryParams" => [
"invoiceIssueDate" => [
"dateFrom" => "2021-01-01",
"dateTo" => "2021-01-11",
],
],
"relationalQueryParams" => [
"invoiceDelivery" => [
"queryOperator" => "GTE",
"queryValue" => "2021-01-01",
],
// Több feltétel esetén ugyanazon elemhez tömbben adjuk át a gyerek elemeket
"paymentDate" => [
[
"queryOperator" => "GTE",
"queryValue" => "2021-01-01",
],
[
"queryOperator" => "LTE",
"queryValue" => "2021-01-28",
],
],
],
];
$page = 1;
$invoiceDigestResult = $reporter->queryInvoiceDigest($invoiceQueryParams, $page, "OUTBOUND");
print "Query results XML elem:\n";
var_dump($invoiceDigestResult);
// Request XML for debugging:
// $data = $reporter->getLastRequestData();
// $requestXml = $data['requestBody'];
// var_dump($requestXml);
} catch(Exception $ex) {
print get_class($ex) . ": " . $ex->getMessage();
}