UsageRuleCounter
Version: 1.33
Create usageRuleCounters in the Gotransverse GUI as you need them. Gotransverse provides the following kinds of Counters:
-
UsageRuleCounter
-
UsageChargeCounter
-
UsageEventCounter
If needed, refer to the following related topics:
-
AddCounterToService
-
UpdateOpenCounters
-
CounterStatus
-
CounterType
Parameters
When you query Counters, the following table provides information about the values returned for UsageRuleCounters from the query:
Element Name | Query Key |
Element Type |
Field Length |
Required to Create |
Description |
---|---|---|---|---|---|
queryScope |
QueryScope |
- - |
N |
The depth of the query results, whether |
|
eid |
Y |
Long |
System |
System |
System generated unique identity number |
Choose one: |
Choose one: |
- - |
The type of Counter Reset. See: |
||
name |
Y |
String |
265 |
Y |
The unique name of the Counter |
description |
String |
265 |
N |
Optional. You may enter a description |
|
fromDate |
Y |
DateTime |
See Data Types page |
Y |
The DateTime the Counter started. |
thruDate |
Y |
DateTime |
See Data Types page |
The DateTime the Counter ends. |
|
status |
Y |
CounterStatus |
Select one: |
Y |
See CounterStatus for details. |
type |
Y |
CounterType |
Select one: |
Y |
The type of Counter. See CounterType for details. |
entityRelationType |
Y |
CounterEntityRelationType |
Enter: |
Y |
The type of Counter Entity Relation. |
amount |
Decimal |
As needed |
Y |
The current amount. |
|
uom |
UsageDurationUom |
- - |
See UsageDurationUom for the list of over |
||
threshold |
Decimal |
As needed |
N |
The threshold event for when the |
Entity Counters
The entity Counters enables you to see multiple pages of the entity UsageRuleCounter (and UsageChargeCounter, and UsageEventCounter).
Element Name | Element Type |
Field Length |
Description |
---|---|---|---|
pageNumber |
Integer |
as needed |
Shows the current page number. |
pageSize |
Integer |
as needed |
Shows the page size. |
totalElements |
Long |
as needed |
Shows the total number of items found. |
elementCount |
Integer |
as needed |
Shows the current count of the item |
totalPages |
Integer |
as needed |
Shows the total number of pages. |
Select one: |
Choose: |
- - |
Shows the list of |
Information for the related entity of Counters:
-
Entity Counters
How to Query for a Usage Rule Counter
Usage Rule Counters cannot be queried as a group, but instead query for Counters which include Usage Rule Counters.
Query Key Information for SOAP and REST
Querying to see Counters needs to include either at least a single parameter or at least a required pair of parameters. If you do not know the values for the parameters, query separately to learn the values.
Query Key Parameters
Query Key |
Value | Definition |
---|---|---|
eid |
Long |
The unique eid number for the Counter. |
name |
String |
The unique name of the Counter. |
serviceEid |
Long |
The unique Service |
type |
The type of Counter (Usage Event, |
|
status |
The status of the Counter. |
|
fromDate |
DateTime |
The DateTime the Counter started. |
thruDate |
DateTime |
The DateTime the Counter ends. |
-
2nd Req Query Key — entityRelationType — The CounterEntityRelationType. At this time: "SERVICE".
Query to Use
For a single parameter, use the following query.
Query | Query for | Parameter Name and Value | Returns | ||
---|---|---|---|---|---|
SimpleDataQuery |
Counter |
<parameter name><parameter value> |
List of your Counters, including Usage Charge Counters, for that parameter name and value. |
For a required parameter pair, use the following query.
Query to Use | Query for | Parameter Names and Values | Returns | ||
---|---|---|---|---|---|
SimpleDataQuery |
Counter |
<parameter name><parameter value> |
List of your Counters for that pair of parameters and their values. |
SOAP Example Query
In the following example SOAP query, the parameter of Eid was used. The Counter's EID value (in this example "7"), was learned through a previous query on Counter. ServiceEid (value "80334") has the required pair of entityRelationType (value "SERVICE") and if you use one, you would need to use the other.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ser="http://www.tractbilling.com/billing/1_26/service"xmlns:dom="http://www.tractbilling.com/billing/1_26/domain"> <soapenv:Header/> <soapenv:Body> <ser:query> <ser:queryRequest> <dom:simpleDataQuery> <dom:type>Counter</dom:type> <dom:parameter parameter="eid" parameterValue="7"/> <!-- <dom:parameter parameter="serviceEid" parameterValue="80334"/>--> <!-- serviceEid and entityRelationType are both required --> <!-- <dom:parameter parameter="entityRelationType" parameterValue="SERVICE"/>--> </dom:simpleDataQuery> </ser:queryRequest> </ser:query> </soapenv:Body> </soapenv:Envelope>
REST Mount Point and Parameters
Query
GET https://my.tractbilling.com/t/s/r/1.26/counters/<eid>
GET https://my.tractbilling.com/t/s/r/1.26/counters?eid=<eid>
GET https://my.tractbilling.com/t/s/r/1.26/counters?name=<name>
GET https://my.tractbilling.com/t/s/r/1.26/counters?serviceEid=<serviceEid>&entityRelationType=<entityRelationType>
GET https://my.tractbilling.com/t/s/r/1.26/counters?type=<type>
GET https://my.tractbilling.com/t/s/r/1.26/counters?status=<status>
GET https://my.tractbilling.com/t/s/r/1.26/counters?fromDate=<fromDate>
GET https://my.tractbilling.com/t/s/r/1.26/counters?thruDate=<thruDate>
Update (see UpdateOpenCounters)
PUT https://my.tractbilling.com/t/s/r/1.26/counters/usageCharge/<eid>
PUT https://my.tractbilling.com/t/s/r/1.26/counters/usageEvent/<eid>
PUT https://my.tractbilling.com/t/s/r/1.26/counters/usageRule/<eid>
REST Example Query
The following example shows a query of a Counter for serviceEid and entityRelationType in REST.
Query
GET https://my.tractbilling.com/t/s/r/1.26/counters?serviceEid=85049&entityRelationType=SERVICE