ZEPETO.Multiplay.Product
类型 | 说明 |
|---|---|
表示 World 内商品相关请求失败原因的错误代码。 | |
表示 World 内商品购买类型的枚举。 | |
表示 World 内商品状态的枚举。 | |
表示 World 内商品类型的枚举。 | |
World 内商品信息。 |
ProductError
enum
表示 World 内商品相关请求失败原因的错误代码。
名称 | 值 | 说明 |
|---|---|---|
Unknown | -1 | 错误:未知错误。 |
NetworkError | 0 | 错误:与网络问题相关的错误,包括连接中断或连接不稳定。 |
PurchaseType
enum
表示 World 内商品购买类型的枚举。
名称 | 值 | 说明 |
|---|---|---|
Consumable | "CONSUMABLE" | 消耗型 World 内商品。 |
NonConsumable | "NON_CONSUMABLE" | 非消耗型 World 内商品。 |
ProductStatus
enum
表示 World 内商品状态的枚举。
名称 | 值 | 说明 |
|---|---|---|
Active | "ACTIVE" | 启用状态。 |
InActive | "INACTIVE" | 停用状态。 |
Forbidden | "FORBIDDEN" | 因使用期限到期而被禁用的状态。 |
ProductType
enum
表示 World 内商品类型的枚举。
名称 | 值 | 说明 |
|---|---|---|
Item | "ITEM" | 单个道具的 World 内商品。 |
ItemPackage | "ITEM_PACKAGE" | 包含多个道具的道具礼包类 World 内商品。 |
CurrencyPackage | "CURRENCY_PACKAGE" | 包含多种货币的货币礼包类 World 内商品。 |
ProductRecord
interface
World 内商品信息。
属性
名称 | 类型 | 说明 |
|---|---|---|
productId | string | World 内商品 ID。 |
name | string | World 内商品名称。 |
price | number | World 内商品价格。 |
purchaseType | World 内商品的 PurchaseType。 | |
status | World 内商品的 ProductStatus。 | |
productType | World 内商品的 ProductType。 | |
currency | { currencyId: string; name: string; isOfficialCurrency: boolean } | 返回购买该 World 内商品所使用的货币类型。 |
itemPackageUnits | { productId: string; itemName: string; quantity: number }[] | 当 ProductType 为 ItemPackage 时,该 World 内商品包含的道具。 |
currencyPackageUnits | { currencyId: string; currencyName: string; quantity: number }[] | 当 ProductType 为 CurrencyPackage 时,该 World 内商品包含的货币。 |