Class: Celery::Shop

Inherits:
Base
  • Object
show all
Defined in:
lib/celery/shop.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Celery::Base

Instance Attribute Details

#_idObject

Returns the value of attribute _id.



4
5
6
# File 'lib/celery/shop.rb', line 4

def _id
  @_id
end

#analyticsObject

Returns the value of attribute analytics.



4
5
6
# File 'lib/celery/shop.rb', line 4

def analytics
  @analytics
end

#campaignObject

Returns the value of attribute campaign.



4
5
6
# File 'lib/celery/shop.rb', line 4

def campaign
  @campaign
end

#createdObject

Returns the value of attribute created.



4
5
6
# File 'lib/celery/shop.rb', line 4

def created
  @created
end

#created_dateObject

Returns the value of attribute created_date.



4
5
6
# File 'lib/celery/shop.rb', line 4

def created_date
  @created_date
end

#cssObject

Returns the value of attribute css.



4
5
6
# File 'lib/celery/shop.rb', line 4

def css
  @css
end

#depositObject

Returns the value of attribute deposit.



4
5
6
# File 'lib/celery/shop.rb', line 4

def deposit
  @deposit
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/celery/shop.rb', line 4

def description
  @description
end

#extrasObject

Returns the value of attribute extras.



4
5
6
# File 'lib/celery/shop.rb', line 4

def extras
  @extras
end

#flagsObject

Returns the value of attribute flags.



4
5
6
# File 'lib/celery/shop.rb', line 4

def flags
  @flags
end

#imageObject

Returns the value of attribute image.



4
5
6
# File 'lib/celery/shop.rb', line 4

def image
  @image
end

#metadataObject

Returns the value of attribute metadata.



4
5
6
# File 'lib/celery/shop.rb', line 4

def 
  
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/celery/shop.rb', line 4

def name
  @name
end

#notesObject

Returns the value of attribute notes.



4
5
6
# File 'lib/celery/shop.rb', line 4

def notes
  @notes
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/celery/shop.rb', line 4

def options
  @options
end

#pitchObject

Returns the value of attribute pitch.



4
5
6
# File 'lib/celery/shop.rb', line 4

def pitch
  @pitch
end

#priceObject

Returns the value of attribute price.



4
5
6
# File 'lib/celery/shop.rb', line 4

def price
  @price
end

#publishedObject

Returns the value of attribute published.



4
5
6
# File 'lib/celery/shop.rb', line 4

def published
  @published
end

#quantity_limitObject

Returns the value of attribute quantity_limit.



4
5
6
# File 'lib/celery/shop.rb', line 4

def quantity_limit
  @quantity_limit
end

#shippingObject

Returns the value of attribute shipping.



4
5
6
# File 'lib/celery/shop.rb', line 4

def shipping
  @shipping
end

#slugObject

Returns the value of attribute slug.



4
5
6
# File 'lib/celery/shop.rb', line 4

def slug
  @slug
end

#taglineObject

Returns the value of attribute tagline.



4
5
6
# File 'lib/celery/shop.rb', line 4

def tagline
  @tagline
end

#updatedObject

Returns the value of attribute updated.



4
5
6
# File 'lib/celery/shop.rb', line 4

def updated
  @updated
end

#updated_dateObject

Returns the value of attribute updated_date.



4
5
6
# File 'lib/celery/shop.rb', line 4

def updated_date
  @updated_date
end

#user_idObject

Returns the value of attribute user_id.



4
5
6
# File 'lib/celery/shop.rb', line 4

def user_id
  @user_id
end

#videoObject

Returns the value of attribute video.



4
5
6
# File 'lib/celery/shop.rb', line 4

def video
  @video
end

Class Method Details

.endpoint_pathObject



21
22
23
# File 'lib/celery/shop.rb', line 21

def endpoint_path
  Celery.endpoint + "shop"
end

.get(slug) ⇒ Object



11
12
13
14
# File 'lib/celery/shop.rb', line 11

def get(slug)
  response = HTTParty.get("#{endpoint_path}/#{slug}")
  Celery::Product.new(response["product"])
end

.options(args = {}) ⇒ Object



25
26
27
# File 'lib/celery/shop.rb', line 25

def options(args={})
  Celery.parameterize_options(args)
end

.slugify(slug) ⇒ Object



16
17
18
19
# File 'lib/celery/shop.rb', line 16

def slugify(slug)
  response = HTTParty.get("#{Celery.endpoint}slugify?slug=#{slug}")
  return response["slugify"]
end