Compare commits
7 Commits
d0b5c3d8b2
...
c39f76be45
Author | SHA1 | Date |
---|---|---|
Ivan Koryakovsky | c39f76be45 | |
Ivan Koriakovskii | 07ddbfc77e | |
Ivan Koriakovskii | 6e5959e0cd | |
Ivan Koryakovsky | 509776676a | |
Ivan Koriakovskii | 3d5314f800 | |
Ivan Koryakovsky | e71a6a86d1 | |
Ivan Koriakovskii | 31e5aeddd8 |
311
precalc-api.json
311
precalc-api.json
|
@ -16,6 +16,51 @@
|
|||
}
|
||||
],
|
||||
"paths": {
|
||||
"/api/v3/calc": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"V3 / Payments"
|
||||
],
|
||||
"summary": "Payment calculation",
|
||||
"description": "Perform payment calculation for promo and standard courses",
|
||||
"operationId": "calculate",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RequestV3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"500": {
|
||||
"description": "Internal Server Error"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"content": {
|
||||
"*/*": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ResponseContainerDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"*/*": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PrecalcResponseDtoV3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/calc": {
|
||||
"post": {
|
||||
"tags": [
|
||||
|
@ -28,7 +73,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RequestDtoV2"
|
||||
"$ref": "#/components/schemas/ExternalPrecalcRequestDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -73,7 +118,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RequestDtoV1"
|
||||
"$ref": "#/components/schemas/RequestV1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -137,30 +182,150 @@
|
|||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"ResponseContainerDto": {
|
||||
"RequestV1": {
|
||||
"required": [
|
||||
"message",
|
||||
"status"
|
||||
"merchantId",
|
||||
"fromCurrency",
|
||||
"toCurrency"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"response": {
|
||||
"$ref": "#/components/schemas/ResponseDto"
|
||||
},
|
||||
"status": {
|
||||
"merchantId": {
|
||||
"type": "string",
|
||||
"description": "Status of performed operation",
|
||||
"enum": [
|
||||
"OK",
|
||||
"ERROR"
|
||||
]
|
||||
"description": "Merchant ID"
|
||||
},
|
||||
"message": {
|
||||
"methodId": {
|
||||
"type": "string",
|
||||
"description": "Error message when occurred, 'OK' otherwise"
|
||||
"description": "Payment method type id"
|
||||
},
|
||||
"fromCountry": {
|
||||
"type": "string",
|
||||
"description": "Source country (ISO Alpha2 code)"
|
||||
},
|
||||
"fromCurrency": {
|
||||
"type": "string",
|
||||
"description": "Source currency (ISO code)"
|
||||
},
|
||||
"fromAmount": {
|
||||
"type": "number",
|
||||
"description": "Source amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"toCountry": {
|
||||
"type": "string",
|
||||
"description": "Destination country (ISO Alpa2 code)"
|
||||
},
|
||||
"toCurrency": {
|
||||
"type": "string",
|
||||
"description": "Destination currency (ISO code)"
|
||||
},
|
||||
"toAmount": {
|
||||
"type": "number",
|
||||
"description": "Destination amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"externalId": {
|
||||
"maxLength": 1000,
|
||||
"minLength": 0,
|
||||
"type": "string",
|
||||
"description": "Merchant's marketing ID (this ID will be placed at utm_campaign further)"
|
||||
}
|
||||
},
|
||||
"description": "Response container"
|
||||
"description": "Request for payment calculation (either 'fromAmount' or 'toAmount' must be specified)"
|
||||
},
|
||||
"ExternalPrecalcRequestDto": {
|
||||
"required": [
|
||||
"merchantId",
|
||||
"fromCurrency",
|
||||
"toCurrency",
|
||||
"fromCountry",
|
||||
"toCountry"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"merchantId": {
|
||||
"type": "string",
|
||||
"description": "Merchant ID"
|
||||
},
|
||||
"methodId": {
|
||||
"type": "string",
|
||||
"description": "Payment method type id"
|
||||
},
|
||||
"fromCountry": {
|
||||
"type": "string",
|
||||
"description": "Source country (ISO Alpha2 code)"
|
||||
},
|
||||
"fromCurrency": {
|
||||
"type": "string",
|
||||
"description": "Source currency (ISO code)"
|
||||
},
|
||||
"fromAmount": {
|
||||
"type": "number",
|
||||
"description": "Source amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"toCountry": {
|
||||
"type": "string",
|
||||
"description": "Destination country (ISO Alpa2 code)"
|
||||
},
|
||||
"toCurrency": {
|
||||
"type": "string",
|
||||
"description": "Destination currency (ISO code)"
|
||||
},
|
||||
"toAmount": {
|
||||
"type": "number",
|
||||
"description": "Destination amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"externalId": {
|
||||
"maxLength": 1000,
|
||||
"minLength": 0,
|
||||
"type": "string",
|
||||
"description": "Merchant's marketing ID (this ID will be placed at utm_campaign further)"
|
||||
}
|
||||
},
|
||||
"description": "Request for payment calculation (either 'fromAmount' or 'toAmount' must be specified)"
|
||||
},
|
||||
"RequestV3": {
|
||||
"required": [
|
||||
"merchantId",
|
||||
"fromCurrency",
|
||||
"toCurrency",
|
||||
"fromCountry",
|
||||
"toCountry"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"merchantId": {
|
||||
"type": "string",
|
||||
"description": "Merchant ID"
|
||||
},
|
||||
"methodId": {
|
||||
"type": "string",
|
||||
"description": "Payment method type id"
|
||||
},
|
||||
"fromCountry": {
|
||||
"type": "string",
|
||||
"description": "Source country (ISO Alpha2 code)"
|
||||
},
|
||||
"fromCurrency": {
|
||||
"type": "string",
|
||||
"description": "Source currency (ISO code)"
|
||||
},
|
||||
"fromAmount": {
|
||||
"type": "number",
|
||||
"description": "Source amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"toCountry": {
|
||||
"type": "string",
|
||||
"description": "Destination country (ISO Alpa2 code)"
|
||||
},
|
||||
"toCurrency": {
|
||||
"type": "string",
|
||||
"description": "Destination currency (ISO code)"
|
||||
},
|
||||
"toAmount": {
|
||||
"type": "number",
|
||||
"description": "Destination amount (one of fromAmount and toAmount must be specified)"
|
||||
}
|
||||
},
|
||||
"description": "Request for payment calculation (either 'fromAmount' or 'toAmount' must be specified)"
|
||||
},
|
||||
"ResponseDto": {
|
||||
"type": "object",
|
||||
|
@ -212,91 +377,87 @@
|
|||
},
|
||||
"description": "Payment calculation result"
|
||||
},
|
||||
"RequestDtoV2": {
|
||||
"ResponseContainerDto": {
|
||||
"required": [
|
||||
"fromCurrency",
|
||||
"merchantId",
|
||||
"toCurrency",
|
||||
"fromCountry",
|
||||
"toCountry"
|
||||
"message",
|
||||
"status"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"merchantId": {
|
||||
"response": {
|
||||
"$ref": "#/components/schemas/ResponseDto"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "Merchant ID"
|
||||
"description": "Status of performed operation",
|
||||
"enum": [
|
||||
"OK",
|
||||
"ERROR"
|
||||
]
|
||||
},
|
||||
"methodId": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "Payment method type id"
|
||||
},
|
||||
"fromCountry": {
|
||||
"type": "string",
|
||||
"description": "Source country (ISO Alpha2 code)"
|
||||
},
|
||||
"fromCurrency": {
|
||||
"type": "string",
|
||||
"description": "Source currency (ISO code)"
|
||||
},
|
||||
"fromAmount": {
|
||||
"type": "number",
|
||||
"description": "Source amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"toCountry": {
|
||||
"type": "string",
|
||||
"description": "Destination country (ISO Alpa2 code)"
|
||||
},
|
||||
"toCurrency": {
|
||||
"type": "string",
|
||||
"description": "Destination currency (ISO code)"
|
||||
},
|
||||
"toAmount": {
|
||||
"type": "number",
|
||||
"description": "Destination amount (one of fromAmount and toAmount must be specified)"
|
||||
},
|
||||
"externalId": {
|
||||
"maxLength": 1000,
|
||||
"minLength": 0,
|
||||
"type": "string",
|
||||
"description": "Merchant's marketing ID (this ID will be placed at utm_campaign further)"
|
||||
"description": "Error message when occurred, 'OK' otherwise"
|
||||
}
|
||||
},
|
||||
"description": "Request for payment calculation (either 'fromAmount' or 'toAmount' must be specified)"
|
||||
"description": "Response container"
|
||||
},
|
||||
"RequestDtoV1": {
|
||||
"required": [
|
||||
"fromCurrency",
|
||||
"merchantId",
|
||||
"toCurrency"
|
||||
],
|
||||
"ResponseDtoV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"merchantId": {
|
||||
"precalcId": {
|
||||
"type": "string",
|
||||
"description": "Merchant ID"
|
||||
},
|
||||
"methodId": {
|
||||
"type": "string",
|
||||
"description": "Payment method type id"
|
||||
"description": "Calculation ID"
|
||||
},
|
||||
"fromCurrency": {
|
||||
"type": "string",
|
||||
"description": "Source currency (ISO code)"
|
||||
"description": "Source currency"
|
||||
},
|
||||
"fromAmount": {
|
||||
"type": "number",
|
||||
"description": "Source amount (one of fromAmount and toAmount must be specified)"
|
||||
"description": "Source amount"
|
||||
},
|
||||
"toCurrency": {
|
||||
"type": "string",
|
||||
"description": "Destination currency (ISO code)"
|
||||
"description": "Destination currency"
|
||||
},
|
||||
"toAmount": {
|
||||
"type": "number",
|
||||
"description": "Destination amount (one of fromAmount and toAmount must be specified)"
|
||||
"description": "Destination amount"
|
||||
},
|
||||
"feeCurrency": {
|
||||
"type": "string",
|
||||
"description": "Fee currency"
|
||||
},
|
||||
"feeAmount": {
|
||||
"type": "number",
|
||||
"description": "Fee amount"
|
||||
},
|
||||
"rateFromCurrency": {
|
||||
"type": "string",
|
||||
"description": "Rate source currency"
|
||||
},
|
||||
"rateToCurrency": {
|
||||
"type": "string",
|
||||
"description": "Rate destination currency"
|
||||
},
|
||||
"rateAmount": {
|
||||
"type": "number",
|
||||
"description": "Currency rate amount"
|
||||
}
|
||||
},
|
||||
"description": "Request for payment calculation (either 'fromAmount' or 'toAmount' must be specified)"
|
||||
"description": "Payment calculation result V3"
|
||||
},
|
||||
"PrecalcResponseDtoV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"promotion": {
|
||||
"$ref": "#/components/schemas/ResponseDtoV3"
|
||||
},
|
||||
"standard": {
|
||||
"$ref": "#/components/schemas/ResponseDtoV3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CorridorDescriptorDto": {
|
||||
"type": "object",
|
||||
|
|
Loading…
Reference in New Issue