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

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

The rental duration (for rental offers only).

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) ⇒ RentalDuration

Returns a new instance of RentalDuration



3291
3292
3293
# File 'generated/google/apis/books_v1/classes.rb', line 3291

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

Instance Attribute Details

#countFloat

Corresponds to the JSON property count

Returns:

  • (Float)


3284
3285
3286
# File 'generated/google/apis/books_v1/classes.rb', line 3284

def count
  @count
end

#unitString

Corresponds to the JSON property unit

Returns:

  • (String)


3289
3290
3291
# File 'generated/google/apis/books_v1/classes.rb', line 3289

def unit
  @unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3296
3297
3298
3299
# File 'generated/google/apis/books_v1/classes.rb', line 3296

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @unit = args[:unit] if args.key?(:unit)
end