pipedrive / client-php

Pipedrive API client for PHP
MIT License
49 stars 57 forks source link

GRAL-2093: make sure all response properties are camelCased #45

Closed ziimk closed 3 years ago

ziimk commented 3 years ago

Fixes https://github.com/pipedrive/client-php/issues/42

Every response now goes through CamelCaseHelper::keysToCamelCase() function because relying on only the model mapper caused inconsistencies (if the model contained a property that is defined just as an object, not a specific model - like this one - then the keys of this object were not camel-cased).

Also, if json_encode() is run over the response then everything is now consistently snake_cased (as in the raw response)

Testing:

For example, $client->getDeals()->getDetailsOfADeal(123); now (left) vs before (right):

Markup 2021-07-01 at 12 20 26