Merge pull request #19120 from eileenmcnaughton/fee
[civicrm-core.git] / api / v3 / FinancialType.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * This api exposes CiviCRM FinancialType.
14 *
15 * @package CiviCRM_APIv3
16 */
17
18 /**
19 * Save a FinancialType.
20 *
21 * @param array $params
22 *
23 * @return array
24 */
25 function civicrm_api3_financial_type_create($params) {
26 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'FinancialType');
27 }
28
29 function _civicrm_api3_financial_type_create_spec(&$params) {
30 $params['name']['api.required'] = 1;
31 }
32
33 /**
34 * Get a FinancialType.
35 *
36 * @param array $params
37 *
38 * @return array
39 * Array of retrieved FinancialType property values.
40 */
41 function civicrm_api3_financial_type_get($params) {
42 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
43 }
44
45 /**
46 * Delete a FinancialType.
47 *
48 * @param array $params
49 *
50 * @return array
51 * Array of deleted values.
52 */
53 function civicrm_api3_financial_type_delete($params) {
54 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
55 }