Class: PQSDK::Offer

Inherits:
RemoteObject show all
Defined in:
lib/pqsdk/offer.rb

Overview

The Offer class provides an interface for crawlers to the v1/offers api endpoint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RemoteObject

all, #create, #create!, from_hash, get, #persisted?, #save, #save!, #update, #update!

Instance Attribute Details

#brandObject

Returns the value of attribute brand.



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

def brand
  @brand
end

#btn_online_offers_visibleObject

Returns the value of attribute btn_online_offers_visible.



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

def btn_online_offers_visible
  @btn_online_offers_visible
end

#btn_other_offers_visibleObject

Returns the value of attribute btn_other_offers_visible.



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

def btn_other_offers_visible
  @btn_other_offers_visible
end

Returns the value of attribute btn_partner_link_text.



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

def btn_partner_link_text
  @btn_partner_link_text
end

Returns the value of attribute btn_partner_link_visible.



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

def btn_partner_link_visible
  @btn_partner_link_visible
end

#btn_print_visibleObject

Returns the value of attribute btn_print_visible.



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

def btn_print_visible
  @btn_print_visible
end

#btn_stores_visibleObject

Returns the value of attribute btn_stores_visible.



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

def btn_stores_visible
  @btn_stores_visible
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#discountObject

Returns the value of attribute discount.



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

def discount
  @discount
end

#end_dateObject

Returns the value of attribute end_date.



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

def end_date
  @end_date
end

Returns the value of attribute go_to_partner_link.



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

def go_to_partner_link
  @go_to_partner_link
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#imageObject

Returns the value of attribute image.



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

def image
  @image
end

#nationalObject

Returns the value of attribute national.



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

def national
  @national
end

#original_priceObject

Returns the value of attribute original_price.



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

def original_price
  @original_price
end

Returns the value of attribute partner_link.



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

def partner_link
  @partner_link
end

#priceObject

Returns the value of attribute price.



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

def price
  @price
end

#start_dateObject

Returns the value of attribute start_date.



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

def start_date
  @start_date
end

#store_idsObject

Returns the value of attribute store_ids.



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

def store_ids
  @store_ids
end

#titleObject

Returns the value of attribute title.



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

def title
  @title
end

Instance Method Details

#attributesObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/pqsdk/offer.rb', line 18

def attributes
  {
    'title' => nil, 'description' => nil, 'price' => nil, 'original_price' => nil,
    'discount' => nil, 'start_date' => nil, 'end_date' => nil, 'brand' => nil,
    'image' => nil, 'store_ids' => nil, 'national' => nil, 'partner_link' => nil,
    'go_to_partner_link' => nil, 'btn_other_offers_visible' => nil,
    'btn_partner_link_text' => nil, 'btn_partner_link_visible' => nil,
    'btn_print_visible' => nil, 'btn_stores_visible' => nil, 'btn_online_offers_visible' => nil
  }
end