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.



370
371
372
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 370

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)


351
352
353
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 351

def kind
  @kind
end

#product_idString

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

Returns:

  • (String)


356
357
358
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 356

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)


363
364
365
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 363

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)


368
369
370
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 368

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



375
376
377
378
379
380
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 375

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