feat(payouts): implement KVRouterStore (#3889)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Kashif <mohammed.kashif@juspay.in>
This commit is contained in:
Kashif
2024-03-19 15:33:37 +05:30
committed by GitHub
parent 3eb464250e
commit 944089d691
59 changed files with 2176 additions and 782 deletions

View File

@ -8,7 +8,7 @@ readme = "README.md"
license.workspace = true
[features]
default = ["payouts", "frm"]
default = []
business_profile_routing = []
connector_choice_bcompat = []
errors = ["dep:actix-web", "dep:reqwest"]

View File

@ -843,13 +843,6 @@ pub struct MerchantConnectorDetails {
pub metadata: Option<pii::SecretSerdeValue>,
}
#[cfg(feature = "payouts")]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(tag = "type", content = "data", rename_all = "snake_case")]
pub enum PayoutRoutingAlgorithm {
Single(api_enums::PayoutConnectors),
}
#[derive(Clone, Debug, Deserialize, ToSchema, Default, Serialize)]
#[serde(deny_unknown_fields)]
pub struct BusinessProfileCreate {

View File

@ -184,6 +184,7 @@ pub struct PaymentMethodResponse {
/// Payment method details from locker
#[cfg(feature = "payouts")]
#[schema(value_type = Option<Bank>)]
#[serde(skip_serializing_if = "Option::is_none")]
pub bank_transfer: Option<payouts::Bank>,
#[schema(value_type = Option<PrimitiveDateTime>, example = "2024-02-24T11:04:09.922Z")]
@ -822,6 +823,7 @@ pub struct CustomerPaymentMethod {
/// Payment method details from locker
#[cfg(feature = "payouts")]
#[schema(value_type = Option<Bank>)]
#[serde(skip_serializing_if = "Option::is_none")]
pub bank_transfer: Option<payouts::Bank>,
/// Masked bank details from PM auth services

View File

@ -51,8 +51,8 @@ pub struct PayoutCreateRequest {
pub routing: Option<serde_json::Value>,
/// This allows the merchant to manually select a connector with which the payout can go through
#[schema(value_type = Option<Vec<Connector>>, max_length = 255, example = json!(["wise", "adyen"]))]
pub connector: Option<Vec<api_enums::Connector>>,
#[schema(value_type = Option<Vec<PayoutConnectors>>, max_length = 255, example = json!(["wise", "adyen"]))]
pub connector: Option<Vec<api_enums::PayoutConnectors>>,
/// The boolean value to create payout with connector
#[schema(value_type = bool, example = true, default = false)]
@ -272,7 +272,7 @@ pub struct Paypal {
pub email: Option<Email>,
}
#[derive(Debug, ToSchema, Clone, Serialize)]
#[derive(Debug, Default, ToSchema, Clone, Serialize)]
#[serde(deny_unknown_fields)]
pub struct PayoutCreateResponse {
/// Unique identifier for the payout. This ensures idempotency for multiple payouts