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 async fn fetch_disputes_from_connector(
state: SessionState,
merchant_context: domain::MerchantContext,
merchant_connector_id: common_utils::id_type::MerchantConnectorAccountId,
req: FetchDisputesRequestData,
) -> RouterResponse<FetchDisputesResponse> {
let db = &*state.store;
let key_manage... | crates/router/src/core/disputes.rs | router | function_signature | 752 | rust | null | null | null | null | fetch_disputes_from_connector | null | null | null | null | null | null | null |
pub fn update_enabled_features(
&mut self,
algo_type: DynamicRoutingType,
feature_to_enable: DynamicRoutingFeatures,
) {
match algo_type {
DynamicRoutingType::SuccessRateBasedRouting => {
self.success_based_algorithm
.as_mut()
... | crates/api_models/src/routing.rs | api_models | function_signature | 154 | rust | null | null | null | null | update_enabled_features | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/jpmorgan.rs | hyperswitch_connectors | function_signature | 27 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct GocardlessMandateRequest {
mandates: Mandate,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | GocardlessMandateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct DigitalvirgoPaymentsRequest {
amount: FloatMajorUnit,
amount_surcharge: Option<FloatMajorUnit>,
client_uid: Option<String>,
msisdn: String,
product_name: String,
description: Option<String>,
partner_transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/digitalvirgo/transformers.rs | hyperswitch_connectors | struct_definition | 59 | rust | DigitalvirgoPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl super::payments::metrics::PaymentMetricAnalytics for SqlxClient {} | crates/analytics/src/sqlx.rs | analytics | impl_block | 15 | rust | null | SqlxClient | super::payments::metrics::PaymentMetricAnalytics for | impl super::payments::metrics::PaymentMetricAnalytics for for SqlxClient | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx
# Type: Doc File
---
openapi: get /v2/payment-method-sessions/{id}
--- | api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx | null | doc_file | 39 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl PartialEq for RoutableConnectorChoice {
fn eq(&self, other: &Self) -> bool {
self.connector.eq(&other.connector)
&& self.merchant_connector_id.eq(&other.merchant_connector_id)
}
} | crates/api_models/src/routing.rs | api_models | impl_block | 48 | rust | null | RoutableConnectorChoice | PartialEq for | impl PartialEq for for RoutableConnectorChoice | null | null | null | null | null | null | null | null |
pub async fn get_role_info<A>(state: &A, token: &AuthToken) -> RouterResult<roles::RoleInfo>
where
A: SessionStateInfo + Sync,
{
if let Some(role_info) = roles::predefined_roles::PREDEFINED_ROLES.get(token.role_id.as_str()) {
return Ok(role_info.clone());
}
if let Ok(role_info) = get_role_info_... | crates/router/src/services/authorization.rs | router | function_signature | 297 | rust | null | null | null | null | get_role_info | null | null | null | null | null | null | null |
impl ConnectorValidation for Affirm {
fn validate_mandate_payment(
&self,
_pm_type: Option<enums::PaymentMethodType>,
pm_data: PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
match pm_data {
PaymentMethodData::Card(_) => Err(errors::ConnectorError::... | crates/hyperswitch_connectors/src/connectors/affirm.rs | hyperswitch_connectors | impl_block | 179 | rust | null | Affirm | ConnectorValidation for | impl ConnectorValidation for for Affirm | null | null | null | null | null | null | null | null |
pub fn get_payment_routing_algorithm(
&self,
) -> CustomResult<
Option<api_models::routing::RoutingAlgorithmRef>,
api_error_response::ApiErrorResponse,
> {
self.routing_algorithm
.clone()
.map(|val| {
val.parse_value::<api_models::routing::... | crates/hyperswitch_domain_models/src/business_profile.rs | hyperswitch_domain_models | function_signature | 111 | rust | null | null | null | null | get_payment_routing_algorithm | null | null | null | null | null | null | null |
impl api::Refund for Elavon {} | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Elavon | api::Refund for | impl api::Refund for for Elavon | null | null | null | null | null | null | null | null |
pub struct PaymentIntentCreate; | crates/router/src/core/payments/operations/payment_create_intent.rs | router | struct_definition | 6 | rust | PaymentIntentCreate | null | null | null | null | null | null | null | null | null | null | null |
pub struct GetActivePaymentsMetricRequest {
#[serde(default)]
pub metrics: HashSet<ActivePaymentsMetrics>,
pub time_range: TimeRange,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 32 | rust | GetActivePaymentsMetricRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ToTokens for OperationsEnumMeta {
fn to_tokens(&self, tokens: &mut TokenStream) {
match self {
Self::Operations { keyword, .. } => keyword.to_tokens(tokens),
Self::Flow { keyword, .. } => keyword.to_tokens(tokens),
}
}
} | crates/router_derive/src/macros/operation.rs | router_derive | impl_block | 62 | rust | null | OperationsEnumMeta | ToTokens for | impl ToTokens for for OperationsEnumMeta | null | null | null | null | null | null | null | null |
pub struct StripeConnectRecipientAccountCreateResponse {
id: String,
} | crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs | hyperswitch_connectors | struct_definition | 15 | rust | StripeConnectRecipientAccountCreateResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Billwerk {
pub fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/billwerk.rs | hyperswitch_connectors | impl_block | 33 | rust | null | Billwerk | null | impl Billwerk | null | null | null | null | null | null | null | null |
pub struct StripePaymentIntentResponse {
pub id: id_type::PaymentId,
pub object: &'static str,
pub amount: i64,
pub amount_received: Option<i64>,
pub amount_capturable: i64,
pub currency: String,
pub status: StripePaymentStatus,
pub client_secret: Option<masking::Secret<String>>,
pub... | crates/router/src/compatibility/stripe/payment_intents/types.rs | router | struct_definition | 407 | rust | StripePaymentIntentResponse | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> KafkaPaymentAttempt<'a> {
pub fn from_storage(attempt: &'a PaymentAttempt) -> Self {
use masking::PeekInterface;
let PaymentAttempt {
payment_id,
merchant_id,
amount_details,
status,
connector,
error,
authen... | crates/router/src/services/kafka/payment_attempt.rs | router | impl_block | 1,245 | rust | null | KafkaPaymentAttempt | null | impl KafkaPaymentAttempt | null | null | null | null | null | null | null | null |
File: crates/test_utils/tests/connectors/mollie_ui.rs
use serial_test::serial;
use thirtyfour::{prelude::*, WebDriver};
use crate::{selenium::*, tester};
struct MollieSeleniumTest;
impl SeleniumTest for MollieSeleniumTest {
fn get_connector_name(&self) -> String {
"mollie".to_string()
}
}
async fn ... | crates/test_utils/tests/connectors/mollie_ui.rs | test_utils | full_file | 1,912 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct UasFlowData {
pub authenticate_by: String,
pub source_authentication_id: common_utils::id_type::AuthenticationId,
} | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 30 | rust | UasFlowData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_reference_id_merchant_id(
conn: &PgPooledConn,
merchant_reference_id: &id_type::CustomerId,
merchant_id: &id_type::MerchantId,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::me... | crates/diesel_models/src/query/customers.rs | diesel_models | function_signature | 114 | rust | null | null | null | null | find_by_merchant_reference_id_merchant_id | null | null | null | null | null | null | null |
pub struct PaymentsVoidRequest {
pub ssl_transaction_type: TransactionType,
pub ssl_account_id: Secret<String>,
pub ssl_user_id: Secret<String>,
pub ssl_pin: Secret<String>,
pub ssl_txn_id: String,
} | crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | PaymentsVoidRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantConnectorAccount {
pub merchant_id: id_type::MerchantId,
pub connector_name: common_enums::connector_enums::Connector,
pub connector_account_details: Encryption,
pub disabled: Option<bool>,
#[diesel(deserialize_as = super::OptionalDieselArray<common_types::payment_methods::Payment... | crates/diesel_models/src/merchant_connector_account.rs | diesel_models | struct_definition | 341 | rust | MerchantConnectorAccount | null | null | null | null | null | null | null | null | null | null | null |
/// Unify the address details, giving priority to `self` when details are present in both
pub fn unify_address_details(&self, other: Option<&Self>) -> Self {
if let Some(other) = other {
let (first_name, last_name) = if self
.first_name
.as_ref()
.... | crates/hyperswitch_domain_models/src/address.rs | hyperswitch_domain_models | function_signature | 251 | rust | null | null | null | null | unify_address_details | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/relay.rs
Public functions: 4
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
errors,
relay::{Relay, RelayNew, RelayUpdateInternal},
schema::relay::dsl,
PgPooledConn, StorageResult,
};
impl RelayNew... | crates/diesel_models/src/query/relay.rs | diesel_models | full_file | 438 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ForteCancelResponse {
pub transaction_id: String,
pub location_id: Secret<String>,
pub action: String,
pub authorization_code: String,
pub entered_by: String,
pub response: CancelResponseStatus,
} | crates/hyperswitch_connectors/src/connectors/forte/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | ForteCancelResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Coingate {} | crates/hyperswitch_connectors/src/connectors/coingate.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Coingate | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Coingate | null | null | null | null | null | null | null | null |
pub struct CheckoutRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | CheckoutRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_user_authentication_methods_for_auth_id(
conn: &PgPooledConn,
auth_id: &str,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::auth_id.eq(auth_id.to_owned()),
None,
None... | crates/diesel_models/src/query/user_authentication_method.rs | diesel_models | function_signature | 93 | rust | null | null | null | null | list_user_authentication_methods_for_auth_id | null | null | null | null | null | null | null |
impl api::PaymentSession for Inespay {} | crates/hyperswitch_connectors/src/connectors/inespay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Inespay | api::PaymentSession for | impl api::PaymentSession for for Inespay | null | null | null | null | null | null | null | null |
impl KafkaStore {
pub async fn new(
store: Store,
mut kafka_producer: KafkaProducer,
tenant_id: TenantID,
tenant_config: &dyn TenantConfig,
) -> Self {
kafka_producer.set_tenancy(tenant_config);
Self {
kafka_producer,
diesel_store: store,
... | crates/router/src/db/kafka_store.rs | router | impl_block | 79 | rust | null | KafkaStore | null | impl KafkaStore | null | null | null | null | null | null | null | null |
pub struct ActivePaymentsMetricRow {
pub count: Option<i64>,
} | crates/analytics/src/active_payments/metrics.rs | analytics | struct_definition | 17 | rust | ActivePaymentsMetricRow | null | null | null | null | null | null | null | null | null | null | null |
pub struct OrderInformationWithBill {
amount_details: Amount,
bill_to: Option<BillTo>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | OrderInformationWithBill | null | null | null | null | null | null | null | null | null | null | null |
impl Deref for CardExpirationMonth {
type Target = StrongSecret<u8>;
fn deref(&self) -> &Self::Target {
&self.0
}
} | crates/cards/src/lib.rs | cards | impl_block | 39 | rust | null | CardExpirationMonth | Deref for | impl Deref for for CardExpirationMonth | null | null | null | null | null | null | null | null |
pub fn into_inner(self) -> String {
self.0
} | crates/diesel_models/src/api_keys.rs | diesel_models | function_signature | 16 | rust | null | null | null | null | into_inner | null | null | null | null | null | null | null |
pub struct MandateData {
pub mandate_acceptance_type: Option<enums::MandateAcceptanceType>,
pub mandate_type: Option<enums::MandateType>,
pub payment_type: Option<enums::PaymentType>,
} | crates/euclid/src/backend/inputs.rs | euclid | struct_definition | 51 | rust | MandateData | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankPaymentInformationResponse {
pub status: TrustpayBankRedirectPaymentStatus,
pub status_reason_information: Option<StatusReasonInformation>,
pub references: ReferencesResponse,
pub amount: WebhookAmount,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | BankPaymentInformationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn check_if_already_exists_in_db(&self, state: SessionState) -> UserResult<()> {
if state
.global_store
.find_user_by_email(&self.get_email())
.await
.is_ok()
{
return Err(report!(UserErrors::UserExists));
}
Ok(())
... | crates/router/src/types/domain/user.rs | router | function_signature | 71 | rust | null | null | null | null | check_if_already_exists_in_db | null | null | null | null | null | null | null |
Documentation: crates/router_env/README.md
# Type: Doc File
# router_env
Environment of payment router: logger, basic config, its environment awareness.
## Example
```rust
use router_env::logger;
use tracing::{self, instrument};
#[instrument]
pub fn sample() -> () {
logger::log!(
logger::Level::INFO,
... | crates/router_env/README.md | null | doc_file | 157 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn form_payment_link_data(
state: &SessionState,
merchant_context: domain::MerchantContext,
merchant_id: common_utils::id_type::MerchantId,
payment_id: common_utils::id_type::PaymentId,
) -> RouterResult<(PaymentLink, PaymentLinkData, PaymentLinkConfig)> {
let db = &*state.store;
let k... | crates/router/src/core/payment_link.rs | router | function_signature | 2,103 | rust | null | null | null | null | form_payment_link_data | null | null | null | null | null | null | null |
impl Mask for Secret<String> {
type Output = String;
fn into_masked(self) -> Maskable<Self::Output> {
Maskable::new_masked(self)
}
} | crates/masking/src/maskable.rs | masking | impl_block | 40 | rust | null | Secret | Mask for | impl Mask for for Secret | null | null | null | null | null | null | null | null |
pub struct CardPaymentInformation {
card: Card,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | CardPaymentInformation | null | null | null | null | null | null | null | null | null | null | null |
impl<'a, K, V> Iterator for Iter<'a, K, V>
where
K: EntityId,
{
type Item = (K, &'a V);
fn next(&mut self) -> Option<Self::Item> {
self.inner.next().map(|(id, val)| (K::with_id(id), val))
}
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | impl_block | 76 | rust | null | Iter | Iterator for | impl Iterator for for Iter | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Breadpay {} | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Breadpay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Breadpay | null | null | null | null | null | null | null | null |
pub struct ItaubankPaymentsRequest {
valor: PixPaymentValue, // amount
chave: Secret<String>, // pix-key
devedor: ItaubankDebtor, // debtor
} | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | ItaubankPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Bamboraapac {} | crates/hyperswitch_connectors/src/connectors/bamboraapac.rs | hyperswitch_connectors | impl_block | 13 | rust | null | Bamboraapac | api::RefundSync for | impl api::RefundSync for for Bamboraapac | null | null | null | null | null | null | null | null |
impl RoutableConnectorChoiceWithBucketName {
pub fn new(routable_connector_choice: RoutableConnectorChoice, bucket_name: String) -> Self {
Self {
routable_connector_choice,
bucket_name,
}
}
} | crates/api_models/src/routing.rs | api_models | impl_block | 50 | rust | null | RoutableConnectorChoiceWithBucketName | null | impl RoutableConnectorChoiceWithBucketName | null | null | null | null | null | null | null | null |
pub struct NuvieAmountDetails {
total_tax: Option<StringMajorUnit>,
} | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | NuvieAmountDetails | null | null | null | null | null | null | null | null | null | null | null |
impl<K, V> fmt::Debug for DenseMap<K, V>
where
K: EntityId + fmt::Debug,
V: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_map().entries(self.iter()).finish()
}
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | impl_block | 70 | rust | null | DenseMap | fmt::Debug for | impl fmt::Debug for for DenseMap | null | null | null | null | null | null | null | null |
pub struct PlaidBankAccountCredentialsNumbers {
pub ach: Vec<PlaidBankAccountCredentialsACH>,
pub eft: Vec<PlaidBankAccountCredentialsEFT>,
pub international: Vec<PlaidBankAccountCredentialsInternational>,
pub bacs: Vec<PlaidBankAccountCredentialsBacs>,
} | crates/pm_auth/src/connector/plaid/transformers.rs | pm_auth | struct_definition | 66 | rust | PlaidBankAccountCredentialsNumbers | null | null | null | null | null | null | null | null | null | null | null |
pub struct Shift4PaymentsRequest {
amount: MinorUnit,
currency: enums::Currency,
captured: bool,
metadata: Option<serde_json::Value>,
#[serde(flatten)]
payment_method: Shift4PaymentMethod,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | Shift4PaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Checkout {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&CHECKOUT_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*CHECKOUT_SUPPORTED_PAYMENT_METHODS)
}
fn get_s... | crates/hyperswitch_connectors/src/connectors/checkout.rs | hyperswitch_connectors | impl_block | 104 | rust | null | Checkout | ConnectorSpecifications for | impl ConnectorSpecifications for for Checkout | null | null | null | null | null | null | null | null |
impl Capturable for PaymentsAuthorizeData {
fn get_captured_amount<F>(
&self,
amount_captured: Option<i64>,
payment_data: &PaymentData<F>,
) -> Option<i64>
where
F: Clone,
{
amount_captured.or(Some(
payment_data
.payment_attempt
... | crates/router/src/types.rs | router | impl_block | 553 | rust | null | PaymentsAuthorizeData | Capturable for | impl Capturable for for PaymentsAuthorizeData | null | null | null | null | null | null | null | null |
impl events::ApiEventMetric for SurchargeDecisionConfigReq {
fn get_api_event_type(&self) -> Option<events::ApiEventsType> {
Some(events::ApiEventsType::Routing)
}
} | crates/api_models/src/surcharge_decision_configs.rs | api_models | impl_block | 45 | rust | null | SurchargeDecisionConfigReq | events::ApiEventMetric for | impl events::ApiEventMetric for for SurchargeDecisionConfigReq | null | null | null | null | null | null | null | null |
pub struct OpensearchTimeRange {
#[serde(with = "common_utils::custom_serde::iso8601")]
pub gte: PrimitiveDateTime,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub lte: Option<PrimitiveDateTime>,
} | crates/analytics/src/opensearch.rs | analytics | struct_definition | 69 | rust | OpensearchTimeRange | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Multisafepay {} | crates/hyperswitch_connectors/src/connectors/multisafepay.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Multisafepay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Multisafepay | null | null | null | null | null | null | null | null |
pub async fn get_parent_info_for_role(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
) -> HttpResponse {
let flow = Flow::GetRoleV2;
let request_payload = user_role_api::role::GetRoleRequest {
role_id: path.into_inner(),
};
Box::pin(api::server_wrap(
... | crates/router/src/routes/user_role.rs | router | function_signature | 163 | rust | null | null | null | null | get_parent_info_for_role | null | null | null | null | null | null | null |
pub async fn cache_store(
cache_conf: &redis_interface::RedisSettings,
cache_error_signal: tokio::sync::oneshot::Sender<() | crates/storage_impl/src/lib.rs | storage_impl | function_signature | 33 | rust | null | null | null | null | cache_store | null | null | null | null | null | null | null |
pub struct LabelInformation {
pub label: String,
pub target_count: u64,
pub target_time: u64,
#[schema(value_type = String)]
pub mca_id: common_utils::id_type::MerchantConnectorAccountId,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 54 | rust | LabelInformation | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Braintree {
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::col... | crates/hyperswitch_connectors/src/connectors/braintree.rs | hyperswitch_connectors | impl_block | 104 | rust | null | Braintree | ConnectorValidation for | impl ConnectorValidation for for Braintree | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Breadpay {
fn get_webhook_object_reference_id(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplemented... | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | impl_block | 210 | rust | null | Breadpay | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Breadpay | null | null | null | null | null | null | null | null |
pub fn new(code: String) -> Self {
Self {
authorization_code: Secret::new(code),
}
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | function_signature | 26 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/api_models/src/user/dashboard_metadata.rs
Public structs: 12
use common_enums::{CountryAlpha2, MerchantProductType};
use common_utils::{id_type, pii};
use masking::Secret;
use strum::EnumString;
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub enum SetMetaDataRequest {
ProductionAgreement(... | crates/api_models/src/user/dashboard_metadata.rs | api_models | full_file | 1,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/configs/defaults.rs
use std::collections::HashSet;
use common_utils::id_type;
#[cfg(feature = "payouts")]
pub mod payout_required_fields;
impl Default for super::settings::Server {
fn default() -> Self {
Self {
port: 8080,
workers: num_cpus::get_physical()... | crates/router/src/configs/defaults.rs | router | full_file | 1,042 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.AuthenticationResponse
{
"type": "object",
"required": [
"authentication_id",
"merchant_id",
"status",
"amount",
"currency"
],
"properties": {
"authentication_id": {
"type": "string",
"description": "The unique identifier for this authen... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 717 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"AuthenticationResponse"
] | null | null | null | null |
impl ApiEventMetric for GetFrmMetricRequest {} | crates/api_models/src/analytics.rs | api_models | impl_block | 11 | rust | null | GetFrmMetricRequest | ApiEventMetric for | impl ApiEventMetric for for GetFrmMetricRequest | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ConfigKeyUpdate;
let mut payload = json_payload.into_inner();
let key = path.into_inner();
payload.key = key;
api::server_wrap(
flow,
state,
&req,
&payload,
|state, _, payload, _| configs::update_config(state, payload),
... | crates/router/src/routes/configs.rs | router | impl_block | 99 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Helcim {} | crates/hyperswitch_connectors/src/connectors/helcim.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Helcim | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Helcim | null | null | null | null | null | null | null | null |
pub struct PaymentFilterRow {
pub currency: Option<DBEnumWrapper<Currency>>,
pub status: Option<DBEnumWrapper<AttemptStatus>>,
pub connector: Option<String>,
pub authentication_type: Option<DBEnumWrapper<AuthenticationType>>,
pub payment_method: Option<String>,
pub payment_method_type: Option<St... | crates/analytics/src/payments/filters.rs | analytics | struct_definition | 191 | rust | PaymentFilterRow | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponse {
id: String,
status: RefundStatus,
} | crates/hyperswitch_connectors/src/connectors/paytm/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Powertranz {} | crates/hyperswitch_connectors/src/connectors/powertranz.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Powertranz | api::RefundExecute for | impl api::RefundExecute for for Powertranz | null | null | null | null | null | null | null | null |
pub trait PaymentMetricAccumulator {
type MetricOutput;
fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow);
fn collect(self) -> Self::MetricOutput;
} | crates/analytics/src/payments/accumulator.rs | analytics | trait_definition | 41 | rust | null | null | PaymentMetricAccumulator | null | null | null | null | null | null | null | null | null |
File: crates/common_utils/src/types/user/theme.rs
Public functions: 7
Public structs: 1
use common_enums::EntityType;
use serde::{Deserialize, Serialize};
use crate::{
events::{ApiEventMetric, ApiEventsType},
id_type, impl_api_event_type,
};
/// Enum for having all the required lineage for every level.
///... | crates/common_utils/src/types/user/theme.rs | common_utils | full_file | 1,277 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/customers/{customer_id}"
{
"get": {
"tags": [
"Customers"
],
"summary": "Customers - Retrieve",
"description": "Retrieves a customer's details.",
"operationId": "Retrieve a Customer",
"parameters": [
{
"name": "customer_id",
"in": "path",... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 731 | .json | null | null | null | null | null | openapi_spec | paths | [
"/customers/{customer_id}"
] | null | null | null | null |
impl api::ConnectorAccessToken for Wise {} | crates/hyperswitch_connectors/src/connectors/wise.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Wise | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Wise | null | null | null | null | null | null | null | null |
pub async fn update_totp(
state: SessionState,
user_token: auth::UserIdFromAuth,
req: user_api::VerifyTotpRequest,
) -> UserResponse<()> {
let user_from_db: domain::UserFromStorage = state
.global_store
.find_user_by_id(&user_token.user_id)
.await
.change_context(UserErro... | crates/router/src/core/user.rs | router | function_signature | 563 | rust | null | null | null | null | update_totp | null | null | null | null | null | null | null |
File: crates/external_services/src/crm.rs
Public functions: 2
Public structs: 3
use std::sync::Arc;
use common_utils::{
errors::CustomResult,
ext_traits::ConfigExt,
request::{Method, Request, RequestBuilder, RequestContent},
};
use error_stack::ResultExt;
use http::header;
use hyperswitch_interfaces::{
... | crates/external_services/src/crm.rs | external_services | full_file | 1,049 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Dlocal {} | crates/hyperswitch_connectors/src/connectors/dlocal.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Dlocal | api::Refund for | impl api::Refund for for Dlocal | null | null | null | null | null | null | null | null |
impl<T> RequiredFromNullableWithDefault<T> {
/// Extracts the inner value from the wrapper
pub fn into_inner(self) -> T {
self.0
}
} | crates/diesel_models/src/lib.rs | diesel_models | impl_block | 41 | rust | null | RequiredFromNullableWithDefault | null | impl RequiredFromNullableWithDefault | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Zsl {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&*ZSL_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*ZSL_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_webho... | crates/hyperswitch_connectors/src/connectors/zsl.rs | hyperswitch_connectors | impl_block | 107 | rust | null | Zsl | ConnectorSpecifications for | impl ConnectorSpecifications for for Zsl | null | null | null | null | null | null | null | null |
pub async fn organization_create() {} | crates/openapi/src/routes/organization.rs | openapi | function_signature | 7 | rust | null | null | null | null | organization_create | null | null | null | null | null | null | null |
File: crates/router/src/db/blocklist.rs
use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
types::storage,
};
#[async_trait::async_trait]
pub trait Blockl... | crates/router/src/db/blocklist.rs | router | full_file | 1,811 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn supports_instant_payout(self, payout_method: Option<PayoutType>) -> bool {
matches!(
(self, payout_method),
(Self::Paypal, Some(PayoutType::Wallet))
| (_, Some(PayoutType::Card))
| (Self::Adyenplatform, _)
| (Self::Nomupay, _)
... | crates/common_enums/src/connector_enums.rs | common_enums | function_signature | 80 | rust | null | null | null | null | supports_instant_payout | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Prophetpay {} | crates/hyperswitch_connectors/src/connectors/prophetpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Prophetpay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Prophetpay | null | null | null | null | null | null | null | null |
File: crates/router/src/compatibility/stripe/errors.rs
use common_utils::{errors::ErrorSwitch, id_type};
use hyperswitch_domain_models::errors::api_error_response as errors;
use crate::core::errors::CustomersErrorResponse;
#[derive(Debug, router_derive::ApiError, Clone)]
#[error(error_type_enum = StripeErrorType)]
p... | crates/router/src/compatibility/stripe/errors.rs#chunk0 | router | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ReInviteUserRequest {
pub email: pii::Email,
} | crates/api_models/src/user.rs | api_models | struct_definition | 16 | rust | ReInviteUserRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/sdk_events/metrics/sdk_initiated_count.rs
use std::collections::HashSet;
use api_models::analytics::{
sdk_events::{
SdkEventDimensions, SdkEventFilters, SdkEventMetricsBucketIdentifier, SdkEventNames,
},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchEx... | crates/analytics/src/sdk_events/metrics/sdk_initiated_count.rs | analytics | full_file | 801 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantConnectorDeleteResponse {
/// The identifier for the Merchant Account
#[schema(max_length = 255, example = "y3oqhf46pyzuxjbcn2giaqnb44", value_type = String)]
pub merchant_id: id_type::MerchantId,
/// Unique ID of the connector
#[schema(example = "mca_5apGeP94tMts6rg3U3kR", value_... | crates/api_models/src/admin.rs | api_models | struct_definition | 140 | rust | MerchantConnectorDeleteResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payouts_cancel_core(
state: SessionState,
merchant_context: domain::MerchantContext,
req: payouts::PayoutActionRequest,
) -> RouterResponse<payouts::PayoutCreateResponse> {
let mut payout_data = Box::pin(make_payout_data(
&state,
&merchant_context,
None,
&pay... | crates/router/src/core/payouts.rs | router | function_signature | 733 | rust | null | null | null | null | payouts_cancel_core | null | null | null | null | null | null | null |
impl ValidateStatusForOperation for PaymentAttemptRecord {
fn validate_status_for_operation(
&self,
intent_status: common_enums::IntentStatus,
) -> Result<(), errors::ApiErrorResponse> {
// need to verify this?
match intent_status {
// Payment attempt can be recorded ... | crates/router/src/core/payments/operations/payment_attempt_record.rs | router | impl_block | 359 | rust | null | PaymentAttemptRecord | ValidateStatusForOperation for | impl ValidateStatusForOperation for for PaymentAttemptRecord | null | null | null | null | null | null | null | null |
impl<T: Send + Debug + AuthService + PaymentInitiation> AuthServiceConnector for T {} | crates/pm_auth/src/types/api.rs | pm_auth | impl_block | 18 | rust | null | T | AuthServiceConnector for | impl AuthServiceConnector for for T | null | null | null | null | null | null | null | null |
pub struct ElavonPaymentsResponse {
pub result: ElavonResult,
} | crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | ElavonPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::UasAuthenticationConfirmationV2 for Recurly {} | crates/hyperswitch_connectors/src/connectors/recurly.rs | hyperswitch_connectors | impl_block | 14 | rust | null | Recurly | api::UasAuthenticationConfirmationV2 for | impl api::UasAuthenticationConfirmationV2 for for Recurly | null | null | null | null | null | null | null | null |
pub fn validate_secure_payment_link_render_request(
request_headers: &header::HeaderMap,
payment_link: &PaymentLink,
payment_link_config: &PaymentLinkConfig,
) -> RouterResult<()> {
let link_id = payment_link.payment_link_id.clone();
let allowed_domains = payment_link_config
.allowed_domains... | crates/router/src/core/payment_link/validator.rs | router | function_signature | 738 | rust | null | null | null | null | validate_secure_payment_link_render_request | null | null | null | null | null | null | null |
pub struct RefundResponse {
resource: String,
id: String,
amount: Amount,
settlement_id: Option<String>,
settlement_amount: Option<Amount>,
status: MollieRefundStatus,
description: Option<String>,
metadata: Option<MollieMetadata>,
payment_id: String,
#[serde(rename = "_links")]
... | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | struct_definition | 81 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Adyenplatform {} | crates/hyperswitch_connectors/src/connectors/adyenplatform.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Adyenplatform | api::RefundSync for | impl api::RefundSync for for Adyenplatform | null | null | null | null | null | null | null | null |
pub struct CustomerAssigned; | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | struct_definition | 5 | rust | CustomerAssigned | null | null | null | null | null | null | null | null | null | null | null |
impl DrainerSettings {
fn validate(&self) -> Result<(), errors::DrainerError> {
common_utils::fp_utils::when(self.stream_name.is_default_or_empty(), || {
Err(errors::DrainerError::ConfigParsingError(
"drainer stream name must not be empty".into(),
))
})
}
... | crates/drainer/src/settings.rs | drainer | impl_block | 71 | rust | null | DrainerSettings | null | impl DrainerSettings | null | null | null | null | null | null | null | null |
pub struct ApiLogsRequest {
#[serde(flatten)]
pub query_param: QueryType,
} | crates/api_models/src/analytics/api_event.rs | api_models | struct_definition | 21 | rust | ApiLogsRequest | null | null | 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.