EditPersonRecord.php
EditPersonRecord.php
<?php
require_once "C:/Php/SoftLayer/SoftLayer/SoapClient.class.php";
$username = "set me";
$apiKey = "set me";
$registryId = 467201;
$organization = "Organization hoioo";
$firstName = "First name test2";
$lastName = "Last name test2";
$streetAddress = "Street address test2";
$city = "Cochabamba2";
$country = "Bolivia";
$zipCode = "592";
$email = "noreply2@softlayer.com";
$abuseEmail = "noreply2@softlayer.com";
$phoneNumber = "2222222222";
$regionalRegistryService = SoftLayer_SoapClient::getClient("SoftLayer_Account_Regional_Registry_Detail", null, $username, $apiKey);
$properties = array( array("propertyTypeId" => 61, "value" => $organization, "sequencePosition" => 0), array("propertyTypeId" => 11, "value" => $email, "sequencePosition" => 0), array("propertyTypeId" => 2, "value" => $firstName, "sequencePosition" => 0), array("propertyTypeId" => 3, "value" => $lastName, "sequencePosition" => 0), array("propertyTypeId" => 4, "value" => $streetAddress, "sequencePosition" => 0), array("propertyTypeId" => 5, "value" => $city, "sequencePosition" => 0), array("propertyTypeId" => 6, "value" => "OT", "sequencePosition" => 0), array("propertyTypeId" => 7, "value" => $zipCode, "sequencePosition" => 0), array("propertyTypeId" => 8, "value" => $country, "sequencePosition" => 0), array("propertyTypeId" => 14, "value" => $abuseEmail, "sequencePosition" => 0), array("propertyTypeId" => 9, "value" => $phoneNumber, "sequencePosition" => 0), );
$regionalRegistryService -> setInitParameter($registryId);
$templateObject = new stdClass();
$templateObject -> detailTypeId = 3;
$templateObject -> properties = $properties;
$regionalRegistryService -> setObjectMask("mask[properties]");
try {
$result = $regionalRegistryService -> editObject($templateObject);
echo "Person Record edited?: " . $result . "\n";
} catch(Exception $e) {
echo "Unable to edit person record: " . $e -> getMessage();
}