Sha256: 379121438798d2e9f1868e4383ded2f46cb59a9a77a131780a90fbe0270ad9a2

Contents?: true

Size: 517 Bytes

Versions: 16

Compression:

Stored size: 517 Bytes

Contents

module Ecom
  module Core
    class UnitCostSerializer < ActiveModel::Serializer
      attributes :id, :resource_type_id, :quantity, :measurement_unit_id,
                 :price, :currency_id, :utilization_factor, :effective_date, :set_by_id,
                 :resource_type, :measurement_unit, :currency

      def resource_type
        object.resource_type
      end

      def measurement_unit
        object.measurement_unit
      end

      def currency
        object.currency.name
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ecom_core-1.3.14 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.13 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.12 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.11 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.10 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.9 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.8 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.7 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.6 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.5 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.4 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.3 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.2 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.1 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.3.0 app/serializers/ecom/core/unit_cost_serializer.rb
ecom_core-1.2.36 app/serializers/ecom/core/unit_cost_serializer.rb