class Retailigence::Product

A product from the Retailigence API

Attributes

Public Class Methods

Public Instance Methods

inventory() click to toggle source

Retrieve inventory information for the product and current location.

Returns

Inventory

# File lib/retailigence/product.rb, line 72
def inventory
  @inventory ||= Inventory.fetch(id, location.id)
end
large_image() click to toggle source

Get the large image for the Product

Returns

Image

Example

product.large_image
  # => "http://c.shld.net/rpx/i/s/i/spin/image/spin_prod_837932112"
# File lib/retailigence/product.rb, line 104
def large_image
  @images.select { |image| image.image_name == 'LARGE' }.first
end
small_image() click to toggle source

Get the small image for the Product

Returns

Image

Example

product.small_image
  # => "http://images.bestbuy.com/BestBuy_US/images/products/3021/3021168_54x108_s.gif"
# File lib/retailigence/product.rb, line 92
def small_image
  @images.select { |image| image.image_name == 'SMALL' }.first
end