Sha256: a11cc28f2b0c7a07c2eb6e7a09dc24f2a9b586638672be2d1b1dfd498bcb2f80

Contents?: true

Size: 841 Bytes

Versions: 9

Compression:

Stored size: 841 Bytes

Contents

module Logistics
  module Core
    class ContractKilogramMinimumRateSerializer < ActiveModel::Serializer
      attributes :id, :service_delivery_unit_id, :service_delivery_unit_name, :chargeable_service_id,
                 :chargeable_service_name, :contract_id, :transaction_type_id, :transaction_type_name,
                 :minimum_price

      def service_delivery_unit_id
        object.chargeable_service_unit_of_charge&.service_delivery_unit_id
      end

      def service_delivery_unit_name
        object.chargeable_service_unit_of_charge&.service_delivery_unit&.name
      end

      def chargeable_service_id
        object.chargeable_service_unit_of_charge&.chargeable_service_id
      end

      def chargeable_service_name
        object.chargeable_service_unit_of_charge&.chargeable_service&.name
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-21.11.1 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-21.08.1 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-21.03.1 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-20.10.3 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-20.10.2 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-20.10.1 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-20.9.1 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb
logistics_core-20.8.1 app/serializers/logistics/core/contract_kilogram_minimum_rate_serializer.rb