Skip to content

Commit

Permalink
Implement getCurrenciesCount
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-ruth committed Apr 29, 2016
1 parent 0061526 commit b3749b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Bigcommerce/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1459,4 +1459,16 @@ public static function getCurrencies($filter = array())
$filter = Filter::create($filter);
return self::getCollection('/currencies' . $filter->toQuery(), 'Currency');
}

/**
* Returns the total number of currencies in the collection.
*
* @param array $filter
* @return int|string number of currencies or XML string if useXml is true
*/
public static function getCurrenciesCount($filter = array())
{
$filter = Filter::create($filter);
return self::getCount('/currencies/count' . $filter->toQuery());
}
}
1 change: 1 addition & 0 deletions test/Unit/Api/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ public function collections()
array('optionsets', 'getOptionSets', 'OptionSet'),
array('products/skus', 'getSkus', 'Sku'),
array('requestlogs', 'getRequestLogs', 'RequestLog'),
array('currencies', 'getCurrencies', 'Currency'),
);
}

Expand Down

0 comments on commit b3749b0

Please sign in to comment.