Sha256: a3d4118a285608fa91125d1f66b593c4df3723faeba32356a1202f8adb61d9e8

Contents?: true

Size: 650 Bytes

Versions: 6

Compression:

Stored size: 650 Bytes

Contents

module Xeroizer
  module Record
    
    class CurrencyModel < BaseModel
        
      set_permissions :read, :write

      # Currencies can only be created (added), no update or delete is possible
      def create_method
        :http_put
      end
      
    end
    
    class Currency < Base

      # Currency does not have an ID
      # This method overrides the base model to always treat a Currency as new (so it can be saved)
      # Attempting to update a currency will result in a validation error.	
      def new_record?
      	true
      end
      
      string  :code
      string  :description # read only
      
    end
    
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
xeroizer-3.0.1 lib/xeroizer/models/currency.rb
xeroizer-3.0.0 lib/xeroizer/models/currency.rb
xeroizer-3-pre-beta-3.0.0.pre.beta lib/xeroizer/models/currency.rb
xeroizer-2.20.0 lib/xeroizer/models/currency.rb
xeroizer-2.19.0 lib/xeroizer/models/currency.rb
xeroizer-2.18.1 lib/xeroizer/models/currency.rb