Module: TipsanityMerchantExtractor::Cj
- Includes:
- BestBuy, OneEightThousandLighting
- Included in:
- FindCj
- Defined in:
- lib/tipsanity_merchant_extractor/cj.rb
Defined Under Namespace
Modules: FindCj
Class Method Summary collapse
Instance Method Summary collapse
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?
Class Method Details
.extended(base) ⇒ Object
7 8 9 10 11 |
# File 'lib/tipsanity_merchant_extractor/cj.rb', line 7 def self.extended(base) if base == AttributeExtractor base.send :include, FindCj end end |
Instance Method Details
#call_to_cj(merchant_url, developer_key, website_id) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tipsanity_merchant_extractor/cj.rb', line 13 def call_to_cj(merchant_url, developer_key, website_id) cj = CommissionJunction.new(developer_key, website_id) case AttributeExtractor.who_is_merchant merchant_url when RegisteredMerchantList::REGISTERED_MERCHANT[:cjunction][:bestbuy] yield find_product_best_buy(merchant_url, cj, {"advertiser-ids" => "notjoined"}) when RegisteredMerchantList::REGISTERED_MERCHANT[:cjunction][:one_eight_thousand_lighting] yield find_product_one_eight_thousand_lighting(merchant_url, cj, {"advertiser-ids" => "notjoined"}) end end |