Class: Akatus::InstallmentOptions
- Inherits:
-
Object
- Object
- Akatus::InstallmentOptions
- Includes:
- Transferrable
- Defined in:
- lib/akatus/installment_options.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#installments ⇒ Object
Returns the value of attribute installments.
-
#taken_installments ⇒ Object
Returns the value of attribute taken_installments.
Class Method Summary collapse
-
.blank(payment) ⇒ Object
Build an empty (“dummy”) object.
Methods included from Transferrable
included, #initialize, #to_payload
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/akatus/installment_options.rb', line 4 def description @description end |
#installments ⇒ Object
Returns the value of attribute installments.
4 5 6 |
# File 'lib/akatus/installment_options.rb', line 4 def installments @installments end |
#taken_installments ⇒ Object
Returns the value of attribute taken_installments.
4 5 6 |
# File 'lib/akatus/installment_options.rb', line 4 def taken_installments @taken_installments end |
Class Method Details
.blank(payment) ⇒ Object
Build an empty (“dummy”) object.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/akatus/installment_options.rb', line 9 def self.blank(payment) # The only "option" is to pay the full amount in one installment. = [ Installment.new({ :quantity => 1, :unitary_amount => payment.total_amount, :total_amount => payment.total_amount }) ] new({ :taken_installments => 0, :installments => }) end |