helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API
MIT License
98 stars 62 forks source link

How to get/set Properties #262

Closed sanishkamboj closed 3 years ago

sanishkamboj commented 3 years ago

How to retrieve Properties for a customer.

bkuhl commented 3 years ago

Hey,

We haven't yet added support for this to the PHP SDK, but it is on our radar and we're tracking requests for this. I'm not able to provide a timeline on when this will be implemented, but we would welcome a PR that adds all or partial support for properties. The good news is that the API GET /v2/customers endpoint already supports providing the properties in the response, so hydrating the Customer object is the only step left towards fulfilling this.

We'd welcome a PR that adds support for hydrating this data

bkuhl commented 3 years ago

Hey @sanishkamboj, I'm excited to tell you that v3.4.0 introduces the ability to access a Customer's properties and their values once you've already got the Customer. Give this a spin and if you encounter any problems please let us know!

arwinvdv commented 3 years ago

@bkuhl Great! I think its not yet possible to update the properties with this sdk?

bkuhl commented 3 years ago

Not yet, but I've recorded your request for that feature. We'll update this thread when that functionality is available.

arwinvdv commented 3 years ago

Because I need it now I just developed it and created a pull-request: https://github.com/helpscout/helpscout-api-php/pull/274 I don't know if this in the way you would implement it, but for me it works.

leewillis77 commented 3 years ago

Adding my voice to the group of people that would like the ability to update customer properties through the SDK.

leewillis77 commented 3 years ago

As a short-term solution, it would be helpful to expose the underlying restClient from the ApiClient class. Would a PR that did that be accepted?

careybaird commented 3 years ago

Also adding my +1 for this

bkuhl commented 3 years ago

Thanks to @leewillis77 this is now available in v3.6.2