class Access::Product

Attributes

location[R]
store[R]

Public Class Methods

new(values) click to toggle source
# File lib/access/product.rb, line 11
def initialize(values)
  @used_fields = []
  set_up_methods(values)
  set_values(values)
  @offer = Access::Offer.new(@offer) if @offer
  @offer_store = Access::Store.new(@offer_store) if @offer_store
  @categories = Access::Category.process_batch(@categories) if @categories
  @links = Access::Link.new(@links) if @links
  @offer_store = Access::Store.new(@offer_store) if @offer_store
  @offer_uses_remaining = Access::Redemption.new(@offer_uses_remaining) if @offer_uses_remaining
end
process_batch(chunk) click to toggle source
# File lib/access/product.rb, line 7
def self.process_batch(chunk)
  chunk.map { |product| new(product) }
end