Class: Product
resources/products.ProductClient
The ProductClient manages the lifecycle of products, which represent the instantiation of a licensed asset on an external platform (e.g., a specific t-shirt on Roblox created from a licensed design). Products link the Spaceport asset and agreement to its real-world counterpart, enabling tracking and royalty calculations.
Table of contents
Methods
constructor
• new ProductClient(client
): ProductClient
Parameters
Name | Type |
---|---|
client | SpaceportSDK |
Returns
Methods
findById
▸ findById(productId
, _params?
): Promise
<null
| Product
>
Finds a product by its ID
Parameters
Name | Type | Description |
---|---|---|
productId | string | The ID of the product to find |
_params | FindProductParams | - |
Returns
Promise
<null
| Product
>
Promise resolving to product details
findManyByIds
▸ findManyByIds(productIds
, _params?
): Promise
<Product
[]>
Finds multiple products by their IDs in a single request
Parameters
Name | Type | Description |
---|---|---|
productIds | string [] | Array of product IDs to find |
_params | FindProductParams | - |
Returns
Promise
<Product
[]>
Promise resolving to array of product details
Example
create
▸ create(params
): Promise
<CreateProductResponse
>
Creates products from agreement assets
Parameters
Name | Type | Description |
---|---|---|
params | CreateProductParams | Product creation parameters |
Returns
Promise
<CreateProductResponse
>
Promise resolving to creation response