Class: PagSeguro::Transaction::CreditorFees
- Inherits:
-
Object
- Object
- PagSeguro::Transaction::CreditorFees
- Defined in:
- lib/pagseguro/transaction/creditor_fees.rb
Instance Attribute Summary collapse
-
#creditor_fees ⇒ Object
Returns the value of attribute creditor_fees.
Instance Method Summary collapse
- #fee_amount ⇒ Object
-
#initialize(creditor_fees) ⇒ CreditorFees
constructor
A new instance of CreditorFees.
- #installment_fee_amount ⇒ Object
- #intermediation_fee_amount ⇒ Object
- #intermediation_rate_amount ⇒ Object
Constructor Details
#initialize(creditor_fees) ⇒ CreditorFees
Returns a new instance of CreditorFees.
6 7 8 |
# File 'lib/pagseguro/transaction/creditor_fees.rb', line 6 def initialize(creditor_fees) @creditor_fees = creditor_fees end |
Instance Attribute Details
#creditor_fees ⇒ Object
Returns the value of attribute creditor_fees.
4 5 6 |
# File 'lib/pagseguro/transaction/creditor_fees.rb', line 4 def creditor_fees @creditor_fees end |
Instance Method Details
#fee_amount ⇒ Object
22 23 24 |
# File 'lib/pagseguro/transaction/creditor_fees.rb', line 22 def fee_amount @fee_amount ||= installment_fee_amount + intermediation_rate_amount + intermediation_fee_amount end |
#installment_fee_amount ⇒ Object
10 11 12 |
# File 'lib/pagseguro/transaction/creditor_fees.rb', line 10 def installment_fee_amount @installment_fee_amount ||= creditor_fees['installmentFeeAmount'].to_f end |
#intermediation_fee_amount ⇒ Object
18 19 20 |
# File 'lib/pagseguro/transaction/creditor_fees.rb', line 18 def intermediation_fee_amount @intermediation_fee_amount ||= creditor_fees['intermediationFeeAmount'].to_f end |
#intermediation_rate_amount ⇒ Object
14 15 16 |
# File 'lib/pagseguro/transaction/creditor_fees.rb', line 14 def intermediation_rate_amount @intermediation_rate_amount ||= creditor_fees['intermediationRateAmount'].to_f end |