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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/androidpublisher_v3/classes.rb,
generated/google/apis/androidpublisher_v3/representations.rb,
generated/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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ProductPurchase

Returns a new instance of ProductPurchase.



1274
1275
1276
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1274

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

Instance Attribute Details

#acknowledgement_stateFixnum

The acknowledgement state of the inapp product. Possible values are:

  • Yet to be acknowledged
  • Acknowledged Corresponds to the JSON property acknowledgementState

Returns:

  • (Fixnum)


1210
1211
1212
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1210

def acknowledgement_state
  @acknowledgement_state
end

#consumption_stateFixnum

The consumption state of the inapp product. Possible values are:

  • Yet to be consumed
  • Consumed Corresponds to the JSON property consumptionState

Returns:

  • (Fixnum)


1217
1218
1219
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1217

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)


1223
1224
1225
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1223

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)


1228
1229
1230
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1228

def kind
  @kind
end

#order_idString

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

Returns:

  • (String)


1233
1234
1235
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1233

def order_id
  @order_id
end

#product_idString

The inapp product SKU. Corresponds to the JSON property productId

Returns:

  • (String)


1238
1239
1240
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1238

def product_id
  @product_id
end

#purchase_stateFixnum

The purchase state of the order. Possible values are:

  • Purchased
  • Canceled
  • Pending Corresponds to the JSON property purchaseState

Returns:

  • (Fixnum)


1246
1247
1248
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1246

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)


1252
1253
1254
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1252

def purchase_time_millis
  @purchase_time_millis
end

#purchase_tokenString

The purchase token generated to identify this purchase. Corresponds to the JSON property purchaseToken

Returns:

  • (String)


1257
1258
1259
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1257

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:

  • Test (i.e. purchased from a license testing account)
  • Promo (i.e. purchased using a promo code)
  • Rewarded (i.e. from watching a video ad instead of paying) Corresponds to the JSON property purchaseType

Returns:

  • (Fixnum)


1267
1268
1269
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1267

def purchase_type
  @purchase_type
end

#quantityFixnum

The quantity associated with the purchase of the inapp product. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


1272
1273
1274
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1272

def quantity
  @quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1279

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