Class: Epages::TaxClass

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/epages/tax_class.rb

Constant Summary collapse

KEYS =
%w(tax_class_id name links).collect(&:to_sym).freeze

Instance Method Summary collapse

Methods included from Utils

build_shop_from, camelize_keys, camelize_words, options_to_multipart_request, options_to_patch_request, parse_attribute_as, parse_attribute_as_array_of, parse_attributes, symbolize_keys!, to_query_options, underscorize_keys

Constructor Details

#initialize(data) ⇒ TaxClass

Returns a new instance of TaxClass.



11
12
13
14
# File 'lib/epages/tax_class.rb', line 11

def initialize(data)
  @links = data.delete(:links).collect { |i| Epages::Link.new(i) } if data[:links]
  parse_attributes(data)
end