class Multicash::Payment

Constants

CHARGES

Attributes

ammount[RW]
ammount_currency[R]
ammount_value[R]
charges[RW]
details[RW]
errors[R]
payment_system[R]

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/multicash/payment.rb, line 11
def initialize attributes = {}
  @ammount = attributes[:ammount]
  @details = attributes[:details]
  @charges = attributes[:charges]
  @errors = ActiveModel::Errors.new(self)
end

Public Instance Methods

valid_ammount() click to toggle source
# File lib/multicash/payment.rb, line 31
def valid_ammount
  unless self.ammount.valid?
    self.errors.add(:ammount, self.ammount.errors.full_messages)
  end
end