Class: Opera::AdMarvel::Impression

Inherits:
Object
  • Object
show all
Includes:
Reportable
Defined in:
lib/opera/ad_marvel/models/impression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Reportable

#as_payload, #save

Instance Attribute Details

#randomObject

Returns the value of attribute random.



9
10
11
# File 'lib/opera/ad_marvel/models/impression.rb', line 9

def random
  @random
end

#user_idObject

Returns the value of attribute user_id.



9
10
11
# File 'lib/opera/ad_marvel/models/impression.rb', line 9

def user_id
  @user_id
end

Instance Method Details

#attributes_with_payload_keysObject

Override to add random and user_id:



16
17
18
19
20
# File 'lib/opera/ad_marvel/models/impression.rb', line 16

def attributes_with_payload_keys
  super.merge(
    { "cb" => random, "uid" => user_id }.select { |_, value| !value.nil? }
  )
end