Class: Hotfile::Record::BCC82
- Inherits:
-
Hotfile::Record
- Object
- Hotfile::Record
- Hotfile::Record::BCC82
- Defined in:
- lib/hotfile/record/BCC82.rb
Overview
Additional Card Information Record ! not tested, I hope this code works at all…
Instance Method Summary collapse
-
#initialize(line) ⇒ BCC82
constructor
A new instance of BCC82.
Constructor Details
#initialize(line) ⇒ BCC82
Returns a new instance of BCC82.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/hotfile/record/BCC82.rb', line 8 def initialize(line) super date_of_issue, transaction_number, payment_type, transaction_id, reserved = line.scan(/ (\d{6}) (\d{6}) (.{10}) (.{25}) (.{76}) /x).flatten @data = { date_of_issue: Hotfile::Date.new(date_of_issue).to_date, transaction_number: transaction_number.to_i, transaction_id: transaction_id.strip, payment_type: payment_type.strip, reserved: reserved.strip } end |