Merge pull request #2704 from jitendrapurohit/CRM_TestFix
[civicrm-core.git] / api / v3 / PriceFieldValue.php
index f64e6e572e25ef742fec6f11c7f1a6aab73e3fbe..984e9e1a5aa2b8d7e027dafbac97d94a91e25833 100644 (file)
@@ -2,7 +2,7 @@
 /*
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -52,20 +52,22 @@ function civicrm_api3_price_field_value_create($params) {
     $ids['id'] = $params['id'];
   }
 
-  $bao = CRM_Price_BAO_FieldValue::create($params, $ids);
+  $bao = CRM_Price_BAO_PriceFieldValue::create($params, $ids);
 
   $values = array();
   _civicrm_api3_object_to_array($bao, $values[$bao->id]);
   return civicrm_api3_create_success($values, $params, 'price_field_value', 'create', $bao);
 
-  }
-/*
+}
+
+/**
  * Adjust Metadata for Create action
  *
  * The metadata is used for setting defaults, documentation & validation
  * @param array $params array or parameters determined by getfields
  */
 function _civicrm_api3_price_field_value_create_spec(&$params) {
+  $params['price_field_id']['api.required'] = TRUE;
 }
 
 /**