By default wsdl in wsdl dir is used.
*
*/
function DomContact($wsdlurl="wsdl/domaincontact.wsdl")
{
$this->wsdl = $wsdlurl;
$this->s = new soapclient($this->wsdl,"wsdl");
}
/**
* @access private
*/
//This function is to diaplay xml Request/Response.
function debugfunction()
{
global $debugfunction;
if($debugfunction)
{
print "XML Sent:
";
print "
" . $this->s->request . "";
print "
XML Received:
";
print "" . $this->s->response . "";
print "
";
}
}
/**
* Adds a contact using the details of the customer.
*
* @return int
* @param string Username.
* @param string Password.
* @param string Role.
* @param string Language Preference.
* @param int Parent id.
* @param int The customer under whom the contact is to be created
*
A contact is created with the same details (such as email address, postal address, etc) as the customer.
*
Returns:
*
contactId The Contact Id of the newly added contact.
*
*/
function addDefaultContact($userName,$password,$role,$langpref,$parentid,$customerId)
{
$para = array($userName,$password,$role,$langpref,$parentid,$customerId);
$return = $this->s->call("addDefaultContact",$para);
$this->debugfunction();
return $return;
}
/**
* Adds a contact using the details provided.
*
* @return int
* @param string Username.
* @param string Password.
* @param string Role.
* @param string Language Preference.
* @param int Parent id.
* @param string Name.
* @param string Company.
* @param string E-Mail.
* @param string Address1.
* @param string Address2.
* @param string Address3.
* @param string City.
* @param string State.
* @param string Country.
* @param string Zip.
* @param string Country Code.
* @param string Tel. No.
* @param string Country Code.
* @param string Fax No.
* @param int The customer under whom the contact is to be created.
*
Returns:
*
contactId: The Contact Id of the newly added contact.
*
*/
function addContact($userName,$password,$role,$langpref,$parentid,$name,$company,$emailAddr,$address1,$address2,$address3,$city,$state,$country,$zip,$telNoCc,$telNo,$faxNoCc,$faxNo,$customerId)
{
$para = array($userName,$password,$role,$langpref,$parentid,$name,$company,$emailAddr,$address1,$address2,$address3,$city,$state,$country,$zip,$telNoCc,$telNo,$faxNoCc,$faxNo,$customerId);
$return = $this->s->call("add",$para);
$this->debugfunction();
return $return;
}
/**
* Returns the complete details of a particular contact.
*
* @return AssociativeArray
* @param string Username.
* @param string Password.
* @param string Role.
* @param string Language Preference.
* @param int Parent id.
* @param int The contactId for which details are required
* @param Array The various details that are required for the order. An Array with no keys specified. Valid entries are: ContactDetails,StatusDetails,All.
*
Returns:
*
AssociativeArray.
*
A AssociativeArray with the following information:
*
contactid=320
*
name=Contact
*
company=FAPI
*
customerid=21
*
parentkey=1
*
emailaddr=contact@fapi.com
*
address1=Somewhere
*
address2=
*
address3=
*
city=Someplace
*
state=
*
country=SH
*
zip=12345
*
telnocc=123
*
telno=135435456
*
faxnocc=
*
faxno=
*
contacttype=[domorg]
*
*/
function getDetails($userName,$password,$role,$langpref,$parentid,$contactId,$option)
{
$para = array($userName,$password,$role,$langpref,$parentid,$contactId,$option);
$return = $this->s->call("getDetails",$para);
$this->debugfunction();
return $return;
}
/**
* This method returns a list of Contacts that match the specified search criteria. If you do not want to specify a particular criterion, pass null for that parameter.
*
* @return AssociativeArray
* @param string Username.
* @param string Password.
* @param string Role.
* @param string Language Preference.
* @param int Parent id.
* @param int Customer Id.
* @param int[] int[] with no keys specified of ContactIds for listing of specific contacts or null for all contacts
* @param string[] string[] with no keys specified for listing contacts of specific CurrentStatus or null for all. Valid values are: InActive, Active, Suspended, Deleted
* @param string UNIX TimeStamp (epoch) for listing contacts created after creationDTRangStart or null for all contacts
* @param string UNIX TimeStamp (epoch) for listing contacts created before creationDTRangEnd or null for all contacts
* @param string Searches for contacts whose name contains 'contactName'
* @param string Searches for contacts whose company contains 'companyName'
* @param string Searches for contacts whose email address contains 'emailAddr'
* @param int Number of Records to be returned. The maximum valoue allowed is 50.
* @param int Page Number for which records are required.
* @param string[] string[] with no keys specified of Field names for sorting listing of contacts or null for default by contactId
*
Returns:
*
AssociativeArray.
*
AssociativeArray which contains contact details The Key for AssociativeArray is index starting from 1. The Value is another AssociativeArray which contains key-value pairs of contact information.
*
*/
function listContact($userName,$password,$role,$langpref,$parentid,$customerId,$contactId,$currentStatus,$creationDTRangStart,$creationDTRangEnd,$contactName,$companyName,$emailAddr,$numOfRecordPerPage,$pageNum,$orderBy)
{
$para = array($userName,$password,$role,$langpref,$parentid,$customerId,$contactId,$currentStatus,$creationDTRangStart,$creationDTRangEnd,$contactName,$companyName,$emailAddr,$numOfRecordPerPage,$pageNum,$orderBy);
$return = $this->s->call("list",$para);
$this->debugfunction();
return $return;
}
/**
* Returns a list of ContactName - CompanyName of all contacts for the specified customerId
*
* @return AssociativeArray
* @param string Username.
* @param string Password.
* @param string Role.
* @param string Language Preference.
* @param int Parent id.
* @param int the customer for whom the list should be returned
*
Returns:
*
AssociativeArray.
*
AssociativeArray which contains contact details The Key for the AssociativeArray is index starting from 1. The Value is another AssociativeArray which contains key-value pairs of contact information with the following keys:
*
contactid
*
name
*
company
*
emailaddr
*
*/
function listNames($userName,$password,$role,$langpref,$parentid,$customerId)
{
$para = array($userName,$password,$role,$langpref,$parentid,$customerId);
$return = $this->s->call("listNames",$para);
$this->debugfunction();
return $return;
}
/**
* Modifies the details for the specified contact.
*
* @return AssociativeArray
* @param string Username.
* @param string Password.
* @param string Role.
* @param string Language Preference.
* @param int Parent id.
* @param int The contact whose details are to be modified.
* @param string Name.
* @param string Company.
* @param string E-Mail.
* @param string Address1.
* @param string Address2.
* @param string Address3.
* @param string City.
* @param string State.
* @param string Country.
* @param string Zip.
* @param string Country Code.
* @param string Tel. No.
* @param string Country Code.
* @param string Fax No.
*
Returns:
*
AssociativeArray.
*
A AssociativeArray with the result of the modification.
*
entityid=245
*
description=DomainContact
*
actiontype=Mod
*
actiontypedesc=Modification of Contact Details in the Registry
*
actionstatus=Success
*
actionstatusdesc=Contact modification completed successfully in all registry
*
status=Success
*
*/
function mod($userName,$password,$role,$langpref,$parentid,$contactId,$name,$company,$emailAddr,$address1,$address2,$address3,$city,$state,$country,$zip,$telNoCc,$telNo,$faxNoCc,$faxNo)
{
$para = array($userName,$password,$role,$langpref,$parentid,$contactId,$name,$company,$emailAddr,$address1,$address2,$address3,$city,$state,$country,$zip,$telNoCc,$telNo,$faxNoCc,$faxNo);
$return = $this->s->call("mod",$para);
$this->debugfunction();
return $return;
}
}
?>