Class: Kin::Sale

Inherits:
Object
  • Object
show all
Defined in:
lib/sale.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj = {}) ⇒ Sale



8
9
10
11
12
# File 'lib/sale.rb', line 8

def initialize(obj={})
  raise 'Invalid Argument' unless obj.is_a?(Hash)
  init_with_values(obj['name'], obj['sale'], obj['sale_key'], obj['store'], obj['sale_url'], obj['begins'], 
    obj['image_urls'], obj['description'], obj['ends'], obj['products'])
end

Instance Attribute Details

#beginsObject

Returns the value of attribute begins.



6
7
8
# File 'lib/sale.rb', line 6

def begins
  @begins
end

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/sale.rb', line 6

def description
  @description
end

#endsObject

Returns the value of attribute ends.



6
7
8
# File 'lib/sale.rb', line 6

def ends
  @ends
end

#image_urlsObject

Returns the value of attribute image_urls.



6
7
8
# File 'lib/sale.rb', line 6

def image_urls
  @image_urls
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/sale.rb', line 6

def name
  @name
end

#productsObject

Returns the value of attribute products.



6
7
8
# File 'lib/sale.rb', line 6

def products
  @products
end

#saleObject

Returns the value of attribute sale.



6
7
8
# File 'lib/sale.rb', line 6

def sale
  @sale
end

#sale_keyObject

Returns the value of attribute sale_key.



6
7
8
# File 'lib/sale.rb', line 6

def sale_key
  @sale_key
end

#sale_urlObject

Returns the value of attribute sale_url.



6
7
8
# File 'lib/sale.rb', line 6

def sale_url
  @sale_url
end

#storeObject

Returns the value of attribute store.



6
7
8
# File 'lib/sale.rb', line 6

def store
  @store
end