Module: TipsanityMerchantExtractor::Cj::FindCj
- Includes:
- TipsanityMerchantExtractor::Cj
- Defined in:
- lib/tipsanity_merchant_extractor/cj.rb
Instance Method Summary collapse
Methods included from TipsanityMerchantExtractor::Cj
Methods included from OneEightThousandLighting
#extract_cj_one_eight_thousand_lighting, #find_product_one_eight_thousand_lighting, #is_merchant_cj_one_eight_thousand_lighting?
Methods included from BestBuy
#extract_cj_bestbuy, #find_product_best_buy, #is_merchant_cj_bestbuy?
Instance Method Details
#find_product_cj(merchant_url) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/tipsanity_merchant_extractor/cj.rb', line 28 def find_product_cj merchant_url call_to_cj(merchant_url, [:cj][:developer_key], [:cj][:website_id]) do |product| if product @product_name = product.name @description = product.description @list_price = product.price @currency_code = product.currency @image_url = product.image_url @details_url = product.buy_url @categories = product.advertiser_category @response_object = product @product_token = self.class.extract_cj_bestbuy(@merchant_url){|product_name, query| CGI.parse(query)["skuId"].first} else @product_name = @description = @list_price = @currency_code = @image_url = @details_url = @categories = @response_object = nil end end end |