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.14.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.13.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.12.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.11.2 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.11.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.11.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.10.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.9.2 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.9.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.9.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.8.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.8.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.7.5 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.7.4 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.7.3 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.7.2 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.7.1 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.7.0 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.6.7 lib/gotransverse-tract-api/usage/usage_rate.rb
gotransverse-tract-api-0.6.6 lib/gotransverse-tract-api/usage/usage_rate.rb