class Google::Apis::AndroidpublisherV3::ProductPurchase

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

Attributes

acknowledgement_state[RW]

The acknowledgement state of the inapp product. Possible values are: 0. Yet to be acknowledged 1. Acknowledged Corresponds to the JSON property `acknowledgementState` @return [Fixnum]

consumption_state[RW]

The consumption state of the inapp product. Possible values are: 0. Yet to be consumed 1. Consumed Corresponds to the JSON property `consumptionState` @return [Fixnum]

developer_payload[RW]

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

kind[RW]

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

obfuscated_external_account_id[RW]

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

obfuscated_external_profile_id[RW]

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

order_id[RW]

The order id associated with the purchase of the inapp product. Corresponds to the JSON property `orderId` @return [String]

product_id[RW]

The inapp product SKU. Corresponds to the JSON property `productId` @return [String]

purchase_state[RW]

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

  1. Pending

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

purchase_time_millis[RW]

The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). Corresponds to the JSON property `purchaseTimeMillis` @return [Fixnum]

purchase_token[RW]

The purchase token generated to identify this purchase. Corresponds to the JSON property `purchaseToken` @return [String]

purchase_type[RW]

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) 2. Rewarded (i.e. from watching a video ad instead of paying) Corresponds to the JSON property `purchaseType` @return [Fixnum]

quantity[RW]

The quantity associated with the purchase of the inapp product. Corresponds to the JSON property `quantity` @return [Fixnum]

region_code[RW]

ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted. Corresponds to the JSON property `regionCode` @return [String]

Public Class Methods

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

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/androidpublisher_v3/classes.rb, line 1239
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)
  @region_code = args[:region_code] if args.key?(:region_code)
end