Merge pull request #5901 from colemanw/CRM-16557
[civicrm-core.git] / api / v3 / Address.php
index 472e85fc0be99600baf24dee0b43355bdeb485ba..7c95d30d38acefc8c3b967768184a006e8cea24b 100644 (file)
@@ -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.                                    |
  |                                                                    |
  */
 
 /**
- * File for the CiviCRM APIv3 address functions
+ * This api exposes CiviCRM Address records.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_Address
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: Address.php 2011-02-16 ErikHommel $
  */
 
 /**
@@ -42,7 +38,6 @@
  *   Array per getfields metadata.
  *
  * @return array
- *   Array of newly created tag property values.
  */
 function civicrm_api3_address_create(&$params) {
   /**
@@ -83,7 +78,7 @@ function civicrm_api3_address_create(&$params) {
   }
   else {
     $values = _civicrm_api3_dao_to_array($addressBAO, $params);
-    return civicrm_api3_create_success($values, $params, 'address', $addressBAO);
+    return civicrm_api3_create_success($values, $params, 'Address', $addressBAO);
   }
 }
 
@@ -91,13 +86,16 @@ function civicrm_api3_address_create(&$params) {
  * Adjust Metadata for Create action.
  *
  * @param array $params
- *   Array or parameters determined by getfields.
+ *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_address_create_spec(&$params) {
   $params['location_type_id']['api.required'] = 1;
   $params['contact_id']['api.required'] = 1;
-  $params['country'] = array('title' => 'Name or 2-letter abbreviation of country. Looked up in civicrm_country table');
-  $params['street_parsing'] = array('title' => 'optional param to indicate you want the street_address field parsed into individual params');
+  $params['street_parsing'] = array(
+    'title' => 'Street Address Parsing',
+    'description' => 'Optional param to indicate you want the street_address field parsed into individual params',
+    'type' => CRM_Utils_Type::T_BOOLEAN,
+  );
   $params['world_region'] = array(
     'title' => ts('World Region'),
     'name' => 'world_region',