-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/profile_specific_fallback_routing' of https://gith…
…ub.com/juspay/hyperswitch into feat/profile_specific_fallback_routing
- Loading branch information
Showing
59 changed files
with
616 additions
and
1,005 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod customer; | ||
pub mod gsm; | ||
pub mod payment; | ||
#[cfg(feature = "payouts")] | ||
pub mod payouts; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use common_utils::events::{ApiEventMetric, ApiEventsType}; | ||
|
||
use crate::gsm; | ||
|
||
impl ApiEventMetric for gsm::GsmCreateRequest { | ||
fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||
Some(ApiEventsType::Gsm) | ||
} | ||
} | ||
|
||
impl ApiEventMetric for gsm::GsmUpdateRequest { | ||
fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||
Some(ApiEventsType::Gsm) | ||
} | ||
} | ||
|
||
impl ApiEventMetric for gsm::GsmRetrieveRequest { | ||
fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||
Some(ApiEventsType::Gsm) | ||
} | ||
} | ||
|
||
impl ApiEventMetric for gsm::GsmDeleteRequest { | ||
fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||
Some(ApiEventsType::Gsm) | ||
} | ||
} | ||
|
||
impl ApiEventMetric for gsm::GsmDeleteResponse { | ||
fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||
Some(ApiEventsType::Gsm) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
use crate::enums; | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct GsmCreateRequest { | ||
pub connector: enums::Connector, | ||
pub flow: String, | ||
pub sub_flow: String, | ||
pub code: String, | ||
pub message: String, | ||
pub status: String, | ||
pub router_error: Option<String>, | ||
pub decision: GsmDecision, | ||
pub step_up_possible: bool, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct GsmRetrieveRequest { | ||
pub connector: enums::Connector, | ||
pub flow: String, | ||
pub sub_flow: String, | ||
pub code: String, | ||
pub message: String, | ||
} | ||
|
||
#[derive( | ||
Default, | ||
Clone, | ||
Copy, | ||
Debug, | ||
strum::Display, | ||
PartialEq, | ||
Eq, | ||
serde::Serialize, | ||
serde::Deserialize, | ||
strum::EnumString, | ||
)] | ||
#[serde(rename_all = "snake_case")] | ||
#[strum(serialize_all = "snake_case")] | ||
pub enum GsmDecision { | ||
Retry, | ||
Requeue, | ||
#[default] | ||
DoDefault, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct GsmUpdateRequest { | ||
pub connector: String, | ||
pub flow: String, | ||
pub sub_flow: String, | ||
pub code: String, | ||
pub message: String, | ||
pub status: Option<String>, | ||
pub router_error: Option<String>, | ||
pub decision: Option<GsmDecision>, | ||
pub step_up_possible: Option<bool>, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct GsmDeleteRequest { | ||
pub connector: String, | ||
pub flow: String, | ||
pub sub_flow: String, | ||
pub code: String, | ||
pub message: String, | ||
} | ||
|
||
#[derive(Debug, serde::Serialize)] | ||
pub struct GsmDeleteResponse { | ||
pub gsm_rule_delete: bool, | ||
pub connector: String, | ||
pub flow: String, | ||
pub sub_flow: String, | ||
pub code: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.