class Bing::Content::Api::Product
Attributes
availability[RW]
channel[RW]
condition[RW]
content_language[RW]
currency[RW]
custom_label_0[RW]
custom_label_1[RW]
custom_label_2[RW]
custom_label_3[RW]
custom_label_4[RW]
description[RW]
image_link[RW]
offer_id[RW]
price[RW]
product_category[RW]
product_link[RW]
product_type[RW]
target_country[RW]
title[RW]
Public Instance Methods
bing_product_id()
click to toggle source
# File lib/bing/content/api/product.rb, line 7 def bing_product_id "#{@channel}:#{@content_language}:#{@target_country}:#{@offer_id}" end
to_record()
click to toggle source
# File lib/bing/content/api/product.rb, line 11 def to_record { "offerId" => @offer_id, "title" => @title, "description" => @description, "price" => { "currency" => @currency, "value" => @price }, "imageLink" => @image_link, "link" => @product_link, "targetCountry" => @target_country, "contentLanguage" => @content_language, "availability" => @availability, "channel" => @channel, "condition" => @condition, "productType" => @product_type, "googleProductCategory" => @product_category, "customLabel0" => @custom_label_0, "customLabel1" => @custom_label_1, "customLabel2" => @custom_label_2, "customLabel3" => @custom_label_3, "customLabel4" => @custom_label_4, } end