Class: Google::Apis::ReaderrevenuesubscriptionlinkingV1::Entitlement

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

Overview

A single entitlement for a publication reader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Entitlement

Returns a new instance of Entitlement.



70
71
72
# File 'lib/google/apis/readerrevenuesubscriptionlinking_v1/classes.rb', line 70

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

Instance Attribute Details

#detailString

The detail field can carry a description of the SKU that corresponds to what the user has been granted access to. This description, which is opaque to Google, can be displayed in the Google user subscription console for users who linked the subscription to a Google Account. Max 80 character limit. Corresponds to the JSON property detail

Returns:

  • (String)


48
49
50
# File 'lib/google/apis/readerrevenuesubscriptionlinking_v1/classes.rb', line 48

def detail
  @detail
end

#expire_timeString

Required. Expiration time of the entitlement. Entitlements that have expired over 30 days will be purged. The max expire_time is 398 days from now(). Corresponds to the JSON property expireTime

Returns:

  • (String)


54
55
56
# File 'lib/google/apis/readerrevenuesubscriptionlinking_v1/classes.rb', line 54

def expire_time
  @expire_time
end

#product_idString

Required. The publication's product ID that the user has access to. This is the same product ID as can be found in Schema.org markup (http://schema.org/ productID). E.g. "dailybugle.com:basic" Corresponds to the JSON property productId

Returns:

  • (String)


61
62
63
# File 'lib/google/apis/readerrevenuesubscriptionlinking_v1/classes.rb', line 61

def product_id
  @product_id
end

#subscription_tokenString

A source-specific subscription token. This is an opaque string that the publisher provides to Google. This token is opaque and has no meaning to Google. Corresponds to the JSON property subscriptionToken

Returns:

  • (String)


68
69
70
# File 'lib/google/apis/readerrevenuesubscriptionlinking_v1/classes.rb', line 68

def subscription_token
  @subscription_token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



75
76
77
78
79
80
# File 'lib/google/apis/readerrevenuesubscriptionlinking_v1/classes.rb', line 75

def update!(**args)
  @detail = args[:detail] if args.key?(:detail)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @product_id = args[:product_id] if args.key?(:product_id)
  @subscription_token = args[:subscription_token] if args.key?(:subscription_token)
end