We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5348461 commit dd1573aCopy full SHA for dd1573a
1 file changed
lib/hubspot/owner.rb
@@ -8,6 +8,7 @@ module Hubspot
8
# TODO: Update an Owner
9
# TODO: Delete an Owner
10
class Owner
11
+ GET_OWNER_PATH = '/owners/v2/owners/:owner_id' # GET
12
GET_OWNERS_PATH = '/owners/v2/owners' # GET
13
CREATE_OWNER_PATH = '/owners/v2/owners' # POST
14
UPDATE_OWNER_PATH = '/owners/v2/owners/:owner_id' # PUT
@@ -34,6 +35,12 @@ def all(include_inactive=false)
34
35
response.map { |r| new(r) }
36
end
37
38
+ def find(id, include_inactive=false)
39
+ response = Hubspot::Connection.get_json(path, owner_id: id,
40
+ include_inactive: include_inactive)
41
+ new(response)
42
+ end
43
+
44
def find_by_email(email, include_inactive=false)
45
path = GET_OWNERS_PATH
46
params = { email: email, includeInactive: include_inactive }
0 commit comments