mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
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:
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user