jpetrucciani / hubspot3

python3.6+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python
MIT License
147 stars 73 forks source link

Update method in Tickets API now parses data dict into a list of dicts #81

Closed selinfildis closed 4 years ago

selinfildis commented 4 years ago

Update method in Tickets API didn't parse dict therefore the user needed to send a list of dicts, now it parses the dict. Also added tests for update ticket method.

related comment in TicketAPI issue: https://github.com/jpetrucciani/hubspot3/issues/29#issuecomment-569056536 @vivithemage can you please also take a look 👼

vivithemage commented 4 years ago

Just tried the changes and the admin panel and looks good on my end.

params = {
    "hs_ticket_priority": "LOW",
    "content": "hi there"
}

""" List all tickets """
ticket_client = TicketsClient(api_key=API_KEY)
ticket_client.update(ticket_id="73420176", data=params)
jpetrucciani commented 4 years ago

Cool! If it works for you two, I'll get that merged in now.

Thanks for the contribution!

jpetrucciani commented 4 years ago

This is now live on pip as version 3.2.42

Thanks again for your contribution! 😄