Skip to content

Commit

Permalink
Merge pull request #280 from msznaper/patch-1
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
bc-zachary authored Oct 28, 2022
2 parents fe228a2 + e02d96e commit 7fa8a36
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/Bigcommerce/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2053,4 +2053,42 @@ public static function getSkusByProduct($productId, $filter = array())
$filter = Filter::create($filter);
return self::getCollection('/products/'.$productId.'/skus' . $filter->toQuery(), 'Sku');
}

/**
* Delete the given optionValue.
*
* @param int $optionId
* @Param int $valueId
* @return mixed
*/
public static function deleteOptionValue($optionId, $valueId)
{
return self::deleteResource('/options/' . $optionId .'/values/'. $valueId);
}

/**
* Return the collection of all option values By OptionID
*
* @param int $optionId
* @param array $filter
* @return array
*/
public static function getOptionValuesByOption($optionId, $filter = array())
{
$filter = Filter::create($filter);
return self::getCollection('/options/' . $optionId . '/values' . $filter->toQuery(), 'OptionValue');
}

/**
* Get collection of product rules by ProductId
*
* @param int $productId
* @param array $filter
* @return mixed
*/
public static function getRulesByProduct($productId, $filter = array())
{
$filter = Filter::create($filter);
return self::getCollection('/products/'.$productId.'/rules' . $filter->toQuery(), 'Rule');
}
}

0 comments on commit 7fa8a36

Please sign in to comment.