Hi,
Looking at the API and the details around it it I see there is no use case describing its use and that is a pity. Each individual balance/bucket will have their own identity given upon creation. A customer/user/entity can have 0 or more buckets. When looking at the resource, operation and samples provided I see that the accumulated balance has an ID itself in the below sample 6956 and it is related to one bucket with ID 11.
|
{ "bucket": [ { "id": "11", "href": "https://mycsp.com:8080/tmf-api/prepayBalanceManagement/v4/bucket/11" } ], "description": "an accumulation of balances", "href": "https://mycsp.com:8080/tmf-api/prepayBalanceManagment/v4/accumulatedBalance/6956", "id": "6956", "logicalResource": [ { "id": "22", "href": "https://mycsp.com:8080/tmf-api/resourceInventoryManagement/v4/logicalResource/22", "@type": "MSISDN", "@baseType": "logicalResource", "value": "07645233482" } ], "name": "accumulatedBalance", "partyAccount": { "id": "acc1", "href": "https://mycsp.com:8080/tmf-api/accountManagement/v4/account/acc1" }, "product": [ { "id": "prd1", "href": "https://mycsp.com:8080/tmf-api/productInventory/v4/product/prd1" } ], "relatedParty": [ { "id": "5", "href": "https://mycsp.com:8080/tmf-api/customerManagement/customer/22", "name": "jerry lewis", "role": "customer", "@referredType": "Customer" } ], "totalBalance": { "amount": 900, "units": "MB" } }
|
In the operation for List the accumulated balance has an ID of 55 as a unique Identifier and it has buckets 11 and 12 included in it.
|
Request
|
|
GET /tmf-api/prepayBalanceManagement/v4/accumulatedBalance?product.id=prd1 Accept: application/json
|
|
Response
|
|
200
{ "id": "55", "href": "https://mycsp.com:8080/tmf-api/prepayBalanceManagement/v4/bucket?product.id=12345&bucketBalance[usageType==\"data\"]", "description": "The query used to fetch the accumulated balance", "@type": "AccumulatedBalance", "@baseType": "Entity", "bucket": [ { "id": "11", "href": "https://mycsp.com:8080/tmf-api/prepayBalanceManagement/v4/bucket/11" }, { "id": "12", "href": "https://mycsp.com:8080/tmf-api/prepayBalanceManagement/v4/bucket/12" } ], "partyAccount": { "id": "acc1", "href": "https://mycsp.com:8080/tmf-api/accountManagement/v4/account/acc1" }, "product": [ { "id": "prd1", "href": "https://mycsp.com:8080/tmf-api/productInventory/v4/product/prd1" } ], "relatedParty": [ { "id": "cust1", "href": "https://mycsp.com:8080/tmf-api/customerManagement/customer/cust1", "name": "jerry watts", "role": "customer", "@referredType": "Customer" } ], "totalBalance": { "amount": 200, "units": "MB" } }
|
As there is no create accumulated, I would assume that the ID is generated as part of the list request to then be able to re-query it, but that is guessing without having more guideline in the user guide.
My recommendation is to look at your use case and see how you would use the accumulate balance part. You do have TMF677 that in a way is similar to retrieve balances.
------------------------------
Elisabeth Andersson
MATRIXX Software
------------------------------