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

Extend VatCode resource #138

Closed
wants to merge 7 commits into from
Closed

Conversation

iranl
Copy link
Contributor

@iranl iranl commented Apr 28, 2019

Adds get(), send() and Mapper to VatCode.

Includes fixes to listAll() code to:

  1. Properly process options passed to listAll in the following format:
$options['vattype'] = 'sales';
$vatcodeApiConnector = new \PhpTwinfield\ApiConnectors\VatCodeApiConnector($connection);
$vatcodes = $vatcodeApiConnector->listAll('*', 0, 1, 100, $options);
  1. Handle situations where only one result is returned from listAll() and Twinfield uses a different format when returning results

@willemstuursma
Copy link
Contributor

Thanks, it could use some tests but it looks fine.

That's a lot of pull requests you are contributing! Working on a Twinfield related project?

@iranl
Copy link
Contributor Author

iranl commented Apr 29, 2019

Thanks, it could use some tests but it looks fine.

That's a lot of pull requests you are contributing! Working on a Twinfield related project?

Been using the Twinfield API in about 5 projects using my own horrendous code since 2014 based on the PHP Example by Twinfield. But in my own defence there wasn't a lot of documentation or libraries like this one then.

The deprecation of session login and switch to OpenID Authentication seemed like a good moment to replace my own code with this library, but the library lacks some functionality I currently use (like listAll() for articles and invoices and invoice VAT lines), so thats why I'm creating all these PR's.

@willemstuursma
Copy link
Contributor

Thanks @iranl, nice to hear that you are liking the library. Looking forward to merging all the changes.

@iranl
Copy link
Contributor Author

iranl commented May 9, 2019

Superseded by #142

@iranl iranl closed this May 9, 2019
@iranl iranl deleted the update-vatcode branch June 30, 2019 10:32
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

Successfully merging this pull request may close these issues.

2 participants