Sha256: 28b95eda1cb954a0109b737b03726fe69c5ad4be39ed512fab54487ca68c20a4

Contents?: true

Size: 912 Bytes

Versions: 1

Compression:

Stored size: 912 Bytes

Contents

module ReplayApi
  class EventProperties < Model

    attribute :amount, Float
    attribute :app_version, String
    attribute :client_os, String
    attribute :client_sdk, String
    attribute :device_brand, String
    attribute :device_carrier, String
    attribute :device_id, String
    attribute :device_manufacturer, String
    attribute :device_model, String
    attribute :device_type, String
    attribute :country, String
    attribute :event_category, String, default: 'general'
    attribute :ip, String
    attribute :language, String
    attribute :latitude, String
    attribute :longitude, String
    attribute :page_name, String
    attribute :page_url, String
    attribute :past_event, Integer, default: 0
    attribute :timestamp, Integer, default: -> (_, _) { clock.now.to_i }

    def self.clock=(val)
      @clock = val
    end

    def self.clock
      @clock ||= Time
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
replay_api-0.0.3 lib/replay_api/event_properties.rb