/** * Merge records * * @param stdclass $mergeRequest * @param String $type * @return unknown */ public function merge($mergeRequest, $type) { $mergeRequest->masterRecord = new \SoapVar($mergeRequest->masterRecord, SOAP_ENC_OBJECT, $type, $this->namespace); $arg = new \stdClass(); $arg->request = new \SoapVar($mergeRequest, SOAP_ENC_OBJECT, 'MergeRequest', $this->namespace); return parent::_merge($arg); }
/** * Creates new objects and updates existing objects; uses a custom field to * determine the presence of existing objects. In most cases, we recommend * that you use upsert instead of create because upsert is idempotent. * Available in the API version 7.0 and later. * * @param string $extId External Id * @param array $sObjects Array of sObjects * @return UpsertResult */ public function upsert($extId, $sObjects) { // $this->_setSessionHeader(); $arg = new stdClass(); $arg->externalIDFieldName = new SoapVar($extId, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); foreach ($sObjects as $sObject) { if (isset($sObject->fields)) { $sObject->any = $this->_convertToAny($sObject->fields); } } $arg->sObjects = $sObjects; return parent::_upsert($arg); }
public function retrieve($fieldList, $sObjectType, $ids) { return $this->_retrieveResult(parent::retrieve($fieldList, $sObjectType, $ids)); }