lib/efax/inbound.rb in efax-1.2.0 vs lib/efax/inbound.rb in efax-1.2.1
- old
+ new
@@ -18,11 +18,12 @@
:status,
:mcfid,
:page_count,
:request_type,
:date_received,
- :request_date
+ :request_date,
+ :barcodes
alias_method :sender_fax_number, :ani
def initialize(xml)
doc = Hpricot(xml)
@@ -36,9 +37,10 @@
@mcfid = doc.at(:mcfid).inner_text.to_i
@page_count = doc.at(:pagecount).inner_text.to_i
@request_type = doc.at(:requesttype).inner_text
@date_received = Time.parse("#{doc.at(:datereceived).inner_text} -08:00")
@request_date = Time.parse("#{doc.at(:requestdate).inner_text} -08:00")
+ @barcodes = doc.search("//barcode/key").map { |key| key.inner_html }
end
def file_contents
@file_contents ||= Base64.decode64(encoded_file_contents)
end