class Google::Apis::AndroidpublisherV2::SubscriptionPurchase

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

Attributes

auto_renewing[RW]

Whether the subscription will automatically be renewed when it reaches its current expiry time. Corresponds to the JSON property `autoRenewing` @return [Boolean]

auto_renewing?[RW]

Whether the subscription will automatically be renewed when it reaches its current expiry time. Corresponds to the JSON property `autoRenewing` @return [Boolean]

cancel_reason[RW]

The cancel reason of the subscription, if the subscription 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` @return [Fixnum]

country_code[RW]

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` @return [String]

developer_payload[RW]

A developer-specified string that contains supplemental information about an order. Corresponds to the JSON property `developerPayload` @return [String]

expiry_time_millis[RW]

Time at which the subscription will expire, in milliseconds since Epoch. Corresponds to the JSON property `expiryTimeMillis` @return [String]

kind[RW]

This kind represents a subscriptionPurchase object in the androidpublisher service. Corresponds to the JSON property `kind` @return [String]

payment_state[RW]

The payment state of the subscription. Possible values are:

  • Payment pending

  • Payment received

Corresponds to the JSON property `paymentState` @return [Fixnum]

price_amount_micros[RW]

Price of the subscription, not including tax. Price is expressed in micro- units, where 1,000,000 micro-units equal 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` @return [String]

price_currency_code[RW]

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` @return [String]

start_time_millis[RW]

Time at which the subscription was granted, in milliseconds since Epoch. Corresponds to the JSON property `startTimeMillis` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/androidpublisher_v2/classes.rb, line 1292
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/androidpublisher_v2/classes.rb, line 1297
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