Class: Google::Apis::AndroidpublisherV3::ProductPurchase
- Inherits:
-
Object
- Object
- Google::Apis::AndroidpublisherV3::ProductPurchase
- 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
-
#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.
-
#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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ProductPurchase
constructor
A new instance of ProductPurchase.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ProductPurchase
Returns a new instance of ProductPurchase.
1286 1287 1288 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1286 def initialize(**args) update!(**args) end |
Instance Attribute Details
#acknowledgement_state ⇒ Fixnum
The acknowledgement state of the inapp product. Possible values are:
- Yet to be acknowledged
- Acknowledged
Corresponds to the JSON property
acknowledgementState
1222 1223 1224 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1222 def acknowledgement_state @acknowledgement_state end |
#consumption_state ⇒ Fixnum
The consumption state of the inapp product. Possible values are:
- Yet to be consumed
- Consumed
Corresponds to the JSON property
consumptionState
1229 1230 1231 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1229 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
1235 1236 1237 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1235 def developer_payload @developer_payload end |
#kind ⇒ String
This kind represents an inappPurchase object in the androidpublisher service.
Corresponds to the JSON property kind
1240 1241 1242 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1240 def kind @kind end |
#order_id ⇒ String
The order id associated with the purchase of the inapp product.
Corresponds to the JSON property orderId
1245 1246 1247 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1245 def order_id @order_id end |
#product_id ⇒ String
The inapp product SKU.
Corresponds to the JSON property productId
1250 1251 1252 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1250 def product_id @product_id end |
#purchase_state ⇒ Fixnum
The purchase state of the order. Possible values are:
- Purchased
- Canceled
- Pending
Corresponds to the JSON property
purchaseState
1258 1259 1260 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1258 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
1264 1265 1266 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1264 def purchase_time_millis @purchase_time_millis end |
#purchase_token ⇒ String
The purchase token generated to identify this purchase.
Corresponds to the JSON property purchaseToken
1269 1270 1271 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1269 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:
- 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
1279 1280 1281 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1279 def purchase_type @purchase_type end |
#quantity ⇒ Fixnum
The quantity associated with the purchase of the inapp product.
Corresponds to the JSON property quantity
1284 1285 1286 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1284 def quantity @quantity end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 |
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1291 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 |