Class: Google::Apis::BooksV1::Volume::UserInfo

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

User specific information related to this volume. (e.g. page this user last read or whether they purchased this book)

Defined Under Namespace

Classes: Copy, FamilySharing, RentalPeriod, UserUploadedVolumeInfo

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

Returns a new instance of UserInfo.



3516
3517
3518
# File 'generated/google/apis/books_v1/classes.rb', line 3516

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

Instance Attribute Details

#acquired_timeDateTime

Timestamp when this volume was acquired by the user. (RFC 3339 UTC date-time format) Acquiring includes purchase, user upload, receiving family sharing, etc. Corresponds to the JSON property acquiredTime

Returns:

  • (DateTime)


3411
3412
3413
# File 'generated/google/apis/books_v1/classes.rb', line 3411

def acquired_time
  @acquired_time
end

#acquisition_typeFixnum

How this volume was acquired. Corresponds to the JSON property acquisitionType

Returns:

  • (Fixnum)


3416
3417
3418
# File 'generated/google/apis/books_v1/classes.rb', line 3416

def acquisition_type
  @acquisition_type
end

#copyGoogle::Apis::BooksV1::Volume::UserInfo::Copy

Copy/Paste accounting information. Corresponds to the JSON property copy



3421
3422
3423
# File 'generated/google/apis/books_v1/classes.rb', line 3421

def copy
  @copy
end

#entitlement_typeFixnum

Whether this volume is purchased, sample, pd download etc. Corresponds to the JSON property entitlementType

Returns:

  • (Fixnum)


3426
3427
3428
# File 'generated/google/apis/books_v1/classes.rb', line 3426

def entitlement_type
  @entitlement_type
end

#family_sharingGoogle::Apis::BooksV1::Volume::UserInfo::FamilySharing

Information on the ability to share with the family. Corresponds to the JSON property familySharing



3431
3432
3433
# File 'generated/google/apis/books_v1/classes.rb', line 3431

def family_sharing
  @family_sharing
end

#is_family_shared_from_userBoolean Also known as: is_family_shared_from_user?

Whether or not the user shared this volume with the family. Corresponds to the JSON property isFamilySharedFromUser

Returns:

  • (Boolean)


3436
3437
3438
# File 'generated/google/apis/books_v1/classes.rb', line 3436

def is_family_shared_from_user
  @is_family_shared_from_user
end

#is_family_shared_to_userBoolean Also known as: is_family_shared_to_user?

Whether or not the user received this volume through family sharing. Corresponds to the JSON property isFamilySharedToUser

Returns:

  • (Boolean)


3442
3443
3444
# File 'generated/google/apis/books_v1/classes.rb', line 3442

def is_family_shared_to_user
  @is_family_shared_to_user
end

#is_family_sharing_allowedBoolean Also known as: is_family_sharing_allowed?

Deprecated: Replaced by familySharing. Corresponds to the JSON property isFamilySharingAllowed

Returns:

  • (Boolean)


3448
3449
3450
# File 'generated/google/apis/books_v1/classes.rb', line 3448

def is_family_sharing_allowed
  @is_family_sharing_allowed
end

#is_family_sharing_disabled_by_fopBoolean Also known as: is_family_sharing_disabled_by_fop?

Deprecated: Replaced by familySharing. Corresponds to the JSON property isFamilySharingDisabledByFop

Returns:

  • (Boolean)


3454
3455
3456
# File 'generated/google/apis/books_v1/classes.rb', line 3454

def is_family_sharing_disabled_by_fop
  @is_family_sharing_disabled_by_fop
end

#is_in_my_booksBoolean Also known as: is_in_my_books?

Whether or not this volume is currently in "my books." Corresponds to the JSON property isInMyBooks

Returns:

  • (Boolean)


3460
3461
3462
# File 'generated/google/apis/books_v1/classes.rb', line 3460

def is_in_my_books
  @is_in_my_books
end

#is_preorderedBoolean Also known as: is_preordered?

Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.) Corresponds to the JSON property isPreordered

Returns:

  • (Boolean)


3467
3468
3469
# File 'generated/google/apis/books_v1/classes.rb', line 3467

