SOAP API – AddCharge
AddCharge( username, amount, servicename, transactiondate, detail , periodstart , periodend , applytax, iscredit ) : void
Since: EngageIP v25.2
Adds Charge to a user or throws exception if any of the following occurs: (The user does not exist, the amount is less than or equal to zero, the service name is not supplied, the service does not exist as use or the service or does not exist as a non-recurring charge)
Parameters:
username (String) - The name of the User.
amount (Double) - The amount of the charge, must be greater than zero.
servicename (String) - The name of the service which exist in the system with as a non-recurring charge ( Defined as any service with Base Time Unit of once).
transactiondate (String) - The date of this transaction.
detail (String) - The charge details.
periodstart (DateTime) - The start date of the billing period for the invoice you want the charge to appear on.
periodend (DateTime) - The end date of the billing period for the invoice you want the charge to appear on.
applytax (Boolean) - Indicates tax will be applied or not. If the value is true then tax will be calculated and applied otherwise no tax will be applied.
iscredit (Boolean) - Indicates the charge will be added as credit or not. If the value is true then it is credit otherwise it is charge.
Possible Exceptions:
INVALID USERNAME
INVALID AMOUNT
INVALID SERVICE
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /AdminPortal/webservice.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<AuthHeader xmlns="Logisense_EngageIP">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap12:Header>
<soap12:Body>
<AddCharge xmlns="Logisense_EngageIP">
<username>string</username>
<amount>double</amount>
<servicename>string</servicename>
<transactiondate>dateTime</transactiondate>
<detail>string</detail>
<periodstart>dateTime</periodstart>
<periodend>dateTime</periodend>
<applytax>boolean</applytax>
<iscredit>boolean</iscredit>
</AddCharge>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddChargeResponse xmlns="Logisense_EngageIP" />
</soap12:Body>
</soap12:Envelope>
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /AdminPortal/webservice.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "Logisense_EngageIP/AddCharge"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthHeader xmlns="Logisense_EngageIP">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap:Header>
<soap:Body>
<AddCharge xmlns="Logisense_EngageIP">
<username>string</username>
<amount>double</amount>
<servicename>string</servicename>
<transactiondate>dateTime</transactiondate>
<detail>string</detail>
<periodstart>dateTime</periodstart>
<periodend>dateTime</periodend>
<applytax>boolean</applytax>
<iscredit>boolean</iscredit>
</AddCharge>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddChargeResponse xmlns="Logisense_EngageIP" />
</soap:Body>
</soap:Envelope>