Class: Google::Apis::AndroidpublisherV1::SubscriptionPurchase

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/androidpublisher_v1/classes.rb,
generated/google/apis/androidpublisher_v1/representations.rb,
generated/google/apis/androidpublisher_v1/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.



53
54
55
# File 'generated/google/apis/androidpublisher_v1/classes.rb', line 53

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)


34
35
36
# File 'generated/google/apis/androidpublisher_v1/classes.rb', line 34

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)


40
41
42
# File 'generated/google/apis/androidpublisher_v1/classes.rb', line 40

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)


46
47
48
# File 'generated/google/apis/androidpublisher_v1/classes.rb', line 46

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)


51
52
53
# File 'generated/google/apis/androidpublisher_v1/classes.rb', line 51

def valid_until_timestamp_msec
  @valid_until_timestamp_msec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



58
59
60
61
62
63
# File 'generated/google/apis/androidpublisher_v1/classes.rb', line 58

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