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.



332
333
334
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 332

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)


313
314
315
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 313

def kind
  @kind
end

#product_idString

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

Returns:

  • (String)


318
319
320
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 318

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)


325
326
327
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 325

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)


330
331
332
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 330

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



337
338
339
340
341
342
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 337

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