Class: Emvoicer::Invoice
- Inherits:
-
Object
- Object
- Emvoicer::Invoice
- Defined in:
- lib/emvoicer/invoice.rb
Constant Summary collapse
- ATTRIBUTES =
[ :id, :number, :total_amount, :due_amount, :issued_on, :due_on, :currency, :client_id ]
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
- #client(callback) ⇒ Object
-
#initialize(service, attributes) ⇒ Invoice
constructor
A new instance of Invoice.
Constructor Details
#initialize(service, attributes) ⇒ Invoice
Returns a new instance of Invoice.
16 17 18 19 |
# File 'lib/emvoicer/invoice.rb', line 16 def initialize(service, attributes) @service = service @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
14 15 16 |
# File 'lib/emvoicer/invoice.rb', line 14 def attributes @attributes end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
14 15 16 |
# File 'lib/emvoicer/invoice.rb', line 14 def service @service end |
Instance Method Details
#client(callback) ⇒ Object
27 28 29 |
# File 'lib/emvoicer/invoice.rb', line 27 def client(callback) service.client(client_id, callback) end |