API/Autodoc/Files/RuStorePurchase.gd.en.md
Source code
# @brief Purchase information.
class_name RuStorePurchase extends RefCounted
# @brief Purchase ID.
var purchaseId = null
# @brief Product ID that was assigned to the product in the RuStore console.
var productId: String = ""
# @brief Product type.
var productType = null
# @brief Invoice ID.
var invoiceId = null
# @brief Language specified using BCP 47 encoding.
var language = null
# @brief Purchase time.
var purchaseTime = null
# Maximum length of 150 characters.
var orderId = null
# @brief Formatted purchase price, including currency sign.
var amountLabel = null
# @brief Price in the smallest currency units (e.g., in kopecks).
var amount = null
# @brief ISO 4217 currency code.
var currency = null
# @brief Product quantity.
var quantity = null
# @brief Purchase state.
var purchaseState = null
# which you can set when initializing the purchase process.
var developerPayload = null
# @brief Token for purchase validation on the server.
var subscriptionToken = null
func _init(json: String = ""):
if json != "":
var obj = JSON.parse_string(json)
if obj.has("purchaseId"): purchaseId = obj["purchaseId"]
productId = obj["productId"]
if obj.has("productType"): productType = ERuStoreProductType.Item.get(obj["productType"])
if obj.has("invoiceId"): invoiceId = obj["invoiceId"]
if obj.has("language"): language = obj["language"]
if obj.has("purchaseTime"): purchaseTime = obj["purchaseTime"]#RuStoreDateTime
if obj.has("orderId"): orderId = obj["orderId"]
if obj.has("amountLabel"): amountLabel = obj["amountLabel"]
if obj.has("amount"): amount = int(obj["amount"])
if obj.has("currency"): currency = obj["currency"]
if obj.has("quantity"): quantity = int(obj["quantity"])
if obj.has("purchaseState"): purchaseState = ERuStorePurchaseState.Item.get(obj["purchaseState"])
if obj.has("developerPayload"): developerPayload = obj["developerPayload"]
if obj.has("subscriptionToken"): subscriptionToken = obj["subscriptionToken"]
- Страницы
- ERuStoreProductStatus.gd.en
- ERuStoreProductStatus.gd
- ERuStoreProductType.gd.en
- ERuStoreProductType.gd
- ERuStorePurchaseState.gd.en
- ERuStorePurchaseState.gd
- ERuStoreTheme.gd.en
- ERuStoreTheme.gd
- RuStoreBillingJsonParser.gd.en
- RuStoreBillingJsonParser.gd
- RuStoreBillingUserAuthorizationStatus.gd.en
- RuStoreBillingUserAuthorizationStatus.gd
- RuStoreError.gd.en
- RuStoreError.gd
- RuStoreFeatureAvailabilityResult.gd.en
- RuStoreFeatureAvailabilityResult.gd
- RuStoreGodotBilling.en
- RuStoreGodotBilling.gd.en
- RuStoreGodotBilling.gd
- RuStoreGodotBilling
- RuStoreGodotCore.en
- RuStoreGodotCore
- RuStorePaymentResult.gd.en
- RuStorePaymentResult.gd
- RuStoreProduct.gd.en
- RuStoreProduct.gd
- RuStoreProductSubscription.gd.en
- RuStoreProductSubscription.gd
- RuStorePurchase.gd.en
- RuStorePurchase.gd
- RuStorePurchaseAvailabilityResult.gd.en
- RuStorePurchaseAvailabilityResult.gd
- RuStoreSubscriptionPeriod.gd.en
- RuStoreSubscriptionPeriod.gd
- addons.en
- addons
- docs.en
- docs
- godot_example.en
- godot_example
- ERuStoreProductStatus.gd.en
- ERuStoreProductStatus.gd
- ERuStoreProductType.gd.en
- ERuStoreProductType.gd
- ERuStorePurchaseState.gd.en
- ERuStorePurchaseState.gd
- ERuStoreTheme.gd.en
- ERuStoreTheme.gd
- RuStoreBillingJsonParser.gd.en
- RuStoreBillingJsonParser.gd
- RuStoreBillingUserAuthorizationStatus.gd.en
- RuStoreBillingUserAuthorizationStatus.gd
- RuStoreError.gd.en
- RuStoreError.gd
- RuStoreFeatureAvailabilityResult.gd.en
- RuStoreFeatureAvailabilityResult.gd
- RuStoreGodotBilling.en
- RuStoreGodotBilling.gd.en
- RuStoreGodotBilling.gd
- RuStoreGodotBilling
- RuStoreGodotCore.en
- RuStoreGodotCore
- RuStorePaymentResult.gd.en
- RuStorePaymentResult.gd
- RuStoreProduct.gd.en
- RuStoreProduct.gd
- RuStoreProductSubscription.gd.en
- RuStoreProductSubscription.gd
- RuStorePurchase.gd.en
- RuStorePurchase.gd
- RuStorePurchaseAvailabilityResult.gd.en
- RuStorePurchaseAvailabilityResult.gd
- RuStoreSubscriptionPeriod.gd.en
- RuStoreSubscriptionPeriod.gd
- addons.en
- addons
- docs.en
- docs
- godot_example.en
- godot_example