Class: Bing::Content::Api::Product
- Inherits:
-
Object
- Object
- Bing::Content::Api::Product
- Defined in:
- lib/bing/content/api/product.rb
Instance Attribute Summary collapse
-
#availability ⇒ Object
Returns the value of attribute availability.
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#content_language ⇒ Object
Returns the value of attribute content_language.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#image_link ⇒ Object
Returns the value of attribute image_link.
-
#offer_id ⇒ Object
Returns the value of attribute offer_id.
-
#price ⇒ Object
Returns the value of attribute price.
-
#product_category ⇒ Object
Returns the value of attribute product_category.
-
#product_link ⇒ Object
Returns the value of attribute product_link.
-
#product_type ⇒ Object
Returns the value of attribute product_type.
-
#target_country ⇒ Object
Returns the value of attribute target_country.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#availability ⇒ Object
Returns the value of attribute availability.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def availability @availability end |
#channel ⇒ Object
Returns the value of attribute channel.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def channel @channel end |
#condition ⇒ Object
Returns the value of attribute condition.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def condition @condition end |
#content_language ⇒ Object
Returns the value of attribute content_language.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def content_language @content_language end |
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def description @description end |
#image_link ⇒ Object
Returns the value of attribute image_link.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def image_link @image_link end |
#offer_id ⇒ Object
Returns the value of attribute offer_id.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def offer_id @offer_id end |
#price ⇒ Object
Returns the value of attribute price.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def price @price end |
#product_category ⇒ Object
Returns the value of attribute product_category.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def product_category @product_category end |
#product_link ⇒ Object
Returns the value of attribute product_link.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def product_link @product_link end |
#product_type ⇒ Object
Returns the value of attribute product_type.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def product_type @product_type end |
#target_country ⇒ Object
Returns the value of attribute target_country.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def target_country @target_country end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/bing/content/api/product.rb', line 5 def title @title end |
Instance Method Details
#bing_product_id ⇒ Object
7 8 9 |
# File 'lib/bing/content/api/product.rb', line 7 def bing_product_id "#{@channel}:#{@content_language}:#{@target_country}:#{@offer_id}" end |
#to_record ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# 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, } end |