Class: KondutoNavigation

Inherits:
Object
  • Object
show all
Defined in:
lib/konduto-ruby/konduto_navigation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ KondutoNavigation

Returns a new instance of KondutoNavigation.


5
6
7
8
9
10
11
# File 'lib/konduto-ruby/konduto_navigation.rb', line 5

def initialize(*args)
  unless args[0].nil?
    args[0].each do |k,v|
      instance_variable_set("@#{k}", v) unless v.nil?
    end
  end
end

Instance Attribute Details

#checkout_count_7dObject

Returns the value of attribute checkout_count_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def checkout_count_7d
  @checkout_count_7d
end

#new_accounts_1dObject

Returns the value of attribute new_accounts_1d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def new_accounts_1d
  @new_accounts_1d
end

#new_accounts_7dObject

Returns the value of attribute new_accounts_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def new_accounts_7d
  @new_accounts_7d
end

#password_resets_1dObject

Returns the value of attribute password_resets_1d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def password_resets_1d
  @password_resets_1d
end

#password_resets_7dObject

Returns the value of attribute password_resets_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def password_resets_7d
  @password_resets_7d
end

#referrerObject

Returns the value of attribute referrer


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def referrer
  @referrer
end

#sales_declined_1dObject

Returns the value of attribute sales_declined_1d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def sales_declined_1d
  @sales_declined_1d
end

#sales_declined_7dObject

Returns the value of attribute sales_declined_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def sales_declined_7d
  @sales_declined_7d
end

#session_timeObject

Returns the value of attribute session_time


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def session_time
  @session_time
end

#sessions_1dObject

Returns the value of attribute sessions_1d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def sessions_1d
  @sessions_1d
end

#sessions_7dObject

Returns the value of attribute sessions_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def sessions_7d
  @sessions_7d
end

#time_per_page_7dObject

Returns the value of attribute time_per_page_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def time_per_page_7d
  @time_per_page_7d
end

#time_since_last_saleObject

Returns the value of attribute time_since_last_sale


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def time_since_last_sale
  @time_since_last_sale
end

#time_site_1dObject

Returns the value of attribute time_site_1d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def time_site_1d
  @time_site_1d
end

#time_site_7dObject

Returns the value of attribute time_site_7d


2
3
4
# File 'lib/konduto-ruby/konduto_navigation.rb', line 2

def time_site_7d
  @time_site_7d
end

Instance Method Details

#to_hashObject


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/konduto-ruby/konduto_navigation.rb', line 13

def to_hash
  hash = {
      session_time: self.session_time,
      referrer: self.referrer,
      time_site_1d: self.time_site_1d,
      new_accounts_1d: self.new_accounts_1d,
      password_resets_1d: self.password_resets_1d,
      sales_declined_1d: self.sales_declined_1d,
      sessions_1d: self.sessions_1d,
      time_since_last_sale: self.time_since_last_sale,
      time_site_7d: self.time_site_7d,
      time_per_page_7d: self.time_per_page_7d,
      new_accounts_7d: self.new_accounts_7d,
      password_resets_7d: self.password_resets_7d,
      checkout_count_7d: self.checkout_count_7d,
      sales_declined_7d: self.sales_declined_7d,
      sessions_7d: self.sessions_7d,
  }
  KondutoUtils.remove_nil_keys_from_hash(hash)
end

#to_jsonObject


34
35
36
# File 'lib/konduto-ruby/konduto_navigation.rb', line 34

def to_json
  self.to_hash.to_json
end