UpdateTerms

Description

This method is used to update existing terms.

Syntax

TermsResponse UpdateTerms(SecurityToken securityToken, Terms terms, string termsId, string termsInternalId).

Arguments

Type

Name

Description

SecurityToken

securityToken

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

Terms

terms

Terms name, description and conditions. (required)

String

termsId

Terms ID. (required)

String

termsInternalId

Unique internal terms ID assigned by EBizCharge. (required)

Return Value

Type

Description

TermsResponse

Returns result of UpdateTerms request.

Examples

function updateTerms()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-777',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$terms = array(
'TermsId' => 'Net30',
'TermsName' => 'Net30',
'TermsDescription' => 'Net30',
'NetDueInDays' => '30',
'DiscountPercentage' =>'2',
'DiscountIfPaidWithinDays' => '10',
'IsInactive' => 0,
'ExternalUniqueId' => 'Net30'
);
$updateTerms = array(
'securityToken' => $securityToken,
'terms' => $terms,
'termsId' => 'Net30',
'termsInternalId' => 'Net30'
);
$updateTermsResponse = $client->UpdateTerms($updateTerms);
$updateTermsResponseResult = $addTermsResponse->UpdateTermsResult;
}
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header />
   <soapenv:Body>
      <ebiz:UpdateTerms>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-55ee-434c-b126-f630f2486a2d</ebiz:SecurityId>
            <ebiz:UserId />
            <ebiz:Password />
         </ebiz:securityToken>
         <ebiz:terms>
            <ebiz:TermsInternalId>*******-1838-4b16-b38c-3b801ed8822f</ebiz:TermsInternalId>
            <ebiz:TermsId>T-0001</ebiz:TermsId>
            <ebiz:TermsName>Net30</ebiz:TermsName>
            <ebiz:TermsDescription />
            <ebiz:NetDueInDays>30</ebiz:NetDueInDays>
            <ebiz:DiscountPercentage>4</ebiz:DiscountPercentage>
            <ebiz:DiscountIfPaidWithinDays>4</ebiz:DiscountIfPaidWithinDays>
            <ebiz:IsInactive>0</ebiz:IsInactive>
            <ebiz:ExternalUniqueId />
            <ebiz:DateTimeCreated />
            <ebiz:DateTimeModified />
         </ebiz:terms>
         <ebiz:termsId>T-0001</ebiz:termsId>
         <ebiz:termsInternalId>********-1838-4b16-b38c-3b801ed8822f</ebiz:termsInternalId>
      </ebiz:UpdateTerms>
   </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">
      <UpdateTermsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <UpdateTermsResult>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error />
            <ErrorCode>0</ErrorCode>
         </UpdateTermsResult>
      </UpdateTermsResponse>
   </s:Body>
</s:Envelope>