class SixSaferpay::MastercardIssuerInstallments
Attributes
chosen_plan[RW]
custom_plan[RW]
installment_plans[RW]
receipt_free_text[RW]
Public Class Methods
new( installment_plans: nil, custom_plan: nil, chosen_plan: nil, receipt_free_text: nil )
click to toggle source
# File lib/six_saferpay/models/mastercard_issuer_installments.rb, line 11 def initialize( installment_plans: nil, custom_plan: nil, chosen_plan: nil, receipt_free_text: nil ) if installment_plans @installment_plans = SixSaferpay::InstallmentPlans .new(installment_plans.to_h) end if custom_plan @custom_plan = SixSaferpay::CustomPlan .new(custom_plan) end if chosen_plan @chosen_plan = SixSaferpay::ChosenPlan .new(chosen_plan.to_h) end @receipt_free_text = receipt_free_text end
Public Instance Methods
to_hash()
click to toggle source
# File lib/six_saferpay/models/mastercard_issuer_installments.rb, line 32 def to_hash hash = Hash.new if @installment_plans hash.merge!(installment_plans: @installment_plans.to_h) end if @custom_plan hash.merge!(custom_plan: @custom_plan.to_h) end if @chosen_plan hash.merge!(chosen_plan: @chosen_plan.to_h) end hash.merge!(receipt_free_text: @receipt_free_text) hash end
Also aliased as: to_h