Module: KM::SaaS

Defined in:
lib/km/saas.rb

Instance Method Summary collapse

Instance Method Details

#billed(amount = nil, description = nil, props = {}) ⇒ Object



20
21
22
23
24
# File 'lib/km/saas.rb', line 20

def billed(amount=nil, description=nil, props={})
  props['Billing Amount']      = amount unless amount.to_s.empty?
  props['Billing Description'] = description unless description.to_s.empty?
  record 'Billed', props
end

#canceled(props = {}) ⇒ Object Also known as: cancelled



26
27
28
# File 'lib/km/saas.rb', line 26

def canceled(props={})
  record 'Canceled', props
end

#downgraded(plan = nil, props = {}) ⇒ Object



15
16
17
18
# File 'lib/km/saas.rb', line 15

def downgraded(plan=nil, props = {})
  props['Plan Name'] = plan unless plan.to_s.empty?
  record 'Downgraded', props
end

#signed_up(plan = nil, props = {}) ⇒ Object Also known as: signedup



4
5
6
7
# File 'lib/km/saas.rb', line 4

def signed_up(plan=nil, props = {})
  props['Plan Name'] = plan unless plan.to_s.empty?
  record 'Signed Up', props
end

#upgraded(plan = nil, props = {}) ⇒ Object



10
11
12
13
# File 'lib/km/saas.rb', line 10

def upgraded(plan=nil, props = {})
  props['Plan Name'] = plan unless plan.to_s.empty?
  record 'Upgraded', props
end

#visited_site(url = nil, referrer = nil, props = {}) ⇒ Object



31
32
33
34
35
# File 'lib/km/saas.rb', line 31

def visited_site(url=nil, referrer=nil, props={})
  props['URL']      = url unless url.to_s.empty?
  props['Referrer'] = referrer unless referrer.to_s.empty?
  record 'Visited Site', props
end