Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DanePobierzRaportZbiorczy method #88

Open
steosoft opened this issue Jan 29, 2020 · 5 comments
Open

Add DanePobierzRaportZbiorczy method #88

steosoft opened this issue Jan 29, 2020 · 5 comments

Comments

@steosoft
Copy link

In BIR1.1 there new method to get data - DanePobierzRaportZbiorczy - list of reports by starting date (max 7 days ago).
Can you add this method to library?

@johnzuk
Copy link
Owner

johnzuk commented Jan 29, 2020

This was added in version 5.0 method getBulkReport

@steosoft
Copy link
Author

steosoft commented Jan 30, 2020

Ok, you're right, but method always returns no results, doesn't matter which report type, e.g.

$gus = new GusApi('xxxxxxxxxxxxxx');
try {
    $gus->login();
    $gusReports = $gus->getBulkReport(
        new DateTimeImmutable('2019-01-24'),
        BulkReportTypes::REPORT_NEW_LEGAL_ENTITY_AND_NATURAL_PERSON);
    var_dump($gusReports);
} catch (InvalidUserKeyException $e) {
    var_dump($e);
} catch (\GusApi\Exception\NotFoundException $e) {
    var_dump($e);
}

returns

array(1) {
  [0]=>
  string(0) ""
}

@johnzuk
Copy link
Owner

johnzuk commented Jan 30, 2020

@steosoft be aware with date, from documentation:

Zakres obsługiwanych dat: ostatnie siedem dni (od dnia wczorajszego zaczynając, tzn. data bieżąca nie jest obsługiwana).

@steosoft
Copy link
Author

oh... I didn't notice bad year in my test example... after changing it to 2020 of course it works fine...
Sorry for trouble.

@johnzuk
Copy link
Owner

johnzuk commented Jan 30, 2020

No problem I will an update example with something like new DateTimeImmutable('yesterday')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants