Esempio n. 1
0
 /**
  * Handy wrapper for 2.1 update methods
  *
  * @param String      $function for 2.1 function (create_sotransaction, etc)
  * @param String      $key      The attribute key
  * @param Array       $phpObj   an array for the object.  Do not nest in another array() wrapper
  * @param api_session $session  an api_session instance with a valid connection
  *
  * @return String the XML response from Intacct
  */
 public static function call21UpdateMethod($function, $key, $phpObj, api_session $session)
 {
     $xml = api_util::phpToXml($function, array($phpObj));
     $xml = str_replace("<{$function}", "<{$function} key=\"{$key}\"", $xml);
     return api_post::post($xml, $session, "2.1");
 }