API/Services/GetCapCurrentStatus
Purpose
This method will allow a user to get an idea of what account based caps are remaining in the current period for their end user.
Inputs
<soapenv:Header/> <soapenv:Body> <ser:GetCapCurrentStatus> <ser:AccountID>?</ser:AccountID> <ser:ServiceID>?</ser:ServiceID> <ser:UsageDate>?</ser:UsageDate> </ser:GetCapCurrentStatus> </soapenv:Body>
Important notes:
115. AccountID needs to be the ID of the Account in the Emersion system
116. ServiceID needs to be the ID of a Service in the Emersion system
117. UsageDate has to be a valid date, it’s an optional field, defaults to now
Error String
Example Validation Error:
<SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>Validation Error</faultstring> <faultactor>http://emersion.com.au/Services</faultactor> <detail>You do not have permission to modify this Account!</detail> </SOAP-ENV:Fault> </SOAP-ENV:Body>
Validation rules:
118. Account exists
119. Account has a parent which matches the caller.
120. Service Id exists
121. Usage Date is a valid date if supplied
Output
<SOAP-ENV:Body> <ns1:GetCapCurrentStatusResponse> <ns1:GetCapCurrentStatusItem> <ns1:PeriodRatio>0.7741935483871</ns1:PeriodRatio> <ns1:BaseCapAmount>1</ns1:BaseCapAmount> <ns1:CapAmount>0.7741935483871</ns1:CapAmount> <ns1:RateCardID>119423</ns1:RateCardID> <ns1:Weight>5</ns1:Weight> <ns1:AccountDiscountSubPeriodID>100020</ns1:AccountDiscountSubPeriodID> <ns1:PeriodStart>2013-10-08 12:15:58</ns1:PeriodStart> <ns1:PeriodEnd>2013-11-01 00:00:00</ns1:PeriodEnd> <ns1:SumRatedAmount/> <ns1:CapRemaining>0.7741935483871</ns1:CapRemaining> </ns1:GetCapCurrentStatusItem> </ns1:GetCapCurrentStatusResponse> </SOAP-ENV:Body>
Error String
122. Invalid or Missing Account ID
123. Invalid or Missing Service ID
124. Could not find Account ID!
125. You do not have permission to modify this Account!
126. Could not find Service ID!
127. This service doesn't belong to this Account