Class: Shipvine::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/shipvine/base.rb

Constant Summary collapse

WAREHOUSE_XSD_FILE =
File.expand_path('../../../data/WarehouseFS-1.0.xsd', __FILE__)

Class Method Summary collapse

Class Method Details

.clientObject



5
6
7
# File 'lib/shipvine/base.rb', line 5

def self.client
  @client ||= Shipvine::Client.new
end

.xml_to_hash(raw_xml) ⇒ Object



9
10
11
12
# File 'lib/shipvine/base.rb', line 9

def self.xml_to_hash(raw_xml)
  Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
    .parse(raw_xml)
end