class Preact::Event

Attributes

account[RW]
external_identifier[RW]
extras[RW]
name[RW]
note[RW]
revenue[RW]
target_id[RW]
thumb_url[RW]
timestamp[RW]

Public Instance Methods

as_json(options={}) click to toggle source
# File lib/preact/objects/event.rb, line 13
def as_json(options={})
  {
    :klass     => "actionevent",
    :name      => self.name,
    :timestamp => self.timestamp,
    :account   => self.account,
    :revenue   => self.revenue,
    :source    => Preact.configuration.user_agent, # version of this logging library

    :note      => self.note,
    :external_identifier => self.target_id || self.external_identifier,
    :extras    => self.extras,
    :links     => self.links.nil? ? nil : self.links.as_json,
    :thumb_url => self.thumb_url,
    :link_url  => self.link_url
  }
end