Class: CiPower::InstallmentPlan
- Defined in:
- lib/ci_power/installment_plan.rb
Instance Attribute Summary collapse
-
#first_installment_date ⇒ Object
Returns the value of attribute first_installment_date.
-
#fixed_size_installment_amount ⇒ Object
Returns the value of attribute fixed_size_installment_amount.
-
#installment_amount ⇒ Object
Returns the value of attribute installment_amount.
-
#installment_fee ⇒ Object
Returns the value of attribute installment_fee.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#last_installment_date ⇒ Object
Returns the value of attribute last_installment_date.
-
#no_of_installments ⇒ Object
Returns the value of attribute no_of_installments.
-
#period ⇒ Object
Returns the value of attribute period.
Attributes inherited from Record
#address_identification_debtee, #address_identification_debtor, #group_no, #record_type
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ InstallmentPlan
constructor
A new instance of InstallmentPlan.
- #to_cip(with_line_terminator = true) ⇒ Object
Methods inherited from Record
#cip_default_data, #fill_up, #line_terminator
Constructor Details
#initialize(attributes = {}) ⇒ InstallmentPlan
Returns a new instance of InstallmentPlan.
12 13 14 15 16 17 18 19 |
# File 'lib/ci_power/installment_plan.rb', line 12 def initialize(attributes = {}) if attributes.is_a? Hash attributes.merge! :record_type => '15' attributes.each do |key, value| self.send("#{key}=".to_sym, value) if self.respond_to?("#{key}=") end end end |
Instance Attribute Details
#first_installment_date ⇒ Object
Returns the value of attribute first_installment_date.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def first_installment_date @first_installment_date end |
#fixed_size_installment_amount ⇒ Object
Returns the value of attribute fixed_size_installment_amount.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def fixed_size_installment_amount @fixed_size_installment_amount end |
#installment_amount ⇒ Object
Returns the value of attribute installment_amount.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def installment_amount @installment_amount end |
#installment_fee ⇒ Object
Returns the value of attribute installment_fee.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def installment_fee @installment_fee end |
#interval ⇒ Object
Returns the value of attribute interval.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def interval @interval end |
#last_installment_date ⇒ Object
Returns the value of attribute last_installment_date.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def last_installment_date @last_installment_date end |
#no_of_installments ⇒ Object
Returns the value of attribute no_of_installments.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def no_of_installments @no_of_installments end |
#period ⇒ Object
Returns the value of attribute period.
3 4 5 |
# File 'lib/ci_power/installment_plan.rb', line 3 def period @period end |
Instance Method Details
#to_cip(with_line_terminator = true) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ci_power/installment_plan.rb', line 21 def to_cip(with_line_terminator = true) fill_up( { :record_type => 2, :group_no => 7, :address_identification_debtee => 25, :address_identification_debtor => 25, :no_of_installments => 3, :installment_amount => 15, :first_installment_date => 10, :period => 10, :interval => 3, :installment_fee => 15, :fixed_size_installment_amount => 1, :last_installment_date => 10 }, with_line_terminator ) end |