ZEPETO.Inventory
Type | Description |
|---|---|
The InventoryListResponse class provides the API call result and the product inventory information list. | |
Inventory product information. | |
The InventoryResponse class provides the API call result and the retrieved inventory product information. | |
InventoryService manages operations associated with the player's in-World product inventory. | |
Class for checking the existence of a specific product in a user's inventory. | |
Class representing the response for checking the existence of a product in the inventory. | |
The error code specifies the reason for the failure of inventory-related requests. |
InventoryListResponse
class · extends ProductBaseResponse
The InventoryListResponse class provides the API call result and the product inventory information list.
Properties
Name | Type | Description |
|---|---|---|
products | List of product inventory information. |
InventoryRecord
class
Inventory product information.
Properties
Name | Type | Description |
|---|---|---|
productId | string | Product ID. |
quantity | bigint | Quantity of the product. |
createdAt | Date | Date and time when the product was added to the inventory. |
updatedAt | Date | Date and time when the product information was last updated. |
InventoryResponse
class · extends ProductBaseResponse
The InventoryResponse class provides the API call result and the retrieved inventory product information.
Properties
Name | Type | Description |
|---|---|---|
product | Inventory product information. |
InventoryService
class
InventoryService manages operations associated with the player's in-World product inventory.
Methods
GetListAsync
static GetListAsync() → BaseRequest<InventoryListResponse>
This asynchronous method retrieves the player's inventory product information list.
Returns: BaseRequest<InventoryListResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the InventoryListResponse object by the responseData property.
GetAsync
static GetAsync(productId: string) → BaseRequest<InventoryResponse>
This asynchronous method retrieves the player's inventory product information based on the provided product ID.
Parameter | Type | Description |
|---|---|---|
productId | string | ID of the product to fetch. |
Returns: BaseRequest<InventoryResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the InventoryResponse object by the responseData property.
HasAsync
static HasAsync(productId: string) → CheckInventoryRequest
This asynchronous method checks the existence of a product in the player's inventory.
Parameter | Type | Description |
|---|---|---|
productId | string | ID of the product to check. |
Returns: CheckInventoryRequest — A CheckInventoryRequest object. When the asynchronous process is complete, you can access the CheckInventoryResponse object by the responseData property.
CheckInventoryRequest
class · extends BaseAPIRequest
Class for checking the existence of a specific product in a user's inventory.
Properties
Name | Type | Description |
|---|---|---|
responseData | Response data of CheckInventoryResponse. |
CheckInventoryResponse
class · extends ProductBaseResponse
Class representing the response for checking the existence of a product in the inventory.
Properties
Name | Type | Description |
|---|---|---|
isExist | boolean | A boolean value that indicates whether a specific product exists in the user's inventory. |
InventoryError
enum
The error code specifies the reason for the failure of inventory-related requests.
Name | Value | Description |
|---|---|---|
Unknown | -1 | Error: Unknown error. |
NetworkError | 0 | Error: Errors related to network issues, including disconnections or unstable connections. |