Class: Highrise::Deal

Inherits:
Subject
  • Object
show all
Defined in:
lib/highrise/deal.rb

Instance Method Summary collapse

Methods inherited from Subject

#add_note, #add_task, #emails, #label, #notes, #upcoming_tasks

Methods inherited from Base

url_for

Instance Method Details

#update_status(status) ⇒ Object

Raises:

  • (ArgumentError)


3
4
5
6
# File 'lib/highrise/deal.rb', line 3

def update_status(status)
  raise ArgumentError, "status must be one of 'pending', 'won', or 'lost'" unless %w[pending won lost].include?(status)
  self.put(:status, :status => {:name => status})
end