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

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

Overview

The rental duration (for rental offers only).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RentalDuration

Returns a new instance of RentalDuration.



3502
3503
3504
# File 'lib/google/apis/books_v1/classes.rb', line 3502

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

Instance Attribute Details

#countFloat

Corresponds to the JSON property count

Returns:

  • (Float)


3495
3496
3497
# File 'lib/google/apis/books_v1/classes.rb', line 3495

def count
  @count
end

#unitString

Corresponds to the JSON property unit

Returns:

  • (String)


3500
3501
3502
# File 'lib/google/apis/books_v1/classes.rb', line 3500

def unit
  @unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3507
3508
3509
3510
# File 'lib/google/apis/books_v1/classes.rb', line 3507

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