Class: Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SubscriptionPurchaseV2

Returns a new instance of SubscriptionPurchaseV2.



9030
9031
9032
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9030

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#acknowledgement_stateString

The acknowledgement state of the subscription. Corresponds to the JSON property acknowledgementState

Returns:

  • (String)


8942
8943
8944
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8942

def acknowledgement_state
  @acknowledgement_state
end

#canceled_state_contextGoogle::Apis::AndroidpublisherV3::CanceledStateContext

Information specific to a subscription in the SUBSCRIPTION_STATE_CANCELED or SUBSCRIPTION_STATE_EXPIRED state. Corresponds to the JSON property canceledStateContext



8948
8949
8950
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8948

def canceled_state_context
  @canceled_state_context
end

#etagString

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

Returns:

  • (String)


8955
8956
8957
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8955

def etag
  @etag
end

#external_account_identifiersGoogle::Apis::AndroidpublisherV3::ExternalAccountIdentifiers

User account identifier in the third-party service. Corresponds to the JSON property externalAccountIdentifiers



8960
8961
8962
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8960

def 
  @external_account_identifiers
end

#kindString

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

Returns:

  • (String)


8966
8967
8968
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8966

def kind
  @kind
end

#latest_order_idString

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

Returns:

  • (String)


8976
8977
8978
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8976

def latest_order_id
  @latest_order_id
end

#line_itemsArray<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



8982
8983
8984
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8982

def line_items
  @line_items
end

#linked_purchase_tokenString

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

Returns:

  • (String)


8991
8992
8993
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8991

def linked_purchase_token
  @linked_purchase_token
end

#out_of_app_purchase_contextGoogle::Apis::AndroidpublisherV3::OutOfAppPurchaseContext

Information specific to an out of app purchase. Corresponds to the JSON property outOfAppPurchaseContext



8996
8997
8998
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 8996

def out_of_app_purchase_context
  @out_of_app_purchase_context
end

#paused_state_contextGoogle::Apis::AndroidpublisherV3::PausedStateContext

Information specific to a subscription in paused state. Corresponds to the JSON property pausedStateContext



9001
9002
9003
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9001

def paused_state_context
  @paused_state_context
end

#region_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 regionCode

Returns:

  • (String)


9007
9008
9009
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9007

def region_code
  @region_code
end

#start_timeString

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

Returns:

  • (String)


9013
9014
9015
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9013

def start_time
  @start_time
end

#subscribe_with_google_infoGoogle::Apis::AndroidpublisherV3::SubscribeWithGoogleInfo

Information associated with purchases made with 'Subscribe with Google'. Corresponds to the JSON property subscribeWithGoogleInfo



9018
9019
9020
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9018

def subscribe_with_google_info
  @subscribe_with_google_info
end

#subscription_stateString

The current state of the subscription. Corresponds to the JSON property subscriptionState

Returns:

  • (String)


9023
9024
9025
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9023

def subscription_state
  @subscription_state
end

#test_purchaseGoogle::Apis::AndroidpublisherV3::TestPurchase

Whether this subscription purchase is a test purchase. Corresponds to the JSON property testPurchase



9028
9029
9030
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9028

def test_purchase
  @test_purchase
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 9035

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)
  @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)
  @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