UpdateSalesRep
Description
This method is used to update the existing sales rep.
Syntax
SalesRepResponse UpdateSalesRep(SecurityToken securityToken , SalesRep salesRep, string salesRepId, string salesRepInternalId).
Arguments
Type | Name | Description |
---|---|---|
SecurityToken | securityToken | Merchant security token: used to identify merchant and validate transaction. (required) |
String | salesRepId | Sales rep ID. (required) |
String | salesRepInternalId | Unique internal sales rep ID assigned by EBizCharge. (required) |
Return Value
Type | Description |
---|---|
SalesRepResponse | Returns result of UpdateSalesRep request. |
Examples
function updateSalesRep()
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '*******-454757-4567457-777',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$address = array(
'FirstName' => 'Hello',
'LastName' => 'There',
'CompanyName' => 'ABC',
'Address1' => 'Gulber 3',
'Address2' => 'Model Town N block',
'City' => 'Lahore',
'State' => 'Punjab',
'ZipCode' => '54000',
'Country' => 'Pakistan',
'IsDefault' => true,
'AddressId' => '101',
);
$salesRep = array(
'SalesRepType' => '1',
'LinkedToInternalId' => 'sr001',
'FirstName' => 'Hello',
'LastName' => 'ThereNow',
'CompanyName' =>'Abc',
'Phone' => '234-232323',
'Phone' => '2020-05-01',
'WebSite' => '2020-05-01',
'Address' => $address
);
$updateSalesRep = array(
'SecurityToken' => $securityToken,
'SalesRep' => $salesRep,
'salesRepId' => 'So107',
'salesRepInternalId' => 1
);
$updateSalesRepResponse = $client->UpdateSalesRep($updateSalesRep);
$updateSalesRepResult = $updateSalesRepResponse->UpdateSalesRepResult;
}
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header />
<soapenv:Body>
<ebiz:UpdateSalesRep>
<ebiz:securityToken>
<ebiz:SecurityId>********-23f6-4466-a993-f0008187ab9a</ebiz:SecurityId>
<ebiz:UserId />
<ebiz:Password />
</ebiz:securityToken>
<ebiz:salesRep>
<ebiz:SalesRepInternalId>********-db6b-424b-8b7c-d38904ae1075</ebiz:SalesRepInternalId>
<ebiz:SalesRepId>Sr-0002</ebiz:SalesRepId>
<ebiz:SalesRepType>Sales</ebiz:SalesRepType>
<ebiz:LinkedToInternalId />
<ebiz:FirstName>Tim</ebiz:FirstName>
<ebiz:LastName>Litton</ebiz:LastName>
<ebiz:CompanyName />
<ebiz:Phone>949-444-4333</ebiz:Phone>
<ebiz:AccountNumber>000027</ebiz:AccountNumber>
<ebiz:IsInactive>false</ebiz:IsInactive>
<ebiz:ExternalUniqueId />
<ebiz:Address>
<ebiz:FirstName>Tim</ebiz:FirstName>
<ebiz:LastName>Litton</ebiz:LastName>
<ebiz:CompanyName>A.Datum</ebiz:CompanyName>
<ebiz:Address1>54 Summerfield</ebiz:Address1>
<ebiz:City>Irvine</ebiz:City>
<ebiz:State>CA</ebiz:State>
<ebiz:ZipCode>92644</ebiz:ZipCode>
<ebiz:Country>US</ebiz:Country>
<ebiz:IsDefault>true</ebiz:IsDefault>
</ebiz:Address>
</ebiz:salesRep>
<ebiz:salesRepId>Sr-0002</ebiz:salesRepId>
<ebiz:salesRepInternalId>********-db6b-424b-8b7c-d38904ae1075</ebiz:salesRepInternalId>
</ebiz:UpdateSalesRep>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UpdateSalesRepResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<UpdateSalesRepResult>
<Status>Success</Status>
<StatusCode>1</StatusCode>
<Error />
<ErrorCode>0</ErrorCode>
</UpdateSalesRepResult>
</UpdateSalesRepResponse>
</s:Body>
</s:Envelope>
Updated about 2 years ago