Class: Pipedrive::Organization
- Inherits:
-
Base
- Object
- OpenStruct
- Base
- Pipedrive::Organization
show all
- Defined in:
- lib/pipedrive/organization.rb
Instance Attribute Summary
Attributes inherited from Base
#data
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
all, authenticate, bad_response, create, find, find_by_name, #initialize, new_list, resource_path, #update
Class Method Details
.find_or_create_by_name(name, opts = {}) ⇒ Object
14
15
16
|
# File 'lib/pipedrive/organization.rb', line 14
def find_or_create_by_name(name, opts={})
find_by_name(name).first || create(opts.merge(:name => name))
end
|
Instance Method Details
#deals ⇒ Object
8
9
10
|
# File 'lib/pipedrive/organization.rb', line 8
def deals
Deal.all(get "#{resource_path}/#{id}/deals")
end
|
#persons ⇒ Object
4
5
6
|
# File 'lib/pipedrive/organization.rb', line 4
def persons
Person.all(get "#{resource_path}/#{id}/persons")
end
|