Class: Invoicer::BlinksaleInvoiceManager
- Inherits:
-
Object
- Object
- Invoicer::BlinksaleInvoiceManager
- Defined in:
- lib/services/blinksale/invoice_manager.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
- #all(params = {}) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(service) ⇒ BlinksaleInvoiceManager
constructor
A new instance of BlinksaleInvoiceManager.
Constructor Details
#initialize(service) ⇒ BlinksaleInvoiceManager
Returns a new instance of BlinksaleInvoiceManager.
8 9 10 |
# File 'lib/services/blinksale/invoice_manager.rb', line 8 def initialize(service) @service = service end |
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
6 7 8 |
# File 'lib/services/blinksale/invoice_manager.rb', line 6 def service @service end |
Instance Method Details
#all(params = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/services/blinksale/invoice_manager.rb', line 12 def all(params = {}) service.blinksale.all(params).map do |i| Invoicer::BlinksaleInvoice.from_blinksale(i) end end |
#get(id) ⇒ Object
18 19 20 |
# File 'lib/services/blinksale/invoice_manager.rb', line 18 def get(id) Invoicer::BlinksaleInvoice.from_blinksale(service.blinksale.get(id)) end |