projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Checkstyle fix - one pesky whitespace
[civicrm-core.git]
/
api
/
v3
/
PledgePayment.php
diff --git
a/api/v3/PledgePayment.php
b/api/v3/PledgePayment.php
index 340a29d03ed9c7801601a87e4f4c38d5046daa7a..aac734ce720d9bcf7aa43b4c4cd9bf2ce445e57f 100644
(file)
--- a/
api/v3/PledgePayment.php
+++ b/
api/v3/PledgePayment.php
@@
-3,7
+3,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
4
|
+ | Copyright CiviCRM LLC (c) 2004-201
5
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-26,28
+26,23
@@
*/
/**
*/
/**
- *
File for the CiviCRM APIv3 Pledge functions
+ *
This api exposes CiviCRM Pledge payment.
*
* @package CiviCRM_APIv3
*
* @package CiviCRM_APIv3
- * @subpackage API_Pledge_Payment
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: PledgePayment.php
- *
*/
/**
*/
/**
- * Add or update a plege payment. Pledge Payment API doesn't actually add a pledge
- * if the request is to 'create' and 'id' is not passed in
- * the oldest pledge with no associated contribution is updated
+ * Add or update a pledge payment.
+ *
+ * Pledge Payment API doesn't actually add a pledge.
+ * If the request is to 'create' and 'id' is not passed in
+ * the oldest pledge with no associated contribution is updated.
*
* @todo possibly add ability to add payment if there are less payments than pledge installments
* @todo possibly add ability to recalculate dates if the schedule is changed
*
* @param array $params
* Input parameters.
*
* @todo possibly add ability to add payment if there are less payments than pledge installments
* @todo possibly add ability to recalculate dates if the schedule is changed
*
* @param array $params
* Input parameters.
- * {@getfields PledgePayment_create}
- * @example PledgePaymentCreate.php
*
* @return array
* API Result
*
* @return array
* API Result
@@
-75,15
+70,16
@@
function civicrm_api3_pledge_payment_create($params) {
//update pledge status
CRM_Pledge_BAO_PledgePayment::updatePledgePaymentStatus($dao->pledge_id);
//update pledge status
CRM_Pledge_BAO_PledgePayment::updatePledgePaymentStatus($dao->pledge_id);
- return civicrm_api3_create_success($result, $params, '
pledge_p
ayment', 'create', $dao);
+ return civicrm_api3_create_success($result, $params, '
PledgeP
ayment', 'create', $dao);
}
/**
}
/**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
*
*
- * The metadata is used for setting defaults, documentation & validation
* @param array $params
* @param array $params
- * Array o
r
parameters determined by getfields.
+ * Array o
f
parameters determined by getfields.
*/
function _civicrm_api3_pledge_payment_create_spec(&$params) {
$params['pledge_id']['api.required'] = 1;
*/
function _civicrm_api3_pledge_payment_create_spec(&$params) {
$params['pledge_id']['api.required'] = 1;
@@
-91,12
+87,10
@@
function _civicrm_api3_pledge_payment_create_spec(&$params) {
}
/**
}
/**
- * Delete a pledge Payment - Note this deletes the contribution not just the link
+ * Delete a pledge Payment - Note this deletes the contribution not just the link
.
*
* @param array $params
* Input parameters.
*
* @param array $params
* Input parameters.
- * {@getfields PledgePayment_delete}
- * @example PledgePaymentDelete.php
*
* @return array
* API result
*
* @return array
* API result
@@
-104,7
+98,7
@@
function _civicrm_api3_pledge_payment_create_spec(&$params) {
function civicrm_api3_pledge_payment_delete($params) {
if (CRM_Pledge_BAO_PledgePayment::del($params['id'])) {
function civicrm_api3_pledge_payment_delete($params) {
if (CRM_Pledge_BAO_PledgePayment::del($params['id'])) {
- return civicrm_api3_create_success(array('id' => $params['id']), $params, '
pledge_p
ayment', 'delete');
+ return civicrm_api3_create_success(array('id' => $params['id']), $params, '
PledgeP
ayment', 'delete');
}
else {
return civicrm_api3_create_error('Could not delete payment');
}
else {
return civicrm_api3_create_error('Could not delete payment');
@@
-112,15
+106,13
@@
function civicrm_api3_pledge_payment_delete($params) {
}
/**
}
/**
- * Retrieve a set of pledges, given a set of input params
+ * Retrieve a set of pledges, given a set of input params
.
*
* @param array $params
* Input parameters.
*
* @param array $params
* Input parameters.
- * {@getfields PledgePayment_get}
- * @example PledgePaymentGet.php *
*
* @return array
*
* @return array
- *
(reference )
array of pledges, if error an array with an error id and error message
+ * array of pledges, if error an array with an error id and error message
*/
function civicrm_api3_pledge_payment_get($params) {
*/
function civicrm_api3_pledge_payment_get($params) {
@@
-128,11
+120,15
@@
function civicrm_api3_pledge_payment_get($params) {
}
/**
}
/**
- * Gets field for civicrm_pledge_payment functions
+ * Gets field for civicrm_pledge_payment functions
.
*
* @param array $params
* Modifiable list of fields allowed for the PledgePayment.get action.
*/
function civicrm_api3_pledge_payment_get_spec(&$params) {
*
* @param array $params
* Modifiable list of fields allowed for the PledgePayment.get action.
*/
function civicrm_api3_pledge_payment_get_spec(&$params) {
- $params['option.create_new'] = array('title' => "Create new field rather than update an unpaid payment");
+ $params['option.create_new'] = array(
+ 'title' => "Create New",
+ 'description' => "Create new field rather than update an unpaid payment",
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
}
}