Sha256: 69a934b54649abca0ff8c5c1c45b4c295680ec1ee565220abe28460276169545

Contents?: true

Size: 634 Bytes

Versions: 3

Compression:

Stored size: 634 Bytes

Contents

# frozen_string_literal :true

module ActionTracker
  module Models
    class StatisticRecord < ActionTracker::Models::ApplicationRecord
      include ActionTracker::HttpGateway

      attribute :user_id, Integer
      attribute :report_date, String
      attribute :total_count, Integer
      attribute :targets, Hash

      def count(params = {})
        request processed_path(collection_path, params)
      end

      def daily(params = {})
        path = processed_path("#{collection_path}/daily", params)
        parse_response request(path)
      end

      def collection_path
        'statistics'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
action_tracker_client-0.1.6 lib/action_tracker/models/statistic_record.rb
action_tracker_client-0.1.5 lib/action_tracker/models/statistic_record.rb
action_tracker_client-0.1.4 lib/action_tracker/models/statistic_record.rb