Skip to content

Commit 7fa8a36

Browse files
authored
Merge pull request #280 from msznaper/patch-1
Improvements
2 parents fe228a2 + e02d96e commit 7fa8a36

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/Bigcommerce/Api/Client.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)