Class: Securetrading::Amount

Inherits:
BaseModel show all
Defined in:
lib/securetrading/amount.rb

Instance Method Summary collapse

Methods inherited from BaseModel

#initialize

Constructor Details

This class inherits a constructor from Securetrading::BaseModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Securetrading::BaseModel

Instance Method Details

#currency_codeObject



3
4
5
# File 'lib/securetrading/amount.rb', line 3

def currency_code
  attributes_hash['currencycode']
end

#ox_xmlObject



11
12
13
14
15
# File 'lib/securetrading/amount.rb', line 11

def ox_xml
  el = XmlDoc.new_element(xml_tag_name)
  el['currencycode'] = currency_code if currency_code.present?
  el << value.to_s
end

#valueObject



7
8
9
# File 'lib/securetrading/amount.rb', line 7

def value
  attributes_hash['content']
end