Module: Shoppr

Defined in:
lib/shoppr.rb,
lib/shoppr/image.rb,
lib/shoppr/offer.rb,
lib/shoppr/store.rb,
lib/shoppr/client.rb,
lib/shoppr/feature.rb,
lib/shoppr/product.rb,
lib/shoppr/category.rb,
lib/shoppr/attribute.rb,
lib/shoppr/api_exception.rb,
lib/shoppr/feature_group.rb,
lib/shoppr/server_detail.rb,
lib/shoppr/feature_rating.rb,
lib/shoppr/keyword_search.rb,
lib/shoppr/search_history.rb,
lib/shoppr/attribute_value.rb,
lib/shoppr/client_tracking.rb,
lib/shoppr/consumer_review.rb,
lib/shoppr/offer_selection.rb,
lib/shoppr/generic_response.rb,
lib/shoppr/product_selection.rb,
lib/shoppr/category_selection.rb,
lib/shoppr/attribute_selection.rb,
lib/shoppr/general_search_response.rb,
lib/shoppr/dynamic_navigation_history.rb

Defined Under Namespace

Classes: APIException, Attribute, AttributeSelection, AttributeValue, Category, CategorySelection, Client, ClientTracking, ConsumerReview, DynamicNavigationHistory, Feature, FeatureGroup, FeatureRating, GeneralSearchResponse, GenericResponse, Image, KeywordSearch, Offer, OfferSelection, Product, ProductSelection, SearchHistory, ServerDetail, Store

Class Method Summary collapse

Class Method Details

.api_keyObject



9
10
11
# File 'lib/shoppr.rb', line 9

def self.api_key
  @api_key ||= 'authorized-key'
end

.api_key=(value) ⇒ Object



13
14
15
# File 'lib/shoppr.rb', line 13

def self.api_key=(value)
  @api_key = value
end

.map_mash_attrs(obj, mash) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/shoppr.rb', line 25

def self.map_mash_attrs(obj, mash)
  attrs = mash.map {|k,v| k.underscore}

  obj.class_eval do
    attr_accessor *attrs
  end
   
  mash.each do |k,v|
    obj.send("#{k.underscore}=", v)
  end
end

.tracking_idObject



17
18
19
# File 'lib/shoppr.rb', line 17

def self.tracking_id
  @tracking_id ||= '7000610'
end

.tracking_id=(value) ⇒ Object



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

def self.tracking_id=(value)
  @tracking_id = value
end