Class: Google::Apis::AndroidpublisherV2::Entitlement

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

Overview

An Entitlement resource indicates a user's current entitlement to an inapp item or subscription.

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

Returns a new instance of Entitlement



449
450
451
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 449

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

Instance Attribute Details

#kindString

This kind represents an entitlement object in the androidpublisher service. Corresponds to the JSON property kind

Returns:

  • (String)


430
431
432
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 430

def kind
  @kind
end

#product_idString

The SKU of the product. Corresponds to the JSON property productId

Returns:

  • (String)


435
436
437
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 435

def product_id
  @product_id
end

#product_typeString

The type of the inapp product. Possible values are:

  • In-app item: "inapp"
  • Subscription: "subs" Corresponds to the JSON property productType

Returns:

  • (String)


442
443
444
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 442

def product_type
  @product_type
end

#tokenString

The token which can be verified using the subscriptions or products API. Corresponds to the JSON property token

Returns:

  • (String)


447
448
449
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 447

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



454
455
456
457
458
459
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 454

def update!(**args)
  @kind = args[:kind] if args.key?(:kind)
  @product_id = args[:product_id] if args.key?(:product_id)
  @product_type = args[:product_type] if args.key?(:product_type)
  @token = args[:token] if args.key?(:token)
end