Module: Closeio::Client::Opportunity
- Included in:
- Closeio::Client
- Defined in:
- lib/closeio/resources/opportunity.rb
Instance Method Summary collapse
- #create_opportunity(options = {}) ⇒ Object
- #delete_opportunity(id) ⇒ Object
- #find_opportunity(id) ⇒ Object
- #list_opportunities(options = {}, paginate = false) ⇒ Object
- #update_opportunity(id, options = {}) ⇒ Object
Instance Method Details
#create_opportunity(options = {}) ⇒ Object
16 17 18 |
# File 'lib/closeio/resources/opportunity.rb', line 16 def create_opportunity( = {}) post(opportunity_path, ) 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( = {}, paginate = false) if paginate paginate(opportunity_path, ) else get(opportunity_path, ) end end |
#update_opportunity(id, options = {}) ⇒ Object
20 21 22 |
# File 'lib/closeio/resources/opportunity.rb', line 20 def update_opportunity(id, = {}) put(opportunity_path(id), ) end |