Method: Optimizely::SnapshotEvent#as_json

Defined in:
lib/optimizely/event/entity/snapshot_event.rb

#as_jsonObject



40
41
42
43
44
45
46
# File 'lib/optimizely/event/entity/snapshot_event.rb', line 40

def as_json
  hash = {entity_id: @entity_id, uuid: @uuid, key: @key, timestamp: @timestamp}
  hash[:revenue] = @revenue unless @revenue.nil?
  hash[:value] = @value unless @value.nil?
  hash[:tags] = @tags unless @tags.nil?
  hash
end