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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OpenAPI Block Path: paths."/payment_methods"
{
"post": {
"tags": [
"Payment Methods"
],
"summary": "PaymentMethods - Create",
"description": "Creates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.",
"operationId": "... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 350 | .json | null | null | null | null | null | openapi_spec | paths | [
"/payment_methods"
] | null | null | null | null |
pub async fn filter_payout_methods(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payout: &hyperswitch_domain_models::payouts::payouts::Payouts,
address: Option<&domain::Address>,
) -> errors::RouterResult<Vec<link_utils::EnabledPaymentMethod>> {
use masking::ExposeInterface;
... | crates/router/src/core/payout_link.rs | router | function_signature | 973 | rust | null | null | null | null | filter_payout_methods | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Globalpay {} | crates/hyperswitch_connectors/src/connectors/globalpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Globalpay | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Globalpay | null | null | null | null | null | null | null | null |
pub struct ApiKeyExpiryWorkflow; | crates/router/src/workflows/api_key_expiry.rs | router | struct_definition | 8 | rust | ApiKeyExpiryWorkflow | null | null | null | null | null | null | null | null | null | null | null |
pub struct OutgoingWebhookLogsRequest {
pub payment_id: common_utils::id_type::PaymentId,
pub event_id: Option<String>,
pub refund_id: Option<String>,
pub dispute_id: Option<String>,
pub mandate_id: Option<String>,
pub payment_method_id: Option<String>,
pub attempt_id: Option<String>,
} | crates/api_models/src/analytics/outgoing_webhook_event.rs | api_models | struct_definition | 73 | rust | OutgoingWebhookLogsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub trait DomainType: Debug + Sync + Conversion {} | crates/storage_impl/src/kv_router_store.rs | storage_impl | trait_definition | 11 | rust | null | null | DomainType | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/stax.rs
Public structs: 1
pub mod transformers;
use std::{fmt::Debug, sync::LazyLock};
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::ByteSliceExt,
request::{Method, Request... | crates/hyperswitch_connectors/src/connectors/stax.rs | hyperswitch_connectors | full_file | 7,440 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Noon {} | crates/hyperswitch_connectors/src/connectors/noon.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Noon | api::RefundSync for | impl api::RefundSync for for Noon | null | null | null | null | null | null | null | null |
pub trait AuthService:
super::ConnectorCommon
+ AuthServiceLinkToken
+ AuthServiceExchangeToken
+ AuthServiceBankAccountCredentials
{
} | crates/pm_auth/src/types/api/auth_service.rs | pm_auth | trait_definition | 31 | rust | null | null | AuthService | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentsExternalAuthenticationRequest
{
"type": "object",
"required": [
"client_secret",
"device_channel",
"threeds_method_comp_ind"
],
"properties": {
"client_secret": {
"type": "string",
"description": "Client Secret"
},
"sdk_informati... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 166 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentsExternalAuthenticationRequest"
] | null | null | null | null |
pub struct PaymentsRedirectResponseData {
pub payment_id: id_type::GlobalPaymentId,
pub query_params: String,
pub json_payload: Option<serde_json::Value>,
} | crates/router/src/core/payments.rs | router | struct_definition | 39 | rust | PaymentsRedirectResponseData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_user_authentication_method(
state: SessionState,
req: user_api::UpdateUserAuthenticationMethodRequest,
) -> UserResponse<()> {
let user_auth_encryption_key = hex::decode(
state
.conf
.user_auth_methods
.get_inner()
.encryption_key
... | crates/router/src/core/user.rs | router | function_signature | 480 | rust | null | null | null | null | update_user_authentication_method | null | null | null | null | null | null | null |
pub struct AirwallexWebhookDataResource {
// Should this be a secret by default since it represents webhook payload
pub object: Secret<serde_json::Value>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | AirwallexWebhookDataResource | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_metadata(&self) -> Option<pii::SecretSerdeValue> {
self.metadata.clone()
} | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 25 | rust | null | null | null | null | get_metadata | null | null | null | null | null | null | null |
impl api::PaymentVoid for Fiservemea {} | crates/hyperswitch_connectors/src/connectors/fiservemea.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Fiservemea | api::PaymentVoid for | impl api::PaymentVoid for for Fiservemea | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
common_utils::fp_utils::when(self.wallets.is_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"list of connectors supporting wallets must not be empty".into(),
))
})
} | crates/router/src/configs/validations.rs | router | function_signature | 59 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
/// Here the fields passed in payment_method_data_billing takes precedence
pub fn unify_with_payment_method_data_billing(
self,
payment_method_data_billing: Option<Address>,
) -> Self {
// Unify the billing details with `payment_method_data.billing_details`
let unified_payment_me... | crates/hyperswitch_domain_models/src/payment_address.rs | hyperswitch_domain_models | function_signature | 143 | rust | null | null | null | null | unify_with_payment_method_data_billing | null | null | null | null | null | null | null |
/// Checks if step-up retry is possible.
pub fn is_step_up_possible(&self) -> bool {
self.step_up_possible
} | crates/common_types/src/domain.rs | common_types | function_signature | 30 | rust | null | null | null | null | is_step_up_possible | null | null | null | null | null | null | null |
pub fn convert_expiry(expiry: time::PrimitiveDateTime) -> u64 {
let now = common_utils::date_time::now();
let duration = expiry - now;
let output = duration.whole_seconds();
match output {
i64::MIN..=0 => 0,
_ => output as u64,
}
} | crates/router/src/services/authentication/decision.rs | router | function_signature | 75 | rust | null | null | null | null | convert_expiry | null | null | null | null | null | null | null |
macro_rules! db_type {
($a: ident, $str: tt) => {
impl DbType for $a {
fn name() -> &'static str {
stringify!($str)
}
}
};
($a:ident) => {
impl DbType for $a {
fn name() -> &'static str {
stringify!($a)
... | crates/analytics/src/sqlx.rs | analytics | macro | 85 | rust | null | null | null | null | null | null | null | null | declarative | null | null | null |
impl State for PmTokenized {} | crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs | router | impl_block | 8 | rust | null | PmTokenized | State for | impl State for for PmTokenized | null | null | null | null | null | null | null | null |
impl<const T: u8> IncomingWebhook for DummyConnector<T> {
fn get_webhook_object_reference_id(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<ObjectReferenceId, ConnectorError> {
Err(report!(ConnectorError::WebhooksNotImplemented))
}
fn get_webhook_event_t... | crates/hyperswitch_connectors/src/connectors/dummyconnector.rs | hyperswitch_connectors | impl_block | 181 | rust | null | DummyConnector | IncomingWebhook for | impl IncomingWebhook for for DummyConnector | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BankNames
{
"type": "string",
"description": "Name of banks supported by Hyperswitch",
"enum": [
"american_express",
"affin_bank",
"agro_bank",
"alliance_bank",
"am_bank",
"bank_of_america",
"bank_of_china",
"bank_islam",
"bank_muamalat",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 1,151 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BankNames"
] | null | null | null | null |
pub struct JWTAuthProfileFromRoute {
pub profile_id: id_type::ProfileId,
pub required_permission: Permission,
} | crates/router/src/services/authentication.rs | router | struct_definition | 27 | rust | JWTAuthProfileFromRoute | null | null | null | null | null | null | null | null | null | null | null |
pub struct EventListItemResponse {
/// The identifier for the Event.
#[schema(max_length = 64, example = "evt_018e31720d1b7a2b82677d3032cab959")]
pub event_id: String,
/// The identifier for the Merchant Account.
#[schema(max_length = 64, example = "y3oqhf46pyzuxjbcn2giaqnb44", value_type = String)... | crates/api_models/src/webhook_events.rs | api_models | struct_definition | 470 | rust | EventListItemResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn routing_retrieve_default_config_for_profiles(
state: web::Data<AppState>,
req: HttpRequest,
transaction_type: &enums::TransactionType,
) -> impl Responder {
Box::pin(oss_api::server_wrap(
Flow::RoutingRetrieveDefaultConfig,
state,
&req,
(),
|state, au... | crates/router/src/routes/routing.rs | router | function_signature | 290 | rust | null | null | null | null | routing_retrieve_default_config_for_profiles | null | null | null | null | null | null | null |
impl PaymentAttempt {
#[cfg(feature = "v1")]
pub fn get_payment_method(&self) -> Option<storage_enums::PaymentMethod> {
self.payment_method
}
#[cfg(feature = "v2")]
pub fn get_payment_method(&self) -> Option<storage_enums::PaymentMethod> {
// TODO: check if we can fix this
S... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | impl_block | 3,616 | rust | null | PaymentAttempt | null | impl PaymentAttempt | null | null | null | null | null | null | null | null |
pub struct CalSuccessRateEventResponse {
pub labels_with_score: Vec<LabelWithScoreEventResponse>,
pub routing_approach: RoutingApproach,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 33 | rust | CalSuccessRateEventResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Digitalvirgo {} | crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Digitalvirgo | api::Refund for | impl api::Refund for for Digitalvirgo | null | null | null | null | null | null | null | null |
pub fn get_card(&self) -> Option<&payment_methods::CardDetail> {
match self {
Self::Card(card) => Some(card),
#[cfg(feature = "v2")]
Self::NetworkToken(_) => None,
}
} | crates/hyperswitch_domain_models/src/vault.rs | hyperswitch_domain_models | function_signature | 53 | rust | null | null | null | null | get_card | null | null | null | null | null | null | null |
pub struct DrainerSettings {
pub stream_name: String,
pub num_partitions: u8,
pub max_read_count: u64,
pub shutdown_interval: u32, // in milliseconds
pub loop_interval: u32, // in milliseconds
} | crates/drainer/src/settings.rs | drainer | struct_definition | 59 | rust | DrainerSettings | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router_env/src/logger/formatter.rs
Public functions: 3
Public structs: 1
//! Formatting [layer](https://docs.rs/tracing-subscriber/0.3.15/tracing_subscriber/layer/trait.Layer.html) for Router.
use std::{
collections::{HashMap, HashSet},
fmt,
io::Write,
sync::LazyLock,
};
use config::Co... | crates/router_env/src/logger/formatter.rs | router_env | full_file | 3,392 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Globepay {} | crates/hyperswitch_connectors/src/connectors/globepay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Globepay | api::Payment for | impl api::Payment for for Globepay | null | null | null | null | null | null | null | null |
pub async fn get_organization(
state: SessionState,
org_id: api::OrganizationId,
) -> RouterResponse<api::OrganizationResponse> {
#[cfg(all(feature = "v1", feature = "olap"))]
{
CreateOrValidateOrganization::new(Some(org_id.organization_id))
.create_or_validate(state.accounts_store.a... | crates/router/src/core/admin.rs | router | function_signature | 174 | rust | null | null | null | null | get_organization | null | null | null | null | null | null | null |
impl DecisionEngineErrorsInterface for DeErrorResponse {
fn get_error_message(&self) -> String {
self.message.clone()
}
fn get_error_code(&self) -> String {
self.code.clone()
}
fn get_error_data(&self) -> Option<String> {
self.data.as_ref().map(|data| data.to_string())
... | crates/router/src/core/payments/routing/utils.rs | router | impl_block | 75 | rust | null | DeErrorResponse | DecisionEngineErrorsInterface for | impl DecisionEngineErrorsInterface for for DeErrorResponse | null | null | null | null | null | null | null | null |
impl Elavon {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | impl_block | 35 | rust | null | Elavon | null | impl Elavon | null | null | null | null | null | null | null | null |
File: crates/router/src/core/user/dashboard_metadata.rs
Public functions: 4
use std::str::FromStr;
use api_models::user::dashboard_metadata::{self as api, GetMultipleMetaDataPayload};
#[cfg(feature = "email")]
use common_enums::EntityType;
use common_utils::pii;
use diesel_models::{
enums::DashboardMetadata as D... | crates/router/src/core/user/dashboard_metadata.rs | router | full_file | 5,808 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Digitalvirgo {} | crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Digitalvirgo | api::PaymentToken for | impl api::PaymentToken for for Digitalvirgo | null | null | null | null | null | null | null | null |
pub struct PaymeQuerySaleRequest {
sale_payme_id: String,
seller_payme_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/payme/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | PaymeQuerySaleRequest | null | null | null | null | null | null | null | null | null | null | null |
### Refactors
- **billing:** Store `payment_method_data_billing` for recurring payments ([#4513](https://github.com/juspay/hyperswitch/pull/4513)) ([`55ae0fc`](https://github.com/juspay/hyperswitch/commit/55ae0fc5f704d8b35815fcd2170befb4a726ea8d))
**Full Changelog:** [`2024.05.09.0...2024.05.10.0`](https://github.com... | CHANGELOG.md#chunk33 | null | doc_chunk | 8,162 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/pm_auth.rs
Public functions: 2
use actix_web::{web, HttpRequest, Responder};
use api_models as api_types;
use router_env::{instrument, tracing, types::Flow};
use crate::{
core::api_locking,
routes::AppState,
services::{api, authentication as auth},
types::transformers::... | crates/router/src/routes/pm_auth.rs | router | full_file | 709 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> KafkaPaymentAttemptEvent<'a> {
pub fn from_storage(attempt: &'a PaymentAttempt) -> Self {
let card_payment_method_data = attempt
.get_payment_method_data()
.and_then(|data| data.get_additional_card_info());
Self {
payment_id: &attempt.payment_id,
... | crates/router/src/services/kafka/payment_attempt_event.rs | router | impl_block | 720 | rust | null | KafkaPaymentAttemptEvent | null | impl KafkaPaymentAttemptEvent | null | null | null | null | null | null | null | null |
impl AppState {
/// # Panics
///
/// Panics if secret or encryption management client cannot be initiated
pub async fn new(conf: Settings<SecuredSecret>) -> Self {
#[allow(clippy::expect_used)]
let secret_management_client = conf
.secrets_management
.get_secret_ma... | crates/drainer/src/settings.rs | drainer | impl_block | 176 | rust | null | AppState | null | impl AppState | null | null | null | null | null | null | null | null |
pub struct CardResponseObject {
suffix: Option<String>,
prefix: Option<String>,
expiration_month: Option<Secret<String>>,
expiration_year: Option<Secret<String>>,
#[serde(rename = "type")]
card_type: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 52 | rust | CardResponseObject | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Globalpay {
fn get_webhook_source_verification_algorithm(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn crypto::VerifySignature + Send>, errors::ConnectorError> {
Ok(Box::new(crypto::Sha512))
}
fn get_webhook_source_verif... | crates/hyperswitch_connectors/src/connectors/globalpay.rs | hyperswitch_connectors | impl_block | 699 | rust | null | Globalpay | IncomingWebhook for | impl IncomingWebhook for for Globalpay | null | null | null | null | null | null | null | null |
pub struct NoonPaymentsRequest {
api_operation: NoonApiOperations,
order: NoonOrder,
configuration: NoonConfiguration,
payment_data: NoonPaymentData,
subscription: Option<NoonSubscriptionData>,
billing: Option<NoonBilling>,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 54 | rust | NoonPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
consts::BASE64_ENGINE.encode(payload_digest)
} | crates/hyperswitch_connectors/src/connectors/barclaycard.rs | hyperswitch_connectors | function_signature | 47 | rust | null | null | null | null | generate_digest | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RetryAction
{
"type": "string",
"description": "Denotes the retry action",
"enum": [
"manual_retry",
"requeue"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 49 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RetryAction"
] | null | null | null | null |
pub struct RoutingRetrieveLinkQuery {
pub profile_id: Option<common_utils::id_type::ProfileId>,
pub transaction_type: Option<TransactionType>,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 33 | rust | RoutingRetrieveLinkQuery | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_encrypted_data<T>(
key_manager_state: &keymanager::KeyManagerState,
key_store: &merchant_key_store::MerchantKeyStore,
data: T,
) -> Result<
crypto::Encryptable<Secret<serde_json::Value>>,
error_stack::Report<storage_errors::StorageError>,
>
where
T: Debug + Serialize,
{
l... | crates/payment_methods/src/controller.rs | payment_methods | function_signature | 262 | rust | null | null | null | null | create_encrypted_data | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.SessionToken
{
"oneOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/GpaySessionTokenResponse"
},
{
"type": "object",
"required": [
"wallet_name"
],
"properties": {
"wal... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 896 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"SessionToken"
] | null | null | null | null |
pub struct PaymentAttemptNew {
pub payment_id: id_type::PaymentId,
pub merchant_id: id_type::MerchantId,
pub attempt_id: String,
pub status: storage_enums::AttemptStatus,
/// amount + surcharge_amount + tax_amount
/// This field will always be derived before updating in the Database
pub net_... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | struct_definition | 876 | rust | PaymentAttemptNew | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Archipel {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ARCHIPEL_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*ARCHIPEL_SUPPORTED_PAYMENT_METHODS)
}
fn get_s... | crates/hyperswitch_connectors/src/connectors/archipel.rs | hyperswitch_connectors | impl_block | 111 | rust | null | Archipel | ConnectorSpecifications for | impl ConnectorSpecifications for for Archipel | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Sift {} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Sift | api::MandateSetup for | impl api::MandateSetup for for Sift | null | null | null | null | null | null | null | null |
impl crate::events::ApiEventMetric for GlobalCustomerId {
fn get_api_event_type(&self) -> Option<crate::events::ApiEventsType> {
Some(crate::events::ApiEventsType::Customer {
customer_id: Some(self.clone()),
})
}
} | crates/common_utils/src/id_type/global_id/customer.rs | common_utils | impl_block | 58 | rust | null | GlobalCustomerId | crate::events::ApiEventMetric for | impl crate::events::ApiEventMetric for for GlobalCustomerId | null | null | null | null | null | null | null | null |
impl PaymentMethodIntentConfirm {
pub fn validate_payment_method_data_against_payment_method(
payment_method_type: api_enums::PaymentMethod,
payment_method_data: PaymentMethodCreateData,
) -> bool {
match payment_method_type {
api_enums::PaymentMethod::Card => {
... | crates/api_models/src/payment_methods.rs | api_models | impl_block | 102 | rust | null | PaymentMethodIntentConfirm | null | impl PaymentMethodIntentConfirm | null | null | null | null | null | null | null | null |
impl StaticRoutingAlgorithm {
pub fn should_validate_connectors_in_routing_config(&self) -> bool {
match self {
Self::Single(_) | Self::Priority(_) | Self::VolumeSplit(_) | Self::Advanced(_) => true,
Self::ThreeDsDecisionRule(_) => false,
}
}
} | crates/api_models/src/routing.rs | api_models | impl_block | 65 | rust | null | StaticRoutingAlgorithm | null | impl StaticRoutingAlgorithm | null | null | null | null | null | null | null | null |
pub struct ThreeDsData {
/// The unique identifier for this authentication from the 3DS server.
#[schema(value_type = String)]
pub three_ds_server_transaction_id: Option<String>,
/// The maximum supported 3DS version.
#[schema(value_type = String)]
pub maximum_supported_3ds_version: Option<commo... | crates/api_models/src/authentication.rs | api_models | struct_definition | 240 | rust | ThreeDsData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_disputes_aggregate(
state: web::Data<AppState>,
req: HttpRequest,
query_param: web::Query<common_utils::types::TimeRange>,
) -> HttpResponse {
let flow = Flow::DisputesAggregate;
let query_param = query_param.into_inner();
Box::pin(api::server_wrap(
flow,
state,... | crates/router/src/routes/disputes.rs | router | function_signature | 233 | rust | null | null | null | null | get_disputes_aggregate | null | null | null | null | null | null | null |
pub fn build_webhook_secrets_from_merchant_connector_account(
#[cfg(feature = "v1") | crates/router/src/core/unified_connector_service.rs | router | function_signature | 22 | rust | null | null | null | null | build_webhook_secrets_from_merchant_connector_account | null | null | null | null | null | null | null |
pub fn get_connector_by_name(name: &str) -> CustomResult<Self, errors::ApiErrorResponse> {
let connector_name = enums::AuthenticationConnectors::from_str(name)
.change_context(errors::ApiErrorResponse::IncorrectConnectorNameGiven)
.attach_printable_lazy(|| format!("unable to parse connec... | crates/router/src/types/api/authentication.rs | router | function_signature | 97 | rust | null | null | null | null | get_connector_by_name | null | null | null | null | null | null | null |
pub async fn perform_decision_euclid_routing(
state: &SessionState,
input: BackendInput,
created_by: String,
events_wrapper: RoutingEventsWrapper<RoutingEvaluateRequest>,
fallback_output: Vec<RoutableConnectorChoice>,
) -> RoutingResult<RoutingEvaluateResponse> {
logger::debug!("decision_engine_... | crates/router/src/core/payments/routing/utils.rs | router | function_signature | 432 | rust | null | null | null | null | perform_decision_euclid_routing | null | null | null | null | null | null | null |
impl<T> QueryBuilder<T>
where
T: AnalyticsDataSource,
AnalyticsCollection: ToSql<T>,
{
pub fn new(table: AnalyticsCollection) -> Self {
Self {
columns: Default::default(),
filters: Default::default(),
group_by: Default::default(),
order_by: Default::de... | crates/analytics/src/query.rs | analytics | impl_block | 2,619 | rust | null | QueryBuilder | null | impl QueryBuilder | null | null | null | null | null | null | null | null |
pub struct TsysPaymentsCancelRequest {
void: TsysCancelRequest,
} | crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | TsysPaymentsCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiCancelRequest {
#[serde(rename = "type")]
pub transaction_type: TransactionType,
pub security_key: Secret<String>,
pub transactionid: String,
pub void_reason: NmiVoidReason,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 49 | rust | NmiCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update(
self,
conn: &PgPooledConn,
file_metadata: FileMetadataUpdate,
) -> StorageResult<Self> {
match generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
_,
_,
>(
... | crates/diesel_models/src/query/file.rs | diesel_models | function_signature | 142 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
File: crates/common_types/src/consts.rs
//! Constants that are used in the domain level.
/// API version
#[cfg(feature = "v1")]
pub const API_VERSION: common_enums::ApiVersion = common_enums::ApiVersion::V1;
/// API version
#[cfg(feature = "v2")]
pub const API_VERSION: common_enums::ApiVersion = common_enums::ApiVer... | crates/common_types/src/consts.rs | common_types | full_file | 371 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ReversalInformation {
amount_details: Amount,
reason: String,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | ReversalInformation | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Silverflow {} | crates/hyperswitch_connectors/src/connectors/silverflow.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Silverflow | api::MandateSetup for | impl api::MandateSetup for for Silverflow | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Paytm {} | crates/hyperswitch_connectors/src/connectors/paytm.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paytm | api::PaymentToken for | impl api::PaymentToken for for Paytm | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Amazonpay {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&AMAZONPAY_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&AMAZONPAY_SUPPORTED_PAYMENT_METHODS)
}
fn get... | crates/hyperswitch_connectors/src/connectors/amazonpay.rs | hyperswitch_connectors | impl_block | 110 | rust | null | Amazonpay | ConnectorSpecifications for | impl ConnectorSpecifications for for Amazonpay | null | null | null | null | null | null | null | null |
pub struct SchedulerSettings {
pub stream: String,
pub producer: ProducerSettings,
pub consumer: ConsumerSettings,
pub loop_interval: u64,
pub graceful_shutdown_interval: u64,
pub server: Server,
} | crates/scheduler/src/configs/settings.rs | scheduler | struct_definition | 51 | rust | SchedulerSettings | null | null | null | null | null | null | null | null | null | null | null |
pub struct StripeAddressDetails {
pub city: Option<String>,
pub country: Option<api_enums::CountryAlpha2>,
pub line1: Option<masking::Secret<String>>,
pub line2: Option<masking::Secret<String>>,
pub postal_code: Option<masking::Secret<String>>,
pub state: Option<masking::Secret<String>>,
} | crates/router/src/compatibility/stripe/customers/types.rs | router | struct_definition | 79 | rust | StripeAddressDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProducerSettings {
pub upper_fetch_limit: i64,
pub lower_fetch_limit: i64,
pub lock_key: String,
pub lock_ttl: i64,
pub batch_size: usize,
} | crates/scheduler/src/configs/settings.rs | scheduler | struct_definition | 49 | rust | ProducerSettings | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_signature_network(&self) -> Option<common_enums::CardNetwork> {
self.0
.iter()
.find(|info| info.network.is_signature_network())
.map(|info| info.network.clone())
} | crates/api_models/src/open_router.rs | api_models | function_signature | 52 | rust | null | null | null | null | get_signature_network | null | null | null | null | null | null | null |
pub async fn profile_acquirer_create() { /* … */
} | crates/openapi/src/routes/profile_acquirer.rs | openapi | function_signature | 13 | rust | null | null | null | null | profile_acquirer_create | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.DynamicRoutingFeatures
{
"type": "string",
"enum": [
"metrics",
"dynamic_connector_selection",
"none"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 42 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"DynamicRoutingFeatures"
] | null | null | null | null |
pub struct CoBadgedCardData {
pub co_badged_card_networks_info: open_router::CoBadgedCardNetworks,
pub issuer_country_code: common_enums::CountryAlpha2,
pub is_regulated: bool,
pub regulated_name: Option<common_enums::RegulatedName>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 66 | rust | CoBadgedCardData | null | null | null | null | null | null | null | null | null | null | null |
pub fn retry_webhook_delivery_attempt() {} | crates/openapi/src/routes/webhook_events.rs | openapi | function_signature | 9 | rust | null | null | null | null | retry_webhook_delivery_attempt | null | null | null | null | null | null | null |
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
#[serde(rename_all = "snake_case")]
pub struct GooglePayPaymentMethodInfo {
/// The name of the card network
pub card_network: String,
/// The details of the card
pub card_details: String,
//assurance_details of t... | crates/api_models/src/payments.rs#chunk5 | api_models | chunk | 8,185 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_user_details(
state: SessionState,
user_token: auth::UserFromToken,
req: user_api::UpdateUserAccountDetailsRequest,
_req_state: ReqState,
) -> UserResponse<()> {
let user: domain::UserFromStorage = state
.global_store
.find_user_by_id(&user_token.user_id)
... | crates/router/src/core/user.rs | router | function_signature | 193 | rust | null | null | null | null | update_user_details | null | null | null | null | null | null | null |
pub struct ForgotPasswordRequest {
pub email: pii::Email,
} | crates/api_models/src/user.rs | api_models | struct_definition | 15 | rust | ForgotPasswordRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Fiuu {
fn id(&self) -> &'static str {
"fiuu"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.fiuu.base_url.as_ref()
}
fn build_error_r... | crates/hyperswitch_connectors/src/connectors/fiuu.rs | hyperswitch_connectors | impl_block | 276 | rust | null | Fiuu | ConnectorCommon for | impl ConnectorCommon for for Fiuu | null | null | null | null | null | null | null | null |
pub struct StoreCardReq {
pub merchant_id: id_type::MerchantId,
pub merchant_customer_id: id_type::CustomerId,
#[serde(skip_serializing_if = "Option::is_none")]
pub requestor_card_reference: Option<String>,
pub card: Card,
pub ttl: i64,
} | crates/router/src/core/payment_methods/transformers.rs | router | struct_definition | 67 | rust | StoreCardReq | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/enums.rs
pub use diesel_models::enums::*;
| crates/router/src/types/storage/enums.rs | router | full_file | 18 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct LogTelemetry {
/// Whether the traces pipeline is enabled.
pub traces_enabled: bool,
/// Whether the metrics pipeline is enabled.
pub metrics_enabled: bool,
/// Whether errors in setting up traces or metrics pipelines must be ignored.
pub ignore_errors: bool,
/// Sampling rate for... | crates/router_env/src/logger/config.rs | router_env | struct_definition | 216 | rust | LogTelemetry | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Plaid {
fn id(&self) -> &'static str {
"plaid"
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, _connectors: &'a auth_types::PaymentMethodAuthConnectors) -> &'a str {
"https://sandbox.plaid.com"
}
... | crates/pm_auth/src/connector/plaid.rs | pm_auth | impl_block | 343 | rust | null | Plaid | ConnectorCommon for | impl ConnectorCommon for for Plaid | null | null | null | null | null | null | null | null |
pub struct CybersourceAuthSetupRequest {
payment_information: PaymentInformation,
client_reference_information: ClientReferenceInformation,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | CybersourceAuthSetupRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardError {
pub avs: AVSDetails,
} | crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | CardError | null | null | null | null | null | null | null | null | null | null | null |
pub fn with_additional_payment_method_data(
additional_payment_method_data: AdditionalPaymentMethodConnectorResponse,
) -> Self {
Self {
additional_payment_method_data: Some(additional_payment_method_data),
extended_authorization_response_data: None,
}
} | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | function_signature | 54 | rust | null | null | null | null | with_additional_payment_method_data | null | null | null | null | null | null | null |
pub struct ShippingName {
full_name: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | ShippingName | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/services/logger.rs
//! Logger of the system.
pub use crate::logger::*;
| crates/router/src/services/logger.rs | router | full_file | 21 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn sync_refund_with_gateway(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payment_attempt: &storage::PaymentAttempt,
payment_intent: &storage::PaymentIntent,
refund: &diesel_refund::Refund,
creds_identifier: Option<String>,
split_refunds: Option<SplitRefundsReq... | crates/router/src/core/refunds.rs | router | function_signature | 1,278 | rust | null | null | null | null | sync_refund_with_gateway | null | null | null | null | null | null | null |
/// Acquirer configs
pub struct AcquirerConfigMap(pub HashMap<common_utils::id_type::ProfileAcquirerId, AcquirerConfig>); | crates/common_types/src/domain.rs | common_types | struct_definition | 30 | rust | AcquirerConfigMap | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentMethodNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<PaymentMethod> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/payment_method.rs | diesel_models | impl_block | 42 | rust | null | PaymentMethodNew | null | impl PaymentMethodNew | null | null | null | null | null | null | null | null |
pub async fn refund_metadata_update_core(
state: SessionState,
merchant_account: domain::MerchantAccount,
req: refunds::RefundMetadataUpdateRequest,
global_refund_id: id_type::GlobalRefundId,
) -> errors::RouterResponse<refunds::RefundResponse> {
let db = state.store.as_ref();
let refund = db
... | crates/router/src/core/refunds_v2.rs | router | function_signature | 251 | rust | null | null | null | null | refund_metadata_update_core | null | null | null | null | null | null | null |
pub fn number_value(input: &str) -> ParseResult<&str, ast::ValueType> {
error::context(
"number_value",
combinator::map(num_i64, |n| ast::ValueType::Number(MinorUnit::new(n))),
)(input)
} | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 61 | rust | null | null | null | null | number_value | null | null | null | null | null | null | null |
pub struct PaymentInformationResponse {
tokenized_card: Option<CardResponseObject>,
customer: Option<CustomerResponseObject>,
card: Option<CardResponseObject>,
scheme: Option<String>,
bin: Option<String>,
account_type: Option<String>,
issuer: Option<String>,
bin_country: Option<enums::Co... | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 70 | rust | PaymentInformationResponse | null | null | null | null | null | null | null | null | null | null | null |
query = query.filter(pi_dsl::profile_id.eq_any(profile_id));
}
query = query.filter(pi_dsl::created_at.ge(time_range.start_time));
query = match time_range.end_time {
Some(ending_at) => query.filter(pi_dsl::created_at.le(ending_at)),
None => query,
}... | crates/storage_impl/src/payments/payment_intent.rs#chunk1 | storage_impl | chunk | 4,779 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Allow [error_stack::Report] to convert between error types
/// This auto-implements [ReportSwitchExt] for the corresponding errors
pub trait ErrorSwitch<T> {
/// Get the next error type that the source error can be escalated into
/// This does not consume the source error since we need to keep it in context... | crates/common_utils/src/errors.rs | common_utils | trait_definition | 80 | rust | null | null | ErrorSwitch | null | 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.