Class: Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2
- Inherits:
-
Object
- Object
- Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/androidpublisher_v3/classes.rb,
lib/google/apis/androidpublisher_v3/representations.rb,
lib/google/apis/androidpublisher_v3/representations.rb
Overview
Indicates the status of a user's subscription purchase.
Instance Attribute Summary collapse
-
#acknowledgement_state ⇒ String
The acknowledgement state of the subscription.
-
#canceled_state_context ⇒ Google::Apis::AndroidpublisherV3::CanceledStateContext
Information specific to a subscription in the SUBSCRIPTION_STATE_CANCELED or SUBSCRIPTION_STATE_EXPIRED state.
-
#etag ⇒ String
Entity tag representing the current state of the subscription.
-
#external_account_identifiers ⇒ Google::Apis::AndroidpublisherV3::ExternalAccountIdentifiers
User account identifier in the third-party service.
-
#in_grace_period_state_context ⇒ Google::Apis::AndroidpublisherV3::InGracePeriodStateContext
Additional context around subscriptions in IN_GRACE_PERIOD state.
-
#kind ⇒ String
This kind represents a SubscriptionPurchaseV2 object in the androidpublisher service.
-
#latest_order_id ⇒ String
Deprecated: Use line_items.latest_successful_order_id instead.
-
#line_items ⇒ Array<Google::Apis::AndroidpublisherV3::SubscriptionPurchaseLineItem>
Item-level info for a subscription purchase.
-
#linked_purchase_token ⇒ String
The purchase token of the old subscription if this subscription is one of the following: * Re-signup of a canceled but non-lapsed subscription * Upgrade/ downgrade from a previous subscription.
-
#on_hold_state_context ⇒ Google::Apis::AndroidpublisherV3::OnHoldStateContext
Additional context around subscriptions in ON_HOLD state.
-
#out_of_app_purchase_context ⇒ Google::Apis::AndroidpublisherV3::OutOfAppPurchaseContext
Information specific to an out of app purchase.
-
#paused_state_context ⇒ Google::Apis::AndroidpublisherV3::PausedStateContext
Information specific to a subscription in paused state.
-
#region_code ⇒ String
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.
-
#start_time ⇒ String
Time at which the subscription was granted.
-
#subscribe_with_google_info ⇒ Google::Apis::AndroidpublisherV3::SubscribeWithGoogleInfo
Information associated with purchases made with 'Subscribe with Google'.
-
#subscription_state ⇒ String
The current state of the subscription.
-
#test_purchase ⇒ Google::Apis::AndroidpublisherV3::TestPurchase
Whether this subscription purchase is a test purchase.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SubscriptionPurchaseV2
constructor
A new instance of SubscriptionPurchaseV2.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SubscriptionPurchaseV2
Returns a new instance of SubscriptionPurchaseV2.
9200 9201 9202 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9200 def initialize(**args) update!(**args) end |
Instance Attribute Details
#acknowledgement_state ⇒ String
The acknowledgement state of the subscription.
Corresponds to the JSON property acknowledgementState
9102 9103 9104 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9102 def acknowledgement_state @acknowledgement_state end |
#canceled_state_context ⇒ Google::Apis::AndroidpublisherV3::CanceledStateContext
Information specific to a subscription in the SUBSCRIPTION_STATE_CANCELED or
SUBSCRIPTION_STATE_EXPIRED state.
Corresponds to the JSON property canceledStateContext
9108 9109 9110 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9108 def canceled_state_context @canceled_state_context end |
#etag ⇒ String
Entity tag representing the current state of the subscription. The developer
will provide this etag for subscription actions. This etag is always present
for auto-renewing and prepaid subscriptions.
Corresponds to the JSON property etag
9115 9116 9117 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9115 def etag @etag end |
#external_account_identifiers ⇒ Google::Apis::AndroidpublisherV3::ExternalAccountIdentifiers
User account identifier in the third-party service.
Corresponds to the JSON property externalAccountIdentifiers
9120 9121 9122 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9120 def external_account_identifiers @external_account_identifiers end |
#in_grace_period_state_context ⇒ Google::Apis::AndroidpublisherV3::InGracePeriodStateContext
Additional context around subscriptions in IN_GRACE_PERIOD state.
Corresponds to the JSON property inGracePeriodStateContext
9125 9126 9127 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9125 def in_grace_period_state_context @in_grace_period_state_context end |
#kind ⇒ String
This kind represents a SubscriptionPurchaseV2 object in the androidpublisher
service.
Corresponds to the JSON property kind
9131 9132 9133 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9131 def kind @kind end |
#latest_order_id ⇒ String
Deprecated: Use line_items.latest_successful_order_id instead. The order id of
the latest order associated with the purchase of the subscription. For
autoRenewing subscription, this is the order id of signup order if it is not
renewed yet, or the last recurring order id (success, pending, or declined
order). For prepaid subscription, this is the order id associated with the
queried purchase token.
Corresponds to the JSON property latestOrderId
9141 9142 9143 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9141 def latest_order_id @latest_order_id end |
#line_items ⇒ Array<Google::Apis::AndroidpublisherV3::SubscriptionPurchaseLineItem>
Item-level info for a subscription purchase. The items in the same purchase
should be either all with AutoRenewingPlan or all with PrepaidPlan.
Corresponds to the JSON property lineItems
9147 9148 9149 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9147 def line_items @line_items end |
#linked_purchase_token ⇒ String
The purchase token of the old subscription if this subscription is one of the following: * Re-signup of a canceled but non-lapsed subscription * Upgrade/ downgrade from a previous subscription. * Convert from prepaid to auto renewing subscription. * Convert from an auto renewing subscription to prepaid.
- Topup a prepaid subscription.
Corresponds to the JSON property
linkedPurchaseToken
9156 9157 9158 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9156 def linked_purchase_token @linked_purchase_token end |
#on_hold_state_context ⇒ Google::Apis::AndroidpublisherV3::OnHoldStateContext
Additional context around subscriptions in ON_HOLD state.
Corresponds to the JSON property onHoldStateContext
9161 9162 9163 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9161 def on_hold_state_context @on_hold_state_context end |
#out_of_app_purchase_context ⇒ Google::Apis::AndroidpublisherV3::OutOfAppPurchaseContext
Information specific to an out of app purchase.
Corresponds to the JSON property outOfAppPurchaseContext
9166 9167 9168 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9166 def out_of_app_purchase_context @out_of_app_purchase_context end |
#paused_state_context ⇒ Google::Apis::AndroidpublisherV3::PausedStateContext
Information specific to a subscription in paused state.
Corresponds to the JSON property pausedStateContext
9171 9172 9173 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9171 def paused_state_context @paused_state_context end |
#region_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 regionCode
9177 9178 9179 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9177 def region_code @region_code end |
#start_time ⇒ String
Time at which the subscription was granted. Not set for pending subscriptions (
subscription was created but awaiting payment during signup).
Corresponds to the JSON property startTime
9183 9184 9185 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9183 def start_time @start_time end |
#subscribe_with_google_info ⇒ Google::Apis::AndroidpublisherV3::SubscribeWithGoogleInfo
Information associated with purchases made with 'Subscribe with Google'.
Corresponds to the JSON property subscribeWithGoogleInfo
9188 9189 9190 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9188 def subscribe_with_google_info @subscribe_with_google_info end |
#subscription_state ⇒ String
The current state of the subscription.
Corresponds to the JSON property subscriptionState
9193 9194 9195 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9193 def subscription_state @subscription_state end |
#test_purchase ⇒ Google::Apis::AndroidpublisherV3::TestPurchase
Whether this subscription purchase is a test purchase.
Corresponds to the JSON property testPurchase
9198 9199 9200 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9198 def test_purchase @test_purchase end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9205 def update!(**args) @acknowledgement_state = args[:acknowledgement_state] if args.key?(:acknowledgement_state) @canceled_state_context = args[:canceled_state_context] if args.key?(:canceled_state_context) @etag = args[:etag] if args.key?(:etag) @external_account_identifiers = args[:external_account_identifiers] if args.key?(:external_account_identifiers) @in_grace_period_state_context = args[:in_grace_period_state_context] if args.key?(:in_grace_period_state_context) @kind = args[:kind] if args.key?(:kind) @latest_order_id = args[:latest_order_id] if args.key?(:latest_order_id) @line_items = args[:line_items] if args.key?(:line_items) @linked_purchase_token = args[:linked_purchase_token] if args.key?(:linked_purchase_token) @on_hold_state_context = args[:on_hold_state_context] if args.key?(:on_hold_state_context) @out_of_app_purchase_context = args[:out_of_app_purchase_context] if args.key?(:out_of_app_purchase_context) @paused_state_context = args[:paused_state_context] if args.key?(:paused_state_context) @region_code = args[:region_code] if args.key?(:region_code) @start_time = args[:start_time] if args.key?(:start_time) @subscribe_with_google_info = args[:subscribe_with_google_info] if args.key?(:subscribe_with_google_info) @subscription_state = args[:subscription_state] if args.key?(:subscription_state) @test_purchase = args[:test_purchase] if args.key?(:test_purchase) end |