Class: CFONB::OperationDetail::FEE
- Inherits:
-
Object
- Object
- CFONB::OperationDetail::FEE
- Defined in:
- lib/cfonb/operation_detail/fee.rb
Constant Summary collapse
- ATTRIBUTES =
%i[fee fee_currency].freeze
Class Method Summary collapse
Class Method Details
.apply(operation, line) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/cfonb/operation_detail/fee.rb', line 8 def self.apply(operation, line) operation.fee_currency = line.detail[0..2] scale = line.detail[3].to_i operation.fee = BigDecimal(line.detail[4..17]) / (10**scale) end |