Skip to content

Instantly share code, notes, and snippets.

@LFTroya
Last active July 14, 2020 17:57
Show Gist options
  • Save LFTroya/0f9af553693480efa2333c005ea1e623 to your computer and use it in GitHub Desktop.
Save LFTroya/0f9af553693480efa2333c005ea1e623 to your computer and use it in GitHub Desktop.

Endpoints

Method URL Description
GET /api/ppes/summary/{year}/{month} Get ppes sumary [YYYY-MM]
GET /api/ppes/details/{year}/{month} Get ppes details for depreciation table
GET /api/ppes/{year}/month Get ppes for editing records
POST /api/ppes/reports Get ppes report
POST /api/ppes/ Create ppes
{
"entities": [
{
"id": 1,
"user_id": "15",
"nature_id": "1",
"name": "Sallie Ryan",
"value": 24.79602126,
"purchase_at": "2020-01-11T00:00:00.000000Z",
"sale_amount": 54086.1,
"depreciation_value": 0,
"end_date": "2025-01-01T00:00:00.000000Z",
"created_at": "2020-07-13T19:44:50.000000Z",
"updated_at": "2020-07-13T19:44:50.000000Z",
"nature": {
"id": 1,
"name": "Vehículos y Computadores",
"depreciation_rate": "20.0",
"lifespan": "5"
}
}
]
}
[
{"transaction": {}, "entities": []},
{"transaction": {}, "entities": []}
]
{
"transaction": {
"year": 2020,
"month": 2,
},
"entities": [
{
"user_id": 16,
"nature_id": 1,
"name": "Ryley Lemke",
"value": 0.386837,
"purchase_at": "1975-10-11T00:00:00.000000Z",
"sale_at": "2016-04-15T00:00:00.000000Z",
"sale_amount": 502193830.51,
"depreciation_value": 2.5044,
"end_date": "2025-07-13T19:46:42.000000Z",
"is_total": false,
"total_value": 0,
"total_depreciation": 100
},
{
"user_id": 17,
"nature_id": 1,
"name": "Mr. Adrain Witting II",
"value": 4985.7,
"purchase_at": "2015-04-12T00:00:00.000000Z",
"sale_at": "1992-12-23T00:00:00.000000Z",
"sale_amount": 630973.2875,
"depreciation_value": 2796527.487,
"end_date": "2025-07-13T19:46:42.000000Z",
"is_total": false,
"total_value": 0,
"total_depreciation": 100
},
{
"user_id": 18,
"nature_id": 1,
"name": "Prof. Justus Kunze Sr.",
"value": 3152.538,
"purchase_at": "1970-05-28T00:00:00.000000Z",
"sale_at": "2001-06-30T00:00:00.000000Z",
"sale_amount": 93.44467983,
"depreciation_value": 24.2068914,
"end_date": "2025-07-13T19:46:42.000000Z",
"is_total": false,
"total_value": 0,
"total_depreciation": 100
}
]
}
{
"transactions": [
{
"user_id": 15,
"month": 4,
"year": 2019,
"updated_at": "2020-07-13T19:47:35.000000Z",
"created_at": "2020-07-13T19:47:35.000000Z",
"id": 1,
"details": [
{
"name": "Vehículos y Computadores",
"value": 74.99999999999993
}
],
"total": 74.99999999999993
},
{
"user_id": 15,
"month": 5,
"year": 2019,
"updated_at": "2020-07-13T19:47:35.000000Z",
"created_at": "2020-07-13T19:47:35.000000Z",
"id": 2,
"details": [
{
"name": "Vehículos y Computadores",
"value": 73.33333333333326
}
],
"total": 73.33333333333326
}
],
"entities": [
{
"name": "Vehículos y Computadores",
"previous_value": 74.99999999999993,
"value": 73.33333333333326,
"diff": -1.6666666666666714,
"diff_percentage": -2.2727272727272814
}
]
}
{
"entities": [
{
"id": 1,
"user_id": "15",
"nature_id": "1",
"name": "Cathrine Bins",
"value": 100,
"purchase_at": "2019-10-01T00:00:00.000000Z",
"sale_at": "2020-04-01T00:00:00.000000Z",
"sale_amount": 72899.98446159,
"depreciation_value": 0.91,
"end_date": "2025-07-13T19:48:17.000000Z",
"created_at": "2020-07-13T19:48:17.000000Z",
"updated_at": "2020-07-13T19:48:17.000000Z",
"accumulated_depreciation": 6.666666666666667,
"nature": {
"id": 1,
"name": "Vehículos y Computadores",
"depreciation_rate": "20.0",
"lifespan": "5"
}
},
{
"id": 2,
"user_id": "15",
"nature_id": "1",
"name": "Drake Gutkowski",
"value": 100,
"purchase_at": "2019-10-01T00:00:00.000000Z",
"sale_at": "2020-01-01T00:00:00.000000Z",
"sale_amount": 90468.451864,
"depreciation_value": 29667.29,
"end_date": "2025-07-13T19:48:17.000000Z",
"created_at": "2020-07-13T19:48:17.000000Z",
"updated_at": "2020-07-13T19:48:17.000000Z",
"accumulated_depreciation": 0,
"nature": {
"id": 1,
"name": "Vehículos y Computadores",
"depreciation_rate": "20.0",
"lifespan": "5"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment