Skip to content

Commit a4cb860

Browse files
authored
Merge pull request #231 from msznaper/patch-1
getSkusByProduct
2 parents bd9f452 + 0c4f780 commit a4cb860

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/Bigcommerce/Api/Client.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,4 +2040,17 @@ public static function deleteShippingMethod($zoneId, $methodId)
20402040
{
20412041
return self::deleteResource('/shipping/zones/'. $zoneId . '/methods/'. $methodId);
20422042
}
2043+
2044+
/**
2045+
* Get collection of product skus by Product
2046+
*
2047+
* @param $productId
2048+
* @param array $filter
2049+
* @return mixed
2050+
*/
2051+
public static function getSkusByProduct($productId, $filter = array())
2052+
{
2053+
$filter = Filter::create($filter);
2054+
return self::getCollection('/products/'.$productId.'/skus' . $filter->toQuery(), 'Sku');
2055+
}
20432056
}

0 commit comments

Comments
 (0)