Class: ProductVariant

ProductVariant(shopify)

new ProductVariant(shopify)

Creates a ProductVariant instance.
Parameters:
Name Type Description
shopify Shopify Reference to the Shopify instance

Methods

create(productId, params) → {Promise}

Creates a new product variant.
Parameters:
Name Type Description
productId Number Product ID
params Object Product variant properties
Returns:
Promise that resolves with the result
Type
Promise

get(id, paramsopt) → {Promise}

Gets a single product variant by its ID.
Parameters:
Name Type Attributes Description
id Number Product variant ID
params Object <optional>
Query parameters
Returns:
Promise that resolves with the result
Type
Promise

list(productId, paramsopt) → {Promise}

Get a list of product variants.
Parameters:
Name Type Attributes Description
productId Number Product ID
params Object <optional>
Query parameters
Returns:
Promise that resolves with the result
Type
Promise

update(id, params) → {Promise}

Updates an existing product variant.
Parameters:
Name Type Description
id Number Product variant ID
params Object Product variant properties
Returns:
Promise that resolves with the result
Type
Promise