Skip to content

Commit 99e130f

Browse files
committed
wip
1 parent 9a09e9f commit 99e130f

File tree

1 file changed

+231
-1
lines changed

1 file changed

+231
-1
lines changed

openapi.json

Lines changed: 231 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,195 @@
241241
}
242242
}
243243
}
244+
},
245+
"/query": {
246+
"post": {
247+
"tags": [
248+
"Transaction"
249+
],
250+
"summary": "Query a set transactions",
251+
"description": "Get the given transactions.",
252+
"operationId": "query",
253+
"parameters": [
254+
{
255+
"$ref": "#/components/parameters/Signature"
256+
}
257+
],
258+
"requestBody": {
259+
"description": "The query parameters.",
260+
"required": true,
261+
"content": {
262+
"application/json": {
263+
"schema": {
264+
"$ref": "#/components/schemas/Query"
265+
}
266+
}
267+
}
268+
},
269+
"responses": {
270+
"200": {
271+
"description": "Success response",
272+
"headers": {
273+
"Signature": {
274+
"$ref": "#/components/headers/Signature"
275+
}
276+
},
277+
"content": {
278+
"application/json": {
279+
"schema": {
280+
"properties": {
281+
"salt": {
282+
"type": "string",
283+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
284+
},
285+
"merchant": {
286+
"type": "string",
287+
"example": "PUBLICTESTHUF"
288+
},
289+
"transactions": {
290+
"type": "array",
291+
"items": {
292+
"salt": {
293+
"type": "string",
294+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
295+
},
296+
"merchant": {
297+
"type": "string",
298+
"example": "PUBLICTESTHUF"
299+
},
300+
"orderRef": {
301+
"$ref": "#/components/schemas/OrderRef"
302+
},
303+
"currecy": {
304+
"$ref": "#/components/schemas/Currency"
305+
},
306+
"currecyEnum": {
307+
"$ref": "#/components/schemas/Currency"
308+
},
309+
"customer": {
310+
"type": "string",
311+
"example": "Guillaume Tell"
312+
},
313+
"customerEmail": {
314+
"type": "string",
315+
"format": "email"
316+
},
317+
"language": {
318+
"$ref": "#/components/schemas/Language"
319+
},
320+
"twoStep": {
321+
"type": "boolean",
322+
"default": false
323+
},
324+
"total": {
325+
"type": "number",
326+
"example": 25.0
327+
},
328+
"items": {
329+
"type": "array",
330+
"items": {
331+
"ref": {
332+
"type": "string",
333+
"example": "SKU123"
334+
},
335+
"title": {
336+
"type": "string",
337+
"example": "Sample Product"
338+
},
339+
"amount": {
340+
"type": "integer",
341+
"description": "The quantity."
342+
},
343+
"price": {
344+
"type": "number",
345+
"example": 25.0
346+
},
347+
"tax": {
348+
"type": "number",
349+
"minimum": 0
350+
},
351+
"grossUnitPrice": {
352+
"type": "number",
353+
"example": 25.0
354+
},
355+
"rowTotal": {
356+
"type": "number",
357+
"example": 25.0
358+
}
359+
}
360+
},
361+
"discount": {
362+
"type": "number",
363+
"example": 10.0
364+
},
365+
"shippingCost": {
366+
"type": "number",
367+
"example": 10.0
368+
},
369+
"invoice": {
370+
"$ref": "#/components/schemas/Invoice"
371+
},
372+
"delivery": {
373+
"$ref": "#/components/schemas/Delivery"
374+
},
375+
"transactionId": {
376+
"$ref": "#/components/schemas/TransactionId"
377+
},
378+
"status": {
379+
"$ref": "#/components/schemas/Status"
380+
},
381+
"resultCode": {
382+
"type": "string",
383+
"example": "OK"
384+
},
385+
"refundStatus": {
386+
"$ref": "#/components/schemas/RefundStatus"
387+
},
388+
"refunds": {
389+
"type": "array",
390+
"items": {
391+
"transactionId": {
392+
"$ref": "#/components/schemas/TransactionId"
393+
},
394+
"refundTotal": {
395+
"type": "number",
396+
"example": 25.0
397+
},
398+
"refundDate": {
399+
"type": "string",
400+
"description": "The ISO 8601 format of the refund date.",
401+
"example": "2004-02-12T15:19:21+00:00"
402+
},
403+
"status": {
404+
"$ref": "#/components/schemas/Status"
405+
}
406+
}
407+
},
408+
"remainingTotal": {
409+
"type": "number",
410+
"example": 25.0
411+
},
412+
"paymentDate": {
413+
"type": "string",
414+
"description": "The ISO 8601 format of the payment date.",
415+
"example": "2004-02-12T15:19:21+00:00"
416+
},
417+
"method": {
418+
"$ref": "#/components/schemas/Method"
419+
}
420+
}
421+
},
422+
"totalCount": {
423+
"type": "integer",
424+
"example": 1
425+
}
426+
}
427+
}
428+
}
429+
}
430+
}
431+
}
432+
}
244433
}
245434
},
246435
"components": {
@@ -437,6 +626,34 @@
437626
}
438627
}
439628
},
629+
"Query": {
630+
"type": "object",
631+
"required": [
632+
"transactionIds"
633+
],
634+
"properties": {
635+
"transactionIds": {
636+
"type": "array",
637+
"items": {
638+
"$ref": "#/components/schemas/TransactionId"
639+
}
640+
},
641+
"orderRefs": {
642+
"type": "array",
643+
"items": {
644+
"$ref": "#/components/schemas/OrderRef"
645+
}
646+
},
647+
"detailed": {
648+
"type": "boolean",
649+
"default": false
650+
},
651+
"refunds": {
652+
"type": "boolean",
653+
"default": false
654+
}
655+
}
656+
},
440657
"OrderRef": {
441658
"type": "string",
442659
"example": "101010515680292482600"
@@ -451,6 +668,18 @@
451668
"CARD", "EAM", "WIRE"
452669
]
453670
},
671+
"Status": {
672+
"type": "string",
673+
"enum": [
674+
"INIT", "TIMEOUT", "CANCELLED", "NOTAUTHORIZED", "INPAYMENT", "INFRAUD", "AUTHORIZED", "REVERSED", "FINISHED"
675+
]
676+
},
677+
"RefundStatus": {
678+
"type": "string",
679+
"enum": [
680+
"PARTIAL", "FULL"
681+
]
682+
},
454683
"Currency": {
455684
"type": "string",
456685
"enum": [
@@ -498,7 +727,8 @@
498727
"example": 25.0
499728
},
500729
"tax": {
501-
"type": "number"
730+
"type": "number",
731+
"minimum": 0
502732
}
503733
}
504734
},

0 commit comments

Comments
 (0)