new Product(shopify)
Creates a Product instance.
Parameters:
Name | Type | Description |
---|---|---|
shopify |
Shopify | Reference to the Shopify instance |
Methods
create(params) → {Promise}
Creates a new product.
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Product properties |
Returns:
Promise that resolves with the result
- Type
- Promise
get(id, paramsopt) → {Promise}
Gets a single product by its ID.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
Number | Product ID | |
params |
Object |
<optional> |
Query parameters |
Returns:
Promise that resolves with the result
- Type
- Promise
list(params) → {Promise}
Gets a list of products.
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Query parameters |
Returns:
Promise that resolves with the result
- Type
- Promise
update(id, params) → {Promise}
Updates a product.
Parameters:
Name | Type | Description |
---|---|---|
id |
Number | Products ID |
params |
Object | Products properties |
Returns:
Promise that resolves with the result
- Type
- Promise