Class: TheTracker::Trackers::Transaction

Inherits:
Struct
  • Object
show all
Defined in:
lib/the_tracker/trackers/g_analytics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cityObject

Returns the value of attribute city



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def city
  @city
end

#countryObject

Returns the value of attribute country



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def country
  @country
end

#idObject

Returns the value of attribute id



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def id
  @id
end

#shippingObject

Returns the value of attribute shipping



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def shipping
  @shipping
end

#stateObject

Returns the value of attribute state



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def state
  @state
end

#storeObject

Returns the value of attribute store



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def store
  @store
end

#taxObject

Returns the value of attribute tax



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def tax
  @tax
end

#totalObject

Returns the value of attribute total



88
89
90
# File 'lib/the_tracker/trackers/g_analytics.rb', line 88

def total
  @total
end

Instance Method Details

#add_item(sku, product, category, price, quantity) ⇒ Object



89
90
91
# File 'lib/the_tracker/trackers/g_analytics.rb', line 89

def add_item(sku, product, category, price, quantity)
  items << Item.new(sku, product, category, price, quantity)
end

#itemsObject



93
94
95
# File 'lib/the_tracker/trackers/g_analytics.rb', line 93

def items
  @items ||= []
end