Module: Closeio::Client::Opportunity

Included in:
Closeio::Client
Defined in:
lib/closeio/resources/opportunity.rb

Instance Method Summary collapse

Instance Method Details

#create_opportunity(options = {}) ⇒ Object



16
17
18
# File 'lib/closeio/resources/opportunity.rb', line 16

def create_opportunity(options = {})
  post(opportunity_path, options)
end

#delete_opportunity(id) ⇒ Object



24
25
26
# File 'lib/closeio/resources/opportunity.rb', line 24

def delete_opportunity(id)
  delete(opportunity_path(id))
end

#find_opportunity(id) ⇒ Object



12
13
14
# File 'lib/closeio/resources/opportunity.rb', line 12

def find_opportunity(id)
  get(opportunity_path(id))
end

#list_opportunities(options = {}, paginate = false) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/closeio/resources/opportunity.rb', line 4

def list_opportunities(options = {}, paginate = false)
  if paginate
    paginate(opportunity_path, options)
  else
    get(opportunity_path, options)
  end
end

#update_opportunity(id, options = {}) ⇒ Object



20
21
22
# File 'lib/closeio/resources/opportunity.rb', line 20

def update_opportunity(id, options = {})
  put(opportunity_path(id), options)
end