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 fn filter_type_to_sql(l: &str, op: FilterTypes, r: &str) -> String {
match op {
FilterTypes::EqualBool => format!("{l} = {r}"),
FilterTypes::Equal => format!("{l} = '{r}'"),
FilterTypes::NotEqual => format!("{l} != '{r}'"),
FilterTypes::In => format!("{l} IN ({r})"),
Filt... | crates/analytics/src/query.rs | analytics | function_signature | 192 | rust | null | null | null | null | filter_type_to_sql | null | null | null | null | null | null | null |
pub fn from_payments_request_and_payment_attempt(
payments_request: &api_models::payments::PaymentsRequest,
payment_attempt: Option<&PaymentAttempt>,
) -> Option<Self> {
let option_order_amount = payments_request
.amount
.map(MinorUnit::from)
.or(payment_a... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 305 | rust | null | null | null | null | from_payments_request_and_payment_attempt | null | null | null | null | null | null | null |
pub fn email_config(&self) -> EmailThemeConfig {
EmailThemeConfig {
primary_color: self.email_primary_color.clone(),
foreground_color: self.email_foreground_color.clone(),
background_color: self.email_background_color.clone(),
entity_name: self.email_entity_name.c... | crates/diesel_models/src/user/theme.rs | diesel_models | function_signature | 74 | rust | null | null | null | null | email_config | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Taxjar {
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/taxjar.rs | hyperswitch_connectors | impl_block | 210 | rust | null | Taxjar | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Taxjar | null | null | null | null | null | null | null | null |
File: crates/router/src/db/user/sample_data.rs
use common_utils::types::keymanager::KeyManagerState;
#[cfg(feature = "v1")]
use diesel_models::user::sample_data::PaymentAttemptBatchNew;
use diesel_models::{
dispute::{Dispute, DisputeNew},
errors::DatabaseError,
query::user::sample_data as sample_data_queri... | crates/router/src/db/user/sample_data.rs | router | full_file | 2,499 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NovalnetSyncResponseTransactionData {
pub amount: Option<MinorUnit>,
pub currency: Option<common_enums::Currency>,
pub date: Option<String>,
pub order_no: Option<String>,
pub payment_data: Option<NovalnetResponsePaymentData>,
pub payment_type: String,
pub status: NovalnetTransacti... | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 143 | rust | NovalnetSyncResponseTransactionData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SingleUseTokenKey(String); | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 8 | rust | SingleUseTokenKey | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/session_operation.rs
Public functions: 2
use std::{fmt::Debug, str::FromStr};
pub use common_enums::enums::CallConnectorAction;
use common_utils::id_type;
use error_stack::ResultExt;
pub use hyperswitch_domain_models::{
mandates::MandateData,
payment_address::PaymentAddr... | crates/router/src/core/payments/session_operation.rs | router | full_file | 1,591 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn find_connector_ids(&self) -> Result<ChargebeeMandateDetails, errors::ConnectorError> {
match self.payment_method.gateway {
ChargebeeGateway::Stripe | ChargebeeGateway::Braintree => {
let mut parts = self.payment_method.reference_id.split('/');
let customer_id =... | crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs | hyperswitch_connectors | function_signature | 150 | rust | null | null | null | null | find_connector_ids | null | null | null | null | null | null | null |
impl ContractBasedRoutingConfigBody {
pub fn update(&mut self, new: Self) {
if let Some(new_cons) = new.constants {
self.constants = Some(new_cons)
}
if let Some(new_time_scale) = new.time_scale {
self.time_scale = Some(new_time_scale)
}
}
} | crates/api_models/src/routing.rs | api_models | impl_block | 69 | rust | null | ContractBasedRoutingConfigBody | null | impl ContractBasedRoutingConfigBody | null | null | null | null | null | null | null | null |
pub async fn perform_decision_management(
state: &routes::SessionState,
algorithm_ref: routing::RoutingAlgorithmRef,
merchant_id: &common_utils::id_type::MerchantId,
payment_data: &core_routing::PaymentsDslInput<'_>,
) -> ConditionalConfigResult<common_types::payments::ConditionalConfigs> {
let algo... | crates/router/src/core/payments/conditional_configs.rs | router | function_signature | 343 | rust | null | null | null | null | perform_decision_management | null | null | null | null | null | null | null |
- **connector:** Make the `original_authorized_amount` optional for MITs with `connector_mandate_details` ([#5311](https://github.com/juspay/hyperswitch/pull/5311)) ([`a8e2f3e`](https://github.com/juspay/hyperswitch/commit/a8e2f3ebc9da60ef41459b080d8856d3cadf8c41))
- **core:** Change primary key of refund table ([#536... | CHANGELOG.md#chunk27 | null | doc_chunk | 8,142 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl FileUpload for Adyen {
fn validate_file_upload(
&self,
purpose: FilePurpose,
file_size: i32,
file_type: mime::Mime,
) -> CustomResult<(), errors::ConnectorError> {
match purpose {
FilePurpose::DisputeEvidence => {
let supported_file_types ... | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 338 | rust | null | Adyen | FileUpload for | impl FileUpload for for Adyen | null | null | null | null | null | null | null | null |
pub struct UserFields {
user_field: Vec<UserField>,
} | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | UserFields | null | null | null | null | null | null | null | null | null | null | null |
pub fn payments_list() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 6 | rust | null | null | null | null | payments_list | null | null | null | null | null | null | null |
impl<T> std::fmt::Display for KvOperation<'_, T>
where
T: serde::Serialize + Debug,
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
KvOperation::Hset(_, _) => f.write_str("Hset"),
KvOperation::SetNx(_, _) => f.write_str("Setnx"),
Kv... | crates/storage_impl/src/redis/kv_store.rs | storage_impl | impl_block | 152 | rust | null | KvOperation | std::fmt::Display for | impl std::fmt::Display for for KvOperation | null | null | null | null | null | null | null | null |
pub struct LinkTokenRequest {
pub client_name: String,
pub country_codes: Option<Vec<String>>,
pub language: Option<String>,
pub user_info: Option<id_type::CustomerId>,
pub client_platform: Option<api_enums::ClientPlatform>,
pub android_package_name: Option<String>,
pub redirect_uri: Option<... | crates/pm_auth/src/types.rs | pm_auth | struct_definition | 73 | rust | LinkTokenRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentMethodStatus
{
"type": "string",
"description": "Payment Method Status",
"enum": [
"active",
"inactive",
"processing",
"awaiting_data"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 55 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentMethodStatus"
] | null | null | null | null |
File: crates/router/src/types/storage/payout_attempt.rs
pub use diesel_models::payout_attempt::{
PayoutAttempt, PayoutAttemptNew, PayoutAttemptUpdate, PayoutAttemptUpdateInternal,
};
| crates/router/src/types/storage/payout_attempt.rs | router | full_file | 43 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NexinetsAuthType {
pub(super) api_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | NexinetsAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct RapydPaymentsResponse {
pub status: Status,
pub data: Option<ResponseData>,
} | crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | RapydPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct Customer {
pub browser: Option<Browser>,
pub locale: Option<String>,
pub ip_address: Option<Secret<String, IpAddress>>,
pub forward_ip: Option<Secret<String, IpAddress>>,
pub first_name: Option<Secret<String>>,
pub last_name: Option<Secret<String>>,
pub gender: Option<Secret<Strin... | crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs | hyperswitch_connectors | struct_definition | 185 | rust | Customer | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GetSankey;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth: AuthenticationData, req, _| async move {
let org_id = au... | crates/router/src/analytics.rs | router | impl_block | 190 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn update(&mut self, new: Self) {
if let Some(elimination_routing_algorithm) = new.elimination_routing_algorithm {
self.elimination_routing_algorithm = Some(elimination_routing_algorithm)
}
if let Some(success_based_algorithm) = new.success_based_algorithm {
self.succ... | crates/api_models/src/routing.rs | api_models | function_signature | 103 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
pub struct NomupayMetadata {
pub private_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | NomupayMetadata | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_enable_payment_response_hash(&self) -> bool {
self.enable_payment_response_hash.unwrap_or(true)
} | crates/api_models/src/admin.rs | api_models | function_signature | 25 | rust | null | null | null | null | get_enable_payment_response_hash | null | null | null | null | null | null | null |
pub struct CardsInfoRequest {
pub client_secret: Option<String>,
pub card_iin: String,
} | crates/api_models/src/cards_info.rs | api_models | struct_definition | 23 | rust | CardsInfoRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct Deutschebank {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/deutschebank.rs | hyperswitch_connectors | struct_definition | 26 | rust | Deutschebank | null | null | null | null | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Payouts> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/payouts.rs | diesel_models | function_signature | 35 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
pub async fn validate_lineage(state: &SessionState, lineage: &ThemeLineage) -> UserResult<()> {
match lineage {
ThemeLineage::Tenant { tenant_id } => {
validate_tenant(state, tenant_id)?;
Ok(())
}
ThemeLineage::Organization { tenant_id, org_id } => {
valid... | crates/router/src/utils/user/theme.rs | router | function_signature | 247 | rust | null | null | null | null | validate_lineage | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs
Public structs: 3
use std::collections::HashMap;
use api_models::payments::{MandateIds, MandateReferenceId};
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts::BASE64_ENGINE, errors::CustomResult, ext_traits::Option... | crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs | hyperswitch_connectors | full_file | 7,336 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl FilteredPaymentMethodsEnabled {
fn get_required_fields(
self,
input: RequiredFieldsInput,
) -> RequiredFieldsForEnabledPaymentMethodTypes {
let required_fields_config = input.required_fields_config;
let required_fields_info = self
.0
.into_iter()
... | crates/router/src/core/payment_methods.rs | router | impl_block | 289 | rust | null | FilteredPaymentMethodsEnabled | null | impl FilteredPaymentMethodsEnabled | null | null | null | null | null | null | null | null |
pub fn get_hashed(&self) -> UserResult<Vec<Secret<String>>> {
self.0
.iter()
.cloned()
.map(password::generate_password_hash)
.collect::<Result<Vec<_>, _>>()
} | crates/router/src/types/domain/user.rs | router | function_signature | 53 | rust | null | null | null | null | get_hashed | null | null | null | null | null | null | null |
pub fn qr_code_next_steps_check(
payment_attempt: storage::PaymentAttempt,
) -> RouterResult<Option<api_models::payments::QrCodeInformation>> {
let qr_code_steps: Option<Result<api_models::payments::QrCodeInformation, _>> = payment_attempt
.connector_metadata
.map(|metadata| metadata.parse_value... | crates/router/src/core/payments/transformers.rs | router | function_signature | 102 | rust | null | null | null | null | qr_code_next_steps_check | null | null | null | null | null | null | null |
File: crates/events/src/actix.rs
use router_env::tracing_actix_web::RequestId;
use crate::EventInfo;
impl EventInfo for RequestId {
type Data = String;
fn data(&self) -> error_stack::Result<String, crate::EventsError> {
Ok(self.as_hyphenated().to_string())
}
fn key(&self) -> String {
... | crates/events/src/actix.rs | events | full_file | 94 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankOfAmericaRefundResponse {
id: String,
status: BankofamericaRefundStatus,
error_information: Option<BankOfAmericaErrorInformation>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | BankOfAmericaRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct AffirmRsyncResponse {
pub amount: MinorUnit,
pub amount_refunded: MinorUnit,
pub authorization_expiration: String,
pub checkout_id: String,
pub created: String,
pub currency: Currency,
pub events: Vec<TransactionEvent>,
pub id: String,
pub order_id: String,
pub status:... | crates/hyperswitch_connectors/src/connectors/affirm/transformers.rs | hyperswitch_connectors | struct_definition | 155 | rust | AffirmRsyncResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Refund {
pub async fn update(self, conn: &PgPooledConn, refund: RefundUpdate) -> StorageResult<Self> {
match generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
_,
_,
>(
conn,
dsl::ref... | crates/diesel_models/src/query/refund.rs | diesel_models | impl_block | 824 | rust | null | Refund | null | impl Refund | null | null | null | null | null | null | null | null |
File: crates/router_env/tests/logger.rs
#![allow(clippy::unwrap_used)]
mod test_module;
use ::config::ConfigError;
use router_env::TelemetryGuard;
use self::test_module::fn_with_colon;
fn logger() -> error_stack::Result<&'static TelemetryGuard, ConfigError> {
use std::sync::OnceLock;
static INSTANCE: Once... | crates/router_env/tests/logger.rs | router_env | full_file | 179 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct SelfLink {
#[serde(rename = "self")]
pub self_link: SelfLinkInner,
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 23 | rust | SelfLink | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/user_role/role.rs
Public structs: 15
use common_enums::{
EntityType, ParentGroup, PermissionGroup, PermissionScope, Resource, RoleScope,
};
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct CreateRoleRequest {
pub role_name: String,
pub groups: Vec<PermissionGr... | crates/api_models/src/user_role/role.rs | api_models | full_file | 729 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_payment_billing(&self) -> Option<&Address> {
self.billing.as_ref()
} | crates/hyperswitch_domain_models/src/payment_address.rs | hyperswitch_domain_models | function_signature | 23 | rust | null | null | null | null | get_payment_billing | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/helcim.rs
use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct HelcimTest;
impl ConnectorActions for HelcimTest {}
impl utils::Connector for HelcimTest {
... | crates/router/tests/connectors/helcim.rs | router | full_file | 2,937 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Bitpay {} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bitpay | api::PaymentCapture for | impl api::PaymentCapture for for Bitpay | null | null | null | null | null | null | null | null |
pub fn arbitrary_comparison(input: &str) -> ParseResult<&str, ast::Comparison> {
error::context(
"condition",
combinator::map(
sequence::tuple((
skip_ws(string_str),
skip_ws(comparison_type),
skip_ws(string_str),
)),
... | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 146 | rust | null | null | null | null | arbitrary_comparison | null | null | null | null | null | null | null |
/// Get the encrypted Google Pay payment data, returning an error if it does not exist
pub fn get_encrypted_google_pay_payment_data_mandatory(
&self,
) -> Result<&GpayEcryptedTokenizationData, errors::ValidationError> {
match self {
Self::Encrypted(encrypted_data) => Ok(encrypted_dat... | crates/common_types/src/payments.rs | common_types | function_signature | 113 | rust | null | null | null | null | get_encrypted_google_pay_payment_data_mandatory | null | null | null | null | null | null | null |
pub struct GenericTokenizationRequest {
/// Customer ID for which the tokenization is requested
#[schema(value_type = String, example = "12345_cus_01926c58bc6e77c09e809964e72af8c8")]
pub customer_id: id_type::GlobalCustomerId,
/// Request for tokenization which contains the data to be tokenized
#[sc... | crates/api_models/src/tokenization.rs | api_models | struct_definition | 139 | rust | GenericTokenizationRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConnectorTokenDetails {
/// The unique identifier of the connector account through which the token was generated
#[schema(value_type = String, example = "mca_")]
pub connector_id: id_type::MerchantConnectorAccountId,
#[schema(value_type = TokenizationType)]
pub token_type: common_enums::... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 256 | rust | ConnectorTokenDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_profile(
state: SessionState,
merchant_id: id_type::MerchantId,
profile_id_list: Option<Vec<id_type::ProfileId>>,
) -> RouterResponse<Vec<api_models::admin::ProfileResponse>> {
let db = state.store.as_ref();
let key_store = db
.get_merchant_key_store_by_merchant_id(
... | crates/router/src/core/admin.rs | router | function_signature | 276 | rust | null | null | null | null | list_profile | null | null | null | null | null | null | null |
pub fn new(txn_id: masking::Secret<String>) -> Self {
Self(txn_id)
} | crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs | hyperswitch_domain_models | function_signature | 23 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
.await?;
add_delete_tokenized_data_task(&*state.store, &lookup_key, pm).await?;
metrics::TOKENIZED_DATA_COUNT.add(1, &[]);
Ok(lookup_key)
}
#[cfg(feature = "payouts")]
#[instrument(skip_all)]
pub async fn get_payout_method_data_from_temporary_locker(
state: &rout... | crates/router/src/core/payment_methods/vault.rs#chunk1 | router | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl MasterKeyInterface for KafkaStore {
fn get_master_key(&self) -> &[u8] {
self.diesel_store.get_master_key()
}
} | crates/router/src/db/kafka_store.rs | router | impl_block | 34 | rust | null | KafkaStore | MasterKeyInterface for | impl MasterKeyInterface for for KafkaStore | null | null | null | null | null | null | null | null |
pub async fn fetch_feature_matrix(
state: web::Data<app::AppState>,
req: HttpRequest,
json_payload: Option<web::Json<payment_types::FeatureMatrixRequest>>,
) -> impl Responder {
let flow: Flow = Flow::FeatureMatrix;
let payload = json_payload
.map(|json_request| json_request.into_inner())
... | crates/router/src/routes/feature_matrix.rs | router | function_signature | 152 | rust | null | null | null | null | fetch_feature_matrix | null | null | null | null | null | null | null |
pub struct AuthenticationStore {
pub cavv: Option<masking::Secret<String>>,
pub authentication: diesel_models::authentication::Authentication,
} | crates/hyperswitch_domain_models/src/router_request_types/authentication.rs | hyperswitch_domain_models | struct_definition | 30 | rust | AuthenticationStore | null | null | null | null | null | null | null | null | null | null | null |
/// This is the union of all the required fields for the payment method type enabled in all the connectors.
#[schema(value_type = RequiredFieldInfo)]
pub required_fields: Vec<payment_methods::RequiredFieldInfo>,
/// surcharge details for this payment method type if exists
#[schema(value_type = Opti... | crates/api_models/src/payments.rs#chunk10 | api_models | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentOption {
pub card: Option<Card>,
pub redirect_url: Option<Url>,
pub user_payment_option_id: Option<String>,
pub alternative_payment_method: Option<AlternativePaymentMethod>,
pub billing_address: Option<BillingAddress>,
pub shipping_address: Option<BillingAddress>,
} | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 64 | rust | PaymentOption | null | null | null | null | null | null | null | null | null | null | null |
pub struct V2ApiKeyAuth {
pub is_connected_allowed: bool,
pub is_platform_allowed: bool,
} | crates/router/src/services/authentication.rs | router | struct_definition | 24 | rust | V2ApiKeyAuth | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_payout_retrieve(
state: &SessionState,
merchant_context: &domain::MerchantContext,
connector_data: &api::ConnectorData,
payout_data: &mut PayoutData,
) -> RouterResult<()> {
// 1. Form Router data
let mut router_data = core_utils::construct_payout_router_data(
state,
... | crates/router/src/core/payouts.rs | router | function_signature | 310 | rust | null | null | null | null | create_payout_retrieve | null | null | null | null | null | null | null |
impl OutgoingWebhookType for StripeOutgoingWebhook {
fn get_outgoing_webhooks_signature(
&self,
payment_response_hash_key: Option<impl AsRef<[u8]>>,
) -> errors::CustomResult<OutgoingWebhookPayloadWithSignature, errors::WebhooksFlowError> {
let timestamp = self.created;
let paym... | crates/router/src/compatibility/stripe/webhooks.rs | router | impl_block | 369 | rust | null | StripeOutgoingWebhook | OutgoingWebhookType for | impl OutgoingWebhookType for for StripeOutgoingWebhook | null | null | null | null | null | null | null | null |
impl AuthenticationConnectors {
pub fn is_separate_version_call_required(self) -> bool {
match self {
Self::Threedsecureio
| Self::Netcetera
| Self::CtpMastercard
| Self::UnifiedAuthenticationService
| Self::Juspaythreedsserver
| Self::... | crates/common_enums/src/enums.rs | common_enums | impl_block | 93 | rust | null | AuthenticationConnectors | null | impl AuthenticationConnectors | null | null | null | null | null | null | null | null |
pub async fn unlock_connector_customer_status(
state: &SessionState,
connector_customer_id: &str,
) -> CustomResult<bool, errors::StorageError> {
let redis_conn =
state
.store
.get_redis_conn()
.change_context(errors::StorageError::... | crates/router/src/types/storage/revenue_recovery_redis_operation.rs | router | function_signature | 212 | rust | null | null | null | null | unlock_connector_customer_status | null | null | null | null | null | null | null |
pub fn new() -> Self {
// Do `export CONNECTOR_AUTH_FILE_PATH="/hyperswitch/crates/router/tests/connectors/sample_auth.toml"`
// before running tests in shell
let path = env::var("CONNECTOR_AUTH_FILE_PATH")
.expect("Connector authentication file path not set");
toml::from_str... | crates/test_utils/src/connector_auth.rs | test_utils | function_signature | 108 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CustomerAcceptance
{
"type": "object",
"description": "This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object i... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 238 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CustomerAcceptance"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.CardDetailUpdate
{
"type": "object",
"required": [
"card_exp_month",
"card_exp_year",
"card_holder_name"
],
"properties": {
"card_exp_month": {
"type": "string",
"description": "Card Expiry Month",
"example": "10"
},
"card_exp_year... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 201 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardDetailUpdate"
] | null | null | null | null |
impl api::PaymentsCompleteAuthorize for Paybox {} | crates/hyperswitch_connectors/src/connectors/paybox.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Paybox | api::PaymentsCompleteAuthorize for | impl api::PaymentsCompleteAuthorize for for Paybox | null | null | null | null | null | null | null | null |
pub struct SubmitEvidenceRequest {
///Dispute Id
pub dispute_id: String,
/// Logs showing the usage of service by customer
pub access_activity_log: Option<String>,
/// Billing address of the customer
pub billing_address: Option<String>,
/// File Id of cancellation policy
pub cancellation... | crates/api_models/src/disputes.rs | api_models | struct_definition | 472 | rust | SubmitEvidenceRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct SupportedConnectorsForMandate {
#[serde(deserialize_with = "deserialize_hashset")]
pub connector_list: HashSet<enums::Connector>,
} | crates/payment_methods/src/configs/settings.rs | payment_methods | struct_definition | 34 | rust | SupportedConnectorsForMandate | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentsCompleteAuthorize for Digitalvirgo {} | crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Digitalvirgo | api::PaymentsCompleteAuthorize for | impl api::PaymentsCompleteAuthorize for for Digitalvirgo | null | null | null | null | null | null | null | null |
pub async fn get_single_profile_id(
state: &SessionState,
user_role: &UserRole,
merchant_id: &id_type::MerchantId,
) -> UserResult<id_type::ProfileId> {
let (_, entity_type) = user_role
.get_entity_id_and_type()
.ok_or(UserErrors::InternalServerError)?;
match entity_type {
En... | crates/router/src/utils/user_role.rs | router | function_signature | 256 | rust | null | null | null | null | get_single_profile_id | null | null | null | null | null | null | null |
pub struct StripePaymentRetrieveBody {
pub client_secret: Option<String>,
} | crates/router/src/compatibility/stripe/payment_intents/types.rs | router | struct_definition | 16 | rust | StripePaymentRetrieveBody | null | null | null | null | null | null | null | null | null | null | null |
/// Get the decrypted Apple Pay payment data, returning an error if it does not exist
pub fn get_decrypted_apple_pay_payment_data_mandatory(
&self,
) -> Result<&ApplePayPredecryptData, errors::ValidationError> {
self.get_decrypted_apple_pay_payment_data_optional()
.get_required_value... | crates/common_types/src/payments.rs | common_types | function_signature | 94 | rust | null | null | null | null | get_decrypted_apple_pay_payment_data_mandatory | null | null | null | null | null | null | null |
pub struct EncryptedData {
pub data: StrongSecret<Vec<u8>>,
} | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 17 | rust | EncryptedData | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Xendit {} | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Xendit | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Xendit | null | null | null | null | null | null | null | null |
pub struct Evidence {
pub proof_of_delivery_or_service_file: Option<String>,
pub invoice_or_receipt_file: Option<String>,
pub invoice_showing_distinct_transactions_file: Option<String>,
pub customer_communication_file: Option<String>,
pub refund_or_cancellation_policy_file: Option<String>,
pub r... | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 83 | rust | Evidence | null | null | null | null | null | null | null | null | null | null | null |
pub async fn delete_network_token_from_locker_and_token_service(
_state: &routes::SessionState,
_customer_id: &id_type::GlobalCustomerId,
_merchant_id: &id_type::MerchantId,
_payment_method_id: String,
_network_token_locker_id: Option<String>,
_network_token_requestor_reference_id: String,
) -> ... | crates/router/src/core/payment_methods/network_tokenization.rs | router | function_signature | 94 | rust | null | null | null | null | delete_network_token_from_locker_and_token_service | null | null | null | null | null | null | null |
impl api::PaymentSession for Nordea {} | crates/hyperswitch_connectors/src/connectors/nordea.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Nordea | api::PaymentSession for | impl api::PaymentSession for for Nordea | null | null | null | null | null | null | null | null |
pub fn check_currency_country_filters(
payout_method_filter: Option<&PaymentMethodFilters>,
request_payout_method_type: &api_models::payment_methods::RequestPaymentMethodTypes,
currency: common_enums::Currency,
country: Option<&common_enums::CountryAlpha2>,
) -> errors::RouterResult<Option<bool>> {
... | crates/router/src/core/payout_link.rs | router | function_signature | 297 | rust | null | null | null | null | check_currency_country_filters | null | null | null | null | null | null | null |
pub struct SignedMessage {
encrypted_message: String,
ephemeral_public_key: String,
tag: String,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | SignedMessage | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Adyen {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ADYEN_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*ADYEN_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_... | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 108 | rust | null | Adyen | ConnectorSpecifications for | impl ConnectorSpecifications for for Adyen | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::PaymentStartRedirection;
let global_payment_id = path.into_inner();
tracing::Span::current().record("payment_id", global_payment_id.get_string_repr());
let publishable_key = &payload.publishable_key;
let profile_id = &payload.profile_id;
let payment_start_red... | crates/router/src/routes/payments.rs | router | impl_block | 297 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::RefundSync for Coingate {} | crates/hyperswitch_connectors/src/connectors/coingate.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Coingate | api::RefundSync for | impl api::RefundSync for for Coingate | null | null | null | null | null | null | null | null |
/// Determines whether a capture API call should be made for a payment attempt
/// This function evaluates whether an authorized payment should proceed with a capture API call
/// based on various payment parameters. It's primarily used in two-step (auth + capture) payment flows for CaptureMethod SequentialAutomatic
//... | crates/router/src/core/payments/flows.rs | router | function_signature | 237 | rust | null | null | null | null | should_initiate_capture_flow | null | null | null | null | null | null | null |
File: crates/router/src/utils/currency.rs
Public functions: 3
Public structs: 1
use std::{
collections::HashMap,
ops::Deref,
str::FromStr,
sync::{Arc, LazyLock},
};
use api_models::enums;
use common_utils::{date_time, errors::CustomResult, events::ApiEventMetric, ext_traits::AsyncExt};
use currency_... | crates/router/src/utils/currency.rs | router | full_file | 4,439 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> Storage<'a> {
/// Default constructor.
pub fn new() -> Self {
Self::default()
}
pub fn record_value(&mut self, key: &'a str, value: serde_json::Value) {
if super::formatter::IMPLICIT_KEYS.contains(key) {
tracing::warn!(value =? value, "{} is a reserved entry. Skippi... | crates/router_env/src/logger/storage.rs | router_env | impl_block | 103 | rust | null | Storage | null | impl Storage | null | null | null | null | null | null | null | null |
pub fn collect(self) -> SdkEventMetricsBucketValue {
SdkEventMetricsBucketValue {
payment_attempts: self.payment_attempts.collect(),
payment_methods_call_count: self.payment_methods_call_count.collect(),
average_payment_time: self.average_payment_time.collect(),
l... | crates/analytics/src/sdk_events/accumulator.rs | analytics | function_signature | 119 | rust | null | null | null | null | collect | null | null | null | null | null | null | null |
impl api::RefundSync for Inespay {} | crates/hyperswitch_connectors/src/connectors/inespay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Inespay | api::RefundSync for | impl api::RefundSync for for Inespay | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Stax {} | crates/hyperswitch_connectors/src/connectors/stax.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Stax | api::PaymentToken for | impl api::PaymentToken for for Stax | null | null | null | null | null | null | null | null |
pub fn check_node_inner<C>(
&self,
ctx: &C,
node_id: NodeId,
relation: Relation,
strength: Strength,
memo: &mut Memoization<V>,
cycle_map: &mut CycleCheck,
domains: Option<&[DomainId]>,
) -> Result<(), GraphError<V>>
where
C: CheckingContex... | crates/hyperswitch_constraint_graph/src/graph.rs | hyperswitch_constraint_graph | function_signature | 376 | rust | null | null | null | null | check_node_inner | null | null | null | null | null | null | null |
pub struct BankOfAmericaErrorInformationResponse {
id: String,
error_information: BankOfAmericaErrorInformation,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | BankOfAmericaErrorInformationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn parse_value<T>(value: serde_json::Value, type_name: &str) -> UserResult<T>
where
T: serde::de::DeserializeOwned,
{
serde_json::from_value::<T>(value)
.change_context(UserErrors::InternalServerError)
.attach_printable(format!("Unable to parse {type_name}"))
} | crates/router/src/utils/user.rs | router | function_signature | 73 | rust | null | null | null | null | parse_value | null | null | null | null | null | null | null |
pub struct WellsfargoAuthType {
pub(super) api_key: Secret<String>,
pub(super) merchant_account: Secret<String>,
pub(super) api_secret: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | WellsfargoAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct ArchipelPaymentInformation {
order: ArchipelOrderRequest,
cardholder: Option<ArchipelCardHolder>,
card_holder_name: Option<Secret<String>>,
credential_indicator: Option<ArchipelCredentialIndicator>,
stored_on_file: bool,
} | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | ArchipelPaymentInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct Card {
card_type: ForteCardType,
name_on_card: Secret<String>,
account_number: CardNumber,
expire_month: Secret<String>,
expire_year: Secret<String>,
card_verification_value: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/forte/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | Card | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardExpiryDate {
month: Secret<String>,
year: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | CardExpiryDate | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/api/connector_onboarding/paypal.rs
Public functions: 6
Public structs: 12
use api_models::connector_onboarding as api;
use error_stack::ResultExt;
use crate::core::errors::{ApiErrorResponse, RouterResult};
#[derive(serde::Deserialize, Debug)]
pub struct HateoasLink {
pub href: Str... | crates/router/src/types/api/connector_onboarding/paypal.rs | router | full_file | 1,703 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn authenticate_pm_client_secret_and_check_expiry(
req_client_secret: &String,
payment_method: &domain::PaymentMethod,
) -> errors::CustomResult<bool, errors::ApiErrorResponse> {
let stored_client_secret = payment_method
.client_secret
.clone()
.get_required_value("client_secret"... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 198 | rust | null | null | null | null | authenticate_pm_client_secret_and_check_expiry | null | null | null | null | null | null | null |
pub async fn tokenize_in_router_when_confirm_false_or_external_authentication<F, Req, D>(
state: &SessionState,
operation: &BoxedOperation<'_, F, Req, D>,
payment_data: &mut D,
validate_result: &operations::ValidateResult,
merchant_key_store: &domain::MerchantKeyStore,
customer: &Option<domain::... | crates/router/src/core/payments.rs | router | function_signature | 133 | rust | null | null | null | null | tokenize_in_router_when_confirm_false_or_external_authentication | null | null | null | null | null | null | null |
pub struct PaymentMethodListContext {
pub card_details: Option<api::CardDetailFromLocker>,
pub hyperswitch_token_data: Option<PaymentTokenData>,
#[cfg(feature = "payouts")]
pub bank_transfer_details: Option<api::BankPayout>,
} | crates/router/src/types/storage/payment_method.rs | router | struct_definition | 59 | rust | PaymentMethodListContext | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorMandateRevoke for Braintree {} | crates/hyperswitch_connectors/src/connectors/braintree.rs | hyperswitch_connectors | impl_block | 13 | rust | null | Braintree | api::ConnectorMandateRevoke for | impl api::ConnectorMandateRevoke for for Braintree | null | null | null | null | null | null | null | null |
pub struct BreadpayTransactionResponse {
status: TransactionStatus,
bread_transactin_id: String,
merchant_order_id: String,
} | crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | BreadpayTransactionResponse | 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.