def is_preordered
  @is_preordered
end

#is_purchasedBoolean Also known as: is_purchased?

Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.) Corresponds to the JSON property isPurchased

Returns:

  • (Boolean)


3474
3475
3476
# File 'generated/google/apis/books_v1/classes.rb', line 3474

def is_purchased
  @is_purchased
end

#is_uploadedBoolean Also known as: is_uploaded?

Whether or not this volume was user uploaded. Corresponds to the JSON property isUploaded

Returns:

  • (Boolean)


3480
3481
3482
# File 'generated/google/apis/books_v1/classes.rb', line 3480

def is_uploaded
  @is_uploaded
end

#reading_positionGoogle::Apis::BooksV1::ReadingPosition

The user's current reading position in the volume, if one is available. (In LITE projection.) Corresponds to the JSON property readingPosition



3487
3488
3489
# File 'generated/google/apis/books_v1/classes.rb', line 3487

def reading_position
  @reading_position
end

#rental_periodGoogle::Apis::BooksV1::Volume::UserInfo::RentalPeriod

Period during this book is/was a valid rental. Corresponds to the JSON property rentalPeriod



3492
3493
3494
# File 'generated/google/apis/books_v1/classes.rb', line 3492

def rental_period
  @rental_period
end

#rental_stateString

Whether this book is an active or an expired rental. Corresponds to the JSON property rentalState

Returns:

  • (String)


3497
3498
3499
# File 'generated/google/apis/books_v1/classes.rb', line 3497

def rental_state
  @rental_state
end

#reviewGoogle::Apis::BooksV1::Review

This user's review of this volume, if one exists. Corresponds to the JSON property review



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

def review
  @review
end

#updatedDateTime

Timestamp when this volume was last modified by a user action, such as a reading position update, volume purchase or writing a review. (RFC 3339 UTC date-time format). Corresponds to the JSON property updated

Returns:

  • (DateTime)


3509
3510
3511
# File 'generated/google/apis/books_v1/classes.rb', line 3509

def updated
  @updated
end

#user_uploaded_volume_infoGoogle::Apis::BooksV1::Volume::UserInfo::UserUploadedVolumeInfo

Corresponds to the JSON property userUploadedVolumeInfo



3514
3515
3516
# File 'generated/google/apis/books_v1/classes.rb', line 3514

def user_uploaded_volume_info
  @user_uploaded_volume_info
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
# File 'generated/google/apis/books_v1/classes.rb', line 3521

def update!(**args)
  @acquired_time = args[:acquired_time] if args.key?(:acquired_time)
  @acquisition_type = args[:acquisition_type] if args.key?(:acquisition_type)
  @copy = args[:copy] if args.key?(:copy)
  @entitlement_type = args[:entitlement_type] if args.key?(:entitlement_type)
  @family_sharing = args[:family_sharing] if args.key?(:family_sharing)
  @is_family_shared_from_user = args[:is_family_shared_from_user] if args.key?(:is_family_shared_from_user)
  @is_family_shared_to_user = args[:is_family_shared_to_user] if args.key?(:is_family_shared_to_user)
  @is_family_sharing_allowed = args[:is_family_sharing_allowed] if args.key?(:is_family_sharing_allowed)
  @is_family_sharing_disabled_by_fop = args[:is_family_sharing_disabled_by_fop] if args.key?(:is_family_sharing_disabled_by_fop)
  @is_in_my_books = args[:is_in_my_books] if args.key?(:is_in_my_books)
  @is_preordered = args[:is_preordered] if args.key?(:is_preordered)
  @is_purchased = args[:is_purchased] if args.key?(:is_purchased)
  @is_uploaded = args[:is_uploaded] if args.key?(:is_uploaded)
  @reading_position = args[:reading_position] if args.key?(:reading_position)
  @rental_period = args[:rental_period] if args.key?(:rental_period)
  @rental_state = args[:rental_state] if args.key?(:rental_state)
  @review = args[:review] if args.key?(:review)
  @updated = args[:updated] if args.key?(:updated)
  @user_uploaded_volume_info = args[:user_uploaded_volume_info] if args.key?(:user_uploaded_volume_info)
end