Class: Google::Apis::BooksV1::Volume::SaleInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/books_v1/classes.rb,
generated/google/apis/books_v1/representations.rb,
generated/google/apis/books_v1/representations.rb

Overview

Any information about a volume related to the eBookstore and/or purchaseability. This information can depend on the country where the request originates from (i.e. books may not be for sale in certain countries).

Defined Under Namespace

Classes: ListPrice, Offer, RetailPrice

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SaleInfo

Returns a new instance of SaleInfo.



3395
3396
3397
# File 'generated/google/apis/books_v1/classes.rb', line 3395

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

URL to purchase this volume on the Google Books site. (In LITE projection) Corresponds to the JSON property buyLink

Returns:

  • (String)


3350
3351
3352
# File 'generated/google/apis/books_v1/classes.rb', line 3350

def buy_link
  @buy_link
end

#countryString

The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) Corresponds to the JSON property country

Returns:

  • (String)


3356
3357
3358
# File 'generated/google/apis/books_v1/classes.rb', line 3356

def country
  @country
end

#is_ebookBoolean Also known as: is_ebook?

Whether or not this volume is an eBook (can be added to the My eBooks shelf). Corresponds to the JSON property isEbook

Returns:

  • (Boolean)


3362
3363
3364
# File 'generated/google/apis/books_v1/classes.rb', line 3362

def is_ebook
  @is_ebook
end

#list_priceGoogle::Apis::BooksV1::Volume::SaleInfo::ListPrice

Suggested retail price. (In LITE projection.) Corresponds to the JSON property listPrice



3368
3369
3370
# File 'generated/google/apis/books_v1/classes.rb', line 3368

def list_price
  @list_price
end

#offersArray<Google::Apis::BooksV1::Volume::SaleInfo::Offer>

Offers available for this volume (sales and rentals). Corresponds to the JSON property offers



3373
3374
3375
# File 'generated/google/apis/books_v1/classes.rb', line 3373

def offers
  @offers
end

#on_sale_dateString

The date on which this book is available for sale. Corresponds to the JSON property onSaleDate

Returns:

  • (String)


3378
3379
3380
# File 'generated/google/apis/books_v1/classes.rb', line 3378

def on_sale_date
  @on_sale_date
end

#retail_priceGoogle::Apis::BooksV1::Volume::SaleInfo::RetailPrice

The actual selling price of the book. This is the same as the suggested retail or list price unless there are offers or discounts on this volume. (In LITE projection.) Corresponds to the JSON property retailPrice



3385
3386
3387
# File 'generated/google/apis/books_v1/classes.rb', line 3385

def retail_price
  @retail_price
end

#saleabilityString

Whether or not this book is available for sale or offered for free in the Google eBookstore for the country listed above. Possible values are FOR_SALE, FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. Corresponds to the JSON property saleability

Returns:

  • (String)


3393
3394
3395
# File 'generated/google/apis/books_v1/classes.rb', line 3393

def saleability
  @saleability
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
# File 'generated/google/apis/books_v1/classes.rb', line 3400

def update!(**args)
  @buy_link = args[:buy_link] if args.key?(:buy_link)
  @country = args[:country] if args.key?(:country)
  @is_ebook = args[:is_ebook] if args.key?(:is_ebook)
  @list_price = args[:list_price] if args.key?(:list_price)
  @offers = args[:offers] if args.key?(:offers)
  @on_sale_date = args[:on_sale_date] if args.key?(:on_sale_date)
  @retail_price = args[:retail_price] if args.key?(:retail_price)
  @saleability = args[:saleability] if args.key?(:saleability)
end