Class: Google::Apis::AndroidpublisherV3::ProductPurchase
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::AndroidpublisherV3::ProductPurchase
 
 
- 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
- 
  
    
      #acknowledgement_state  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The acknowledgement state of the inapp product.
 - 
  
    
      #consumption_state  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The consumption state of the inapp product.
 - 
  
    
      #developer_payload  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
A developer-specified string that contains supplemental information about an order.
 - 
  
    
      #kind  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
This kind represents an inappPurchase object in the androidpublisher service.
 - 
  
    
      #obfuscated_external_account_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
An obfuscated version of the id that is uniquely associated with the user's account in your app.
 - 
  
    
      #obfuscated_external_profile_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
An obfuscated version of the id that is uniquely associated with the user's profile in your app.
 - 
  
    
      #order_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The order id associated with the purchase of the inapp product.
 - 
  
    
      #product_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The inapp product SKU.
 - 
  
    
      #purchase_state  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The purchase state of the order.
 - 
  
    
      #purchase_time_millis  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
 - 
  
    
      #purchase_token  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The purchase token generated to identify this purchase.
 - 
  
    
      #purchase_type  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The type of purchase of the inapp product.
 - 
  
    
      #quantity  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The quantity associated with the purchase of the inapp product.
 - 
  
    
      #refundable_quantity  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The quantity eligible for refund, i.e.
 - 
  
    
      #region_code  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ ProductPurchase 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of ProductPurchase.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Constructor Details
#initialize(**args) ⇒ ProductPurchase
Returns a new instance of ProductPurchase.
      4424 4425 4426  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4424 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#acknowledgement_state ⇒ Fixnum
The acknowledgement state of the inapp product. Possible values are: 0. Yet to
be acknowledged 1. Acknowledged
Corresponds to the JSON property acknowledgementState
      4335 4336 4337  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4335 def acknowledgement_state @acknowledgement_state end  | 
  
#consumption_state ⇒ Fixnum
The consumption state of the inapp product. Possible values are: 0. Yet to be
consumed 1. Consumed
Corresponds to the JSON property consumptionState
      4341 4342 4343  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4341 def consumption_state @consumption_state end  | 
  
#developer_payload ⇒ String
A developer-specified string that contains supplemental information about an
order.
Corresponds to the JSON property developerPayload
      4347 4348 4349  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4347 def developer_payload @developer_payload end  | 
  
#kind ⇒ String
This kind represents an inappPurchase object in the androidpublisher service.
Corresponds to the JSON property kind
      4352 4353 4354  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4352 def kind @kind end  | 
  
#obfuscated_external_account_id ⇒ String
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
      4360 4361 4362  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4360 def @obfuscated_external_account_id end  | 
  
#obfuscated_external_profile_id ⇒ String
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
      4368 4369 4370  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4368 def @obfuscated_external_profile_id end  | 
  
#order_id ⇒ String
The order id associated with the purchase of the inapp product.
Corresponds to the JSON property orderId
      4373 4374 4375  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4373 def order_id @order_id end  | 
  
#product_id ⇒ String
The inapp product SKU. May not be present.
Corresponds to the JSON property productId
      4378 4379 4380  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4378 def product_id @product_id end  | 
  
#purchase_state ⇒ Fixnum
The purchase state of the order. Possible values are: 0. Purchased 1. Canceled
- Pending
Corresponds to the JSON property 
purchaseState 
      4384 4385 4386  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4384 def purchase_state @purchase_state end  | 
  
#purchase_time_millis ⇒ Fixnum
The time the product was purchased, in milliseconds since the epoch (Jan 1,
1970).
Corresponds to the JSON property purchaseTimeMillis
      4390 4391 4392  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4390 def purchase_time_millis @purchase_time_millis end  | 
  
#purchase_token ⇒ String
The purchase token generated to identify this purchase. May not be present.
Corresponds to the JSON property purchaseToken
      4395 4396 4397  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4395 def purchase_token @purchase_token end  | 
  
#purchase_type ⇒ Fixnum
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
      4404 4405 4406  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4404 def purchase_type @purchase_type end  | 
  
#quantity ⇒ Fixnum
The quantity associated with the purchase of the inapp product. If not present,
the quantity is 1.
Corresponds to the JSON property quantity
      4410 4411 4412  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4410 def quantity @quantity end  | 
  
#refundable_quantity ⇒ Fixnum
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
      4416 4417 4418  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4416 def refundable_quantity @refundable_quantity end  | 
  
#region_code ⇒ String
ISO 3166-1 alpha-2 billing region code of the user at the time the product was
granted.
Corresponds to the JSON property regionCode
      4422 4423 4424  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4422 def region_code @region_code end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445  | 
    
      # File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4429 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  |