UsageChargeCounter
Version: 1.33
Create usageChargeCounters in the Gotransverse GUI as you need them. Gotransverse provides the following kinds of Counters:
-
UsageChargeCounter
-
UsageEventCounter
-
UsageRuleCounter
If needed, refer to the following related topics:
-
AddCounterToService
-
UpdateOpenCounters
-
CounterStatus
-
CounterType
Further Gotransverse API information for this entity of UsageChargeCounter:
Parameters
When you query Counters, the following table provides information about the values returned for UsageChargeCounters 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 |
DateTime |
255 |
Y |
The unique name of the Counter |
description |
DateTime |
255 |
N |
Optional. You may enter a description of the Counter |
|
fromDate |
Y |
See
|
Y |
The DateTime the Counter started. |
|
thruDate |
Y |
See
|
The DateTime the Counter ends. |
||
status |
Y |
CounterStatus |
Select one: FT |
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. |
charge |
Decimal |
As needed |
Y |
The current charge amount. |
|
threshold |
Decimal |
As needed |
N |
The threshold charge for when the Counter starts counting Usage Charges. |
Entity Counters
The entity Counters enables you to see multiple pages of the entity UsageChargeCounter (and UsageEventCounter, and UsageRuleCounter).
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 Charge Counter
Usage Charge Counters cannot be queried as a group, but instead query for Counters which include Usage Charge 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 |
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_31/service"> <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.33/counters/<eid>
GET https://my.tractbilling.com/t/s/r/1.33/counters?eid=<eid>
GET https://my.tractbilling.com/t/s/r/1.33/counters?name=<name>
GET https://my.tractbilling.com/t/s/r/1.33/counters?serviceEid=<serviceEid>&entityRelationType=<entityRelationType>
GET https://my.tractbilling.com/t/s/r/1.33/counters?type=<type>
GET https://my.tractbilling.com/t/s/r/1.33/counters?status=<status>
GET https://my.tractbilling.com/t/s/r/1.33/counters?fromDate=<fromDate>
GET https://my.tractbilling.com/t/s/r/1.33/counters?thruDate=<thruDate>
Update (refer to UpdateOpenCounters)
PUT https://my.tractbilling.com/t/s/r/1.33/counters/usageCharge/<eid>
PUT https://my.tractbilling.com/t/s/r/1.33/counters/usageEvent/<eid>
PUT https://my.tractbilling.com/t/s/r/1.33/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.33/counters?serviceEid=85049&entityRelationType=SERVICE