Differences

This shows you the differences between two versions of the page.

Link to this comparison view

quickbooks_qbxml_customeradd_with_parent [2013/01/21 12:44] (current)
Line 1: Line 1:
 +====== Adding a Customer with a parent Customer in QuickBooks Online ======
  
 +===== Example Request =====
 +<file>
 +<CustomerAddRq>
 + <CustomerAdd>
 + <Name>Child Customer Name</Name>
 + <ParentRef>
 + <FullName>Parent Customer Name</FullName>
 + </ParentRef>
 + <FirstName>Keith</FirstName>
 + <LastName>Palmer</LastName>
 + <Phone>860-634-1602</Phone>
 + <Email>keith@uglyslug.com</Email>
 + </CustomerAdd>
 +</CustomerAddRq>
 +</file>
 +
 +===== Example Response =====
 +
 +<file>
 +...
 +</file>
 +
 +===== Generating this qbXML with PHP QuickBooks_Object_Customer Objects =====
 +
 +<code>
 +$Customer = new QuickBooks_Object_Customer();
 +
 +$Customer->setName('Child Customer Name');
 +
 +$Customer->setPhone('860-634-1602');
 +$Customer->setEmail('keith@uglyslug.com');
 +
 +$Customer->setFirstName('Keith');
 +$Customer->setLastName('Palmer');
 +
 +// Set the parent of the customer
 +$Customer->setParentFullName('Parent Customer Name');
 +
 +// You could also set the parent customer by ListID too
 +//$Customer->setParentListID('ABCD-1234');
 +
 +print($Customer->asQBXML(QUICKBOOKS_ADD_CUSTOMER, 6.0, QUICKBOOKS_LOCALE_ONLINE_EDITION));
 +</code>
quickbooks_qbxml_customeradd_with_parent.txt · Last modified: 2013/01/21 12:44 (external edit)