-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscheme-adapter.raml
261 lines (233 loc) · 6.15 KB
/
scheme-adapter.raml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
#%RAML 1.0
title: RAML for Scheme Adapter
version: v1
baseUri: https://localhost:8088/scheme/adapter/{version}
types:
QuoteRequest:
type: object
properties:
paymentId: string
payer: Person
payee: Person
amountType:
type:
enum: [SEND, RECEIVE]
amount: Amount
fees?: Amount
transferType: string
QuoteResponse:
type: object
properties:
paymentId: string
receiveAmount: Amount
payeeFee: Amount
payeeCommission: Amount
ipr?: string
sourceExpiryDuration?: integer
PaymentRequest:
type: object
properties:
ipr: string
sourceAmount:
type: number
format: float
sourceAccount: string
connectorAccount: string
sourceExpiryDuration: integer
PaymentResponse:
type: object
properties:
paymentId: string
connectorAccount: string
status:
type:
enum: [executed, rejected, expired]
rejectionMessage: string
fulfillment: string
Invoice:
type: object
properties:
invoiceId: string
senderIdentifier: string
invoiceUrl?:
type: string
#pattern: ^((http(s?))\:\/\/)?((([a-zA-Z0-9_\-]{2,}\.)+[a-zA-Z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)( ?(\.?\d)\.)){4}))(:[a-zA-Z0-9]+)?(\/[a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~]*)?$
submissionUrl:
type: string
#pattern: ^((http(s?))\:\/\/)?((([a-zA-Z0-9_\-]{2,}\.)+[a-zA-Z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)( ?(\.?\d)\.)){4}))(:[a-zA-Z0-9]+)?(\/[a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~]*)?$
memo: string
account?:
type: string
pattern: ^((http(s?))\:\/\/)?((([a-zA-Z0-9_\-]{2,}\.)+[a-zA-Z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)( ?(\.?\d)\.)){4}))(:[a-zA-Z0-9]+)?(\/[a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~]*)?$
currencyCode?: string
currencySymbol?: string
name?: string
userNumber?: string
amount?:
type: string
pattern: ^[-+]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$
status?:
enum: [ paid, unpaid, cancelled ]
invoiceInfo?: string
Person:
type: object
properties:
identifier: string
identifierType: string
url?: string
account?: string
Amount:
type: object
properties:
amount: number
currency: string
HealthStatus:
type: object
properties:
status:
type: string
required: true
ILPAddress:
type: object
properties:
ilpAddress:
type: string
required: true
NotificationRequest:
type: object
properties:
ipr: string
paymentId: string
destinationAccount: string
status:
type:
enum: [prepared, executed]
fulfillment?: string
GetFetchResponse:
type: object
properties:
name?: string
account: string
currencySymbol: string
currencyCode: string
GetPayeeResponse:
type: GetFetchResponse
properties:
type:
enum: [ payee, invoice ]
paymentsUrl: string
imageUrl?:
type: string
pattern: ^((http(s?))\:\/\/)?((([a-zA-Z0-9_\-]{2,}\.)+[a-zA-Z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)( ?(\.?\d)\.)){4}))(:[a-zA-Z0-9]+)?(\/[a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~]*)?$
FetchErrorResponse:
type: object
properties:
id: string
message: string
/receivers:
displayName: Fetching Account Info ( GET <receiver> ).
/{ID}:
get:
description: Payee
responses:
200:
body:
application/json:
type: GetPayeeResponse
404:
body:
application/json:
type: FetchErrorResponse
example:
id: "InvalidReceiverIdError"
message: "Invalid receiver ID"
/quotes:
displayName: /v1/quotes/
post:
description: Submit a request for a quote.
body:
application/json:
type: QuoteRequest
responses:
201:
body:
application/json:
type: QuoteResponse
#example: !include payments-response-sample.json
/ilpAddress:
displayName: ILP Address
description: This resource indicates ILP payment request packet
get:
queryParameters:
account: string
responses:
200:
body:
application/json:
type: ILPAddress
example: |
{
"ilpAddress" : "ok"
}
/payments:
displayName: Payments
description: Endpoint to submit the payments
put:
body:
application/json:
type: PaymentRequest
#example: !include invoice-request-sample.json
responses:
201:
description: "ok"
body:
application/json:
type: PaymentResponse
/notifications:
displayName: Notifications
description: ILP Service calls this endpoint to validate the prepare before proceeding further on fulfillment
post:
body:
application/json:
type: NotificationRequest
responses:
200:
description: "Success"
/invoices:
post:
description: Submit Invoice Method
body:
application/json:
type: Invoice
responses:
200:
get:
description:
queryParameters:
invoiceUrl: string
responses:
200:
body:
application/json:
type: Invoice
/{invoiceId}:
get:
description:
responses:
200:
body:
application/json:
type: Invoice
/health:
displayName: HealthCheck resource
description: This resource is included to provide a simple response to indicate that the API is up and running.
get:
responses:
200:
body:
application/json:
type: HealthStatus
example: |
{
"status" : "ok"
}