webeweb / pappers-library

Integrate Pappers API with your projects
MIT License
2 stars 1 forks source link

Data type mismatched for domiciliation field #1

Closed cuongnguyentan closed 1 year ago

cuongnguyentan commented 1 year ago

https://github.com/webeweb/pappers-library/blob/ca1b19bef8fd5f654be0d32da2c3f4d7dba94a93/src/Model/Etablissement.php#L297

Firstly, thank you for the open source.

I'm having the issue where the field domiciliation in Etablissement is of type object array, not of type string, as indicated in the api documentation:

image

This results in the error Argument 1 passed to WBW\Library\Pappers\Model\Etablissement::setDomiciliation() must be of the type string or null, array given

Would be great if you can update the model or give instruction on how I can contribute.

Thank you.

webeweb commented 1 year ago

Hi,

I have introduce a new model "Domiciliation" in the response parsing.

Can you update your project and test again to check this improvements ?

Best regards

cuongnguyentan commented 1 year ago

Thank you, it works for the domiciliation field now

But now I've got another error for the field rnm Argument 1 passed to WBW\Library\Pappers\Model\Entreprise::setRnm() must be of the type string or null, array given

image

webeweb commented 1 year ago

Please, update with the last changes and test again.

Thanks you for your feedback

cuongnguyentan commented 1 year ago

I've tried again with the latest code and it works fine for our project now. Thank you for your support

webeweb commented 1 year ago

You're welcome.

Best regards