Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[master] - Ledger summaries for parent and subaccounts (2600hz#5738)
* * Added new MODB view, `ledgers/summary_by_account` to return parent and subaccount ledger summaries. * Added new crossbar endpoint to `cb_ledgers` to return current modb ledger summary from `../ledgers/summary/{YYYYMM}`. * Example Payload ``` { "page_size": 1, "start_key": "g24FAO1KPdYO", "data": { "summary": { "rollovers": { "amount": 6.2329, "usage": { "quantity": 0 } }, "prorations": { "amount": -5.1309, "usage": { "quantity": 0 } }, "payments": { "amount": 35.0, "usage": { "quantity": 0 } } }, "account_summary": [ { "cc580f94d7da53816a94b87b2a1d25f8": { "account": { "id": "cc580f94d7da53816a94b87b2a1d25f8", "name": "Account 1" }, "ledgers": { "payments": { "amount": 35.0, "usage": { "quantity": 0 } }, "prorations": { "amount": -4.0649, "usage": { "quantity": 0 } }, "rollovers": { "amount": 6.2329, "usage": { "quantity": 0 } } }, "total": 37.168 }, "de6fd29a54407cfe46e6c9d3828ab0d8": { "account": { "id": "de6fd29a54407cfe46e6c9d3828ab0d8", "name": "Account A" }, "ledgers": { "prorations": { "amount": -1.066, "usage": { "quantity": 0 } } }, "total": -1.066 } } ] }, "revision": "98804f3d59185d64a59ff7f9e47d1ae9", "timestamp": "2019-04-30T22:40:45Z", "version": "4.3.1", "node": "0ozIxbX-rup7AnGvNSM8JQ", "request_id": "051ff47be34fbdf6cb14ed08f4af8415", "status": "success", "auth_token": "Y2M1ODBmOTRkN2RhNTM4MTZhOTRiODdiMmExZDI1Zjg6NzNlZmY2Mzg2Y2UyMDkxYjVjYTcwMmZjMDA3ZTFkYTk=" } ``` * api and doc updates * Revert "api and doc updates" This reverts commit 30cf6bb. * api and doc fixup * payload shape change and other requests * formatting * requested refactor and view changes * doc example
- Loading branch information