public function all($productId, array $params = array())
    {
        $endpoint = '/admin/products/'.$productId.'/variants.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(ProductVariant::class, $response['variants']);
    }
public function all($productId, array $params = array())
    {
        $endpoint = '/admin/products/'.$productId.'/variants.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(ProductVariant::class, $response['variants']);
    }
public function all ( $ productId , array $ params = array ( ) ) { $ endpoint = '/admin/products/' . $ productId . '/variants.json' ; $ response = $ this -> request ( $ endpoint , 'GET' , $ params ) ; return $ this -> createCollection ( ProductVariant :: class , $ response [ 'variants' ] ) ; }
Receive a list of Product Variants

@link   https://help.shopify.com/api/reference/product_variant#index
@param  integer $productId
@param  array   $params
@return ProductVariant[]
Receive a list of Product Variants