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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/// Validates the Redis configuration provided.
pub fn validate(&self) -> CustomResult<(), errors::RedisError> {
use common_utils::{ext_traits::ConfigExt, fp_utils::when};
when(self.host.is_default_or_empty(), || {
Err(errors::RedisError::InvalidConfiguration(
"Redis `ho... | crates/redis_interface/src/types.rs | redis_interface | function_signature | 183 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MaskedBankDetails
{
"type": "object",
"required": [
"mask"
],
"properties": {
"mask": {
"type": "string"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 54 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MaskedBankDetails"
] | null | null | null | null |
pub struct WorldpayvantivAuthType {
pub(super) user: Secret<String>,
pub(super) password: Secret<String>,
pub(super) merchant_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | WorldpayvantivAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/nexinets.rs
use std::str::FromStr;
use cards::CardNumber;
use common_utils::types::MinorUnit;
use masking::Secret;
use router::types::{self, domain, storage::enums, PaymentsAuthorizeData};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, C... | crates/router/tests/connectors/nexinets.rs | router | full_file | 4,989 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn route_connector_v2_for_payments(
state: &SessionState,
merchant_context: &domain::MerchantContext,
business_profile: &domain::Profile,
transaction_data: core_routing::PaymentsDslInput<'_>,
routing_data: &mut storage::RoutingData,
_mandate_type: Option<api::MandateTransactionType>,
)... | crates/router/src/core/payments.rs | router | function_signature | 383 | rust | null | null | null | null | route_connector_v2_for_payments | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Netcetera {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&NETCETERA_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
None
}
fn get_supported_webhook_flows(&self) -> Opt... | crates/hyperswitch_connectors/src/connectors/netcetera.rs | hyperswitch_connectors | impl_block | 96 | rust | null | Netcetera | ConnectorSpecifications for | impl ConnectorSpecifications for for Netcetera | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/moneris.rs
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct MonerisTest;
im... | crates/router/tests/connectors/moneris.rs | router | full_file | 2,936 | null | null | null | null | null | null | null | null | null | null | null | null | null |
- **payment_methods:** Add support to pass apple pay recurring details to obtain apple pay merchant token ([#6770](https://github.com/juspay/hyperswitch/pull/6770)) ([`6074249`](https://github.com/juspay/hyperswitch/commit/607424992af4196f5a3e01477f64d794b3594a47))
- **payments:** [Payment links] Add config for changin... | CHANGELOG.md#chunk16 | null | doc_chunk | 8,135 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn execute_three_ds_decision_rule(
state: SessionState,
merchant_context: MerchantContext,
request: api_models::three_ds_decision_rule::ThreeDsDecisionRuleExecuteRequest,
) -> RouterResponse<api_models::three_ds_decision_rule::ThreeDsDecisionRuleExecuteResponse> {
let decision = get_three_ds_d... | crates/router/src/core/three_ds_decision_rule.rs | router | function_signature | 136 | rust | null | null | null | null | execute_three_ds_decision_rule | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Sift {} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Sift | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Sift | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MerchantConnectorDeleteResponse
{
"type": "object",
"required": [
"merchant_id",
"merchant_connector_id",
"deleted"
],
"properties": {
"merchant_id": {
"type": "string",
"description": "The identifier for the Merchant Account",
"example": ... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 198 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MerchantConnectorDeleteResponse"
] | null | null | null | null |
pub struct JuspaythreedsserverRouterData<T> {
pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | JuspaythreedsserverRouterData | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BusinessPayoutLinkConfig
{
"allOf": [
{
"$ref": "#/components/schemas/BusinessGenericLinkConfig"
},
{
"type": "object",
"properties": {
"form_layout": {
"allOf": [
{
"$ref": "#/components/schemas/UIWidgetF... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 152 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BusinessPayoutLinkConfig"
] | null | null | null | null |
pub async fn payment_connector_verify(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<VerifyConnectorRequest>,
) -> HttpResponse {
let flow = Flow::VerifyPaymentConnector;
Box::pin(services::server_wrap(
flow,
state,
&req,
json_payload.into_inne... | crates/router/src/routes/verify_connector.rs | router | function_signature | 142 | rust | null | null | null | null | payment_connector_verify | null | null | null | null | null | null | null |
pub struct CustomerAddress {
pub address: Address,
pub customer_id: id_type::CustomerId,
} | crates/router/src/types/domain/address.rs | router | struct_definition | 22 | rust | CustomerAddress | null | null | null | null | null | null | null | null | null | null | null |
pub async fn record_operation_time<F, R>(
future: F,
metric: &opentelemetry::metrics::Histogram<f64>,
key_value: &[opentelemetry::KeyValue],
) -> R
where
F: futures::Future<Output = R>,
{
let (result, time) = time_future(future).await;
metric.record(time.as_secs_f64(), key_value);
result
} | crates/common_utils/src/metrics/utils.rs | common_utils | function_signature | 91 | rust | null | null | null | null | record_operation_time | null | null | null | null | null | null | null |
File: crates/test_utils/tests/connectors/multisafepay_ui.rs
use serial_test::serial;
use thirtyfour::{prelude::*, WebDriver};
use crate::{selenium::*, tester};
struct MultisafepaySeleniumTest;
impl SeleniumTest for MultisafepaySeleniumTest {
fn get_connector_name(&self) -> String {
"multisafepay".to_str... | crates/test_utils/tests/connectors/multisafepay_ui.rs | test_utils | full_file | 741 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payouts_confirm() {} | crates/openapi/src/routes/payouts.rs | openapi | function_signature | 7 | rust | null | null | null | null | payouts_confirm | null | null | null | null | null | null | null |
impl Dispute for Adyen {} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Adyen | Dispute for | impl Dispute for for Adyen | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/locker_mock_up.rs
pub use diesel_models::locker_mock_up::{LockerMockUp, LockerMockUpNew};
| crates/router/src/types/storage/locker_mock_up.rs | router | full_file | 31 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct UserKeyStore {
pub user_id: String,
pub key: Encryptable<Secret<Vec<u8>>>,
pub created_at: PrimitiveDateTime,
} | crates/router/src/types/domain/user_key_store.rs | router | struct_definition | 35 | rust | UserKeyStore | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_payment_method(&self) -> Option<storage_enums::PaymentMethod> {
self.payment_method
} | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 26 | rust | null | null | null | null | get_payment_method | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<MerchantAccount> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/merchant_account.rs | diesel_models | function_signature | 35 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
pub struct PaypalPayoutMethodData {
recipient_type: PayoutRecipientType,
recipient_wallet: PayoutWalletType,
receiver: PaypalPayoutDataType,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | PaypalPayoutMethodData | null | null | null | null | null | null | null | null | null | null | null |
pub struct ThirdPartyMessages {
/// Category of the TPP message, INFO is further information, WARNING is something can be fixed, ERROR possibly non fixable issue
#[serde(skip_serializing_if = "Option::is_none")]
pub category: Option<TppCategory>,
/// Additional code that is combined with the text
#[... | crates/hyperswitch_connectors/src/connectors/nordea/requests.rs | hyperswitch_connectors | struct_definition | 121 | rust | ThirdPartyMessages | null | null | null | null | null | null | null | null | null | null | null |
pub async fn log_authentication(
&self,
authentication: &Authentication,
old_authentication: Option<Authentication>,
tenant_id: TenantID,
) -> MQResult<()> {
if let Some(negative_event) = old_authentication {
self.log_event(&KafkaEvent::old(
&Kafka... | crates/router/src/services/kafka.rs | router | function_signature | 236 | rust | null | null | null | null | log_authentication | null | null | null | null | null | null | null |
pub struct UasDynamicData {
pub dynamic_data_value: Option<Secret<String>>,
pub dynamic_data_type: Option<String>,
pub ds_trans_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | UasDynamicData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SyncResponse {
pub transaction: Option<SyncTransactionResponse>,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | SyncResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: info
{
"title": "Hyperswitch - API Documentation",
"description": "\n## Get started\n\nHyperswitch provides a collection of APIs that enable you to process and manage payments.\nOur APIs accept and return JSON in the HTTP body, and return standard HTTP response codes.\n\nYou can consume the APIs... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 453 | .json | null | null | null | null | null | openapi_spec | info | [] | null | null | null | null |
pub struct CreateRefundRequest {
create_transaction_request: AuthorizedotnetRefundRequest,
} | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | CreateRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Nexinets {} | crates/hyperswitch_connectors/src/connectors/nexinets.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Nexinets | api::PaymentCapture for | impl api::PaymentCapture for for Nexinets | null | null | null | null | null | null | null | null |
pub fn add_certificate(mut self, certificate: Option<Secret<String>>) -> Self {
self.certificate = certificate;
self
} | crates/common_utils/src/request.rs | common_utils | function_signature | 29 | rust | null | null | null | null | add_certificate | null | null | null | null | null | null | null |
pub struct MpgsErrorResponse {
pub status_code: u16,
pub code: String,
pub message: String,
pub reason: Option<String>,
pub network_advice_code: Option<String>,
pub network_decline_code: Option<String>,
pub network_error_message: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/mpgs/transformers.rs | hyperswitch_connectors | struct_definition | 65 | rust | MpgsErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/errors.rs
use api_models::errors::types::{ApiError, ApiErrorResponse};
use common_utils::errors::{CustomResult, ErrorSwitch};
pub type AnalyticsResult<T> = CustomResult<T, AnalyticsError>;
#[derive(Debug, Clone, serde::Serialize, thiserror::Error)]
pub enum AnalyticsError {
#[allow(dea... | crates/analytics/src/errors.rs | analytics | full_file | 310 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Paysafe {} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Paysafe | api::MandateSetup for | impl api::MandateSetup for for Paysafe | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/santander.rs
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct SantanderTest;
impl ConnectorActions for SantanderTest {}
impl utils::Connector for ... | crates/router/tests/connectors/santander.rs | router | full_file | 2,928 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthenticationSyncRequest {
/// The client secret for this authentication.
#[schema(value_type = String)]
pub client_secret: Option<masking::Secret<String>>,
/// Authentication ID for the authentication
#[serde(skip_deserializing)]
pub authentication_id: id_type::AuthenticationId,
} | crates/api_models/src/authentication.rs | api_models | struct_definition | 64 | rust | AuthenticationSyncRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct UserPassword(Secret<String>); | crates/router/src/types/domain/user.rs | router | struct_definition | 9 | rust | UserPassword | null | null | null | null | null | null | null | null | null | null | null |
pub struct ThreeDsDecisionRuleExecuteResponse {
/// The decision made by the 3DS decision rule engine.
#[schema(value_type = ThreeDSDecision)]
pub decision: common_types::three_ds_decision_rule_engine::ThreeDSDecision,
} | crates/api_models/src/three_ds_decision_rule.rs | api_models | struct_definition | 51 | rust | ThreeDsDecisionRuleExecuteResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardResponse {
pub(crate) cres: Option<common_utils::pii::SecretSerdeValue>,
} | crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | CardResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct AdyenCategoryData {
priority: AdyenPayoutPriority,
#[serde(rename = "type")]
category: AdyenPayoutMethod,
} | crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs | hyperswitch_connectors | struct_definition | 34 | rust | AdyenCategoryData | null | null | null | null | null | null | null | null | null | null | null |
pub struct GpayTokenizationSpecification {
#[serde(rename = "type")]
pub token_specification_type: String,
pub parameters: GpayTokenParameters,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | GpayTokenizationSpecification | null | null | null | null | null | null | null | null | null | null | null |
pub struct PixPaymentValue {
original: StringMajorUnit,
} | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | PixPaymentValue | null | null | null | null | null | null | null | null | null | null | null |
pub struct VoltRefundWebhookBodyReference {
pub refund: String,
pub external_reference: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | VoltRefundWebhookBodyReference | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/payouts/create"
{
"post": {
"tags": [
"Payouts"
],
"summary": "Payouts - Create",
"operationId": "Create a Payout",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PayoutsCreateReque... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 203 | .json | null | null | null | null | null | openapi_spec | paths | [
"/payouts/create"
] | null | null | null | null |
pub async fn retrieve_merchant_account() {} | crates/openapi/src/routes/merchant_account.rs | openapi | function_signature | 9 | rust | null | null | null | null | retrieve_merchant_account | null | null | null | null | null | null | null |
pub async fn create_platform_account(
state: SessionState,
user_from_token: auth::UserFromToken,
req: user_api::PlatformAccountCreateRequest,
) -> UserResponse<user_api::PlatformAccountCreateResponse> {
let user_from_db = user_from_token.get_user_from_db(&state).await?;
let new_merchant = domain::N... | crates/router/src/core/user.rs | router | function_signature | 469 | rust | null | null | null | null | create_platform_account | null | null | null | null | null | null | null |
pub struct UserName(Secret<String>); | crates/router/src/types/domain/user.rs | router | struct_definition | 8 | rust | UserName | null | null | null | null | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for FeatureMatrixListResponse {} | crates/api_models/src/feature_matrix.rs | api_models | impl_block | 15 | rust | null | FeatureMatrixListResponse | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for FeatureMatrixListResponse | null | null | null | null | null | null | null | null |
pub struct NovalnetResponsePaypal {
pub paypal_account: Option<Email>,
pub paypal_transaction_id: Option<Secret<String>>,
pub token: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | NovalnetResponsePaypal | null | null | null | null | null | null | null | null | null | null | null |
impl FraudCheckFulfillment for Signifyd {} | crates/hyperswitch_connectors/src/connectors/signifyd.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Signifyd | FraudCheckFulfillment for | impl FraudCheckFulfillment for for Signifyd | null | null | null | null | null | null | null | null |
pub struct Facilitapay {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/facilitapay.rs | hyperswitch_connectors | struct_definition | 29 | rust | Facilitapay | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PayoutSendPriority
{
"type": "string",
"description": "The send method which will be required for processing payouts, check options for better understanding.",
"enum": [
"instant",
"fast",
"regular",
"wire",
"cross_border",
"internal"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 76 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PayoutSendPriority"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.LabelInformation
{
"type": "object",
"required": [
"label",
"target_count",
"target_time",
"mca_id"
],
"properties": {
"label": {
"type": "string"
},
"target_count": {
"type": "integer",
"format": "int64",
"minimum": 0
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 146 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"LabelInformation"
] | null | null | null | null |
pub struct DenseMap<K, V> {
data: Vec<V>,
_marker: PhantomData<K>,
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | struct_definition | 24 | rust | DenseMap | null | null | null | null | null | null | null | null | null | null | null |
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
connector_request_reference_id: None,
connector_response_reference_id: None,
},
}
}
}
#[cfg(feature = "v2")]
#[derive(Debug, Clone, ... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs#chunk3 | hyperswitch_domain_models | chunk | 353 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/openapi/src/routes/profile_acquirer.rs
Public functions: 2
#[cfg(feature = "v1")]
/// Profile Acquirer - Create
///
/// Create a new Profile Acquirer for accessing our APIs from your servers.
#[utoipa::path(
post,
path = "/profile_acquirers",
request_body = ProfileAcquirerCreate,
response... | crates/openapi/src/routes/profile_acquirer.rs | openapi | full_file | 362 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/dynamic_routing_stats.rs
pub use diesel_models::dynamic_routing_stats::{
DynamicRoutingStats, DynamicRoutingStatsNew, DynamicRoutingStatsUpdate,
};
| crates/router/src/types/storage/dynamic_routing_stats.rs | router | full_file | 38 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// A messaging interface for sending messages/events.
/// This can be implemented for any messaging system, such as a message queue, a logger, or a database.
pub trait MessagingInterface {
/// The type of the event used for categorization by the event publisher.
type MessageClass;
/// Send a message that f... | crates/events/src/lib.rs | events | trait_definition | 128 | rust | null | null | MessagingInterface | null | null | null | null | null | null | null | null | null |
pub async fn from_conf(
config: &AnalyticsConfig,
tenant: &dyn storage_impl::config::TenantConfig,
) -> Self {
match config {
AnalyticsConfig::Sqlx { sqlx, .. } => {
Self::Sqlx(SqlxClient::from_conf(sqlx, tenant.get_schema()).await)
}
Analy... | crates/analytics/src/lib.rs | analytics | function_signature | 265 | rust | null | null | null | null | from_conf | null | null | null | null | null | null | null |
impl PaymentToken for Riskified {} | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Riskified | PaymentToken for | impl PaymentToken for for Riskified | null | null | null | null | null | null | null | null |
pub struct ConnectorVolumeSplit {
pub connector: RoutableConnectorChoice,
pub split: u8,
} | crates/euclid/src/frontend/ast.rs | euclid | struct_definition | 23 | rust | ConnectorVolumeSplit | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_primary_details_as_value(
&self,
) -> CustomResult<serde_json::Value, errors::ParsingError> {
Vec::<PrimaryBusinessDetails>::new().encode_to_value()
} | crates/api_models/src/admin.rs | api_models | function_signature | 44 | rust | null | null | null | null | get_primary_details_as_value | null | null | null | null | null | null | null |
pub struct Expiry {
month: Secret<i32>,
year: Secret<i32>,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | Expiry | null | null | null | null | null | null | null | null | null | null | null |
pub struct DisputesMetricsResponse<T> {
pub query_data: Vec<T>,
pub meta_data: [DisputesAnalyticsMetadata; 1],
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 34 | rust | DisputesMetricsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayeezyError {
pub messages: Vec<Message>,
} | crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | PayeezyError | null | null | null | null | null | null | null | null | null | null | null |
pub struct SetupIntents; | crates/router/src/compatibility/stripe/app.rs | router | struct_definition | 6 | rust | SetupIntents | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payments_start(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
path: web::Path<(
common_utils::id_type::PaymentId,
common_utils::id_type::MerchantId,
String,
) | crates/router/src/routes/payments.rs | router | function_signature | 59 | rust | null | null | null | null | payments_start | null | null | null | null | null | null | null |
impl StorageInterface for Store {
fn get_scheduler_db(&self) -> Box<dyn scheduler::SchedulerInterface> {
Box::new(self.clone())
}
fn get_payment_methods_store(&self) -> Box<dyn PaymentMethodsStorageInterface> {
Box::new(self.clone())
}
fn get_cache_store(&self) -> Box<(dyn RedisConn... | crates/router/src/db.rs | router | impl_block | 93 | rust | null | Store | StorageInterface for | impl StorageInterface for for Store | null | null | null | null | null | null | null | null |
pub async fn proxy(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
payload: web::Json<api_models::proxy::ProxyRequest>,
) -> impl Responder {
let flow = Flow::Proxy;
Box::pin(api::server_wrap(
flow,
state,
&req,
payload.into_inner(),
|state, au... | crates/router/src/routes/proxy.rs | router | function_signature | 182 | rust | null | null | null | null | proxy | null | null | null | null | null | null | null |
pub struct User {
/// name: String,
/// address: Address,
/// email: String,
/// } | crates/router_derive/src/lib.rs | router_derive | struct_definition | 24 | rust | User | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthipayErrorResponse {
pub client_request_id: Option<String>,
pub api_trace_id: Option<String>,
pub response_type: Option<String>,
#[serde(rename = "type")]
pub response_object_type: Option<String>,
pub error: ErrorDetails,
pub decline_reason_code: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs | hyperswitch_connectors | struct_definition | 66 | rust | AuthipayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Generates a new token string
///
/// # Returns
/// A randomly generated token string of length `TOKEN_LENGTH`
pub fn generate_token() -> String {
use nanoid::nanoid;
nanoid!(TOKEN_LENGTH)
} | crates/common_utils/src/tokenization.rs | common_utils | function_signature | 48 | rust | null | null | null | null | generate_token | null | null | null | null | null | null | null |
pub async fn accept_invite_from_email_token_only_flow(
state: SessionState,
user_token: auth::UserFromSinglePurposeToken,
request: user_api::AcceptInviteFromEmailRequest,
) -> UserResponse<user_api::TokenResponse> {
let token = request.token.expose();
let email_token = auth::decode_jwt::<email_type... | crates/router/src/core/user.rs | router | function_signature | 770 | rust | null | null | null | null | accept_invite_from_email_token_only_flow | null | null | null | null | null | null | null |
impl<'a> KafkaDispute<'a> {
pub fn from_storage(dispute: &'a Dispute) -> Self {
let currency = dispute.dispute_currency.unwrap_or(
dispute
.currency
.to_uppercase()
.parse_enum("Currency")
.unwrap_or_default(),
);
Se... | crates/router/src/services/kafka/dispute.rs | router | impl_block | 383 | rust | null | KafkaDispute | null | impl KafkaDispute | null | null | null | null | null | null | null | null |
impl RedisStore {
pub async fn new(
conf: &redis_interface::RedisSettings,
) -> error_stack::Result<Self, redis_interface::errors::RedisError> {
Ok(Self {
redis_conn: Arc::new(redis_interface::RedisConnectionPool::new(conf).await?),
})
}
pub fn set_error_callback(&se... | crates/storage_impl/src/redis.rs | storage_impl | impl_block | 137 | rust | null | RedisStore | null | impl RedisStore | null | null | null | null | null | null | null | null |
pub async fn get_api_event_metrics(
pool: &AnalyticsProvider,
merchant_id: &common_utils::id_type::MerchantId,
req: GetApiEventMetricRequest,
) -> AnalyticsResult<MetricsResponse<ApiMetricsBucketResponse>> {
let mut metrics_accumulator: HashMap<ApiEventMetricsBucketIdentifier, ApiEventMetricRow> =
... | crates/analytics/src/api_event/core.rs | analytics | function_signature | 612 | rust | null | null | null | null | get_api_event_metrics | null | null | null | null | null | null | null |
pub trait Lift<U> {
type SelfWrapper<T>;
type OtherWrapper<T, E>;
fn lift<Func, E, V>(self, func: Func) -> Self::OtherWrapper<V, E>
where
Func: Fn(Self::SelfWrapper<U>) -> Self::OtherWrapper<V, E>;
} | crates/hyperswitch_domain_models/src/type_encryption.rs | hyperswitch_domain_models | trait_definition | 67 | rust | null | null | Lift | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs
Public structs: 12
use common_enums::enums;
use common_utils::{request::Method, types::StringMinorUnit};
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router... | crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs | hyperswitch_connectors | full_file | 2,708 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MbWayRedirection
{
"type": "object",
"required": [
"telephone_number"
],
"properties": {
"telephone_number": {
"type": "string",
"description": "Telephone number of the shopper. Should be Portuguese phone number."
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 74 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MbWayRedirection"
] | null | null | null | null |
impl api::PaymentToken for Facilitapay {} | crates/hyperswitch_connectors/src/connectors/facilitapay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Facilitapay | api::PaymentToken for | impl api::PaymentToken for for Facilitapay | null | null | null | null | null | null | null | null |
pub async fn create(conf: &OpenSearchConfig) -> CustomResult<Self, OpenSearchError> {
let url = Url::parse(&conf.host).map_err(|_| OpenSearchError::ConnectionError)?;
let transport = match &conf.auth {
OpenSearchAuth::Basic { username, password } => {
let credentials = Creden... | crates/analytics/src/opensearch.rs | analytics | function_signature | 288 | rust | null | null | null | null | create | null | null | null | null | null | null | null |
File: crates/router/src/events.rs
Public functions: 4
use std::collections::HashMap;
use error_stack::ResultExt;
use events::{EventsError, Message, MessagingInterface};
use masking::ErasedMaskSerialize;
use router_env::logger;
use serde::{Deserialize, Serialize};
use storage_impl::{
config::TenantConfig,
err... | crates/router/src/events.rs | router | full_file | 733 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Worldline {} | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Worldline | api::PaymentVoid for | impl api::PaymentVoid for for Worldline | null | null | null | null | null | null | null | null |
pub struct FileRetrieveQuery {
///Dispute Id
pub dispute_id: Option<String>,
} | crates/api_models/src/files.rs | api_models | struct_definition | 21 | rust | FileRetrieveQuery | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardData {
ccnumber: CardNumber,
ccexp: Secret<String>,
cvv: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 27 | rust | CardData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/masking/src/cassandra.rs
use scylla::{
deserialize::DeserializeValue,
frame::response::result::ColumnType,
serialize::{
value::SerializeValue,
writers::{CellWriter, WrittenCellProof},
SerializationError,
},
};
use crate::{abs::PeekInterface, StrongSecret};
impl<T>... | crates/masking/src/cassandra.rs | masking | full_file | 296 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CaptureData {
amount: Option<u64>,
payment_type: Option<String>,
status: Option<String>,
status_code: u64,
tid: Option<Secret<i64>>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | CaptureData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SwishQrData {} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 8 | rust | SwishQrData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_customer_payment_method_api() {} | crates/openapi/src/routes/payment_method.rs | openapi | function_signature | 10 | rust | null | null | null | null | list_customer_payment_method_api | null | null | null | null | null | null | null |
impl FileMetadataNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<FileMetadata> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/file.rs | diesel_models | impl_block | 41 | rust | null | FileMetadataNew | null | impl FileMetadataNew | null | null | null | null | null | null | null | null |
pub async fn render_pm_collect_link(
state: SessionState,
merchant_context: domain::MerchantContext,
req: payment_methods::PaymentMethodCollectLinkRenderRequest,
) -> RouterResponse<services::GenericLinkFormData> {
let db: &dyn StorageInterface = &*state.store;
// Fetch pm collect link
let pm_c... | crates/router/src/core/payment_methods.rs | router | function_signature | 1,256 | rust | null | null | null | null | render_pm_collect_link | null | null | null | null | null | null | null |
impl api::RefundSync for Silverflow {} | crates/hyperswitch_connectors/src/connectors/silverflow.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Silverflow | api::RefundSync for | impl api::RefundSync for for Silverflow | null | null | null | null | null | null | null | null |
pub struct FacilitapayCredentials {
pub username: Secret<String>, // email_id
pub password: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs | hyperswitch_connectors | struct_definition | 27 | rust | FacilitapayCredentials | null | null | null | null | null | null | null | null | null | null | null |
pub fn execute_dsl_and_get_conditional_config(
backend_input: dsl_inputs::BackendInput,
interpreter: &backend::VirInterpreterBackend<common_types::payments::ConditionalConfigs>,
) -> ConditionalConfigResult<common_types::payments::ConditionalConfigs> {
let routing_output = interpreter
.execute(backe... | crates/router/src/core/payments/conditional_configs.rs | router | function_signature | 98 | rust | null | null | null | null | execute_dsl_and_get_conditional_config | null | null | null | null | null | null | null |
pub struct BillwerkRefundRequest {
pub invoice: String,
pub amount: MinorUnit,
pub text: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs | hyperswitch_connectors | struct_definition | 29 | rust | BillwerkRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BlocklistDataKind
{
"type": "string",
"enum": [
"payment_method",
"card_bin",
"extended_card_bin"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 45 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BlocklistDataKind"
] | null | null | null | null |
pub struct CreateInternalUserRequest {
pub name: Secret<String>,
pub email: pii::Email,
pub password: Secret<String>,
pub role_id: String,
} | crates/api_models/src/user.rs | api_models | struct_definition | 37 | rust | CreateInternalUserRequest | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentMetricAccumulator for PaymentsDistributionAccumulator {
type MetricOutput = (
Option<f64>,
Option<f64>,
Option<f64>,
Option<f64>,
Option<f64>,
Option<f64>,
);
fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow) {
if let Some(ref s... | crates/analytics/src/payments/accumulator.rs | analytics | impl_block | 1,020 | rust | null | PaymentsDistributionAccumulator | PaymentMetricAccumulator for | impl PaymentMetricAccumulator for for PaymentsDistributionAccumulator | 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.