Exemplo n.º 1
0
 /**
  * test crunchyroll login
  *
  * @return [type] [description]
  */
 public function testInsertRecord()
 {
     $lead = new Lead();
     // $lead->deserializeXml($xmlstr);
     // Receiving request
     $request = ['first_name' => 'Test', 'last_name' => 'Test', 'email' => '*****@*****.**', 'phone' => '404-855-2695', 'affiliate_record%5FID' => '95641000016912544'];
     $xmlstr2 = $lead->serializeXml($request);
     // Mapping the request for create xmlstr
     $lead->deserializeXml($xmlstr2);
     $ZohoClient = new ZohoClient('YOU_TOKEN');
     // Make the connection to zoho api
     $ZohoClient->setModule('Leads');
     // Selecting the module
     $validXML = $ZohoClient->mapEntity($lead);
     // Create valid XML (zoho format)
     // Insert the new record
     $response = $ZohoClient->insertRecords($validXML, ['wfTrigger' => 'true']);
     print_r($response);
 }
Exemplo n.º 2
0
<Comments>Time In Business: Not yet in business, still in planning stages
Annual Revenue: $0, No Revenues
Loan Purpose: Working Capital
Accounts Receivable Amount: Do not have accounts receivable
Total Profits: Not Profitable
Collateral Available: Land / Real Estate,Equity in a home/personal residence
Product Name: Business Credit Lines
Inquiry Date:
Time To Funding: 1 month
Comments: want to purchase a hydraulic band sawmill
</Comments>
<CreditScore>Excellent</CreditScore>
<Bankruptcy>No</Bankruptcy>
</Lead>';
*/
$lead = new Lead();
// $lead->deserializeXml($xmlstr);
// Receiving request
$request = ['first_name' => 'Test', 'last_name' => 'Test', 'email' => '*****@*****.**', 'phone' => '404-855-2695', 'affiliate_record%5FID' => '95641000016912544'];
$xmlstr2 = $lead->serializeXml($request);
// Mapping the request for create xmlstr
$lead->deserializeXml($xmlstr2);
$ZohoClient = new ZohoClient('YOU_TOKEN');
// Make the connection to zoho api
$ZohoClient->setModule('Leads');
// Selecting the module
$validXML = $ZohoClient->mapEntity($lead);
// Create valid XML (zoho format)
// Insert the new record
$response = $ZohoClient->insertRecords($validXML, ['wfTrigger' => 'true']);
print_r($response);