Class: Infuser::Invoice

Inherits:
Models::Base show all
Defined in:
lib/infuser/invoice.rb

Instance Attribute Summary

Attributes inherited from Models::Base

#id

Instance Method Summary collapse

Methods inherited from Models::Base

#attributes, belongs_to, children_names, collection_names, #data, define_schema, #destroy, fieldset, #fieldset, has_collection, has_many, #initialize, #inspect, #klass_name, klass_name, #load, #new_record?, #persisted?, #populate, #save, schema, service_name, #service_name

Methods included from Helpers::Hashie

#camelize_hash, #safe_classify

Constructor Details

This class inherits a constructor from Infuser::Models::Base

Instance Method Details

#add_item(*data) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/infuser/invoice.rb', line 12

def add_item *data
  # Add in specific order:
  # product_id
  # type (UNKNOWN = 0, SHIPPING = 1, TAX = 2, SERVICE = 3, PRODUCT = 4, UPSELL = 5, FINANCECHARGE = 6, SPECIAL = 7)
  # price, quantity, description, notes
  client.get("InvoiceService.addOrderItem", id, *data)
end