lib/efax/inbound.rb in efax-1.4.1 vs lib/efax/inbound.rb in efax-1.4.2
- old
+ new
@@ -19,11 +19,12 @@
:mcfid,
:page_count,
:request_type,
:date_received,
:request_date,
- :barcodes
+ :barcodes,
+ :barcode_pages
alias_method :sender_fax_number, :ani
def initialize(xml)
doc = Hpricot(xml)
@@ -38,9 +39,10 @@
@page_count = doc.at(:pagecount).inner_text.to_i
@request_type = doc.at(:requesttype).inner_text
@date_received = datetime_to_time(DateTime.strptime("#{doc.at(:datereceived).inner_text} -08:00", "%m/%d/%Y %H:%M:%S %z"))
@request_date = datetime_to_time(DateTime.strptime("#{doc.at(:requestdate).inner_text} -08:00", "%m/%d/%Y %H:%M:%S %z"))
@barcodes = doc.search("//barcode/key").map { |key| key.inner_html }
+ @barcode_pages = doc.search("//barcode/AdditionalInfo/CodeLocation/PageNumber").map { |key| key.inner_html }
end
def file_contents
@file_contents ||= Base64.decode64(encoded_file_contents)
end