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



1091
1092
1093
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1091

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)


1051
1052
1053
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1051

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)


1057
1058
1059
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1057

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)


1062
1063
1064
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1062

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)


1067
1068
1069
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1067

def order_id
  @order_id
end

#purchase_stateFixnum

The purchase state of the order. Possible values are:

  • Purchased
  • Canceled Corresponds to the JSON property purchaseState

Returns:

  • (Fixnum)


1074
1075
1076
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1074

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)


1080
1081
1082
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1080

def purchase_time_millis
  @purchase_time_millis
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) Corresponds to the JSON property purchaseType

Returns:

  • (Fixnum)


1089
1090
1091
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1089

def purchase_type
  @purchase_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1096
1097
1098
1099
1100
1101
1102
1103
1104
# File 'generated/google/apis/androidpublisher_v3/classes.rb', line 1096

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)
  @order_id = args[:order_id] if args.key?(:order_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_type = args[:purchase_type] if args.key?(:purchase_type)
end