(NFC) (dev/core#878) Simplify copyright header (api/*)
[civicrm-core.git] / api / v3 / FinancialType.php
CommitLineData
134bc82c 1<?php
134bc82c
CW
2/*
3 +--------------------------------------------------------------------+
a30c801b 4 | Copyright CiviCRM LLC. All rights reserved. |
134bc82c 5 | |
a30c801b
TO
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 |
134bc82c 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
134bc82c
CW
11
12/**
244bbdd8 13 * This api exposes CiviCRM FinancialType.
134bc82c
CW
14 *
15 * @package CiviCRM_APIv3
134bc82c
CW
16 */
17
18/**
244bbdd8 19 * Save a FinancialType.
134bc82c 20 *
c490a46a 21 * @param array $params
77b97be7 22 *
a6c01b45 23 * @return array
134bc82c
CW
24 */
25function civicrm_api3_financial_type_create($params) {
ddaf2161 26 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'FinancialType');
134bc82c
CW
27}
28
da6b7c62
MW
29function _civicrm_api3_financial_type_create_spec(&$params) {
30 $params['name']['api.required'] = 1;
da6b7c62
MW
31}
32
134bc82c 33/**
244bbdd8 34 * Get a FinancialType.
134bc82c 35 *
c490a46a 36 * @param array $params
77b97be7 37 *
a6c01b45 38 * @return array
244bbdd8 39 * Array of retrieved FinancialType property values.
134bc82c
CW
40 */
41function civicrm_api3_financial_type_get($params) {
42 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
43}
44
45/**
244bbdd8 46 * Delete a FinancialType.
134bc82c 47 *
c490a46a 48 * @param array $params
77b97be7 49 *
a6c01b45 50 * @return array
16b10e64 51 * Array of deleted values.
134bc82c
CW
52 */
53function civicrm_api3_financial_type_delete($params) {
54 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
55}