Beispiel #1
0
 function encode(DOMElement $container, DOMDocument $doc)
 {
     parent::encode($container, $doc);
     if ($this->productDetails) {
         $detailsNode = $doc->createElement("fieldlabel");
         $detailsNode->setAttribute("value", "Product Details");
         foreach ($this->productDetails as $i => $productDetail) {
             $row = $doc->createElement("product");
             $row->setAttribute("no", $i + 1);
             $productDetail->encode($row, $doc);
             $detailsNode->appendChild($row);
         }
         $container->appendChild($detailsNode);
     }
 }
Beispiel #2
0
 function __construct()
 {
     parent::__construct();
     $this->nameLabelMap = array_merge($this->nameLabelMap, array("id" => "ACCOUNTID", "accountName" => "Account Name", "accountOwner" => "Account Owner", "website" => "Website", "tickerSymbol" => "Ticker Symbol", "parentAccount" => "Parent Account", "employees" => "Employees", "ownership" => "Ownership", "industry" => "Industry", "accountType" => "Account Type", "accountNumber" => "Account Number", "accountSite" => "Account Site", "phone" => "Phone", "fax" => "Fax", "email" => "Email", "rating" => "Rating", "sicCode" => "SIC Code", "annualRevenue" => "Annual Revenue", "billingStreet" => "Billing Street", "billingCity" => "Billing City", "billingState" => "Billing State", "billingCode" => "Billing Code", "billingCountry" => "Billing Country", "shippingStreet" => "Shipping Street", "shippingCity" => "Shipping City", "shippingState" => "Shipping State", "shippingCode" => "Shipping Code", "shippingCountry" => "Shipping Country", "description" => "Description"));
 }
Beispiel #3
0
 function __construct()
 {
     parent::__construct();
     $this->nameLabelMap = array_merge($this->nameLabelMap, array("id" => "LEADID", "leadOwner" => "Lead Owner", "salutation" => "Salutation", "firstName" => "First Name", "title" => "Title", "lastName" => "Last Name", "company" => "Company", "leadSource" => "Lead Source", "industry" => "Industry", "annualRevenue" => "Annual Revenue", "phone" => "Phone", "mobile" => "Mobile", "fax" => "Fax", "email" => "Email", "skypeId" => "Skype ID", "website" => "Web site", "leadStatus" => "Lead Status", "rating" => "Rating", "employees" => "No of Employees", "emailOptOut" => "Email Opt-out", "campaignSource" => "Campaign Source", "street" => "Street", "city" => "City", "state" => "State", "zipCode" => "ZIP Code", "country" => "Country", "description" => "Description"));
 }
Beispiel #4
0
 function __construct()
 {
     parent::__construct();
     $this->nameLabelMap = array_merge($this->nameLabelMap, array("id" => "CONTACTID", "contactOwner" => "Contact Owner", "salutation" => "Salutation", "firstName" => "First Name", "lastName" => "Last Name", "accountId" => "ACCOUNTID", "accountName" => "Account Name", "vendorName" => "Vendor Name", "campaignSource" => "Campaign Source", "leadSource" => "Lead Source", "title" => "Title", "department" => "Department", "birthDate" => "Date of Birth", "reportsTo" => "Reports To", "emailOptOut" => "Email Opt-out", "skypeId" => "Skype ID", "assignedTo" => "Assigned To", "phone" => "Phone", "mobile" => "Mobile", "homePhone" => "Home Phone", "otherPhone" => "Other Phone", "fax" => "Fax", "email" => "Email", "assistant" => "Assistant", "asstPhone" => "Asst Phone", "mailingStreet" => "Mailing Street", "mailingCity" => "Mailing City", "mailingState" => "Mailing State", "mailingCode" => "Mailing Zip", "mailingCountry" => "Mailing Country", "otherStreet" => "Other Street", "otherCity" => "Other City", "otherState" => "Other State", "otherCode" => "Other Zip", "otherCountry" => "Other Country", "description" => "Description"));
 }
Beispiel #5
0
 /**
  * @param Scalr_Service_ZohoCrm_Entity $entity
  * @return Scalr_Service_ZohoCrm_Entity
  */
 function update($entity)
 {
     $request = $this->newRequest();
     $row = $request->createElement("row");
     $row->setAttribute("no", "1");
     $entity->encode($row, $request);
     $request->documentElement->appendChild($row);
     $response = $this->request(array("method" => self::METHOD_UPDATE, "xmlData" => $request, "queryParams" => array("id" => $entity->id)));
     $xpath = new DOMXPath($response);
     $recorddetails = $xpath->query("//response/result/recorddetail");
     if ($recorddetails->length) {
         $this->decodeRecordDetail($entity, $recorddetails->item(0), $xpath);
     } else {
         throw new Scalr_Service_ZohoCrm_Exception("Cannot find 'recorddetail' node in response xml");
     }
     return $entity;
 }