Class: Google::Apis::AndroidpublisherV2::ProductPurchase

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



1208
1209
1210
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1208

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

Instance Attribute Details

#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)


1182
1183
1184
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1182

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)


1188
1189
1190
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1188

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)


1193
1194
1195
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1193

def kind
  @kind
end

#purchase_stateFixnum

The purchase state of the order. Possible values are:

  • Purchased
  • Cancelled Corresponds to the JSON property purchaseState

Returns:

  • (Fixnum)


1200
1201
1202
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1200

def purchase_state
  @purchase_state
end

#purchase_time_millisString

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

Returns:

  • (String)


1206
1207
1208
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1206

def purchase_time_millis
  @purchase_time_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1213
1214
1215
1216
1217
1218
1219
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 1213

def update!(**args)
  @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)
  @purchase_state = args[:purchase_state] if args.key?(:purchase_state)
  @purchase_time_millis = args[:purchase_time_millis] if args.key?(:purchase_time_millis)
end