{"action":"closed","issue":{"url":"https://api.github.com/repos/adimichele/hubspot-ruby/issues/127","repository_url":"https://api.github.com/repos/adimichele/hubspot-ruby","labels_url":"https://api.github.com/repos/adimichele/hubspot-ruby/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/adimichele/hubspot-ruby/issues/127/comments","events_url":"https://api.github.com/repos/adimichele/hubspot-ruby/issues/127/events","html_url":"https://github.com/adimichele/hubspot-ruby/issues/127","id":340279579,"node_id":"MDU6SXNzdWUzNDAyNzk1Nzk=","number":127,"title":"Support `Deal.find_by_contact(contact)`","user":{"login":"tommotaylor","id":2160769,"node_id":"MDQ6VXNlcjIxNjA3Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/2160769?v=4","gravatar_id":"","url":"https://api.github.com/users/tommotaylor","html_url":"https://github.com/tommotaylor","followers_url":"https://api.github.com/users/tommotaylor/followers","following_url":"https://api.github.com/users/tommotaylor/following{/other_user}","gists_url":"https://api.github.com/users/tommotaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/tommotaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tommotaylor/subscriptions","organizations_url":"https://api.github.com/users/tommotaylor/orgs","repos_url":"https://api.github.com/users/tommotaylor/repos","events_url":"https://api.github.com/users/tommotaylor/events{/privacy}","received_events_url":"https://api.github.com/users/tommotaylor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-11T14:55:11Z","updated_at":"2018-10-25T13:48:50Z","closed_at":"2018-10-25T13:48:50Z","author_association":"NONE","body":"I proposal to add support for finding a deal by its contact. Eg:\r\n\r\n```\r\n def find_by_contact(contact)\r\n  path = ASSOCIATED_DEAL_PATH\r\n  params = { objectType: :contact, objectId: contact.vid }\r\n  response = Hubspot::Connection.get_json(path, params)\r\n  response[\"results\"].map { |deal_id| find(deal_id) }\r\nend\r\n```\r\n\r\nIts almost a copy and paste of https://github.com/adimichele/hubspot-ruby/blob/master/lib/hubspot/deal.rb#L70"}}
{"actor":{"display_login":"cbisnett"}}