Class: Peddler::Handlers::XMLHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/peddler/handlers.rb

Class Method Summary collapse

Class Method Details

.parse_legacy(hash) ⇒ Object

Parses legacy responses to queries on statuses of generated reports and inventory uploads.



6
7
8
9
10
11
12
# File 'lib/peddler/handlers.rb', line 6

def self.parse_legacy(hash)
  if hash['Batches']
    hash['Batches']['Batch'].collect  { |input| Peddler::LegacyReports::UploadStatus.new(input) }
  elsif hash['Reports']
    hash['Reports']['Report'].collect { |input| Peddler::LegacyReports::ReportStatus.new(input) }
  end
end