Rework Expenses resource (#3)
Co-authored-by: Joe Arndt <jmarndt@users.noreply.github.com> Reviewed-on: #3
This commit is contained in:
parent
c6434de89d
commit
6600745072
28 changed files with 317 additions and 89 deletions
|
|
@ -1,5 +1,6 @@
|
|||
meta {
|
||||
name: Categories
|
||||
seq: 2
|
||||
}
|
||||
|
||||
auth {
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
meta {
|
||||
name: LOC DEL Expense
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{localBaseUrl}}/expenses/2aa94170-2c57-4c4f-a1e7-13544ba72917
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
15
bruno/Common Cents/Expenses/LOC DELETE Expense.bru
Normal file
15
bruno/Common Cents/Expenses/LOC DELETE Expense.bru
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
meta {
|
||||
name: LOC DELETE Expense
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}/{{resourceId}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
resourceId: 41294f87-ab77-4fdd-9509-6968e6533962
|
||||
}
|
||||
|
|
@ -5,7 +5,11 @@ meta {
|
|||
}
|
||||
|
||||
get {
|
||||
url: {{localBaseUrl}}/expenses/2aa94170-2c57-4c4f-a1e7-13544ba72917
|
||||
url: {{localBaseUrl}}/{{resourcePath}}/{{resourceId}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
resourceId: 1d6d2842-b271-489b-bd93-e3ceaee5a139
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ meta {
|
|||
}
|
||||
|
||||
get {
|
||||
url: {{localBaseUrl}}/expenses
|
||||
url: {{localBaseUrl}}/{{resourcePath}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
meta {
|
||||
name: LOC PATCH Expense Full
|
||||
type: http
|
||||
seq: 6
|
||||
}
|
||||
|
||||
patch {
|
||||
url: {{localBaseUrl}}/expenses/0708e7f7-3a2a-4b93-81da-38954925ca78
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"date": "2025-12-15",
|
||||
"cents": 888,
|
||||
"categoryId": "1",
|
||||
"merchantId": "1",
|
||||
"subcategoryIds": ["2"],
|
||||
"tagIds": ["2"],
|
||||
"description": "PATCHED Desc."
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
meta {
|
||||
name: LOC POST Expense Full
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{localBaseUrl}}/expenses
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"date": "2025-12-01",
|
||||
"cents": 987,
|
||||
"categoryId": "1",
|
||||
"merchantId": "1",
|
||||
"subcategoryIds": ["1","2"],
|
||||
"tagIds": ["1","2"],
|
||||
"description": "NEW FULL expense"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
meta {
|
||||
name: LOC POST Expense Partial
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{localBaseUrl}}/expenses
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"date": "2025-12-01",
|
||||
"cents": 987,
|
||||
"categoryId": "1",
|
||||
"description": "NEW PARTIAL expense"
|
||||
}
|
||||
}
|
||||
38
bruno/Common Cents/Expenses/LOC POST Expense.bru
Normal file
38
bruno/Common Cents/Expenses/LOC POST Expense.bru
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
meta {
|
||||
name: LOC POST Expense
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"year": "2026",
|
||||
"month": "01",
|
||||
"day": "02",
|
||||
"cents": 1000,
|
||||
"description": "With cat, subcat and merchant and two tags",
|
||||
"category": {
|
||||
"id": "a73fbfdd-1949-4be9-8cdc-ea9197b9b8b6"
|
||||
},
|
||||
"subCategory": {
|
||||
"id": "270ceaea-9cb8-4c6a-846f-ea35ed4d12f7"
|
||||
},
|
||||
"merchant": {
|
||||
"id": "61246db4-3110-4fe2-bdab-d819b8fd0705"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"id": "2616f724-f3ce-46df-8b30-897f147f6b74"
|
||||
},
|
||||
{
|
||||
"id": "16ed84e0-2d17-45c7-ada8-6fe7f8cc8720"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
21
bruno/Common Cents/Expenses/LOC PUT Expense.bru
Normal file
21
bruno/Common Cents/Expenses/LOC PUT Expense.bru
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
meta {
|
||||
name: LOC PUT Expense
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"id": "0254a07d-9dfa-4c06-b7b3-48d30efff991",
|
||||
"description": "Cat, no sub-cat or merchant",
|
||||
"category": {
|
||||
"id": "db434e98-5f32-4202-b69c-eb7d1d248b3e"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,11 @@
|
|||
meta {
|
||||
name: Expenses
|
||||
seq: 2
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
resourcePath: expenses
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
meta {
|
||||
name: Merchants
|
||||
seq: 3
|
||||
}
|
||||
|
||||
auth {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
meta {
|
||||
name: Sub-categories
|
||||
seq: 4
|
||||
}
|
||||
|
||||
auth {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
meta {
|
||||
name: Tags
|
||||
seq: 5
|
||||
}
|
||||
|
||||
auth {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue