Class: EbayRequest::Site
- Inherits:
-
Object
- Object
- EbayRequest::Site
- Defined in:
- lib/ebay_request/site.rb
Constant Summary collapse
- KEYS =
%w( globalid id name currency language domain code metric country gtc_available free_placement max_insertion_fee free_pictures subtitle_fee quantity_limits min_fixed_price ).freeze
Instance Method Summary collapse
- #gtc_available? ⇒ Boolean
-
#initialize(hash) ⇒ Site
constructor
A new instance of Site.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
Instance Method Details
#gtc_available? ⇒ Boolean
21 22 23 24 25 26 27 28 29 |
# File 'lib/ebay_request/site.rb', line 21 def gtc_available? return @gtc_available if [true, false].include? @gtc_available raise <<-MESSAGE.gsub(/^ +\|/, "") |We haven't checked whether GTC duration is available on the site #{@id}. |You should explore if GTC is supported by at least one of its categories (see https://developer.ebay.com/devzone/xml/docs/reference/ebay/GetCategoryFeatures.html) |Then you're welcome to make a PR with a resulting value (true|false) added to `config/sites.yml` MESSAGE end |
#to_hash ⇒ Object Also known as: to_h
16 17 18 |
# File 'lib/ebay_request/site.rb', line 16 def to_hash @hash end |