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

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

Defined Under Namespace

Classes: ListPrice, RentalDuration, 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) ⇒ Offer

Returns a new instance of Offer



3113
3114
3115
# File 'generated/google/apis/books_v1/classes.rb', line 3113

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

Instance Attribute Details

#finsky_offer_typeFixnum

The finsky offer type (e.g., PURCHASE=0 RENTAL=3) Corresponds to the JSON property finskyOfferType

Returns:

  • (Fixnum)


3090
3091
3092
# File 'generated/google/apis/books_v1/classes.rb', line 3090

def finsky_offer_type
  @finsky_offer_type
end

#giftableBoolean Also known as: giftable?

Indicates whether the offer is giftable. Corresponds to the JSON property giftable

Returns:

  • (Boolean)


3095
3096
3097
# File 'generated/google/apis/books_v1/classes.rb', line 3095

def giftable
  @giftable
end

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

Offer list (=undiscounted) price in Micros. Corresponds to the JSON property listPrice



3101
3102
3103
# File 'generated/google/apis/books_v1/classes.rb', line 3101

def list_price
  @list_price
end

#rental_durationGoogle::Apis::BooksV1::Volume::SaleInfo::Offer::RentalDuration

The rental duration (for rental offers only). Corresponds to the JSON property rentalDuration



3106
3107
3108
# File 'generated/google/apis/books_v1/classes.rb', line 3106

def rental_duration
  @rental_duration
end

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

Offer retail (=discounted) price in Micros Corresponds to the JSON property retailPrice



3111
3112
3113
# File 'generated/google/apis/books_v1/classes.rb', line 3111

def retail_price
  @retail_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3118
3119
3120
3121
3122
3123
3124
# File 'generated/google/apis/books_v1/classes.rb', line 3118

def update!(**args)
  @finsky_offer_type = args[:finsky_offer_type] if args.key?(:finsky_offer_type)
  @giftable = args[:giftable] if args.key?(:giftable)
  @list_price = args[:list_price] if args.key?(:list_price)
  @rental_duration = args[:rental_duration] if args.key?(:rental_duration)
  @retail_price = args[:retail_price] if args.key?(:retail_price)
end