Class: Paid::Invoice
- Inherits:
-
APIResource
- Object
- APIResource
- Paid::Invoice
- Defined in:
- lib/paid/invoice.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#amount_string ⇒ Object
Returns the value of attribute amount_string.
-
#chase_schedule ⇒ Object
Returns the value of attribute chase_schedule.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#issued_at ⇒ Object
Returns the value of attribute issued_at.
-
#last_reminder_on ⇒ Object
Returns the value of attribute last_reminder_on.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#next_chase_on ⇒ Object
Returns the value of attribute next_chase_on.
-
#next_reminder_on ⇒ Object
Returns the value of attribute next_reminder_on.
-
#number ⇒ Object
Returns the value of attribute number.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#overdue_amount ⇒ Object
Returns the value of attribute overdue_amount.
-
#paid ⇒ Object
Returns the value of attribute paid.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#status ⇒ Object
Returns the value of attribute status.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#terms ⇒ Object
Returns the value of attribute terms.
-
#unpaid_amount ⇒ Object
Returns the value of attribute unpaid_amount.
-
#url ⇒ Object
Returns the value of attribute url.
-
#views ⇒ Object
Returns the value of attribute views.
-
#voided ⇒ Object
Returns the value of attribute voided.
Attributes inherited from APIResource
Class Method Summary collapse
- .all(params = {}, headers = {}) ⇒ Object
- .create(params = {}, headers = {}) ⇒ Object
- .retrieve(id, params = {}, headers = {}) ⇒ Object
Instance Method Summary collapse
- #issue(params = {}, headers = {}) ⇒ Object
- #mark_as_paid(params = {}, headers = {}) ⇒ Object
- #refresh(params = {}, headers = {}) ⇒ Object
- #save(params = {}, headers = {}) ⇒ Object
- #void(params = {}, headers = {}) ⇒ Object
Methods inherited from APIResource
add_api_attribute, api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, determine_api_attribute_value, #determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json
Constructor Details
This class inherits a constructor from Paid::APIResource
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/paid/invoice.rb', line 5 def amount @amount end |
#amount_string ⇒ Object
Returns the value of attribute amount_string.
6 7 8 |
# File 'lib/paid/invoice.rb', line 6 def amount_string @amount_string end |
#chase_schedule ⇒ Object
Returns the value of attribute chase_schedule.
7 8 9 |
# File 'lib/paid/invoice.rb', line 7 def chase_schedule @chase_schedule end |
#created_at ⇒ Object
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/paid/invoice.rb', line 8 def created_at @created_at end |
#customer ⇒ Object
Returns the value of attribute customer.
9 10 11 |
# File 'lib/paid/invoice.rb', line 9 def customer @customer end |
#due_date ⇒ Object
Returns the value of attribute due_date.
10 11 12 |
# File 'lib/paid/invoice.rb', line 10 def due_date @due_date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/paid/invoice.rb', line 3 def id @id end |
#issued_at ⇒ Object
Returns the value of attribute issued_at.
11 12 13 |
# File 'lib/paid/invoice.rb', line 11 def issued_at @issued_at end |
#last_reminder_on ⇒ Object
Returns the value of attribute last_reminder_on.
12 13 14 |
# File 'lib/paid/invoice.rb', line 12 def last_reminder_on @last_reminder_on end |
#metadata ⇒ Object
Returns the value of attribute metadata.
13 14 15 |
# File 'lib/paid/invoice.rb', line 13 def @metadata end |
#next_chase_on ⇒ Object
Returns the value of attribute next_chase_on.
14 15 16 |
# File 'lib/paid/invoice.rb', line 14 def next_chase_on @next_chase_on end |
#next_reminder_on ⇒ Object
Returns the value of attribute next_reminder_on.
16 17 18 |
# File 'lib/paid/invoice.rb', line 16 def next_reminder_on @next_reminder_on end |
#number ⇒ Object
Returns the value of attribute number.
15 16 17 |
# File 'lib/paid/invoice.rb', line 15 def number @number end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/paid/invoice.rb', line 4 def object @object end |
#overdue_amount ⇒ Object
Returns the value of attribute overdue_amount.
17 18 19 |
# File 'lib/paid/invoice.rb', line 17 def overdue_amount @overdue_amount end |
#paid ⇒ Object
Returns the value of attribute paid.
18 19 20 |
# File 'lib/paid/invoice.rb', line 18 def paid @paid end |
#payment ⇒ Object
Returns the value of attribute payment.
19 20 21 |
# File 'lib/paid/invoice.rb', line 19 def payment @payment end |
#status ⇒ Object
Returns the value of attribute status.
20 21 22 |
# File 'lib/paid/invoice.rb', line 20 def status @status end |
#summary ⇒ Object
Returns the value of attribute summary.
21 22 23 |
# File 'lib/paid/invoice.rb', line 21 def summary @summary end |
#terms ⇒ Object
Returns the value of attribute terms.
22 23 24 |
# File 'lib/paid/invoice.rb', line 22 def terms @terms end |
#unpaid_amount ⇒ Object
Returns the value of attribute unpaid_amount.
24 25 26 |
# File 'lib/paid/invoice.rb', line 24 def unpaid_amount @unpaid_amount end |
#url ⇒ Object
Returns the value of attribute url.
23 24 25 |
# File 'lib/paid/invoice.rb', line 23 def url @url end |
#views ⇒ Object
Returns the value of attribute views.
25 26 27 |
# File 'lib/paid/invoice.rb', line 25 def views @views end |
#voided ⇒ Object
Returns the value of attribute voided.
26 27 28 |
# File 'lib/paid/invoice.rb', line 26 def voided @voided end |
Class Method Details
.all(params = {}, headers = {}) ⇒ Object
28 29 30 31 |
# File 'lib/paid/invoice.rb', line 28 def self.all(params={}, headers={}) method = APIMethod.new(:get, "/invoices", params, headers, self) APIList.new(self, method.execute, method) end |
.create(params = {}, headers = {}) ⇒ Object
41 42 43 44 |
# File 'lib/paid/invoice.rb', line 41 def self.create(params={}, headers={}) method = APIMethod.new(:post, "/invoices", params, headers, self) self.new(method.execute, method) end |
.retrieve(id, params = {}, headers = {}) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/paid/invoice.rb', line 33 def self.retrieve(id, params={}, headers={}) params = ParamsBuilder.merge(params, { :id => id }) method = APIMethod.new(:get, "/invoices/:id", params, headers, self) self.new(method.execute, method) end |
Instance Method Details
#issue(params = {}, headers = {}) ⇒ Object
57 58 59 60 |
# File 'lib/paid/invoice.rb', line 57 def issue(params={}, headers={}) method = APIMethod.new(:post, "/invoices/:id/issue", params, headers, self) self.refresh_from(method.execute, method) end |
#mark_as_paid(params = {}, headers = {}) ⇒ Object
62 63 64 65 |
# File 'lib/paid/invoice.rb', line 62 def mark_as_paid(params={}, headers={}) method = APIMethod.new(:post, "/invoices/:id/mark_as_paid", params, headers, self) self.refresh_from(method.execute, method) end |
#refresh(params = {}, headers = {}) ⇒ Object
46 47 48 49 |
# File 'lib/paid/invoice.rb', line 46 def refresh(params={}, headers={}) method = APIMethod.new(:get, "/invoices/:id", params, headers, self) self.refresh_from(method.execute, method) end |
#save(params = {}, headers = {}) ⇒ Object
51 52 53 54 55 |
# File 'lib/paid/invoice.rb', line 51 def save(params={}, headers={}) params = ParamsBuilder.merge(params, changed_api_attributes) method = APIMethod.new(:put, "/invoices/:id", params, headers, self) self.refresh_from(method.execute, method) end |