/** * 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); }
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); print "\n";