Class: Google::Books::SaleInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/bookle/google_books_sale_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sale_info) ⇒ SaleInfo

Returns a new instance of SaleInfo.



9
10
11
12
13
14
15
16
17
# File 'lib/bookle/google_books_sale_info.rb', line 9

def initialize(sale_info)
	sale_info 		= {} unless sale_info
  @sale_country = sale_info["country"]
  @saleability  = sale_info["saleability"]
  @is_ebook 		= sale_info["isEbook"]
  @list_price		= Google::Books::ListPrice.new(sale_info["listPrice"])
  @retail_price = Google::Books::RetailPrice.new(sale_info["retailPrice"])
  @buy_link			= sale_info["buyLink"]
end

Instance Attribute Details

Returns the value of attribute buy_link.



7
8
9
# File 'lib/bookle/google_books_sale_info.rb', line 7

def buy_link
  @buy_link
end

#is_ebookObject (readonly)

Returns the value of attribute is_ebook.



7
8
9
# File 'lib/bookle/google_books_sale_info.rb', line 7

def is_ebook
  @is_ebook
end

#list_priceObject (readonly)

Returns the value of attribute list_price.



7
8
9
# File 'lib/bookle/google_books_sale_info.rb', line 7

def list_price
  @list_price
end

#retail_priceObject (readonly)

Returns the value of attribute retail_price.



7
8
9
# File 'lib/bookle/google_books_sale_info.rb', line 7

def retail_price
  @retail_price
end

#sale_countryObject (readonly)

Returns the value of attribute sale_country.



7
8
9
# File 'lib/bookle/google_books_sale_info.rb', line 7

def sale_country
  @sale_country
end

#saleabilityObject (readonly)

Returns the value of attribute saleability.



7
8
9
# File 'lib/bookle/google_books_sale_info.rb', line 7

def saleability
  @saleability
end