clean: Removed anything billing related

This commit is contained in:
Maniload
2024-03-02 21:48:56 +01:00
parent 2628758d4f
commit f9ed6281b4
18 changed files with 0 additions and 965 deletions
-38
View File
@@ -63,14 +63,6 @@ export default {
{ text: 'User', link: '/auth/user/' }
],
},
{
text: 'Billing',
items: [
{ text: 'Index', link: '/billing/' },
{ text: 'Balance', link: '/billing/balance/' },
{ text: 'Transaction', link: '/billing/transaction/' }
]
},
{
text: 'Config',
items: [
@@ -221,36 +213,6 @@ export default {
]
}
],
'/billing/': [
{
text: 'Balance',
collapsed: true,
items: [
{ text: 'Resource', link: '/billing/balance/' },
{ text: 'Destroy', link: '/billing/balance/destroy/' },
{ text: 'Force Delete', link: '/billing/balance/forceDelete/' },
{ text: 'Index', link: '/billing/balance/index/' },
{ text: 'Restore', link: '/billing/balance/restore/' },
{ text: 'Show', link: '/billing/balance/show/' },
{ text: 'Store', link: '/billing/balance/store/' },
{ text: 'Update', link: '/billing/balance/update/' }
]
},
{
text: 'Transaction',
collapsed: true,
items: [
{ text: 'Resource', link: '/billing/transaction/' },
{ text: 'Destroy', link: '/billing/transaction/destroy/' },
{ text: 'Force Delete', link: '/billing/transaction/forceDelete/' },
{ text: 'Index', link: '/billing/transaction/index/' },
{ text: 'Restore', link: '/billing/transaction/restore/' },
{ text: 'Show', link: '/billing/transaction/show/' },
{ text: 'Store', link: '/billing/transaction/store/' },
{ text: 'Update', link: '/billing/transaction/update/' }
]
}
],
'/config/': [
{
text: 'Wiki Config',
-51
View File
@@ -1,51 +0,0 @@
---
title: Balance Destroy
---
# Balance Destroy Endpoint
The balance destroy endpoint soft deletes a balance and returns the deleted balance resource.
For example, the `/balance/1` endpoint will soft delete the balance of id '1' and return the deleted balance resource.
## URL
```sh
DELETE /balance/{id}
```
## Authentication
**Required Permission**: delete balance
**Roles with Permission**: Admin
**Other Requirements**: Balance must not be soft deleted
## 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 DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/balance/1
```
-39
View File
@@ -1,39 +0,0 @@
---
title: Balance Force Delete
---
# Balance Force Delete Endpoint
The balance force delete endpoint hard deletes a balance and returns a confirmation message.
For example, the `/forceDelete/balance/1` endpoint will hard delete the balance of id '1' and return a confirmation message.
## URL
```sh
DELETE /forceDelete/balance/{id}
```
## Authentication
**Required Permission**: force delete balance
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
message: "The Balance 'AWS 2022-06-01' was deleted.",
}
```
## Example
```bash
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/balance/1
```
-57
View File
@@ -1,57 +0,0 @@
---
title: Balance
---
# Balance
---
A balance API resource represents an account balance against usage or upcoming charges for the given month.
## Fields
| Name | Type | Nullable | Default | Description |
| :-------------------: | :-----: | :------: | :-----: | :------------------------------------------------------------------------------------------------------- |
| id | Integer | No | Yes | The primary key of the resource |
| date | Date | No | Yes | The given month that the account balance applies to |
| service | Enum | No | Yes | The service that is billing AnimeThemes [Other, DigitalOcean, AWS, Hover, WalkerServers] |
| frequency | Enum | No | Yes | The frequency that AnimeThemes is billed by the service [Once, Annually, Biannually, Quarterly, Monthly] |
| usage | Decimal | No | Yes | The amount of services consumed by AnimeThemes in the billing period |
| month_to_date_balance | Decimal | No | Yes | The balance of the AnimeThemes account with consideration to usage |
| created_at | Date | No | No | The date that the resource was created |
| updated_at | Date | No | No | The date that the resource was last modified |
| deleted_at | Date | Yes | No | The date that the resource was deleted |
## Allowed Include Paths
None
## Endpoints
**[Balance Destroy](/billing/balance/destroy/)**
The balance destroy endpoint soft deletes a balance and returns the deleted balance resource.
**[Balance Force Delete](/billing/balance/forceDelete/)**
The balance force delete endpoint hard deletes a balance and returns a confirmation message.
**[Balance Index](/billing/balance/index/)**
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.
**[Balance Store](/billing/balance/store/)**
The balance store endpoint creates a new balance and returns the new balance resource.
**[Balance Update](/billing/balance/update/)**
The balance update endpoint updates a balance and returns the updated balance resource.
-97
View File
@@ -1,97 +0,0 @@
---
title: Balance Index
---
# Balance Index Endpoint
The balance index endpoint returns a listing of balance resources.
## URL
```sh
GET /balance/
```
## Authentication
None
## Parameters
| Name | Required | Description |
| :----------: | :------: | :---------------------------------------------------------------------------- |
| fields | No | Sparse fieldsets for resource types |
| filter | No | Filters for balance resources & constraining the inclusion of related resources |
| page[number] | No | The page of balance resources to display |
| page[size] | No | The number of balance resources to display for the current page |
| sort | No | The list of fields to sort the balance resources |
## Allowed Sort Fields
| Name | Description |
| :-------------------: | :------------------------------------------------------------------ |
| id | Sort resources on the primary key |
| date | Sort resources on the month that the balance applies to |
| service | Sort resources on the service that is billing AnimeThemes |
| frequency | Sort resources on the frequency that AnimeThemes is billed |
| usage | Sort resources on the consumption of AnimeThemes in the period |
| month_to_date_balance | Sort resources on the balance of the AnimeThemes account |
| created_at | Sort resources on the resource creation date |
| updated_at | Sort resources on the resource last modified date |
| deleted_at | Sort resources on the resource deletion date |
| random | Sort resources randomly. Ignored if other sort fields are provided. |
## Filters
| Name | Description |
| :-------------------: | :----------------------------------------------------------------- |
| id | Filter resources on the primary key |
| date | Filter resources on the month that the balance applies to |
| service | Filter resources on the service that is billing AnimeThemes |
| frequency | Filter resources on the frequency that AnimeThemes is billed |
| usage | Filter resources on the consumption of AnimeThemes in the period |
| month_to_date_balance | Filter resources on the balance of the AnimeThemes account |
| created_at | Filter resources on the resource creation date |
| updated_at | Filter resources on the resource last modified date |
| deleted_at | Filter resources on the resource deletion date |
| trashed | Filter resources on trashed (deleted) status [With, Without, Only] |
## Response
```json
{
balances: [
{
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"
},
...
],
links: {
first: "first",
last: "last",
prev: "prev",
next: "next"
},
meta: {
current_page: current_page,
from: from,
path: "path",
per_page: per_page,
to: to
}
}
```
## Example
```bash
curl https://api.animethemes.moe/balance/
```
-51
View File
@@ -1,51 +0,0 @@
---
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
**Other Requirements**: Balance must be soft deleted
## 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
```
-47
View File
@@ -1,47 +0,0 @@
---
title: Balance Show
---
# Balance Show Endpoint
The balance show endpoint returns a balance resource.
## URL
```sh
GET /balance/{id}
```
## Authentication
None
## Parameters
| Name | Required | Description |
| :-----: | :------: | :------------------------------------------------------ |
| fields | No | Sparse fieldsets for resource types |
## 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 https://api.animethemes.moe/balance/1
```
-55
View File
@@ -1,55 +0,0 @@
---
title: Balance Store
---
# Balance Store Endpoint
The balance store endpoint creates a new balance and returns the new balance resource.
For example, the `/balance?date=2022-06-01&service=AWS&frequency=Monthly&usage=10.00&month_to_date_balance=50.00` endpoint will create a new balance and return the new balance resource.
## URL
```sh
POST /balance
```
## Authentication
**Required Permission**: create balance
**Roles with Permission**: Admin
## Parameters
| Name | Required | Rules |
| :-------------------: | :------: | :--------------------------------------------------------- |
| date | Yes | date_format:Y-m-d |
| service | Yes | EnumValue [Other, DigitalOcean, AWS, Hover, WalkerServers] |
| frequency | Yes | EnumValue [Once, Annually, Biannually, Quarterly, Monthly] |
| usage | Yes | regex:/^\-?\d+(\.\d{1,2})?$/ |
| month_to_date_balance | Yes | regex:/^\-?\d+(\.\d{1,2})?$/ |
## 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 POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/balance/
```
-57
View File
@@ -1,57 +0,0 @@
---
title: Balance Update
---
# Balance Update Endpoint
The balance update endpoint updates a balance and returns the updated balance resource.
For example, the `/balance/1?usage=10.00` endpoint will update the balance usage attribute and return the updated balance resource.
## URL
```sh
PUT|PATCH /balance/{id}
```
## Authentication
**Required Permission**: update balance
**Roles with Permission**: Admin
**Other Requirements**: Balance must not be soft deleted
## Parameters
| Name | Required | Rules |
| :-------------------: | :------: | :--------------------------------------------------------- |
| date | No | date_format:Y-m-d |
| service | No | EnumValue [Other, DigitalOcean, AWS, Hover, WalkerServers] |
| frequency | No | EnumValue [Once, Annually, Biannually, Quarterly, Monthly] |
| usage | No | regex:/^\-?\d+(\.\d{1,2})?$/ |
| month_to_date_balance | No | regex:/^\-?\d+(\.\d{1,2})?$/ |
## 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/balance/1
```
-19
View File
@@ -1,19 +0,0 @@
---
title: Billing
---
# Billing
---
Billing API resources pertain to the financial status of accounts needed to run AnimeThemes.
## Resources
**[Balance](/billing/balance/)**
A balance API resource represents an account balance against usage or upcoming charges for the given month.
**[Transaction](/billing/transaction/)**
A transaction API resource represents an invoice from or a payment to a billing service by AnimeThemes.
-51
View File
@@ -1,51 +0,0 @@
---
title: Transaction Destroy
---
# Transaction Destroy Endpoint
The transaction destroy endpoint soft deletes a transaction and returns the deleted transaction resource.
For example, the `/transaction/1` endpoint will soft delete the transaction of id '1' and return the deleted transaction resource.
## URL
```sh
DELETE /transaction/{id}
```
## Authentication
**Required Permission**: delete transaction
**Roles with Permission**: Admin
**Other Requirements**: Transaction must not be soft deleted
## 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 DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/transaction/1
```
@@ -1,39 +0,0 @@
---
title: Transaction Force Delete
---
# Transaction Force Delete Endpoint
The transaction force delete endpoint hard deletes a transaction and returns a confirmation message.
For example, the `/forceDelete/transaction/1` endpoint will hard delete the transaction of id '1' and return a confirmation message.
## URL
```sh
DELETE /forceDelete/transaction/{id}
```
## Authentication
**Required Permission**: force delete transaction
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
message: "The Transaction 'AWS 2022-06-01' was deleted.",
}
```
## Example
```bash
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/transaction/1
```
-57
View File
@@ -1,57 +0,0 @@
---
title: Transaction
---
# Transaction
---
A transaction API resource represents an invoice from or a payment to a billing service by AnimeThemes.
## Fields
| Name | Type | Nullable | Default | Description |
| :-------------------: | :-----: | :------: | :-----: | :--------------------------------------------------------------------------------------- |
| id | Integer | No | Yes | The primary key of the resource |
| date | Date | No | Yes | The date that the transaction was made |
| service | Enum | No | Yes | The service that is billing AnimeThemes [Other, DigitalOcean, AWS, Hover, WalkerServers] |
| description | String | No | Yes | The short description of what the transaction is for |
| amount | Decimal | No | Yes | The amount of the transaction billed by or paid to the billing service by AnimeThemes |
| external_id | String | Yes | Yes | The identifier used by the service for the transaction, if applicable |
| created_at | Date | No | No | The date that the resource was created |
| updated_at | Date | No | No | The date that the resource was last modified |
| deleted_at | Date | Yes | No | The date that the resource was deleted |
## Allowed Include Paths
None
## Endpoints
**[Transaction Destroy](/billing/transaction/destroy/)**
The transaction destroy endpoint soft deletes a transaction and returns the deleted transaction resource.
**[Transaction Force Delete](/billing/transaction/forceDelete/)**
The transaction force delete endpoint hard deletes a transaction and returns a confirmation message.
**[Transaction Index](/billing/transaction/index/)**
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.
**[Transaction Store](/billing/transaction/store/)**
The transaction store endpoint creates a new transaction and returns the new transaction resource.
**[Transaction Update](/billing/transaction/update/)**
The transaction update endpoint updates a transaction and returns the updated transaction resource.
-97
View File
@@ -1,97 +0,0 @@
---
title: Transaction Index
---
# Transaction Index Endpoint
The transaction index endpoint returns a listing of transaction resources.
## URL
```sh
GET /transaction/
```
## Authentication
None
## Parameters
| Name | Required | Description |
| :----------: | :------: | :---------------------------------------------------------------------------- |
| fields | No | Sparse fieldsets for resource types |
| filter | No | Filters for anime resources & constraining the inclusion of related resources |
| page[number] | No | The page of anime resources to display |
| page[size] | No | The number of anime resources to display for the current page |
| sort | No | The list of fields to sort the resources |
## Allowed Sort Fields
| Name | Description |
| :---------: | :------------------------------------------------------------------ |
| id | Sort resources on the primary key |
| date | Sort resources on the date that the transaction was made |
| service | Sort resources on the service that is billing AnimeThemes |
| description | Sort resources on the description of what the transaction is for |
| amount | Sort resources on the amount of the transaction billed / paid |
| external_id | Sort resources on the identifier used by the service |
| created_at | Sort resources on the resource creation date |
| updated_at | Sort resources on the resource last modified date |
| deleted_at | Sort resources on the resource deletion date |
| random | Sort resources randomly. Ignored if other sort fields are provided. |
## Filters
| Name | Description |
| :---------: | :----------------------------------------------------------------- |
| id | Filter resources on the primary key |
| date | Filter resources on the date that the transaction was made |
| service | Filter resources on the service that is billing AnimeThemes |
| description | Filter resources on the description of what the transaction is for |
| amount | Filter resources on the amount of the transaction billed / paid |
| external_id | Filter resources on the identifier used by the service |
| created_at | Filter resources on the resource creation date |
| updated_at | Filter resources on the resource last modified date |
| deleted_at | Filter resources on the resource deletion date |
| trashed | Filter resources on trashed (deleted) status [With, Without, Only] |
## Response
```json
{
transactions: [
{
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"
},
...
],
links: {
first: "first",
last: "last",
prev: "prev",
next: "next"
},
meta: {
current_page: current_page,
from: from,
path: "path",
per_page: per_page,
to: to
}
}
```
## Example
```bash
curl https://api.animethemes.moe/transaction/
```
-51
View File
@@ -1,51 +0,0 @@
---
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
**Other Requirements**: Transaction must be soft deleted
## 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
```
-47
View File
@@ -1,47 +0,0 @@
---
title: Transaction Show
---
# Transaction Show Endpoint
The transaction show endpoint returns a transaction resource.
## URL
```sh
GET /transaction/{id}
```
## Authentication
None
## Parameters
| Name | Required | Description |
| :-----: | :------: | :------------------------------------------------------ |
| fields | No | Sparse fieldsets for resource types |
## 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 https://api.animethemes.moe/transaction/1
```
-55
View File
@@ -1,55 +0,0 @@
---
title: Transaction Store
---
# Transaction Store Endpoint
The transaction store endpoint creates a new transaction and returns the new transaction resource.
For example, the `/transaction?date=2022-06-01&service=AWS&description=June+2022+Payment&amount=10.00` endpoint will create a new transaction and return the new transaction resource.
## URL
```sh
POST /transaction
```
## Authentication
**Required Permission**: create transaction
**Roles with Permission**: Admin
## Parameters
| Name | Required | Rules |
| :---------: | :------: | :--------------------------------------------------------- |
| date | Yes | date_format:Y-m-d |
| service | Yes | EnumValue [Other, DigitalOcean, AWS, Hover, WalkerServers] |
| description | Yes | string, max:192 |
| amount | Yes | regex:/^\-?\d+(\.\d{1,2})?$/ |
| external_id | No | string, max:192 |
## 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 POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/transaction/
```
-57
View File
@@ -1,57 +0,0 @@
---
title: Transaction Update
---
# Transaction Update Endpoint
The transaction update endpoint updates a transaction and returns the updated transaction resource.
For example, the `/transaction/1?external_id=12345` endpoint will update the transaction external_id attribute and return the updated transaction resource.
## URL
```sh
PUT|PATCH /transaction/{id}
```
## Authentication
**Required Permission**: update transaction
**Roles with Permission**: Admin
**Other Requirements**: Transaction must not be soft deleted
## Parameters
| Name | Required | Rules |
| :---------: | :------: | :--------------------------------------------------------- |
| date | No | date_format:Y-m-d |
| service | No | EnumValue [Other, DigitalOcean, AWS, Hover, WalkerServers] |
| description | No | string, max:192 |
| amount | No | regex:/^\-?\d+(\.\d{1,2})?$/ |
| external_id | No | string, max:192 |
## 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/transaction/1
```