/**
  * buildContactInformation
  * --
  * @param $companyName
  * @param $customerName
  * @param $department
  * @param $phoneNumber
  * @param $name
  * @param $emailAddress
  * @param $fax
  * @param $vendor
  * @return ContactInfoExt
  */
 private function buildContactInformation($companyName, $customerName, $department, $phoneNumber, $name, $emailAddress, $fax, $vendor)
 {
     // New up a ContactInfoExt object.
     $contact_info = new ContactInfoExt($this->apiHandler->api_customer_id);
     // Set information via method attributes.
     $contact_info->setCompanyName($companyName);
     $contact_info->setCustomerName($customerName);
     $contact_info->setDept($department);
     $contact_info->setPhoneNumber1($phoneNumber);
     $contact_info->setName($name);
     $contact_info->setEmailAddress1($emailAddress);
     $contact_info->setFax($fax);
     $contact_info->setVendor($vendor);
     // Return the properly formatted ContactInfoExt object
     return $contact_info;
 }
// Retrieve the ExternalLoginInformation
$external_login_information = $a->getExtLoginData();
// Array of items
$aoItems = new ArrayOfItem();
// New item
$item = new Item($a->api_customer_id, 0.0, 1.0, 1.0, 1, InventoryMethod::LIFO, 0.99, 12.0, true, true, true, true, true, true, true, true, true, true, true, 5.0, MeasurementSystemType::USImperial, 25.0, 15.0, 10.0, 10.0, false, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 50.0, false, HazMatPackingGroup::aDefault, HazMatFlag::aDefault, 25.0, 0);
// set sku of that item
$item->setSKU("TEST1");
// set description
$item->setDescription("Testing API");
// add item to arr.
$aoItems->setItem([$item]);
// create order
$order = new Order(1);
// contact information
$contact_info = new ContactInfoExt(3);
// company name
$contact_info->setCompanyName("Some Company");
// contact information
$contact_info->setCustomerName("John Doe");
$contact_info->setDept("IT");
$contact_info->setPhoneNumber1("9547854455");
$contact_info->setName("Johnathon Doe");
$contact_info->setEmailAddress1("*****@*****.**");
$contact_info->setFax("9548884213");
$contact_info->setVendor("A Vendor");
// transaction information
$transaction = new TransactionInfoExt(new DateTime(), new DateTime(), new DateTime());
$transaction->setPONum("293473718734");
$transaction->setReferenceNum("ThisIsATest1234");
// address ext information