-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankingSystem.http
More file actions
75 lines (59 loc) · 1.33 KB
/
BankingSystem.http
File metadata and controls
75 lines (59 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@url = https://localhost:7101
###
POST {{url}}/users/sign-up
Content-Type: application/json
{
"email": "user1@email.com",
"password": "Password123!"
}
###
# @name sign_in
POST {{url}}/users/sign-in
Content-Type: application/json
{
"email": "user1@email.com",
"password": "Password123!"
}
###
@accessToken = {{sign_in.response.body.$.accessToken}}
###
GET {{url}}/users/me
Authorization: Bearer {{accessToken}}
###
# @name bankingaccounts
POST {{url}}/bankingaccounts
Content-Type: application/json
Authorization: Bearer {{accessToken}}
{
"name": "SavingsAccount"
}
###
@bankingAccountId = {{bankingaccounts.response.headers.location}}
###
GET {{url}}/bankingaccounts/2174d41d-91d6-4c26-8008-d83865e76476
Authorization: Bearer {{accessToken}}
###
POST {{url}}/funds
Content-Type: application/json
Authorization: Bearer {{accessToken}}
{
"bankingAccountId": "2174d41d-91d6-4c26-8008-d83865e76476",
"amount": 100
}
###
PUT {{url}}/funds
Content-Type: application/json
Authorization: Bearer {{accessToken}}
{
"bankingAccountId": "2174d41d-91d6-4c26-8008-d83865e76476",
"amount": 50
}
###
POST {{url}}/funds/transfers
Content-Type: application/json
Authorization: Bearer {{accessToken}}
{
"fromBankingAccountId": "2174d41d-91d6-4c26-8008-d83865e76476",
"toBankingAccountId": "70a1e483-cfe1-458f-a59d-8413c46d1d19",
"amount": 5
}