Class: FreeAgent::Invoice
- Defined in:
- lib/free_agent/invoice.rb
Overview
Represents an Invoice in FreeAgent.
Instance Method Summary collapse
-
#mark_as_cancelled ⇒ void
Marks the current invoice as cancelled.
-
#mark_as_draft ⇒ void
Marks the current invoice as draft.
-
#mark_as_sent ⇒ void
Marks the current invoice as sent.
Methods inherited from Base
Instance Method Details
#mark_as_cancelled ⇒ void
This method returns an undefined value.
Marks the current invoice as cancelled.
This method actually performs a new HTTP request to FreeAgent in order to execute the update.
56 57 58 59 60 61 |
# File 'lib/free_agent/invoice.rb', line 56 def mark_as_cancelled # put(:mark_as_cancelled).tap do |response| # load_attributes_from_response(response) # end put(:mark_as_cancelled) && reload end |
#mark_as_draft ⇒ void
This method returns an undefined value.
Marks the current invoice as draft.
This method actually performs a new HTTP request to FreeAgent in order to execute the update.
28 29 30 31 32 33 |
# File 'lib/free_agent/invoice.rb', line 28 def mark_as_draft # put(:mark_as_draft).tap do |response| # load_attributes_from_response(response) # end put(:mark_as_draft) && reload end |
#mark_as_sent ⇒ void
This method returns an undefined value.
Marks the current invoice as sent.
This method actually performs a new HTTP request to FreeAgent in order to execute the update. It also triggers any automatic deliver if the #send_new_invoice_emails invoice attribute is set to true.
43 44 45 46 47 48 |
# File 'lib/free_agent/invoice.rb', line 43 def mark_as_sent # put(:mark_as_sent).tap do |response| # load_attributes_from_response(response) # end put(:mark_as_sent) && reload end |