File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2053,4 +2053,42 @@ public static function getSkusByProduct($productId, $filter = array())
20532053 $ filter = Filter::create ($ filter );
20542054 return self ::getCollection ('/products/ ' .$ productId .'/skus ' . $ filter ->toQuery (), 'Sku ' );
20552055 }
2056+
2057+ /**
2058+ * Delete the given optionValue.
2059+ *
2060+ * @param int $optionId
2061+ * @Param int $valueId
2062+ * @return mixed
2063+ */
2064+ public static function deleteOptionValue ($ optionId , $ valueId )
2065+ {
2066+ return self ::deleteResource ('/options/ ' . $ optionId .'/values/ ' . $ valueId );
2067+ }
2068+
2069+ /**
2070+ * Return the collection of all option values By OptionID
2071+ *
2072+ * @param int $optionId
2073+ * @param array $filter
2074+ * @return array
2075+ */
2076+ public static function getOptionValuesByOption ($ optionId , $ filter = array ())
2077+ {
2078+ $ filter = Filter::create ($ filter );
2079+ return self ::getCollection ('/options/ ' . $ optionId . '/values ' . $ filter ->toQuery (), 'OptionValue ' );
2080+ }
2081+
2082+ /**
2083+ * Get collection of product rules by ProductId
2084+ *
2085+ * @param int $productId
2086+ * @param array $filter
2087+ * @return mixed
2088+ */
2089+ public static function getRulesByProduct ($ productId , $ filter = array ())
2090+ {
2091+ $ filter = Filter::create ($ filter );
2092+ return self ::getCollection ('/products/ ' .$ productId .'/rules ' . $ filter ->toQuery (), 'Rule ' );
2093+ }
20562094}
You can’t perform that action at this time.
0 commit comments