Class: Google::Apis::AndroidpublisherV3::ProductPurchase

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

A ProductPurchase resource indicates the status of a user's inapp product purchase.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductPurchase

Returns a new instance of ProductPurchase.



6820
6821
6822
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6820

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

Instance Attribute Details

#acknowledgement_stateFixnum

The acknowledgement state of the inapp product. Possible values are: 0. Yet to be acknowledged 1. Acknowledged Corresponds to the JSON property acknowledgementState

Returns:

  • (Fixnum)


6731
6732
6733
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6731

def acknowledgement_state
  @acknowledgement_state
end

#consumption_stateFixnum

The consumption state of the inapp product. Possible values are: 0. Yet to be consumed 1. Consumed Corresponds to the JSON property consumptionState

Returns:

  • (Fixnum)


6737
6738
6739
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6737

def consumption_state
  @consumption_state
end

#developer_payloadString

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

Returns:

  • (String)


6743
6744
6745
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6743

def developer_payload
  @developer_payload
end

#kindString

This kind represents an inappPurchase object in the androidpublisher service. Corresponds to the JSON property kind

Returns:

  • (String)


6748
6749
6750
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6748

def kind
  @kind
end

#obfuscated_external_account_idString

An obfuscated version of the id that is uniquely associated with the user's account in your app. Only present if specified using https://developer.android. com/reference/com/android/billingclient/api/BillingFlowParams.Builder# setobfuscatedaccountid when the purchase was made. Corresponds to the JSON property obfuscatedExternalAccountId

Returns:

  • (String)


6756
6757
6758
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6756

def 
  @obfuscated_external_account_id
end

#obfuscated_external_profile_idString

An obfuscated version of the id that is uniquely associated with the user's profile in your app. Only present if specified using https://developer.android. com/reference/com/android/billingclient/api/BillingFlowParams.Builder# setobfuscatedprofileid when the purchase was made. Corresponds to the JSON property obfuscatedExternalProfileId

Returns:

  • (String)


6764
6765
6766
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6764

def obfuscated_external_profile_id
  @obfuscated_external_profile_id
end

#order_idString

The order id associated with the purchase of the inapp product. Corresponds to the JSON property orderId

Returns:

  • (String)


6769
6770
6771
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6769

def order_id
  @order_id
end

#product_idString

The inapp product SKU. May not be present. Corresponds to the JSON property productId

Returns:

  • (String)


6774
6775
6776
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6774

def product_id
  @product_id
end

#purchase_stateFixnum

The purchase state of the order. Possible values are: 0. Purchased 1. Canceled

  1. Pending Corresponds to the JSON property purchaseState

Returns:

  • (Fixnum)


6780
6781
6782
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6780

def purchase_state
  @purchase_state
end

#purchase_time_millisFixnum

The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). Corresponds to the JSON property purchaseTimeMillis

Returns:

  • (Fixnum)


6786
6787
6788
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6786

def purchase_time_millis
  @purchase_time_millis
end

#purchase_tokenString

The purchase token generated to identify this purchase. May not be present. Corresponds to the JSON property purchaseToken

Returns:

  • (String)


6791
6792
6793
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6791

def purchase_token
  @purchase_token
end

#purchase_typeFixnum

The type of purchase of the inapp product. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0. Test (i.e. purchased from a license testing account) 1. Promo (i.e. purchased using a promo code). Does not include Play Points purchases. 2. Rewarded (i.e. from watching a video ad instead of paying) Corresponds to the JSON property purchaseType

Returns:

  • (Fixnum)


6800
6801
6802
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6800

def purchase_type
  @purchase_type
end

#quantityFixnum

The quantity associated with the purchase of the inapp product. If not present, the quantity is 1. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


6806
6807
6808
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6806

def quantity
  @quantity
end

#refundable_quantityFixnum

The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects quantity-based partial refunds and full refunds. Corresponds to the JSON property refundableQuantity

Returns:

  • (Fixnum)


6812
6813
6814
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6812

def refundable_quantity
  @refundable_quantity
end

#region_codeString

ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted. Corresponds to the JSON property regionCode

Returns:

  • (String)


6818
6819
6820
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6818

def region_code
  @region_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 6825

def update!(**args)
  @acknowledgement_state = args[:acknowledgement_state] if args.key?(:acknowledgement_state)
  @consumption_state = args[:consumption_state] if args.key?(:consumption_state)
  @developer_payload = args[:developer_payload] if args.key?(:developer_payload)
  @kind = args[:kind] if args.key?(:kind)
  @obfuscated_external_account_id = args[:obfuscated_external_account_id] if args.key?(:obfuscated_external_account_id)
  @obfuscated_external_profile_id = args[:obfuscated_external_profile_id] if args.key?(:obfuscated_external_profile_id)
  @order_id = args[:order_id] if args.key?(:order_id)
  @product_id = args[:product_id] if args.key?(:product_id)
  @purchase_state = args[:purchase_state] if args.key?(:purchase_state)
  @purchase_time_millis = args[:purchase_time_millis] if args.key?(:purchase_time_millis)
  @purchase_token = args[:purchase_token] if args.key?(:purchase_token)
  @purchase_type = args[:purchase_type] if args.key?(:purchase_type)
  @quantity = args[:quantity] if args.key?(:quantity)
  @refundable_quantity = args[:refundable_quantity] if args.key?(:refundable_quantity)
  @region_code = args[:region_code] if args.key?(:region_code)
end