Class: Dune::Balanced::Bankaccount::TransactionInclusiveFeeCalculator
- Inherits:
-
TransactionFeeCalculatorBase
- Object
- TransactionFeeCalculatorBase
- Dune::Balanced::Bankaccount::TransactionInclusiveFeeCalculator
- Defined in:
- app/models/dune/balanced/bankaccount/transaction_inclusive_fee_calculator.rb
Instance Attribute Summary
Attributes inherited from TransactionFeeCalculatorBase
Instance Method Summary collapse
-
#net_amount ⇒ Object
Base calculation of fees 1% + 30¢ ($5 cap).
Methods inherited from TransactionFeeCalculatorBase
#fees, #gross_amount, #initialize
Constructor Details
This class inherits a constructor from Dune::Balanced::Bankaccount::TransactionFeeCalculatorBase
Instance Method Details
#net_amount ⇒ Object
Base calculation of fees 1% + 30¢ ($5 cap)
9 10 11 12 13 14 |
# File 'app/models/dune/balanced/bankaccount/transaction_inclusive_fee_calculator.rb', line 9 def net_amount [ ((transaction_value - 0.3) / 1.01).floor_with_two_decimal_places, transaction_value - 5 ].max end |