text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub struct StripebillingAuthType {
pub(super) api_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | StripebillingAuthType | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ApiKeyRetrieve;
let key_id = path.into_inner();
api::server_wrap(
flow,
state,
&req,
&key_id,
|state,
auth::AuthenticationDataWithoutProfile {
merchant_account, ..
},
key_id,
_| {
... | crates/router/src/routes/api_keys.rs | router | impl_block | 165 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
fn handle_response(
&self,
data: &RouterData<RSync, RefundsData, RefundsResponseData>,
event_builder: Option<&mut ConnectorEvent>,
res: Response,
) -> CustomResult<RouterData<RSync, RefundsData, RefundsResponseData>, errors::ConnectorError>
where
RSync: Clone,
... | crates/hyperswitch_connectors/src/connectors/payme.rs#chunk1 | hyperswitch_connectors | chunk | 2,624 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl CurrentFlow {
pub fn new(
token: auth::UserFromSinglePurposeToken,
current_flow: UserFlow,
) -> UserResult<Self> {
let flows = token.origin.get_flows();
let index = flows
.iter()
.position(|flow| flow == ¤t_flow)
.ok_or(UserErrors::I... | crates/router/src/types/domain/user/decision_manager.rs | router | impl_block | 290 | rust | null | CurrentFlow | null | impl CurrentFlow | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
web::scope("health")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::get().to(health)))
.service(web::resource("/ready").route(web::get().to(deep_health_check)))
} | crates/router/src/routes/app.rs | router | function_signature | 66 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl api::PaymentCapture for Powertranz {} | crates/hyperswitch_connectors/src/connectors/powertranz.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Powertranz | api::PaymentCapture for | impl api::PaymentCapture for for Powertranz | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.UpiCollectAdditionalData
{
"type": "object",
"properties": {
"vpa_id": {
"type": "string",
"description": "Masked VPA ID",
"example": "ab********@okhdfcbank",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 77 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"UpiCollectAdditionalData"
] | null | null | null | null |
pub async fn resend_invite(
state: SessionState,
user_from_token: auth::UserFromToken,
request: user_api::ReInviteUserRequest,
auth_id: Option<String>,
) -> UserResponse<()> {
let invitee_email = domain::UserEmail::from_pii_email(request.email)?;
let user: domain::UserFromStorage = state
... | crates/router/src/core/user.rs | router | function_signature | 833 | rust | null | null | null | null | resend_invite | null | null | null | null | null | null | null |
pub struct GlobepayErrorResponse {
pub return_msg: String,
pub return_code: GlobepayReturnCode,
pub message: String,
} | crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | GlobepayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.AlfamartVoucherData
{
"type": "object",
"properties": {
"first_name": {
"type": "string",
"description": "The billing first name for Alfamart",
"example": "Jane",
"nullable": true
},
"last_name": {
"type": "string",
"description"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 160 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"AlfamartVoucherData"
] | null | null | null | null |
impl AppState {
/// # Panics
///
/// Panics if Store can't be created or JWE decryption fails
pub async fn with_storage(
conf: settings::Settings<SecuredSecret>,
storage_impl: StorageImpl,
shut_down_signal: oneshot::Sender<()>,
api_client: Box<dyn crate::services::ApiClie... | crates/router/src/routes/app.rs | router | impl_block | 1,702 | rust | null | AppState | null | impl AppState | null | null | null | null | null | null | null | null |
pub async fn connector_delete(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::MerchantConnectorAccountId>,
) -> HttpResponse {
let flow = Flow::MerchantConnectorsDelete;
let id = path.into_inner();
let payload = web::Json(admin::MerchantConnectorId { id: id... | crates/router/src/routes/admin.rs | router | function_signature | 240 | rust | null | null | null | null | connector_delete | null | null | null | null | null | null | null |
pub struct RSyncResponse {
data: RSyncResponseData,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | RSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs
Public structs: 21
use cards::CardNumber;
use common_enums::enums;
use common_utils::{pii::Email, request::Method, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{BankDebitData, Ba... | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | full_file | 4,512 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RouterData<Flow, Request, Response> {
pub flow: PhantomData<Flow>,
pub merchant_id: id_type::MerchantId,
pub customer_id: Option<id_type::CustomerId>,
pub connector_customer: Option<String>,
pub connector: String,
// TODO: This should be a PaymentId type.
// Make this change after... | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | struct_definition | 831 | rust | RouterData | null | null | null | null | null | null | null | null | null | null | null |
impl ExternalAuthentication for Threedsecureio {} | crates/hyperswitch_connectors/src/connectors/threedsecureio.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Threedsecureio | ExternalAuthentication for | impl ExternalAuthentication for for Threedsecureio | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs
Public functions: 1
Public structs: 71
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts, date_time,
ext_traits::ValueExt,
pii,
types::{SemanticVersion, StringMajorUnit},
};
use error_stack::ResultExt... | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,180 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payouts_list_by_filter(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<payout_types::PayoutListFilterConstraints>,
) -> HttpResponse {
let flow = Flow::PayoutsList;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
stat... | crates/router/src/routes/payouts.rs | router | function_signature | 224 | rust | null | null | null | null | payouts_list_by_filter | null | null | null | null | null | null | null |
pub struct DeleteTokenizeDataWorkflow; | crates/router/src/workflows/tokenized_data.rs | router | struct_definition | 8 | rust | DeleteTokenizeDataWorkflow | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Worldpay {} | crates/hyperswitch_connectors/src/connectors/worldpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Worldpay | api::PaymentSession for | impl api::PaymentSession for for Worldpay | null | null | null | null | null | null | null | null |
/// Trait for providing a method on custom types for constructing `Maskable`
pub trait Mask {
/// The type returned by the `into_masked()` method. Must implement `PartialEq`, `Eq` and `Clone`
type Output: Eq + Clone + PartialEq;
/// Construct a `Maskable` instance that wraps `Self::Output` by consuming `se... | crates/masking/src/maskable.rs | masking | trait_definition | 92 | rust | null | null | Mask | null | null | null | null | null | null | null | null | null |
pub struct PayboxRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | PayboxRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn add_refund_sync_task(
db: &dyn db::StorageInterface,
refund: &diesel_refund::Refund,
runner: storage::ProcessTrackerRunner,
) -> RouterResult<storage::ProcessTracker> {
let task = "SYNC_REFUND";
let process_tracker_id = format!("{runner}_{task}_{}", refund.internal_reference_id);
le... | crates/router/src/core/refunds.rs | router | function_signature | 355 | rust | null | null | null | null | add_refund_sync_task | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs
Public structs: 12
use common_enums::enums;
use common_utils::{
request::Method,
types::{MinorUnit, StringMinorUnit, StringMinorUnitForConnector},
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data:... | crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs | hyperswitch_connectors | full_file | 4,055 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorAccessToken for Threedsecureio {} | crates/hyperswitch_connectors/src/connectors/threedsecureio.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Threedsecureio | ConnectorAccessToken for | impl ConnectorAccessToken for for Threedsecureio | null | null | null | null | null | null | null | null |
impl Tokenizable for PaymentsAuthorizeData {
fn set_session_token(&mut self, token: Option<String>) {
self.session_token = token;
}
} | crates/router/src/types.rs | router | impl_block | 33 | rust | null | PaymentsAuthorizeData | Tokenizable for | impl Tokenizable for for PaymentsAuthorizeData | null | null | null | null | null | null | null | null |
pub struct FiservResponseInteractions {
actions: FiservResponseActions,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | FiservResponseInteractions | null | null | null | null | null | null | null | null | null | null | null |
pub struct AmountDetails {
/// The amount of the order in the lowest denomination of currency
pub order_amount: MinorUnit,
/// The currency of the order
pub currency: common_enums::Currency,
/// The shipping cost of the order. This has to be collected from the merchant
pub shipping_cost: Option<... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | struct_definition | 267 | rust | AmountDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct GocardlessCustomerRequest {
customers: GocardlessCustomer,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | GocardlessCustomerRequest | null | null | null | null | null | null | null | null | null | null | null |
/// Constructs a new AwsSes client
pub async fn create(
conf: &EmailSettings,
ses_config: &SESConfig,
proxy_url: Option<impl AsRef<str>>,
) -> Self {
// Build the client initially which will help us know if the email configuration is correct
Self::create_client(conf, ses_... | crates/external_services/src/email/ses.rs | external_services | function_signature | 136 | rust | null | null | null | null | create | null | null | null | null | null | null | null |
merchant_context: domain::MerchantContext,
business_profile: domain::Profile,
webhook_details: api::IncomingWebhookDetails,
event_type: webhooks::IncomingWebhookEvent,
source_verified: bool,
) -> CustomResult<WebhookResponseTracker, errors::ApiErrorResponse> {
metrics::INCOMING_PAYOUT_WEBHOOK_ME... | crates/router/src/core/webhooks/incoming.rs#chunk1 | router | chunk | 8,182 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentVoid for Threedsecureio {} | crates/hyperswitch_connectors/src/connectors/threedsecureio.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Threedsecureio | PaymentVoid for | impl PaymentVoid for for Threedsecureio | null | null | null | null | null | null | null | null |
pub struct SuccessBasedAlgorithm {
pub algorithm_id_with_timestamp:
DynamicAlgorithmWithTimestamp<common_utils::id_type::RoutingId>,
#[serde(default)]
pub enabled_feature: DynamicRoutingFeatures,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 43 | rust | SuccessBasedAlgorithm | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Vgs {
fn id(&self) -> &'static str {
"vgs"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a Conne... | crates/hyperswitch_connectors/src/connectors/vgs.rs | hyperswitch_connectors | impl_block | 365 | rust | null | Vgs | ConnectorCommon for | impl ConnectorCommon for for Vgs | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Nmi {} | crates/hyperswitch_connectors/src/connectors/nmi.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Nmi | api::RefundExecute for | impl api::RefundExecute for for Nmi | null | null | null | null | null | null | null | null |
pub fn build_unified_connector_service_payment_method_for_external_proxy(
payment_method_data: hyperswitch_domain_models::payment_method_data::ExternalVaultPaymentMethodData,
payment_method_type: PaymentMethodType,
) -> CustomResult<payments_grpc::PaymentMethod, UnifiedConnectorServiceError> {
match payment... | crates/router/src/core/unified_connector_service.rs | router | function_signature | 571 | rust | null | null | null | null | build_unified_connector_service_payment_method_for_external_proxy | null | null | null | null | null | null | null |
pub struct CoingateRefundRequest {
pub amount: StringMajorUnit,
pub address: Secret<String>,
pub currency_id: i32,
pub platform_id: i32,
pub reason: String,
pub email: pii::Email,
pub ledger_account_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs | hyperswitch_connectors | struct_definition | 66 | rust | CoingateRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_token(transaction_data: Option<&Self>) -> Option<String> {
if let Some(data) = transaction_data {
match &data.payment_data {
Some(NovalnetResponsePaymentData::Card(card_data)) => {
card_data.token.clone().map(|token| token.expose())
}
... | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | function_signature | 118 | rust | null | null | null | null | get_token | null | null | null | null | null | null | null |
pub fn get_frm_metrics_info() -> Vec<NameDescription> {
FrmMetrics::iter().map(Into::into).collect()
} | crates/analytics/src/utils.rs | analytics | function_signature | 29 | rust | null | null | null | null | get_frm_metrics_info | null | null | null | null | null | null | null |
impl ApiEventMetric for AuthenticationAuthenticateResponse {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Authentication {
authentication_id: self.authentication_id.clone(),
})
}
} | crates/api_models/src/authentication.rs | api_models | impl_block | 48 | rust | null | AuthenticationAuthenticateResponse | ApiEventMetric for | impl ApiEventMetric for for AuthenticationAuthenticateResponse | null | null | null | null | null | null | null | null |
pub struct UnifiedAuthenticationServicePostAuthenticateRequest {
pub authenticate_by: String,
pub source_authentication_id: common_utils::id_type::AuthenticationId,
pub auth_creds: ConnectorAuthType,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 42 | rust | UnifiedAuthenticationServicePostAuthenticateRequest | null | null | null | null | null | null | null | null | null | null | null |
impl CardExpirationYear {
pub fn four_digits(&self) -> String {
self.peek().to_string()
}
pub fn two_digits(&self) -> String {
let year = self.peek() % 100;
year.to_string()
}
} | crates/cards/src/lib.rs | cards | impl_block | 57 | rust | null | CardExpirationYear | null | impl CardExpirationYear | null | null | null | null | null | null | null | null |
pub struct OrganizationNew {
org_id: id_type::OrganizationId,
org_name: Option<String>,
id: id_type::OrganizationId,
organization_name: Option<String>,
pub organization_details: Option<pii::SecretSerdeValue>,
pub metadata: Option<pii::SecretSerdeValue>,
pub created_at: time::PrimitiveDateTim... | crates/diesel_models/src/organization.rs | diesel_models | struct_definition | 124 | rust | OrganizationNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct DecryptedDataGroup(pub FxHashMap<String, DecryptedData>); | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 17 | rust | DecryptedDataGroup | null | null | null | null | null | null | null | null | null | null | null |
impl auth_service::PaymentInitiation for Plaid {} | crates/pm_auth/src/connector/plaid.rs | pm_auth | impl_block | 11 | rust | null | Plaid | auth_service::PaymentInitiation for | impl auth_service::PaymentInitiation for for Plaid | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Bambora {} | crates/hyperswitch_connectors/src/connectors/bambora.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Bambora | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Bambora | null | null | null | null | null | null | null | null |
File: crates/external_services/src/http_client/client.rs
Public functions: 4
use std::time::Duration;
use base64::Engine;
use common_utils::consts::BASE64_ENGINE;
pub use common_utils::errors::CustomResult;
use error_stack::ResultExt;
use hyperswitch_interfaces::{errors::HttpClientError, types::Proxy};
use masking::... | crates/external_services/src/http_client/client.rs | external_services | full_file | 1,345 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentStart; | crates/router/src/core/payments/operations/payment_start.rs | router | struct_definition | 5 | rust | PaymentStart | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_user_theme_using_lineage(
state: web::Data<AppState>,
req: HttpRequest,
query: web::Query<theme_api::EntityTypeQueryParam>,
) -> HttpResponse {
let flow = Flow::GetUserThemeUsingLineage;
let entity_type = query.into_inner().entity_type;
Box::pin(api::server_wrap(
flow,
... | crates/router/src/routes/user/theme.rs | router | function_signature | 160 | rust | null | null | null | null | get_user_theme_using_lineage | null | null | null | null | null | null | null |
pub struct CardInfo {
pub channel_properties: ChannelProperties,
pub card_information: CardInformation,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | CardInfo | null | null | null | null | null | null | null | null | null | null | null |
impl SecretsHandler for AnalyticsConfig {
async fn convert_to_raw_secret(
value: SecretStateContainer<Self, SecuredSecret>,
secret_management_client: &dyn SecretManagementInterface,
) -> CustomResult<SecretStateContainer<Self, RawSecret>, SecretsManagementError> {
let analytics_config = ... | crates/analytics/src/lib.rs | analytics | impl_block | 375 | rust | null | AnalyticsConfig | SecretsHandler for | impl SecretsHandler for for AnalyticsConfig | null | null | null | null | null | null | null | null |
pub struct MandatePaymentRequest {
pub ssl_transaction_type: TransactionType,
pub ssl_account_id: Secret<String>,
pub ssl_user_id: Secret<String>,
pub ssl_pin: Secret<String>,
pub ssl_amount: StringMajorUnit,
pub ssl_email: Email,
pub ssl_token: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs | hyperswitch_connectors | struct_definition | 67 | rust | MandatePaymentRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct ThreeDSData {
pub preferred_protocol_version: common_utils::types::SemanticVersion,
pub threeds_method_comp_ind: api_models::payments::ThreeDsCompletionIndicator,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 40 | rust | ThreeDSData | null | null | null | null | null | null | null | null | null | null | null |
pub struct XenditPaymentsRequest {
pub amount: FloatMajorUnit,
pub currency: Currency,
pub capture_method: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method: Option<PaymentMethod>,
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_id: Option<Secr... | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 103 | rust | XenditPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_payment_sync_body(req: &types::PaymentsSyncRouterData) -> Result<Vec<u8>, Error> {
let auth_details = BamboraapacAuthType::try_from(&req.connector_auth_type)?;
let connector_transaction_id = req
.request
.connector_transaction_id
.get_connector_transaction_id()
.change... | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | function_signature | 362 | rust | null | null | null | null | get_payment_sync_body | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts,
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, Requ... | crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs | hyperswitch_connectors | full_file | 4,285 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Moneris {
fn validate_mandate_payment(
&self,
pm_type: Option<enums::PaymentMethodType>,
pm_data: hyperswitch_domain_models::payment_method_data::PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::colle... | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Moneris | ConnectorValidation for | impl ConnectorValidation for for Moneris | null | null | null | null | null | null | null | null |
pub fn get_organization_type(&self) -> common_enums::OrganizationType {
self.organization_type.unwrap_or_default()
} | crates/diesel_models/src/organization.rs | diesel_models | function_signature | 26 | rust | null | null | null | null | get_organization_type | null | null | null | null | null | null | null |
pub fn get_payment_dimensions() -> Vec<NameDescription> {
vec![
PaymentDimensions::Connector,
PaymentDimensions::PaymentMethod,
PaymentDimensions::PaymentMethodType,
PaymentDimensions::Currency,
PaymentDimensions::AuthType,
PaymentDimensions::PaymentStatus,
Pa... | crates/analytics/src/utils.rs | analytics | function_signature | 120 | rust | null | null | null | null | get_payment_dimensions | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct PaymentInfo {
#[schema(value_type = String)]
pub payment_id: id_type::PaymentId,
pub amount: MinorUnit,
pub currency: Currency,
// customerId: Option<ETCu::CustomerId>,
// preferredGateway: Option<ETG::Gateway>,
pub payment_type: String,
pub metadata: Option<String>,
// in... | crates/api_models/src/open_router.rs | api_models | struct_definition | 200 | rust | PaymentInfo | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Redsys {} | crates/hyperswitch_connectors/src/connectors/redsys.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Redsys | api::Payment for | impl api::Payment for for Redsys | null | null | null | null | null | null | null | null |
pub struct Card {
expiry: Option<ExpiryResponse>,
card_type: Option<Secret<String>>,
card_type_name: Option<Secret<String>>,
masked_account_number: Option<Secret<String>>,
card_type_indicators: Option<CardTypeIndicators>,
network_response: Option<NetworkResponse>,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 64 | rust | Card | null | null | null | null | null | null | null | null | null | null | null |
pub struct GetUserDetailsResponse {
pub merchant_id: id_type::MerchantId,
pub name: Secret<String>,
pub email: pii::Email,
pub verification_days_left: Option<i64>,
pub role_id: String,
// This field is added for audit/debug reasons
#[serde(skip_serializing)]
pub user_id: String,
pub ... | crates/api_models/src/user.rs | api_models | struct_definition | 143 | rust | GetUserDetailsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct NuveiPaymentsResponse {
pub order_id: Option<String>,
pub user_token_id: Option<Secret<String>>,
pub payment_option: Option<PaymentOption>,
pub transaction_status: Option<NuveiTransactionStatus>,
pub gw_error_code: Option<i64>,
pub gw_error_reason: Option<String>,
pub gw_extended_... | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 303 | rust | NuveiPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardPayment {
#[serde(flatten)]
pub raw_card_details: RawCardDetails,
pub cvc: Secret<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub card_holder_name: Option<Secret<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_address: Option<BillingAddre... | crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs | hyperswitch_connectors | struct_definition | 79 | rust | CardPayment | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponseData {
pub statuses: Statuses,
pub descriptor: String,
pub notifications: NotificationContainer,
#[serde(rename = "merchant-account-id")]
pub merchant_account_id: MerchantAccountId,
#[serde(rename = "transaction-id")]
pub transaction_id: String,
#[serde(rename = ... | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 332 | rust | RefundResponseData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn accept_invitations_v2(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<user_role_api::AcceptInvitationsV2Request>,
) -> HttpResponse {
let flow = Flow::AcceptInvitationsV2;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
... | crates/router/src/routes/user_role.rs | router | function_signature | 144 | rust | null | null | null | null | accept_invitations_v2 | null | null | null | null | null | null | null |
/// Get the unique identifier of MerchantAccount
pub fn get_id(&self) -> &common_utils::id_type::MerchantId {
&self.merchant_id
} | crates/diesel_models/src/merchant_account.rs | diesel_models | function_signature | 37 | rust | null | null | null | null | get_id | null | null | null | null | null | null | null |
pub fn error_type(&self) -> #error_type_enum {
match self {
#(#arms),*
}
} | crates/router_derive/src/macros/api_error.rs | router_derive | function_signature | 27 | rust | null | null | null | null | error_type | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/checkbook.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::{enums, payments::PaymentIdType};
use common_utils::{
crypto,
errors::CustomResult,
ext_traits::{ByteSliceExt, BytesExt},
request::{Me... | crates/hyperswitch_connectors/src/connectors/checkbook.rs | hyperswitch_connectors | full_file | 4,991 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_profile_api_events(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Query<api_models::analytics::api_event::ApiLogsRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GetApiEvents;
Box::pin(api::server_wrap(
flow,... | crates/router/src/analytics.rs | router | function_signature | 269 | rust | null | null | null | null | get_profile_api_events | null | null | null | null | null | null | null |
pub struct Classic {
pub password_classic: String,
pub username_classic: String,
pub merchant_id_classic: String,
} | crates/connector_configs/src/connector.rs | connector_configs | struct_definition | 30 | rust | Classic | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentToken {
reusable: Option<bool>,
decline_duplicates: Option<bool>,
brand: Option<String>,
#[serde(rename = "type")]
token_type: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs | hyperswitch_connectors | struct_definition | 40 | rust | PaymentToken | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_role_from_token_with_groups(
state: SessionState,
user_from_token: UserFromToken,
) -> UserResponse<Vec<PermissionGroup>> {
let role_info = user_from_token
.get_role_info_from_db(&state)
.await
.attach_printable("Invalid role_id in JWT")?;
let permissions = role... | crates/router/src/core/user_role/role.rs | router | function_signature | 94 | rust | null | null | null | null | get_role_from_token_with_groups | null | null | null | null | null | null | null |
File: crates/drainer/src/logger.rs
#[doc(inline)]
pub use router_env::{debug, error, info, warn};
| crates/drainer/src/logger.rs | drainer | full_file | 27 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn record_attempt_core(
state: SessionState,
req_state: ReqState,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
req: api_models::payments::PaymentsAttemptRecordRequest,
payment_id: id_type::GlobalPaymentId,
header_payload: HeaderPayload,
) -> RouterResponse<a... | crates/router/src/core/payments.rs | router | function_signature | 868 | rust | null | null | null | null | record_attempt_core | null | null | null | null | null | null | null |
pub fn is_operation_confirm<Op: Debug>(operation: &Op) -> bool {
matches!(format!("{operation:?}").as_str(), "PaymentConfirm")
} | crates/router/src/core/payments.rs | router | function_signature | 35 | rust | null | null | null | null | is_operation_confirm | null | null | null | null | null | null | null |
pub struct EphemeralKey; | crates/router/src/routes/app.rs | router | struct_definition | 7 | rust | EphemeralKey | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/three_ds_decision_rule.rs
Public functions: 1
use actix_web::{web, Responder};
use hyperswitch_domain_models::merchant_context::{Context, MerchantContext};
use router_env::{instrument, tracing, Flow};
use crate::{
self as app,
core::{api_locking, three_ds_decision_rule as three... | crates/router/src/routes/three_ds_decision_rule.rs | router | full_file | 328 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/test_utils/tests/connectors/checkout_wh_ui.rs
use thirtyfour::{prelude::*, WebDriver};
use crate::{selenium::*, tester};
struct CheckoutSeleniumTest;
impl SeleniumTest for CheckoutSeleniumTest {
fn get_connector_name(&self) -> String {
"checkout".to_string()
}
}
async fn should_make_we... | crates/test_utils/tests/connectors/checkout_wh_ui.rs | test_utils | full_file | 239 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Checkout {} | crates/hyperswitch_connectors/src/connectors/checkout.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Checkout | api::PaymentSession for | impl api::PaymentSession for for Checkout | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub fn get_billing_merchant_connector_account_id(
&self,
) -> Option<id_type::MerchantConnectorAccountId> {
self.payment_revenue_recovery_metadata
.as_ref()
.map(|recovery_metadata| recovery_metadata.billing_connector_id.clone())
} | crates/diesel_models/src/types.rs | diesel_models | function_signature | 58 | rust | null | null | null | null | get_billing_merchant_connector_account_id | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/helcim.rs
Public functions: 2
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Req... | crates/hyperswitch_connectors/src/connectors/helcim.rs | hyperswitch_connectors | full_file | 7,273 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/customer-set-default-payment-method/customers--set-default-payment-method.mdx
# Type: Doc File
---
openapi: post /{customer_id}/payment_methods/{payment_method_id}/default
--- | api-reference/v1/customer-set-default-payment-method/customers--set-default-payment-method.mdx | null | doc_file | 47 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConsumerAuthenticationResponse {
code: Option<String>,
code_raw: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | ConsumerAuthenticationResponse | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentMetricAccumulator for RetriesAmountAccumulator {
type MetricOutput = Option<u64>;
fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow) {
self.total = match (
self.total,
metrics.total.as_ref().and_then(ToPrimitive::to_i64),
) {
(None, None)... | crates/analytics/src/payments/accumulator.rs | analytics | impl_block | 153 | rust | null | RetriesAmountAccumulator | PaymentMetricAccumulator for | impl PaymentMetricAccumulator for for RetriesAmountAccumulator | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Placetopay {} | crates/hyperswitch_connectors/src/connectors/placetopay.rs | hyperswitch_connectors | impl_block | 13 | rust | null | Placetopay | api::MandateSetup for | impl api::MandateSetup for for Placetopay | null | null | null | null | null | null | null | null |
pub struct CardAndNetworkTokenData {
pub card_data: payment_method_data::Card,
pub network_token_data: payment_method_data::NetworkTokenData,
} | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | struct_definition | 34 | rust | CardAndNetworkTokenData | null | null | null | null | null | null | null | null | null | null | null |
pub struct AdyenTransferResponse {
id: String,
account_holder: AdyenPlatformAccountHolder,
amount: adyen::Amount,
balance_account: AdyenBalanceAccount,
category: AdyenPayoutMethod,
category_data: Option<AdyenCategoryData>,
direction: AdyenTransactionDirection,
reference: String,
refe... | crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs | hyperswitch_connectors | struct_definition | 112 | rust | AdyenTransferResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ProxyClient {
pub fn new(proxy_config: &Proxy) -> CustomResult<Self, ApiClientError> {
let client = client::get_client_builder(proxy_config)
.switch()?
.build()
.change_context(ApiClientError::InvalidProxyConfiguration)?;
Ok(Self {
proxy_config: p... | crates/router/src/services/api/client.rs | router | impl_block | 262 | rust | null | ProxyClient | null | impl ProxyClient | null | null | null | null | null | null | null | null |
/// Config path.
pub fn config_path(environment: &str, explicit_config_path: Option<PathBuf>) -> PathBuf {
let mut config_path = PathBuf::new();
if let Some(explicit_config_path_val) = explicit_config_path {
config_path.push(explicit_config_path_val);
} else {
let con... | crates/router_env/src/logger/config.rs | router_env | function_signature | 139 | rust | null | null | null | null | config_path | null | null | null | null | null | null | null |
File: crates/analytics/src/frm/metrics/frm_triggered_attempts.rs
use api_models::analytics::{
frm::{FrmDimensions, FrmFilters, FrmMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use time::PrimitiveDateTime;
use super::FrmMetricRow;
us... | crates/analytics/src/frm/metrics/frm_triggered_attempts.rs | analytics | full_file | 842 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl WorldpayErrorResponse {
pub fn default(status_code: u16) -> Self {
match status_code {
code @ 404 => Self {
error_name: format!("{code} Not found"),
message: "Resource not found".to_string(),
validation_errors: None,
},
... | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | impl_block | 100 | rust | null | WorldpayErrorResponse | null | impl WorldpayErrorResponse | null | null | null | null | null | null | null | null |
pub struct UpiCollectData {
pub vpa_id: Option<Secret<String, pii::UpiVpaMaskingStrategy>>,
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 29 | rust | UpiCollectData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_new_merchant_and_insert_in_db(
&self,
state: SessionState,
) -> UserResult<domain::MerchantAccount> {
self.check_if_already_exists_in_db(state.clone()).await?;
let merchant_account_create_request = self
.create_merchant_account_request()
.... | crates/router/src/types/domain/user.rs | router | function_signature | 441 | rust | null | null | null | null | create_new_merchant_and_insert_in_db | null | null | null | null | null | null | null |
impl AuthipayPaymentsResponse {
/// Get gateway response (like Fiserv's gateway_response)
pub fn gateway_response(&self) -> AuthipayGatewayResponse {
AuthipayGatewayResponse {
transaction_state: self.get_transaction_status(),
transaction_processing_details: AuthipayTransactionPro... | crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs | hyperswitch_connectors | impl_block | 789 | rust | null | AuthipayPaymentsResponse | null | impl AuthipayPaymentsResponse | null | null | null | null | null | null | null | null |
pub async fn build_and_send_decision_engine_http_request<Req, Res, ErrRes>(
state: &SessionState,
http_method: services::Method,
path: &str,
request_body: Option<Req>,
_timeout: Option<u64>,
context_message: &str,
events_wrapper: Option<RoutingEventsWrapper<Req>>,
) -> RoutingResult<RoutingE... | crates/router/src/core/payments/routing/utils.rs | router | function_signature | 940 | rust | null | null | null | null | build_and_send_decision_engine_http_request | null | null | null | null | null | null | null |
impl api::RefundSync for Trustpay {} | crates/hyperswitch_connectors/src/connectors/trustpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Trustpay | api::RefundSync for | impl api::RefundSync for for Trustpay | null | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.