feat(connector): [RISKIFIED] Add support for riskified frm connector (#2533)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kashif <kashif@protonmail.com>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Jagan <jaganelavarasan@gmail.com>
This commit is contained in:
AkshayaFoiger
2023-12-12 18:39:36 +05:30
committed by GitHub
parent 62a7c3053c
commit 151a30f4ee
58 changed files with 1646 additions and 61 deletions

View File

@ -127,6 +127,7 @@ pub enum Connector {
Zen,
Signifyd,
Plaid,
Riskified,
}
impl Connector {
@ -200,6 +201,7 @@ impl From<PayoutConnectors> for RoutableConnectors {
pub enum FrmConnectors {
/// Signifyd Risk Manager. Official docs: https://docs.signifyd.com/
Signifyd,
Riskified,
}
#[cfg(feature = "frm")]
@ -207,6 +209,7 @@ impl From<FrmConnectors> for RoutableConnectors {
fn from(value: FrmConnectors) -> Self {
match value {
FrmConnectors::Signifyd => Self::Signifyd,
FrmConnectors::Riskified => Self::Riskified,
}
}
}

View File

@ -313,6 +313,9 @@ pub struct PaymentsRequest {
///Request for an incremental authorization
pub request_incremental_authorization: Option<bool>,
/// additional data related to some frm connectors
pub frm_metadata: Option<serde_json::Value>,
}
impl PaymentsRequest {
@ -2598,8 +2601,30 @@ pub struct OrderDetailsWithAmount {
pub quantity: u16,
/// the amount per quantity of product
pub amount: i64,
// Does the order includes shipping
pub requires_shipping: Option<bool>,
/// The image URL of the product
pub product_img_link: Option<String>,
/// ID of the product that is being purchased
pub product_id: Option<String>,
/// Category of the product that is being purchased
pub category: Option<String>,
/// Brand of the product that is being purchased
pub brand: Option<String>,
/// Type of the product that is being purchased
pub product_type: Option<ProductType>,
}
#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum ProductType {
#[default]
Physical,
Digital,
Travel,
Ride,
Event,
Accommodation,
}
#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
@ -2610,8 +2635,18 @@ pub struct OrderDetails {
/// The quantity of the product to be purchased
#[schema(example = 1)]
pub quantity: u16,
// Does the order include shipping
pub requires_shipping: Option<bool>,
/// The image URL of the product
pub product_img_link: Option<String>,
/// ID of the product that is being purchased
pub product_id: Option<String>,
/// Category of the product that is being purchased
pub category: Option<String>,
/// Brand of the product that is being purchased
pub brand: Option<String>,
/// Type of the product that is being purchased
pub product_type: Option<ProductType>,
}
#[derive(Default, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]