-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yml
206 lines (206 loc) · 5.63 KB
/
swagger.yml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
swagger: "2.0"
info:
description: "Responsible for taking in requests handling card operations and sending\
\ them to the card provider's api."
title: "Card Service"
contact:
name: "Department Of Health"
url: "https://github.com/DepartmentOfHealth-htbhf"
email: "dh-htbhf-team@equalexperts.com"
license:
name: "MIT"
url: "https://opensource.org/licenses/MIT"
host: "N/A"
basePath: "/"
tags:
- name: "card-controller"
description: "Card Controller"
paths:
/v1/cards:
post:
tags:
- "card-controller"
summary: "Create a new card"
operationId: "createCardUsingPOST"
consumes:
- "application/json"
produces:
- "*/*"
parameters:
- in: "body"
name: "cardRequest"
description: "Details of the new card request"
required: false
schema:
$ref: "#/definitions/CardRequestDTO"
responses:
201:
description: "The response to the create card request"
schema:
$ref: "#/definitions/CardResponse"
401:
description: "Unauthorized"
403:
description: "Forbidden"
404:
description: "Not Found"
deprecated: false
/v1/cards/{cardId}/balance:
get:
tags:
- "card-controller"
summary: "Get balance for a card"
operationId: "getBalanceUsingGET"
produces:
- "*/*"
parameters:
- name: "cardId"
in: "path"
description: "cardId"
required: true
type: "string"
responses:
200:
description: "Card balance"
schema:
$ref: "#/definitions/CardBalance"
401:
description: "Unauthorized"
403:
description: "Forbidden"
404:
description: "Not Found"
deprecated: false
/v1/cards/{cardId}/deposit:
post:
tags:
- "card-controller"
summary: "Deposit funds onto a card"
operationId: "depositFundsUsingPOST"
consumes:
- "application/json"
produces:
- "*/*"
parameters:
- name: "cardId"
in: "path"
description: "cardId"
required: true
type: "string"
- in: "body"
name: "depositFundsRequest"
description: "Deposit funds request information"
required: false
schema:
$ref: "#/definitions/DepositFundsRequestDTO"
responses:
200:
description: "Payment reference"
schema:
$ref: "#/definitions/DepositFundsResponse"
201:
description: "Created"
401:
description: "Unauthorized"
403:
description: "Forbidden"
404:
description: "Not Found"
deprecated: false
definitions:
AddressDTO:
type: "object"
properties:
addressLine1:
type: "string"
example: "Flat B"
description: "First line of the address"
addressLine2:
type: "string"
example: "221 Baker Street"
description: "Second line of the address"
postcode:
type: "string"
example: "AA1 1AA"
description: "The postcode of the address."
townOrCity:
type: "string"
example: "London"
description: "Town or city of the address"
title: "AddressDTO"
description: "The address object"
CardBalance:
type: "object"
properties:
availableBalanceInPence:
type: "integer"
format: "int32"
description: "Card balance (in pence) including transactions that have not\
\ yet cleared"
ledgerBalanceInPence:
type: "integer"
format: "int32"
description: "Card balance (in pence) only including transactions that have\
\ cleared"
title: "CardBalance"
description: "Cleared and uncleared balances of a card"
CardRequestDTO:
type: "object"
properties:
address:
description: "The address the card is registered to"
$ref: "#/definitions/AddressDTO"
claimId:
type: "string"
example: "e2bb5fcb-da0f-4f2c-8795-853e99a91209"
description: "Unique id of the claim requiring the new card"
dateOfBirth:
type: "string"
format: "date"
example: "1985-12-30"
description: "The date of birth of the card owner, in the format YYYY-MM-DD"
email:
type: "string"
example: "homer@simpson.com"
description: "Email address of the card owner"
firstName:
type: "string"
example: "Homer"
description: "First name of the card owner"
lastName:
type: "string"
example: "Simpson"
description: "Last name of the card owner"
mobile:
type: "string"
example: "07700900000"
description: "Mobile number of the card owner"
title: "CardRequestDTO"
description: "The card request object"
CardResponse:
type: "object"
properties:
cardAccountId:
type: "string"
example: "19d39727-dcc4-487a-8ff0-e86996540617"
description: "The id of the account for the new card"
title: "CardResponse"
description: "The response for making creating a new card"
DepositFundsRequestDTO:
type: "object"
properties:
amountInPence:
type: "integer"
format: "int32"
example: 1240
reference:
type: "string"
example: "f8b96afa-7fd1-4200-9c1a-407531036b29"
title: "DepositFundsRequestDTO"
description: "Card deposit funds request object"
DepositFundsResponse:
type: "object"
properties:
referenceId:
type: "string"
title: "DepositFundsResponse"