mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-11-12 01:00:15 +01:00
feat: add documentation for restore endpoints (#52)
* feat: add documentation for restore endpoints * fix: missing prefix on playlist restore route
This commit is contained in:
1 parent
63e16135a9
commit
fa3c714de4
43 files changed
+1077
-26
No files matched your search
@@ -40,6 +40,10 @@ The balance force delete endpoint hard deletes a balance and returns a confirmat
|
||||
|
||||
The balance index endpoint displays a listing of balance resources.
|
||||
|
||||
**[Balance Restore](/billing/balance/restore/)**
|
||||
|
||||
The balance restore endpoint restores a soft deleted balance and returns the restored balance resource.
|
||||
|
||||
**[Balance Show](/billing/balance/show/)**
|
||||
|
||||
The balance show endpoint returns a balance resource.
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Balance Restore
|
||||
---
|
||||
|
||||
# Balance Restore Endpoint
|
||||
|
||||
The balance restore endpoint restores a soft deleted balance and returns the restored balance resource.
|
||||
|
||||
For example, the `/restore/balance/1` endpoint will restore the soft deleted balance of id '1' and return the restored balance resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PATCH /restore/balance/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: restore balance
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
balance: {
|
||||
id: id,
|
||||
date: "date",
|
||||
service: "service",
|
||||
frequency: "frequency",
|
||||
usage: usage,
|
||||
month_to_date_balance: month_to_date_balance,
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/balance/1
|
||||
```
|
||||
@@ -40,6 +40,10 @@ The transaction force delete endpoint hard deletes a transaction and returns a c
|
||||
|
||||
The transaction index endpoint displays a listing of transaction resources.
|
||||
|
||||
**[Transaction Restore](/billing/transaction/restore/)**
|
||||
|
||||
The transaction restore endpoint restores a soft deleted transaction and returns the restored transaction resource.
|
||||
|
||||
**[Transaction Show](/billing/transaction/show/)**
|
||||
|
||||
The transaction show endpoint returns a transaction resource.
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Transaction Restore
|
||||
---
|
||||
|
||||
# Transaction Restore Endpoint
|
||||
|
||||
The transaction restore endpoint restores a soft deleted transaction and returns the restored transaction resource.
|
||||
|
||||
For example, the `/restore/transaction/1` endpoint will restore the soft deleted transaction of id '1' and return the restored transaction resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PATCH /restore/transaction/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: restore transaction
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
transaction: {
|
||||
id: id,
|
||||
date: "date",
|
||||
service: "service",
|
||||
description: "description",
|
||||
amount: amount,
|
||||
external_id: external_id,
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/transaction/1
|
||||
```
|
||||
Reference in new issue
Block a user