X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FPremium.php;h=e2c408df8d6f42134ecaef1df26f51dcdbf8e051;hb=ace09e1280e28e7a8f9a8657b2c6b88bdb6c0389;hp=ca1bdda2d04425ded38ad70cf399bbf4559f3d9d;hpb=8ea180b7e15f28bc58a8cffa5378fb6337cb955c;p=civicrm-core.git diff --git a/api/v3/Premium.php b/api/v3/Premium.php index ca1bdda2d0..e2c408df8d 100644 --- a/api/v3/Premium.php +++ b/api/v3/Premium.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.6 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | + | Copyright CiviCRM LLC (c) 2004-2015 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -23,71 +23,58 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** - * File for the CiviCRM APIv3 premium functions + * This api exposes CiviCRM premiums. * - * @package CiviCRM_APIv3 - * @subpackage API_premium + * Premiums are used as incentive gifts on contribution pages. + * Premiums contain "Products" which has a separate api. + * Use chaining to create a premium and related products in one api call. * + * @package CiviCRM_APIv3 */ /** - * Save a premium - * - * Allowed @params array keys are: - * {@getfields premium_create} - * @example premiumCreate.php + * Save a premium. * * @param array $params * * @throws API_Exception * @return array - * Array of newly created premium property values. - * @access public */ function civicrm_api3_premium_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * Get a premium - * - * Allowed @params array keys are: - * {@getfields premium_get} - * @example premiumCreate.php + * Get a premium. * * @param array $params * * @return array * Array of retrieved premium property values. - * @access public */ function civicrm_api3_premium_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * Delete a premium - * - * Allowed @params array keys are: - * {@getfields premium_delete} - * @example premiumCreate.php + * Delete a premium. * * @param array $params * * @throws API_Exception * @return array * Array of deleted values. - * @access public */ function civicrm_api3_premium_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * return field specification specific to get requests + * Return field specification specific to get requests. + * * @param array $params */ function _civicrm_api3_premium_get_spec(&$params) { @@ -95,7 +82,8 @@ function _civicrm_api3_premium_get_spec(&$params) { } /** - * return field specification specific to create requests + * Return field specification specific to create requests. + * * @param array $params */ function _civicrm_api3_premium_create_spec(&$params) {