Sha256: 98d5c821ce863c65034779e7df1be2c30ada64227fc2b374c7989b13ca71a757

Contents?: true

Size: 340 Bytes

Versions: 3

Compression:

Stored size: 340 Bytes

Contents

module Securetrading
  class Amount < BaseModel
    def currency_code
      attributes_hash['currencycode']
    end

    def value
      attributes_hash['content']
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
securetrading-0.4.0 lib/securetrading/amount.rb
securetrading-0.3.2 lib/securetrading/amount.rb
securetrading-0.3.1 lib/securetrading/amount.rb