*
* @return array
* api result array
+ *
+ * @throws \API_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
*/
function civicrm_api3_line_item_create($params) {
- // @todo the following line is not really appropriate for the api. The BAO should
- // do the work, and it should be in a tighter function. The below function is not really
- // readable because it is handling contribution and line item together.
- $params = CRM_Contribute_BAO_Contribution::checkTaxAmount($params, TRUE);
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'LineItem');
}
* Array of matching line_items
*/
function civicrm_api3_line_item_get($params) {
- if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && !empty($params['check_permissions'])) {
- CRM_Price_BAO_LineItem::getAPILineItemParams($params);
- }
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}