feat: add balance and ledger endpoints for tenant
- Implemented MyBalance and MyLedgerPage methods in the ledger service to retrieve current user balance and transaction history for a specified tenant. - Added corresponding test cases for MyBalance and MyLedgerPage methods in the ledger test suite. - Created DTOs for balance response and ledger items to structure the response data. - Updated Swagger documentation to include new endpoints for retrieving tenant balance and ledgers. - Added HTTP tests for the new endpoints to ensure proper functionality.
This commit is contained in:
@@ -12,6 +12,16 @@ GET {{ host }}/t/{{ tenantCode }}/v1/me
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{ token }}
|
||||
|
||||
### Tenant - My balance
|
||||
GET {{ host }}/t/{{ tenantCode }}/v1/me/balance
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{ token }}
|
||||
|
||||
### Tenant - My ledgers (paged)
|
||||
GET {{ host }}/t/{{ tenantCode }}/v1/me/ledgers?page=1&limit=20
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{ token }}
|
||||
|
||||
### Tenant - Contents list (published)
|
||||
GET {{ host }}/t/{{ tenantCode }}/v1/contents?page=1&limit=10
|
||||
Content-Type: application/json
|
||||
|
||||
Reference in New Issue
Block a user