feat(router): add support for stateful straight through routing (#752)

This commit is contained in:
ItsMeShashank
2023-03-21 17:26:37 +05:30
committed by GitHub
parent 5b5557b71d
commit 568bf01a56
27 changed files with 375 additions and 237 deletions

View File

@ -63,9 +63,16 @@ pub struct PaymentsRequest {
#[serde(default, deserialize_with = "amount::deserialize_option")]
pub amount: Option<Amount>,
#[schema(value_type = Option<RoutingAlgorithm>, example = json!({
"type": "single",
"data": "stripe"
}))]
pub routing: Option<serde_json::Value>,
/// This allows the merchant to manually select a connector with which the payment can go through
#[schema(value_type = Option<Connector>, max_length = 255, example = "stripe")]
#[schema(value_type = Option<Vec<Connector>>, max_length = 255, example = json!(["stripe", "adyen"]))]
pub connector: Option<Vec<api_enums::Connector>>,
/// The currency of the payment request can be specified here
#[schema(value_type = Option<Currency>, example = "USD")]
pub currency: Option<api_enums::Currency>,