Class: Google::Apis::AndroidpublisherV2::SubscriptionPurchase
- Inherits:
-
Object
- Object
- Google::Apis::AndroidpublisherV2::SubscriptionPurchase
- 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
-
#auto_renewing ⇒ Boolean
(also: #auto_renewing?)
Whether the subscription will automatically be renewed when it reaches its current expiry time.
-
#cancel_reason ⇒ Fixnum
The reason why a subscription was cancelled or is not auto-renewing.
-
#country_code ⇒ String
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.
-
#developer_payload ⇒ String
A developer-specified string that contains supplemental information about an order.
-
#expiry_time_millis ⇒ Fixnum
Time at which the subscription will expire, in milliseconds since the Epoch.
-
#kind ⇒ String
This kind represents a subscriptionPurchase object in the androidpublisher service.
-
#order_id ⇒ String
The order id of the latest recurring order associated with the purchase of the subscription.
-
#payment_state ⇒ Fixnum
The payment state of the subscription.
-
#price_amount_micros ⇒ Fixnum
Price of the subscription, not including tax.
-
#price_currency_code ⇒ String
ISO 4217 currency code for the subscription price.
-
#start_time_millis ⇒ Fixnum
Time at which the subscription was granted, in milliseconds since the Epoch.
-
#user_cancellation_time_millis ⇒ Fixnum
The time at which the subscription was canceled by the user, in milliseconds since the epoch.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SubscriptionPurchase
constructor
A new instance of SubscriptionPurchase.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ SubscriptionPurchase
Returns a new instance of SubscriptionPurchase
1613 1614 1615 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1613 def initialize(**args) update!(**args) end |
Instance Attribute Details
#auto_renewing ⇒ Boolean 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
1539 1540 1541 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1539 def auto_renewing @auto_renewing end |
#cancel_reason ⇒ Fixnum
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
- Subscription was replaced with a new subscription
Corresponds to the JSON property
cancelReason
1550 1551 1552 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1550 def cancel_reason @cancel_reason end |
#country_code ⇒ String
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
1556 1557 1558 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1556 def country_code @country_code end |
#developer_payload ⇒ String
A developer-specified string that contains supplemental information about an
order.
Corresponds to the JSON property developerPayload
1562 1563 1564 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1562 def developer_payload @developer_payload end |
#expiry_time_millis ⇒ Fixnum
Time at which the subscription will expire, in milliseconds since the Epoch.
Corresponds to the JSON property expiryTimeMillis
1567 1568 1569 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1567 def expiry_time_millis @expiry_time_millis end |
#kind ⇒ String
This kind represents a subscriptionPurchase object in the androidpublisher
service.
Corresponds to the JSON property kind
1573 1574 1575 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1573 def kind @kind end |
#order_id ⇒ String
The order id of the latest recurring order associated with the purchase of the
subscription.
Corresponds to the JSON property orderId
1579 1580 1581 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1579 def order_id @order_id end |
#payment_state ⇒ Fixnum
The payment state of the subscription. Possible values are:
- Payment pending
- Payment received
- Free trial
Corresponds to the JSON property
paymentState
1587 1588 1589 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1587 def payment_state @payment_state end |
#price_amount_micros ⇒ Fixnum
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
1594 1595 1596 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1594 def price_amount_micros @price_amount_micros end |
#price_currency_code ⇒ String
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
1600 1601 1602 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1600 def price_currency_code @price_currency_code end |
#start_time_millis ⇒ Fixnum
Time at which the subscription was granted, in milliseconds since the Epoch.
Corresponds to the JSON property startTimeMillis
1605 1606 1607 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1605 def start_time_millis @start_time_millis end |
#user_cancellation_time_millis ⇒ Fixnum
The time at which the subscription was canceled by the user, in milliseconds
since the epoch. Only present if cancelReason is 0.
Corresponds to the JSON property userCancellationTimeMillis
1611 1612 1613 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1611 def user_cancellation_time_millis @user_cancellation_time_millis end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 |
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1618 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) @order_id = args[:order_id] if args.key?(:order_id) @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) @user_cancellation_time_millis = args[:user_cancellation_time_millis] if args.key?(:user_cancellation_time_millis) end |