Class: Dawanda::Product
- Inherits:
-
Object
- Object
- Dawanda::Product
- Includes:
- Model
- Defined in:
- lib/dawanda/product.rb
Overview
Listing
Represents a single Dawanda product. Has the following attributes:
- id
-
The unique identifier for this listing
- title
-
The title of this listing
- description
-
This listing’s full description
- view_count
-
The number of times this listing has been viewed
- url
-
The full URL to this listing’s detail page
- price
-
The price of this listing item
- currency
-
The currency that the seller is using for this listing item
- quantity
-
The number of items available for sale
- tags
-
An array of tags that the seller has used for this listing
- materials
-
Any array of materials that was used in the production of this item
Additionally, the following queries on this item are available:
- active?
-
Is this listing active?
- removed?
-
Has this listing been removed?
- sold_out?
-
Is this listing sold out?
- expired?
-
Has this listing expired?
- alchemy?
-
Is this listing an Alchemy item? (i.e. requested by an Dawanda user)
Instance Method Summary collapse
-
#created_at ⇒ Object
Time that this listing was created.
-
#ending_at ⇒ Object
Time that this listing is ending (will be removed from store).
-
#image_25x25 ⇒ Object
The primary image for this listing.
Methods included from Model
Instance Method Details
#created_at ⇒ Object
Time that this listing was created
44 45 46 |
# File 'lib/dawanda/product.rb', line 44 def created_at Time.parse(created) end |
#ending_at ⇒ Object
Time that this listing is ending (will be removed from store)
50 51 52 |
# File 'lib/dawanda/product.rb', line 50 def ending_at Time.parse(ending) end |
#image_25x25 ⇒ Object
The primary image for this listing. See Dawanda::Image for more information
57 58 59 |
# File 'lib/dawanda/product.rb', line 57 def image_25x25 images.first['image_25x25'] end |