3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
13 * This api exposes CiviCRM premium products attached to contributions.
15 * Premiums are used as incentive gifts on contribution pages.
16 * Use chaining to create a premium and related products in one api call.
18 * @package CiviCRM_APIv3
22 * Save a contribution product.
24 * @param array $params
26 * @throws API_Exception
29 function civicrm_api3_contribution_product_create($params) {
30 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__
), $params, 'ContributionProduct');
34 * Get a contribution product.
36 * @param array $params
39 * Array of retrieved product property values.
41 function civicrm_api3_contribution_product_get($params) {
42 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__
), $params);
46 * Delete a contribution product.
48 * @param array $params
50 * @throws API_Exception
52 * Array of deleted values.
54 function civicrm_api3_contribution_product_delete($params) {
55 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__
), $params);