Class: Google::Apis::AndroidpublisherV2::SubscriptionPurchase

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

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.



1469
1470
1471
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1469

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)


1409
1410
1411
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1409

def auto_renewing
  @auto_renewing
end

#cancel_reasonFixnum

The reason why a subscription was cancelled or is not auto-renewing. Possible values are:

  • User cancelled the subscription
  • Subscription was cancelled by the system, for example because of a billing problem Corresponds to the JSON property cancelReason

Returns:

  • (Fixnum)


1419
1420
1421
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1419

def cancel_reason
  @cancel_reason
end

#country_codeString

ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted. Corresponds to the JSON property countryCode

Returns:

  • (String)


1425
1426
1427
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1425

def country_code
  @country_code
end

#developer_payloadString

A developer-specified string that contains supplemental information about an order. Corresponds to the JSON property developerPayload

Returns:

  • (String)


1431
1432
1433
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1431

def developer_payload
  @developer_payload
end

#expiry_time_millisString

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

Returns:

  • (String)


1436
1437
1438
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1436

def expiry_time_millis
  @expiry_time_millis
end

#kindString

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

Returns:

  • (String)


1442
1443
1444
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1442

def kind
  @kind
end

#payment_stateFixnum

The payment state of the subscription. Possible values are:

  • Payment pending
  • Payment received Corresponds to the JSON property paymentState

Returns:

  • (Fixnum)


1449
1450
1451
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1449

def payment_state
  @payment_state
end

#price_amount_microsString

Price of the subscription, not including tax. Price is expressed in micro- units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000. Corresponds to the JSON property priceAmountMicros

Returns:

  • (String)


1456
1457
1458
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1456

def price_amount_micros
  @price_amount_micros
end

#price_currency_codeString

ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP". Corresponds to the JSON property priceCurrencyCode

Returns:

  • (String)


1462
1463
1464
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1462

def price_currency_code
  @price_currency_code
end

#start_time_millisString

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

Returns:

  • (String)


1467
1468
1469
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1467

def start_time_millis
  @start_time_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1474

def update!(**args)
  @auto_renewing = args[:auto_renewing] if args.key?(:auto_renewing)
  @cancel_reason = args[:cancel_reason] if args.key?(:cancel_reason)
  @country_code = args[:country_code] if args.key?(:country_code)
  @developer_payload = args[:developer_payload] if args.key?(:developer_payload)
  @expiry_time_millis = args[:expiry_time_millis] if args.key?(:expiry_time_millis)
  @kind = args[:kind] if args.key?(:kind)
  @payment_state = args[:payment_state] if args.key?(:payment_state)
  @price_amount_micros = args[:price_amount_micros] if args.key?(:price_amount_micros)
  @price_currency_code = args[:price_currency_code] if args.key?(:price_currency_code)
  @start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
end