Class: Dune::Balanced::Creditcard::TransactionInclusiveFeeCalculator

Inherits:
TransactionFeeCalculatorBase show all
Defined in:
app/models/dune/balanced/creditcard/transaction_inclusive_fee_calculator.rb

Instance Attribute Summary

Attributes inherited from TransactionFeeCalculatorBase

#transaction_value

Instance Method Summary collapse

Methods inherited from TransactionFeeCalculatorBase

#fees, #gross_amount, #initialize

Constructor Details

This class inherits a constructor from Dune::Balanced::Creditcard::TransactionFeeCalculatorBase

Instance Method Details

#net_amountObject

Base calculation of fees 2.9% + 30¢



9
10
11
# File 'app/models/dune/balanced/creditcard/transaction_inclusive_fee_calculator.rb', line 9

def net_amount
  ((transaction_value - 0.3) / 1.029).floor_with_two_decimal_places
end