j-frost / billomat-ts

Billomat API implementation in TypeScript for use in Node.js
MIT License
6 stars 5 forks source link

Feat: add contacts as api endpoint #11

Closed opalmo closed 3 years ago

opalmo commented 3 years ago

The Billomat-API also supports accessing and editing the contacts of a customer. This pull requests adds the necessary resource.

Example usage:

const clientId = '12345'; // any existing client id
let contacts = await this.apiClient.contacts.list({ client_id: clientId });

Details about the endpoints can be found in the official documentation: https://www.billomat.com/api/kunden/kontakte/

j-frost commented 3 years ago

Hey @opalmo and sorry for taking a little while on this. I appreciate that you added contacts to src/get-billomat-api-client.ts in the BILLOMAT_RESOURCE_NAMES constant, but to actually run tests against this resource, you'll also have to add them to the isImplemented list.

Doing that, I noticed that you missed adding JSON resource files for those tests. Can you include those?

opalmo commented 3 years ago

Hi @j-frost,

thanks for taking a look on the pull request. I just added the missing example json files and the tests are green.

j-frost commented 3 years ago

Thanks @opalmo for your contribution.