class Multicash::Transfer
Constants
- MESSAGE_IDS
- PAYMENT_SYSTEMS
Attributes
ammount[R]
currency[R]
destination_account[RW]
destination_bae[R]
destination_bank_name[R]
destination_iban[R]
destination_name[R]
errors[R]
order_reference[R]
ordering_account[RW]
ordering_bae[R]
ordering_bank_name[R]
ordering_iban[R]
ordering_name[R]
payment[RW]
payment_charges[R]
payment_details[R]
payment_system[RW]
reference_counter[RW]
today[R]
Public Class Methods
new(attributes = {})
click to toggle source
# File lib/multicash/transfer.rb, line 14 def initialize attributes = {} @ordering_account = attributes[:ordering_account] @destination_account = attributes[:destination_account] @payment = attributes[:payment] @payment_system = attributes[:payment_system] @errors = ActiveModel::Errors.new(self) @today = Time.now.strftime('%y%m%d') @reference_counter = 0 end
Private Instance Methods
validate_associated()
click to toggle source
# File lib/multicash/transfer.rb, line 85 def validate_associated [:ordering_account, :destination_account, :payment].each do |associated| self.errors.add(associated, send(associated).errors.full_messages) unless self.send(associated).valid? end end