Skip to content

Commit 0c9e754

Browse files
committed
Update docs
1 parent a94481b commit 0c9e754

File tree

6 files changed

+91
-92
lines changed

6 files changed

+91
-92
lines changed

pages/balance_updates/balance-update-object.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
{
2-
"id": 191,
3-
"client": {
4-
"id": 60,
5-
"first_name": "Ana",
6-
"last_name": "Oliver",
7-
"email": "[email protected]",
8-
"role_type": "Tutor",
9-
"url": "https://secure.tutorcruncher.com/api/contractors/60/"
10-
},
11-
"created": "2025-09-25T09:55:20.489121+01:00",
2+
"id": 182,
3+
"created": "2025-09-30T15:03:58.676657+01:00",
124
"creator": {
135
"id": 6,
146
"first_name": "Thomas",
157
"last_name": "Jackson",
168
"email": "[email protected]",
179
"role_type": "Administrator"
1810
},
19-
"credit_amount": "135.00",
20-
"description": "Payment Order raised",
11+
"credit_amount": "-567.50",
12+
"description": "Invoice raised",
2113
"method": "auto",
2214
"method_display": "System Generated",
2315
"related_item": {
24-
"id": 46,
25-
"display_id": "PO-46",
26-
"date_sent": "2025-09-25T09:55:20.442900+01:00",
27-
"amount": "135.00",
28-
"payee": {
29-
"id": 60,
30-
"first_name": "Ana",
31-
"last_name": "Oliver",
32-
"email": "[email protected]",
33-
"role_type": "Tutor",
34-
"url": "https://secure.tutorcruncher.com/api/contractors/60/"
16+
"id": 54,
17+
"display_id": "INV-54",
18+
"date_sent": "2025-09-30T15:03:58.623171+01:00",
19+
"gross": "567.50",
20+
"net": "472.92",
21+
"tax": "94.58",
22+
"client": {
23+
"id": 42,
24+
"first_name": "Nicole",
25+
"last_name": "Beggs",
26+
"email": "[email protected]",
27+
"role_type": "Client",
28+
"url": "https://secure.tutorcruncher.com/api/clients/42/"
3529
},
3630
"status": "unpaid",
37-
"url": "https://secure.tutorcruncher.com/api/payment-orders/46/"
31+
"url": "https://secure.tutorcruncher.com/api/invoices/54/"
32+
},
33+
"role": {
34+
"id": 42,
35+
"first_name": "Nicole",
36+
"last_name": "Beggs",
37+
"email": "[email protected]",
38+
"role_type": "Client",
39+
"url": "https://secure.tutorcruncher.com/api/clients/42/"
3840
},
39-
"update_type": "po_creation",
40-
"update_type_display": "Payment Order Creation"
41+
"update_type": "invoice_creation",
42+
"update_type_display": "Invoice Creation"
4143
}
42-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
### Balance Update Object
22

3-
A Balance Update represents a change in a Client's balance. It can be created manually by an admin or automatically
3+
A Balance Update represents a change in a Users balance. It can be created manually by an Admin or automatically
44
when certain actions occur, such as when a payment is processed.

pages/balance_updates/balance-update-object.yml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,6 @@ attributes:
33
name: id
44
type: integer
55
description: Unique identifier for the balance update.
6-
-
7-
name: client
8-
type: object
9-
description: The client whose balance is being updated.
10-
children:
11-
- name: id
12-
type: integer
13-
description: Unique identifier for the object.
14-
- name: first_name
15-
type: string
16-
description: User's first name.
17-
- name: last_name
18-
type: string
19-
description: User's last name.
20-
- name: email
21-
type: string
22-
description: User's email address.
23-
- name: role_type
24-
type: string
25-
description: The role type of the Client.
26-
- name: url
27-
type: string
28-
description: URL to the Client's object.
296
-
307
name: created
318
type: datetime
@@ -73,6 +50,29 @@ attributes:
7350
name: related_item
7451
type: object
7552
description: Any related object that this balance update is associated with (nullable).
53+
-
54+
name: role
55+
type: object
56+
description: The user whose balance is being updated.
57+
children:
58+
- name: id
59+
type: integer
60+
description: Unique identifier for the object.
61+
- name: first_name
62+
type: string
63+
description: User's first name.
64+
- name: last_name
65+
type: string
66+
description: User's last name.
67+
- name: email
68+
type: string
69+
description: User's email address.
70+
- name: role_type
71+
type: string
72+
description: The role type of the User.
73+
- name: url
74+
type: string
75+
description: URL to the User's object.
7676
-
7777
name: update_type
7878
type: string
@@ -87,3 +87,7 @@ filters:
8787
name: client
8888
type: integer
8989
description: Filter by the Balance Updates linked Client (id).
90+
-
91+
name: tutor
92+
type: integer
93+
description: Filter by the Balance Updates linked Tutor (id).

pages/balance_updates/create-a-balance-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"last_name": "Holiday",
77
"email": "[email protected]",
88
"role_type": "Client",
9-
"url": "http://localhost:8000/api/clients/67/"
9+
"url": "https://secure.tutorcruncher.com/api/clients/67/"
1010
},
1111
"created": "2025-09-25T10:00:00.000000+01:00",
1212
"creator": {

pages/balance_updates/get-a-balance-update.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
{
2-
"id": 191,
3-
"client": {
4-
"id": 60,
5-
"first_name": "Ana",
6-
"last_name": "Oliver",
7-
"email": "[email protected]",
8-
"role_type": "Tutor",
9-
"url": "https://secure.tutorcruncher.com/api/contractors/60/"
10-
},
11-
"created": "2025-09-25T09:55:20.489121+01:00",
2+
"id": 182,
3+
"created": "2025-09-30T15:03:58.676657+01:00",
124
"creator": {
135
"id": 6,
146
"first_name": "Thomas",
157
"last_name": "Jackson",
168
"email": "[email protected]",
179
"role_type": "Administrator"
1810
},
19-
"credit_amount": "135.00",
20-
"description": "Payment Order raised",
11+
"credit_amount": "-567.50",
12+
"description": "Invoice raised",
2113
"method": "auto",
2214
"method_display": "System Generated",
2315
"related_item": {
24-
"id": 46,
25-
"display_id": "PO-46",
26-
"date_sent": "2025-09-25T09:55:20.442900+01:00",
27-
"amount": "135.00",
28-
"payee": {
29-
"id": 60,
30-
"first_name": "Ana",
31-
"last_name": "Oliver",
32-
"email": "[email protected]",
33-
"role_type": "Tutor",
34-
"url": "https://secure.tutorcruncher.com/api/contractors/60/"
16+
"id": 54,
17+
"display_id": "INV-54",
18+
"date_sent": "2025-09-30T15:03:58.623171+01:00",
19+
"gross": "567.50",
20+
"net": "472.92",
21+
"tax": "94.58",
22+
"client": {
23+
"id": 42,
24+
"first_name": "Nicole",
25+
"last_name": "Beggs",
26+
"email": "[email protected]",
27+
"role_type": "Client",
28+
"url": "https://secure.tutorcruncher.com/api/clients/42/"
3529
},
3630
"status": "unpaid",
37-
"url": "https://secure.tutorcruncher.com/api/payment-orders/46/"
31+
"url": "https://secure.tutorcruncher.com/api/invoices/54/"
32+
},
33+
"role": {
34+
"id": 42,
35+
"first_name": "Nicole",
36+
"last_name": "Beggs",
37+
"email": "[email protected]",
38+
"role_type": "Client",
39+
"url": "https://secure.tutorcruncher.com/api/clients/42/"
3840
},
39-
"update_type": "po_creation",
40-
"update_type_display": "Payment Order Creation"
41+
"update_type": "invoice_creation",
42+
"update_type_display": "Invoice Creation"
4143
}
42-

pages/balance_updates/list-all-balance-updates.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@
44
"previous": null,
55
"results": [
66
{
7-
"id": 191,
8-
"client": {
9-
"id": 60,
10-
"first_name": "Ana",
11-
"last_name": "Oliver",
12-
"email": "[email protected]",
13-
"role_type": "Tutor",
14-
"url": "https://secure.tutorcruncher.com/api/contractors/60/"
15-
},
16-
"created": "2025-09-25T09:55:20.489121+01:00",
17-
"credit_amount": "135.00",
7+
"id": 182,
8+
"created": "2025-09-30T15:03:58.676657+01:00",
9+
"credit_amount": "-567.50",
1810
"method_display": "System Generated",
19-
"update_type_display": "Payment Order Creation",
20-
"url": "https://secure.tutorcruncher.com/api/balance-updates/191/"
11+
"role": 42,
12+
"update_type_display": "Invoice Creation",
13+
"url": "https://secure.tutorcruncher.com/api/balance-updates/182/"
2114
}
2215
]
2316
}

0 commit comments

Comments
 (0)