Skip to content

Commit a654695

Browse files
prajjwalkumar17Sarthak1799GauravRawat369hyperswitch-bot[bot]Chethan-rao
authored
feat: list for dynamic routing (#8111)
Co-authored-by: Sarthak Soni <[email protected]> Co-authored-by: Gaurav Rawat <[email protected]> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Chethan Rao <[email protected]>
1 parent 3bf6ef8 commit a654695

File tree

18 files changed

+790
-264
lines changed

18 files changed

+790
-264
lines changed

api-reference-v2/openapi_spec.json

Lines changed: 445 additions & 89 deletions
Large diffs are not rendered by default.

api-reference/openapi_spec.json

Lines changed: 168 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -12108,6 +12108,19 @@
1210812108
}
1210912109
}
1211012110
},
12111+
"DynamicRoutingAlgorithm": {
12112+
"oneOf": [
12113+
{
12114+
"$ref": "#/components/schemas/EliminationRoutingConfig"
12115+
},
12116+
{
12117+
"$ref": "#/components/schemas/SuccessBasedRoutingConfig"
12118+
},
12119+
{
12120+
"$ref": "#/components/schemas/ContractBasedRoutingConfig"
12121+
}
12122+
]
12123+
},
1211112124
"DynamicRoutingConfigParams": {
1211212125
"type": "string",
1211312126
"enum": [
@@ -12183,6 +12196,51 @@
1218312196
}
1218412197
]
1218512198
},
12199+
"EliminationAnalyserConfig": {
12200+
"type": "object",
12201+
"properties": {
12202+
"bucket_size": {
12203+
"type": "integer",
12204+
"format": "int64",
12205+
"nullable": true,
12206+
"minimum": 0
12207+
},
12208+
"bucket_leak_interval_in_secs": {
12209+
"type": "integer",
12210+
"format": "int64",
12211+
"nullable": true,
12212+
"minimum": 0
12213+
}
12214+
},
12215+
"additionalProperties": false
12216+
},
12217+
"EliminationRoutingConfig": {
12218+
"type": "object",
12219+
"required": [
12220+
"decision_engine_configs"
12221+
],
12222+
"properties": {
12223+
"params": {
12224+
"type": "array",
12225+
"items": {
12226+
"$ref": "#/components/schemas/DynamicRoutingConfigParams"
12227+
},
12228+
"nullable": true
12229+
},
12230+
"elimination_analyser_config": {
12231+
"allOf": [
12232+
{
12233+
"$ref": "#/components/schemas/EliminationAnalyserConfig"
12234+
}
12235+
],
12236+
"nullable": true
12237+
},
12238+
"decision_engine_configs": {
12239+
"$ref": "#/components/schemas/DecisionEngineEliminationData"
12240+
}
12241+
},
12242+
"additionalProperties": false
12243+
},
1218612244
"EnabledPaymentMethod": {
1218712245
"type": "object",
1218812246
"description": "Object for EnabledPaymentMethod",
@@ -14621,7 +14679,7 @@
1462114679
"payout_routing_algorithm": {
1462214680
"allOf": [
1462314681
{
14624-
"$ref": "#/components/schemas/RoutingAlgorithm"
14682+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
1462514683
}
1462614684
],
1462714685
"nullable": true
@@ -14867,7 +14925,7 @@
1486714925
"payout_routing_algorithm": {
1486814926
"allOf": [
1486914927
{
14870-
"$ref": "#/components/schemas/RoutingAlgorithm"
14928+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
1487114929
}
1487214930
],
1487314931
"nullable": true
@@ -14913,7 +14971,7 @@
1491314971
"frm_routing_algorithm": {
1491414972
"allOf": [
1491514973
{
14916-
"$ref": "#/components/schemas/RoutingAlgorithm"
14974+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
1491714975
}
1491814976
],
1491914977
"nullable": true
@@ -15000,7 +15058,7 @@
1500015058
"payout_routing_algorithm": {
1500115059
"allOf": [
1500215060
{
15003-
"$ref": "#/components/schemas/RoutingAlgorithm"
15061+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
1500415062
}
1500515063
],
1500615064
"nullable": true
@@ -15941,7 +15999,7 @@
1594115999
"type": "string"
1594216000
},
1594316001
"algorithm": {
15944-
"$ref": "#/components/schemas/RoutingAlgorithm"
16002+
"$ref": "#/components/schemas/RoutingAlgorithmWrapper"
1594516003
},
1594616004
"created_at": {
1594716005
"type": "integer",
@@ -22619,7 +22677,7 @@
2261922677
"routing": {
2262022678
"allOf": [
2262122679
{
22622-
"$ref": "#/components/schemas/RoutingAlgorithm"
22680+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
2262322681
}
2262422682
],
2262522683
"nullable": true
@@ -23565,7 +23623,7 @@
2356523623
"routing": {
2356623624
"allOf": [
2356723625
{
23568-
"$ref": "#/components/schemas/RoutingAlgorithm"
23626+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
2356923627
}
2357023628
],
2357123629
"nullable": true
@@ -23788,7 +23846,7 @@
2378823846
"routing": {
2378923847
"allOf": [
2379023848
{
23791-
"$ref": "#/components/schemas/RoutingAlgorithm"
23849+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
2379223850
}
2379323851
],
2379423852
"nullable": true
@@ -24368,7 +24426,7 @@
2436824426
"payout_routing_algorithm": {
2436924427
"allOf": [
2437024428
{
24371-
"$ref": "#/components/schemas/RoutingAlgorithm"
24429+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
2437224430
}
2437324431
],
2437424432
"nullable": true
@@ -24648,7 +24706,7 @@
2464824706
"payout_routing_algorithm": {
2464924707
"allOf": [
2465024708
{
24651-
"$ref": "#/components/schemas/RoutingAlgorithm"
24709+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
2465224710
}
2465324711
],
2465424712
"nullable": true
@@ -26053,92 +26111,6 @@
2605326111
"zsl"
2605426112
]
2605526113
},
26056-
"RoutingAlgorithm": {
26057-
"oneOf": [
26058-
{
26059-
"type": "object",
26060-
"required": [
26061-
"type",
26062-
"data"
26063-
],
26064-
"properties": {
26065-
"type": {
26066-
"type": "string",
26067-
"enum": [
26068-
"single"
26069-
]
26070-
},
26071-
"data": {
26072-
"$ref": "#/components/schemas/RoutableConnectorChoice"
26073-
}
26074-
}
26075-
},
26076-
{
26077-
"type": "object",
26078-
"required": [
26079-
"type",
26080-
"data"
26081-
],
26082-
"properties": {
26083-
"type": {
26084-
"type": "string",
26085-
"enum": [
26086-
"priority"
26087-
]
26088-
},
26089-
"data": {
26090-
"type": "array",
26091-
"items": {
26092-
"$ref": "#/components/schemas/RoutableConnectorChoice"
26093-
}
26094-
}
26095-
}
26096-
},
26097-
{
26098-
"type": "object",
26099-
"required": [
26100-
"type",
26101-
"data"
26102-
],
26103-
"properties": {
26104-
"type": {
26105-
"type": "string",
26106-
"enum": [
26107-
"volume_split"
26108-
]
26109-
},
26110-
"data": {
26111-
"type": "array",
26112-
"items": {
26113-
"$ref": "#/components/schemas/ConnectorVolumeSplit"
26114-
}
26115-
}
26116-
}
26117-
},
26118-
{
26119-
"type": "object",
26120-
"required": [
26121-
"type",
26122-
"data"
26123-
],
26124-
"properties": {
26125-
"type": {
26126-
"type": "string",
26127-
"enum": [
26128-
"advanced"
26129-
]
26130-
},
26131-
"data": {
26132-
"$ref": "#/components/schemas/ProgramConnectorSelection"
26133-
}
26134-
}
26135-
}
26136-
],
26137-
"description": "Routing Algorithm kind",
26138-
"discriminator": {
26139-
"propertyName": "type"
26140-
}
26141-
},
2614226114
"RoutingAlgorithmKind": {
2614326115
"type": "string",
2614426116
"enum": [
@@ -26149,6 +26121,16 @@
2614926121
"dynamic"
2615026122
]
2615126123
},
26124+
"RoutingAlgorithmWrapper": {
26125+
"oneOf": [
26126+
{
26127+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
26128+
},
26129+
{
26130+
"$ref": "#/components/schemas/DynamicRoutingAlgorithm"
26131+
}
26132+
]
26133+
},
2615226134
"RoutingConfigRequest": {
2615326135
"type": "object",
2615426136
"properties": {
@@ -26163,7 +26145,7 @@
2616326145
"algorithm": {
2616426146
"allOf": [
2616526147
{
26166-
"$ref": "#/components/schemas/RoutingAlgorithm"
26148+
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
2616726149
}
2616826150
],
2616926151
"nullable": true
@@ -27110,6 +27092,91 @@
2711027092
],
2711127093
"description": "Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details."
2711227094
},
27095+
"StaticRoutingAlgorithm": {
27096+
"oneOf": [
27097+
{
27098+
"type": "object",
27099+
"required": [
27100+
"type",
27101+
"data"
27102+
],
27103+
"properties": {
27104+
"type": {
27105+
"type": "string",
27106+
"enum": [
27107+
"single"
27108+
]
27109+
},
27110+
"data": {
27111+
"$ref": "#/components/schemas/RoutableConnectorChoice"
27112+
}
27113+
}
27114+
},
27115+
{
27116+
"type": "object",
27117+
"required": [
27118+
"type",
27119+
"data"
27120+
],
27121+
"properties": {
27122+
"type": {
27123+
"type": "string",
27124+
"enum": [
27125+
"priority"
27126+
]
27127+
},
27128+
"data": {
27129+
"type": "array",
27130+
"items": {
27131+
"$ref": "#/components/schemas/RoutableConnectorChoice"
27132+
}
27133+
}
27134+
}
27135+
},
27136+
{
27137+
"type": "object",
27138+
"required": [
27139+
"type",
27140+
"data"
27141+
],
27142+
"properties": {
27143+
"type": {
27144+
"type": "string",
27145+
"enum": [
27146+
"volume_split"
27147+
]
27148+
},
27149+
"data": {
27150+
"type": "array",
27151+
"items": {
27152+
"$ref": "#/components/schemas/ConnectorVolumeSplit"
27153+
}
27154+
}
27155+
}
27156+
},
27157+
{
27158+
"type": "object",
27159+
"required": [
27160+
"type",
27161+
"data"
27162+
],
27163+
"properties": {
27164+
"type": {
27165+
"type": "string",
27166+
"enum": [
27167+
"advanced"
27168+
]
27169+
},
27170+
"data": {
27171+
"$ref": "#/components/schemas/ProgramConnectorSelection"
27172+
}
27173+
}
27174+
}
27175+
],
27176+
"discriminator": {
27177+
"propertyName": "type"
27178+
}
27179+
},
2711327180
"StraightThroughAlgorithm": {
2711427181
"oneOf": [
2711527182
{
@@ -27283,7 +27350,8 @@
2728327350
"decision_engine_configs": {
2728427351
"$ref": "#/components/schemas/DecisionEngineSuccessRateData"
2728527352
}
27286-
}
27353+
},
27354+
"additionalProperties": false
2728727355
},
2728827356
"SuccessBasedRoutingConfigBody": {
2728927357
"type": "object",
@@ -27316,7 +27384,8 @@
2731627384
"specificity_level": {
2731727385
"$ref": "#/components/schemas/SuccessRateSpecificityLevel"
2731827386
}
27319-
}
27387+
},
27388+
"additionalProperties": false
2732027389
},
2732127390
"SuccessRateSpecificityLevel": {
2732227391
"type": "string",

0 commit comments

Comments
 (0)