Sha256: 1f869becd46aecfe487ce829fcca7c8b364bf1eaa61dcc7d108ee0c98be1de49

Contents?: true

Size: 676 Bytes

Versions: 47

Compression:

Stored size: 676 Bytes

Contents

module GoTransverseTractApi

  module Usage

    class UsageRate

      class << self
        def get_usage_rate(usage_rate)
          usage_rates = {
            attributes: {},
            flatUsageRate: {
              attributes: {
                eid: usage_rate[:flat_usage_rate][:eid],
                uom: usage_rate[:flat_usage_rate][:uom],
                validFrom: usage_rate[:flat_usage_rate][:valid_from],
                validTo: usage_rate[:flat_usage_rate][:valid_to],
                rate: usage_rate[:flat_usage_rate][:rate]
              }.delete_if{|k,v| v.nil?}
            }
          }

          usage_rates
        end
      end

    end

  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
gotransverse-tract-api-0.24.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.23.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.22.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.22.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.21.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.21.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.20.3 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.20.2 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.20.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.20.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.19.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.18.3 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.18.2 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.18.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.18.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.17.2 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.17.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.17.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.16.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.15.0 lib/gotransverse-tract-api/usage/usage_rate.rb