Class: Harvest::InvoiceCategory

Inherits:
Hashie::Mash
  • Object
show all
Includes:
Model
Defined in:
lib/harvest/invoice_category.rb

Class Method Summary collapse

Methods included from Model

included

Class Method Details

.json_rootObject



6
# File 'lib/harvest/invoice_category.rb', line 6

def self.json_root; "invoice_item_category"; end

.parse(json) ⇒ Object



9
10
11
12
# File 'lib/harvest/invoice_category.rb', line 9

def parse(json)
  parsed = String === json ? JSON.parse(json) : json
  Array.wrap(parsed).map {|attrs| new(attrs["invoice_category"])}
end