UpdateSubCustomer

Description

Update an existing sub-customer.

Syntax

SubCustomerResponse UpdateSubCustomer(SecurityToken securityToken,SubCustomer subCustomer, string customerId, string subCustomerId, string subCustomerInternalId);

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant and validate transaction. (required)

SubCustomer

subCustomer

Includes NEW sub-customer information, such as sub-customer number, merchant-assigned customer ID, billing address, receipt settings, recurring billing settings, and other pertinent information. (required)

string

customerId

Customer ID for existing sub-customer. (required)

string

subCustomerId

Sub-customer ID for existing sub-customer. (required)

string

subCustomerInternalId

The existing unique sub-customer ID number assigned by the internal system. (required)

Return Value

Type

Description

SubCustomerResponse

Returns result of UpdateSubCustomer request.

var client = new IeBizServiceClient();
SecurityToken securityToken = new SecurityToken();
SubCustomer subCustomer = new SubCustomer();
securityToken.UserId = "userid";
securityToken.SecurityId = "2dc496d1-90b4-4a38-ad78-28a795af78e7";
securityToken.Password = "userPassword";
subCustomer.FirstName = "Mark";
subCustomer.LastName = "Wilson";
subCustomer.CompanyName = "CBS";
subCustomer.CustomerId = "C-E&000002";
subCustomer.CellPhone = "714-555-5014";
subCustomer.Fax = "714-555-5010";
subCustomer.Phone = "714-555-5015";
subCustomer.BillingAddress = new eBizChargeConnectSOAP.Address();
subCustomer.BillingAddress.Address1 = "20 Pacifica";
subCustomer.BillingAddress.Address2 = "Suite 1450";
subCustomer.BillingAddress.City = "Irvine";
subCustomer.BillingAddress.ZipCode = "92618";
subCustomer.BillingAddress.State = "CA";
SubCustomerResponse Response = client.UpdateCustomer(securityToken, subCustomer, "CBS-001","s-001", "");

Console.WriteLine(Response.SubCustomerId);
Console.WriteLine(Response.Status);
Console.WriteLine(Response.StatusCode);
Console.WriteLine(Response.Error);
Console.WriteLine(Response.ErrorCode);
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:UpdateSubCustomer>
         <ebiz:securityToken>
            <ebiz:SecurityId>3dc496d1-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:subCustomer>
            <ebiz:CustomerId>newcustomerID</ebiz:CustomerId>
            <ebiz:SubCustomerId>newSubCustoerID</ebiz:SubCustomerId>
            <ebiz:SubCustomerInternalId/>
            <ebiz:BillingAddress>
               <ebiz:FirstName>Anthony</ebiz:FirstName>
               <ebiz:LastName>Kim</ebiz:LastName>
               <ebiz:CompanyName>CBS</ebiz:CompanyName>
               <ebiz:Address1>20 Pacifica</ebiz:Address1>
               <ebiz:Address2>Suite 1450</ebiz:Address2>
               <ebiz:City>Irvine</ebiz:City>
               <ebiz:State>CA</ebiz:State>
               <ebiz:ZipCode>92618</ebiz:ZipCode>
            </ebiz:BillingAddress>
            <ebiz:FirstName>Anthony</ebiz:FirstName>
            <ebiz:LastName>Kim</ebiz:LastName>
            <ebiz:CompanyName>CBS</ebiz:CompanyName>
            <ebiz:Phone/>
            <ebiz:CellPhone/>
            <ebiz:Fax/>
            <ebiz:Email>[email protected]</ebiz:Email>
            <ebiz:WebSite/>
         </ebiz:subCustomer>
         <ebiz:customerId>mm-0011-03</ebiz:customerId>
         <ebiz:subCustomerId>mm-0011-03[4]</ebiz:subCustomerId>
         <ebiz:subCustomerInternalId/>
      </ebiz:UpdateSubCustomer>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <UpdateSubCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <UpdateSubCustomerResult>
            <CustomerId>newcustomerID</CustomerId>
            <SubCustomerId>newSubCustoerID</SubCustomerId>
            <SubCustomerInternalId/>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </UpdateSubCustomerResult>
      </UpdateSubCustomerResponse>
   </s:Body>
</s:Envelope>