Class: Paid::Invoice
- Inherits:
-
APIResource
- Object
- APIResource
- Paid::Invoice
- Defined in:
- lib/paid/invoice.rb
Instance Attribute Summary collapse
-
#chase_schedule ⇒ Object
Returns the value of attribute chase_schedule.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#issued_at ⇒ Object
Returns the value of attribute issued_at.
-
#next_chase_on ⇒ Object
Returns the value of attribute next_chase_on.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#terms ⇒ Object
Returns the value of attribute terms.
-
#url ⇒ Object
Returns the value of attribute url.
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
- #void(params = {}, headers = {}) ⇒ Object
Methods inherited from APIResource
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
#chase_schedule ⇒ Object
Returns the value of attribute chase_schedule.
6 7 8 |
# File 'lib/paid/invoice.rb', line 6 def chase_schedule @chase_schedule end |
#customer ⇒ Object
Returns the value of attribute customer.
8 9 10 |
# File 'lib/paid/invoice.rb', line 8 def customer @customer 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.
9 10 11 |
# File 'lib/paid/invoice.rb', line 9 def issued_at @issued_at end |
#next_chase_on ⇒ Object
Returns the value of attribute next_chase_on.
7 8 9 |
# File 'lib/paid/invoice.rb', line 7 def next_chase_on @next_chase_on end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/paid/invoice.rb', line 4 def object @object end |
#summary ⇒ Object
Returns the value of attribute summary.
5 6 7 |
# File 'lib/paid/invoice.rb', line 5 def summary @summary end |
#terms ⇒ Object
Returns the value of attribute terms.
10 11 12 |
# File 'lib/paid/invoice.rb', line 10 def terms @terms end |
#url ⇒ Object
Returns the value of attribute url.
11 12 13 |
# File 'lib/paid/invoice.rb', line 11 def url @url end |
Class Method Details
.all(params = {}, headers = {}) ⇒ Object
13 14 15 16 |
# File 'lib/paid/invoice.rb', line 13 def self.all(params={}, headers={}) method = APIMethod.new(:get, "/invoices", params, headers, self) APIList.new(self, method.execute, method) end |
.create(params = {}, headers = {}) ⇒ Object
26 27 28 29 |
# File 'lib/paid/invoice.rb', line 26 def self.create(params={}, headers={}) method = APIMethod.new(:post, "/invoices", params, headers, self) self.new(method.execute, method) end |
.retrieve(id, params = {}, headers = {}) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/paid/invoice.rb', line 18 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
36 37 38 39 |
# File 'lib/paid/invoice.rb', line 36 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
41 42 43 44 |
# File 'lib/paid/invoice.rb', line 41 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 |