Class: Pipedrive::Pipeline
- Inherits:
-
Base
- Object
- OpenStruct
- Base
- Pipedrive::Pipeline
show all
- Defined in:
- lib/pipedrive/pipeline.rb
Instance Attribute Summary
Attributes inherited from Base
#data
Instance Method Summary
collapse
Methods inherited from Base
all, authenticate, bad_response, create, find, find_by_name, #initialize, new_list, resource_path, #update
Instance Method Details
#deals(id, stage_id) ⇒ Object
13
14
15
|
# File 'lib/pipedrive/pipeline.rb', line 13
def deals(id, stage_id)
Pipedrive::Deal.all(get "#{resource_path}/#{id}/deals", :stage_id => stage_id )
end
|
#stages ⇒ Object
3
4
5
|
# File 'lib/pipedrive/pipeline.rb', line 3
def stages
Stage.all(get "/stages", { :pipeline_id => self.id })
end
|
#statistics(id, start_date, end_date) ⇒ Object
7
8
9
10
11
|
# File 'lib/pipedrive/pipeline.rb', line 7
def statistics(id, start_date, end_date)
res = get("#{resource_path}/#{id}/movement_statistics",
:query => {:start_date => start_date, :end_date => end_date})
res.ok? ? new(res) : bad_response(res,{:id=>id,:start_date=>start_date,:end_date=>end_date})
end
|