Class: Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase

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

Overview

A SubscriptionPurchase resource indicates the status of a user's subscription purchase.

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

Returns a new instance of SubscriptionPurchase



119
120
121
# File 'generated/google/apis/androidpublisher_v1_1/classes.rb', line 119

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

Instance Attribute Details

#auto_renewingBoolean Also known as: auto_renewing?

Whether the subscription will automatically be renewed when it reaches its current expiry time. Corresponds to the JSON property autoRenewing

Returns:

  • (Boolean)


100
101
102
# File 'generated/google/apis/androidpublisher_v1_1/classes.rb', line 100

def auto_renewing
  @auto_renewing
end

#initiation_timestamp_msecFixnum

Time at which the subscription was granted, in milliseconds since the Epoch. Corresponds to the JSON property initiationTimestampMsec

Returns:

  • (Fixnum)


106
107
108
# File 'generated/google/apis/androidpublisher_v1_1/classes.rb', line 106

def initiation_timestamp_msec
  @initiation_timestamp_msec
end

#kindString

This kind represents a subscriptionPurchase object in the androidpublisher service. Corresponds to the JSON property kind

Returns:

  • (String)


112
113
114
# File 'generated/google/apis/androidpublisher_v1_1/classes.rb', line 112

def kind
  @kind
end

#valid_until_timestamp_msecFixnum

Time at which the subscription will expire, in milliseconds since the Epoch. Corresponds to the JSON property validUntilTimestampMsec

Returns:

  • (Fixnum)


117
118
119
# File 'generated/google/apis/androidpublisher_v1_1/classes.rb', line 117

def valid_until_timestamp_msec
  @valid_until_timestamp_msec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



124
125
126
127
128
129
# File 'generated/google/apis/androidpublisher_v1_1/classes.rb', line 124

def update!(**args)
  @auto_renewing = args[:auto_renewing] if args.key?(:auto_renewing)
  @initiation_timestamp_msec = args[:initiation_timestamp_msec] if args.key?(:initiation_timestamp_msec)
  @kind = args[:kind] if args.key?(:kind)
  @valid_until_timestamp_msec = args[:valid_until_timestamp_msec] if args.key?(:valid_until_timestamp_msec)
end