HubSpot / hubspot-api-python

HubSpot API Python Client Libraries for V3 version of the API
Apache License 2.0
326 stars 104 forks source link

TIcket Merge Bug #319

Open javfenchel opened 2 weeks ago

javfenchel commented 2 weeks ago

According to the API reference tickets is supposed to have a public_object_api property, but whenever I tried to call that property (to merge tickets) it gave me the error AttributeError: 'Discovery' object has no attribute 'public_object_api'

After looking through the source code I found that in the file hubspot/discovery/crm/tickets/discovery.py it's missing some lines that existed in the equivalent company file (hubspot/discovery/crm/companies/discovery.py). I copied these lines into the ticket file on my local machine and it now works.

@property
def public_object_api(self) -> api_client.PublicObjectApi:
    return self._configure_api_client(api_client, "PublicObjectApi")

I also use python code in workflow custom code and would like to see this update pushed there so I can merge tickets in workflows (without having to switch languages or use requests).