text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub struct PaymentsResponseBankRedirect {
pub payment_request_id: i64,
pub gateway_url: Url,
pub payment_result_info: Option<ResultInfo>,
pub payment_method_response: Option<TrustpayPaymentMethod>,
pub merchant_identification_response: Option<MerchantIdentification>,
pub payment_information_resp... | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 73 | rust | PaymentsResponseBankRedirect | null | null | null | null | null | null | null | null | null | null | null |
### Miscellaneous Tasks
- **configs:** [BOA] Add USD Currency Filter Configuration ([#3961](https://github.com/juspay/hyperswitch/pull/3961)) ([`8a0e468`](https://github.com/juspay/hyperswitch/commit/8a0e468e6a574717b29ccbdd143908727c251dfb))
- **postman:** Update Postman collection files ([`6305bb5`](https://github.... | CHANGELOG.md#chunk38 | null | doc_chunk | 8,100 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/pm_auth/src/types.rs
Public structs: 19
pub mod api;
use std::marker::PhantomData;
use api::auth_service::{BankAccountCredentials, ExchangeToken, LinkToken, RecipientCreate};
use api_models::enums as api_enums;
use common_enums::{CountryAlpha2, PaymentMethod, PaymentMethodType};
use common_utils::{id_t... | crates/pm_auth/src/types.rs | pm_auth | full_file | 1,646 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/configs.rs
Public functions: 4
use actix_web::{web, HttpRequest, Responder};
use router_env::{instrument, tracing, Flow};
use super::app::AppState;
use crate::{
core::{api_locking, configs},
services::{api, authentication as auth},
types::api as api_types,
};
#[cfg(feature... | crates/router/src/routes/configs.rs | router | full_file | 680 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentMethodCollectLinkRequest
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/GenericLinkUiConfig"
}
],
"nullable": true
},
{
"type": "object",
"required": [
"customer_id"
],
"pro... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 444 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentMethodCollectLinkRequest"
] | null | null | null | null |
pub fn extract_payment_link_config(
pl_config: serde_json::Value,
) -> Result<PaymentLinkConfig, error_stack::Report<errors::ApiErrorResponse>> {
serde_json::from_value::<PaymentLinkConfig>(pl_config).change_context(
errors::ApiErrorResponse::InvalidDataValue {
field_name: "payment_link_conf... | crates/router/src/core/payment_link.rs | router | function_signature | 76 | rust | null | null | null | null | extract_payment_link_config | null | null | null | null | null | null | null |
File: crates/router/src/workflows/api_key_expiry.rs
Public structs: 1
use common_utils::{errors::ValidationError, ext_traits::ValueExt, types::user::ThemeLineage};
use diesel_models::{
enums as storage_enums, process_tracker::business_status, ApiKeyExpiryTrackingData,
};
use router_env::logger;
use scheduler::{wo... | crates/router/src/workflows/api_key_expiry.rs | router | full_file | 1,339 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RequiredFieldFinal {
pub mandate: Option<Vec<RequiredFieldInfo>>,
pub non_mandate: Option<Vec<RequiredFieldInfo>>,
pub common: Option<Vec<RequiredFieldInfo>>,
} | crates/payment_methods/src/configs/settings.rs | payment_methods | struct_definition | 43 | rust | RequiredFieldFinal | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payments_complete_authorize(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsCompleteAuthorizeRequest>,
path: web::Path<common_utils::id_type::PaymentId>,
) -> impl Responder {
let flow = Flow::PaymentsCompleteAuthorize;
l... | crates/router/src/routes/payments.rs | router | function_signature | 496 | rust | null | null | null | null | payments_complete_authorize | null | null | null | null | null | null | null |
pub struct DestinationChargeRefund {
pub revert_platform_fee: bool,
pub revert_transfer: bool,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 23 | rust | DestinationChargeRefund | null | null | null | null | null | null | null | null | null | null | null |
pub struct CheckbookPaymentsResponse {
pub status: CheckbookPaymentStatus,
pub id: String,
pub amount: Option<FloatMajorUnit>,
pub description: Option<String>,
pub name: Option<String>,
pub recipient: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/checkbook/transformers.rs | hyperswitch_connectors | struct_definition | 53 | rust | CheckbookPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::DecisionManagerUpsertConfig;
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
json_payload.into_inner(),
|state, auth: auth::AuthenticationData, update_decision, _| {
let merchant_context = domain::MerchantContext::NormalMerc... | crates/router/src/routes/routing.rs | router | impl_block | 227 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl HubspotProxyConfig {
/// Validates Hubspot configuration
pub(super) fn validate(&self) -> Result<(), InvalidCrmConfig> {
use common_utils::fp_utils::when;
when(self.request_url.is_default_or_empty(), || {
Err(InvalidCrmConfig("request url must not be empty"))
})?;
... | crates/external_services/src/crm.rs | external_services | impl_block | 103 | rust | null | HubspotProxyConfig | null | impl HubspotProxyConfig | null | null | null | null | null | null | null | null |
pub struct RoutingRule {
pub rule_id: Option<String>,
pub name: String,
pub description: Option<String>,
pub metadata: Option<RoutingMetadata>,
pub created_by: String,
#[serde(default)]
pub algorithm_for: AlgorithmType,
pub algorithm: StaticRoutingAlgorithm,
} | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 64 | rust | RoutingRule | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayloadEventDetails {
#[serde(rename = "id")]
pub transaction_id: Option<String>,
pub object: String,
pub value: Option<serde_json::Value>, // Changed to handle any value type including null
} | crates/hyperswitch_connectors/src/connectors/payload/responses.rs | hyperswitch_connectors | struct_definition | 50 | rust | PayloadEventDetails | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/operations/payment_response.rs
Public structs: 2
use std::collections::HashMap;
use api_models::payments::{ConnectorMandateReferenceId, MandateReferenceId};
#[cfg(feature = "dynamic_routing")]
use api_models::routing::RoutableConnectorChoice;
use async_trait::async_trait;
use co... | crates/router/src/core/payments/operations/payment_response.rs#chunk0 | router | chunk | 8,183 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/external_services/src/no_encryption.rs
//! No encryption functionalities
pub mod core;
pub mod implementers;
| crates/external_services/src/no_encryption.rs | external_services | full_file | 26 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::TaxCalculation for Taxjar {} | crates/hyperswitch_connectors/src/connectors/taxjar.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Taxjar | api::TaxCalculation for | impl api::TaxCalculation for for Taxjar | null | null | null | null | null | null | null | null |
pub struct BluesnapCardHolderInfo {
first_name: Secret<String>,
last_name: Secret<String>,
email: Email,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | BluesnapCardHolderInfo | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_address(&self) -> Option<payments::AddressDetails> {
self.address.clone()
} | crates/api_models/src/customers.rs | api_models | function_signature | 24 | rust | null | null | null | null | get_address | null | null | null | null | null | null | null |
pub fn insert_locales_in_context_for_payout_link_status(context: &mut Context, locale: &str) {
let language = get_language(locale);
let locale = language.as_str();
let i18n_payout_link_status_title = t!("payout_link.status.title", locale = locale);
let i18n_success_text = t!("payout_link.status.text.suc... | crates/router/src/services/api/generic_link_response/context.rs | router | function_signature | 631 | rust | null | null | null | null | insert_locales_in_context_for_payout_link_status | null | null | null | null | null | null | null |
impl ConnectorRedirectResponse for Paybox {
fn get_flow_type(
&self,
_query_params: &str,
_json_payload: Option<serde_json::Value>,
action: PaymentAction,
) -> CustomResult<CallConnectorAction, errors::ConnectorError> {
match action {
PaymentAction::PSync
... | crates/hyperswitch_connectors/src/connectors/paybox.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Paybox | ConnectorRedirectResponse for | impl ConnectorRedirectResponse for for Paybox | null | null | null | null | null | null | null | null |
pub fn update_storage_scheme(&mut self, storage_scheme: common_enums::MerchantStorageScheme) {
self.updated_by = Some(storage_scheme.to_string());
} | crates/diesel_models/src/customers.rs | diesel_models | function_signature | 34 | rust | null | null | null | null | update_storage_scheme | null | null | null | null | null | null | null |
impl FutureUsage {
/// Indicates whether the payment method should be saved for future use or not
pub fn is_off_session(self) -> bool {
match self {
Self::OffSession => true,
Self::OnSession => false,
}
}
} | crates/common_enums/src/enums.rs | common_enums | impl_block | 56 | rust | null | FutureUsage | null | impl FutureUsage | null | null | null | null | null | null | null | null |
impl SuccessBasedAlgorithm {
pub fn new(
algorithm_id_with_timestamp: DynamicAlgorithmWithTimestamp<
common_utils::id_type::RoutingId,
>,
) -> Self {
Self {
algorithm_id_with_timestamp,
enabled_feature: DynamicRoutingFeatures::None,
}
}
} | crates/api_models/src/routing.rs | api_models | impl_block | 63 | rust | null | SuccessBasedAlgorithm | null | impl SuccessBasedAlgorithm | null | null | null | null | null | null | null | null |
impl GetPaymentMethodType for PayLaterData {
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
match self {
Self::KlarnaRedirect { .. } => api_enums::PaymentMethodType::Klarna,
Self::KlarnaSdk { .. } => api_enums::PaymentMethodType::Klarna,
Self::Flexiti... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 245 | rust | null | PayLaterData | GetPaymentMethodType for | impl GetPaymentMethodType for for PayLaterData | null | null | null | null | null | null | null | null |
impl ApiEventMetric for GetFrmFilterRequest {} | crates/api_models/src/analytics.rs | api_models | impl_block | 11 | rust | null | GetFrmFilterRequest | ApiEventMetric for | impl ApiEventMetric for for GetFrmFilterRequest | null | null | null | null | null | null | null | null |
pub fn get_refund_id_as_string(&self) -> String {
self.refund_id.clone()
} | crates/api_models/src/refunds.rs | api_models | function_signature | 23 | rust | null | null | null | null | get_refund_id_as_string | null | null | null | null | null | null | null |
impl ConnectorValidation for Celero {
fn validate_connector_against_payment_request(
&self,
capture_method: Option<enums::CaptureMethod>,
_payment_method: enums::PaymentMethod,
_pmt: Option<enums::PaymentMethodType>,
) -> CustomResult<(), errors::ConnectorError> {
let cap... | crates/hyperswitch_connectors/src/connectors/celero.rs | hyperswitch_connectors | impl_block | 188 | rust | null | Celero | ConnectorValidation for | impl ConnectorValidation for for Celero | null | null | null | null | null | null | null | null |
pub async fn mk_add_locker_request_hs(
jwekey: &settings::Jwekey,
locker: &settings::Locker,
payload: &StoreLockerReq,
locker_choice: api_enums::LockerChoice,
tenant_id: id_type::TenantId,
request_id: Option<RequestId>,
) -> CustomResult<services::Request, errors::VaultError> {
let payload =... | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 354 | rust | null | null | null | null | mk_add_locker_request_hs | null | null | null | null | null | null | null |
pub struct ToggleDynamicRoutingPath {
#[schema(value_type = String)]
pub profile_id: common_utils::id_type::ProfileId,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 30 | rust | ToggleDynamicRoutingPath | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Nomupay {} | crates/hyperswitch_connectors/src/connectors/nomupay.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Nomupay | api::MandateSetup for | impl api::MandateSetup for for Nomupay | null | null | null | null | null | null | null | null |
pub struct DomainTokenData {
/// The specific token data retrieved from the vault, containing sensitive PII
pub specific_token_data: SecretSerdeValue,
/// The type of vault connector being used for token retrieval
pub vault_connector: VaultConnectors,
} | crates/injector/src/types.rs | injector | struct_definition | 57 | rust | DomainTokenData | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProcessingInformationResponse {
payment_solution: Option<String>,
commerce_indicator: Option<String>,
commerce_indicator_label: Option<String>,
authorization_options: Option<AuthorizationOptions>,
ecommerce_indicator: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | ProcessingInformationResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/refund.rs
use api_models::payments::AmountFilter;
use async_bb8_diesel::AsyncRunQueryDsl;
use common_utils::errors::CustomResult;
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, QueryDsl};
#[cfg(feature = "v1")]
use diesel_models::schema::refund::dsl... | crates/router/src/types/storage/refund.rs | router | full_file | 4,152 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct OpayoCard {
name: Secret<String>,
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
complete: bool,
} | crates/hyperswitch_connectors/src/connectors/opayo/transformers.rs | hyperswitch_connectors | struct_definition | 47 | rust | OpayoCard | null | null | null | null | null | null | null | null | null | null | null |
pub const fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/bamboraapac.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl Default for Filter {
fn default() -> Self {
Self::NestedFilter(FilterCombinator::default(), Vec::new())
}
} | crates/analytics/src/query.rs | analytics | impl_block | 31 | rust | null | Filter | Default for | impl Default for for Filter | null | null | null | null | null | null | null | null |
/// Create a new event context.
pub fn new(message_sink: A) -> Self {
Self {
message_sink: Arc::new(message_sink),
metadata: HashMap::new(),
}
} | crates/events/src/lib.rs | events | function_signature | 43 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub fn postgres_url(&self) -> String {
format!(
"postgres://{}:{}@{}:{}/{}",
self.username, self.password, self.host, self.port, self.dbname
)
} | crates/hsdev/src/input_file.rs | hsdev | function_signature | 46 | rust | null | null | null | null | postgres_url | null | null | null | null | null | null | null |
pub struct LogFile {
/// Whether you want to store log in log files.
pub enabled: bool,
/// Where to store log files.
pub path: String,
/// Name of log file without suffix.
pub file_name: String,
/// What gets into log files.
pub level: Level,
/// Directive which sets the log level f... | crates/router_env/src/logger/config.rs | router_env | struct_definition | 114 | rust | LogFile | null | null | null | null | null | null | null | null | null | null | null |
pub struct DlocalPaymentsSyncRequest {
pub authz_id: String,
} | crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | DlocalPaymentsSyncRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Opennode {} | crates/hyperswitch_connectors/src/connectors/opennode.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Opennode | api::Refund for | impl api::Refund for for Opennode | null | null | null | null | null | null | null | null |
pub struct NoonPayPal {
return_url: String,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | NoonPayPal | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/merchant-connector-account/merchant-connector--retrieve.mdx
# Type: Doc File
---
openapi: get /accounts/{account_id}/connectors/{connector_id}
--- | api-reference/v1/merchant-connector-account/merchant-connector--retrieve.mdx | null | doc_file | 44 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProFeatureRequest {
pub recipient_email: domain::UserEmail,
pub feature_name: String,
pub merchant_id: common_utils::id_type::MerchantId,
pub user_name: domain::UserName,
pub user_email: domain::UserEmail,
pub subject: String,
pub theme_id: Option<String>,
pub theme_config: Em... | crates/router/src/services/email/types.rs | router | struct_definition | 80 | rust | ProFeatureRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn number_array_value(input: &str) -> ParseResult<&str, ast::ValueType> {
fn num_minor_unit(input: &str) -> ParseResult<&str, MinorUnit> {
combinator::map(num_i64, MinorUnit::new)(input)
}
let many_with_comma = multi::many0(sequence::preceded(
skip_ws(complete::tag(",")),
skip_ws... | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 214 | rust | null | null | null | null | number_array_value | null | null | null | null | null | null | null |
pub async fn generic_insert<T, V, R>(conn: &PgPooledConn, values: V) -> StorageResult<R>
where
T: HasTable<Table = T> + Table + 'static + Debug,
V: Debug + Insertable<T>,
<T as QuerySource>::FromClause: QueryFragment<Pg> + Debug,
<V as Insertable<T>>::Values: CanInsertInSingleQuery<Pg> + QueryFragment<P... | crates/diesel_models/src/query/generics.rs | diesel_models | function_signature | 315 | rust | null | null | null | null | generic_insert | null | null | null | null | null | null | null |
impl api::PaymentSync for Paysafe {} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paysafe | api::PaymentSync for | impl api::PaymentSync for for Paysafe | null | null | null | null | null | null | null | null |
pub struct SinglePurposeOrLoginTokenAuth(pub TokenPurpose); | crates/router/src/services/authentication.rs | router | struct_definition | 12 | rust | SinglePurposeOrLoginTokenAuth | null | null | null | null | null | null | null | null | null | null | null |
pub fn new(
tenant_id: common_utils::id_type::TenantId,
merchant_id: common_utils::id_type::MerchantId,
event_id: String,
event_type: OutgoingWebhookEventType,
content: Option<OutgoingWebhookEventContent>,
error: Option<Value>,
initial_attempt_id: Option<String>,
... | crates/router/src/events/outgoing_webhook_logs.rs | router | function_signature | 175 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl AuthorizationUpdateInternal {
pub fn create_authorization(self, source: Authorization) -> Authorization {
Authorization {
status: self.status.unwrap_or(source.status),
error_code: self.error_code.or(source.error_code),
error_message: self.error_message.or(source.erro... | crates/diesel_models/src/authorization.rs | diesel_models | impl_block | 107 | rust | null | AuthorizationUpdateInternal | null | impl AuthorizationUpdateInternal | null | null | null | null | null | null | null | null |
pub fn from_storage(intent: &'a PaymentIntent, infra_values: Option<Value>) -> Self {
let PaymentIntent {
id,
merchant_id,
status,
amount_details,
amount_captured,
customer_id,
description,
return_url,
me... | crates/router/src/services/kafka/payment_intent_event.rs | router | function_signature | 943 | rust | null | null | null | null | from_storage | null | null | null | null | null | null | null |
impl ConnectorCommon for Worldpayxml {
fn id(&self) -> &'static str {
"worldpayxml"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"text/xml"
}
fn base_url<'a>(&self, connectors: &... | crates/hyperswitch_connectors/src/connectors/worldpayxml.rs | hyperswitch_connectors | impl_block | 622 | rust | null | Worldpayxml | ConnectorCommon for | impl ConnectorCommon for for Worldpayxml | null | null | null | null | null | null | null | null |
pub fn refunds_list_profile() {} | crates/openapi/src/routes/refunds.rs | openapi | function_signature | 7 | rust | null | null | null | null | refunds_list_profile | null | null | null | null | null | null | null |
pub struct GooglePayPaymentInformation {
fluid_data: FluidData,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | GooglePayPaymentInformation | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Paypal {} | crates/hyperswitch_connectors/src/connectors/paypal.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Paypal | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Paypal | null | null | null | null | null | null | null | null |
impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::CardsInfoUpdate;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
payload,
|state, _, payload, _| cards_info::update_card_info(state, payload),
&auth::AdminApiAuth,
api_loc... | crates/router/src/routes/cards_info.rs | router | impl_block | 91 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn update(&mut self, new: Self) {
if let Some(new_config) = new.config {
self.config.as_mut().map(|config| config.update(new_config));
}
if let Some(new_label_info) = new.label_info {
new_label_info.iter().for_each(|new_label_info| {
if let Some(existi... | crates/api_models/src/routing.rs | api_models | function_signature | 191 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
impl api::Payment for Sift {} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Sift | api::Payment for | impl api::Payment for for Sift | null | null | null | null | null | null | null | null |
pub struct BraintreeErrorResponse {
pub errors: String,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | BraintreeErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::fp_utils::when;
when(self.redis_lock_expiry_seconds.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"redis_lock_expiry_seconds must not be empty or 0".into(),
... | crates/router/src/configs/validations.rs | router | function_signature | 171 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
pub async fn start_workflow<T>(
state: T,
process: storage::ProcessTracker,
_pickup_time: PrimitiveDateTime,
workflow_selector: impl workflows::ProcessTrackerWorkflows<T> + 'static + std::fmt::Debug,
) -> CustomResult<(), errors::ProcessTrackerError>
where
T: SchedulerSessionState,
{
tracing::Sp... | crates/scheduler/src/consumer.rs | scheduler | function_signature | 174 | rust | null | null | null | null | start_workflow | null | null | null | null | null | null | null |
pub(crate) fn get_order_status(
item: PaypalOrderStatus,
intent: PaypalPaymentIntent,
) -> storage_enums::AttemptStatus {
match item {
PaypalOrderStatus::Completed => {
if intent == PaypalPaymentIntent::Authorize {
storage_enums::AttemptStatus::Authorized
} el... | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | function_signature | 176 | rust | null | null | null | null | get_order_status | null | null | null | null | null | null | null |
impl api::RefundExecute for Bambora {} | crates/hyperswitch_connectors/src/connectors/bambora.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Bambora | api::RefundExecute for | impl api::RefundExecute for for Bambora | null | null | null | null | null | null | null | null |
pub struct PaymentMethod {
#[serde(rename = "type")]
pub pm_type: String,
pub fields: Option<PaymentFields>,
pub address: Option<Address>,
pub digital_wallet: Option<RapydWallet>,
} | crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs | hyperswitch_connectors | struct_definition | 48 | rust | PaymentMethod | null | null | null | null | null | null | null | null | null | null | null |
impl MerchantConnectorAccountNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<MerchantConnectorAccount> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/merchant_connector_account.rs | diesel_models | impl_block | 44 | rust | null | MerchantConnectorAccountNew | null | impl MerchantConnectorAccountNew | null | null | null | null | null | null | null | null |
File: crates/router_derive/src/macros.rs
pub(crate) mod api_error;
pub(crate) mod diesel;
pub(crate) mod generate_permissions;
pub(crate) mod generate_schema;
pub(crate) mod misc;
pub(crate) mod operation;
pub(crate) mod schema;
pub(crate) mod to_encryptable;
pub(crate) mod try_get_enum;
mod helpers;
use proc_macro2... | crates/router_derive/src/macros.rs | router_derive | full_file | 307 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct VaultRetrieveRequest {
pub entity_id: id_type::GlobalCustomerId,
pub vault_id: domain::VaultId,
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 28 | rust | VaultRetrieveRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponse {
#[serde(rename = "type")]
pub action_type: String,
pub key: String,
pub charge_key: String,
pub reference: String,
pub amount: Amount,
pub status: SilverflowRefundStatus,
pub clear_after: Option<String>,
pub authorization_response: Option<AuthorizationResp... | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | struct_definition | 96 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/api_keys/{merchant_id}/{key_id}"
{
"get": {
"tags": [
"API Key"
],
"summary": "API Key - Retrieve",
"description": "Retrieve information about the specified API Key.",
"operationId": "Retrieve an API Key",
"parameters": [
{
"name": "merchant_id",... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 876 | .json | null | null | null | null | null | openapi_spec | paths | [
"/api_keys/{merchant_id}/{key_id}"
] | null | null | null | null |
pub trait Operation<F: Clone, T>: Send + std::fmt::Debug {
type Data;
fn to_validate_request(
&self,
) -> RouterResult<&(dyn ValidateRequest<F, T, Self::Data> + Send + Sync)> {
Err(report!(errors::ApiErrorResponse::InternalServerError))
.attach_printable_lazy(|| format!("validate... | crates/router/src/core/payments/operations.rs | router | trait_definition | 344 | rust | null | null | Operation | null | null | null | null | null | null | null | null | null |
pub struct ConnectorCustomerMap(
std::collections::HashMap<common_utils::id_type::MerchantConnectorAccountId, String>,
); | crates/common_types/src/customers.rs | common_types | struct_definition | 26 | rust | ConnectorCustomerMap | null | null | null | null | null | null | null | null | null | null | null |
pub struct Block {
pub hash: Option<String>,
pub height: Option<i64>,
pub confirmations: Option<i64>,
pub confirmations_required: Option<i64>,
} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 42 | rust | Block | null | null | null | null | null | null | null | null | null | null | null |
impl api::PayoutRecipient for Stripe {} | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Stripe | api::PayoutRecipient for | impl api::PayoutRecipient for for Stripe | null | null | null | null | null | null | null | null |
pub struct FlexitiRouterData<T> {
pub amount: FloatMajorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | FlexitiRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct CheckoutWebhookData {
pub id: String,
pub payment_id: Option<String>,
pub action_id: Option<String>,
pub reference: Option<String>,
pub amount: MinorUnit,
pub balances: Option<Balances>,
pub response_code: Option<String>,
pub response_summary: Option<String>,
pub currency:... | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 90 | rust | CheckoutWebhookData | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CustomerRequest
{
"type": "object",
"description": "The customer details",
"properties": {
"customer_id": {
"type": "string",
"description": "The identifier for the customer object. If not provided the customer ID will be autogenerated.",
"example": "cu... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 547 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CustomerRequest"
] | null | null | null | null |
pub struct DwollaCustomerResponse {} | crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs | hyperswitch_connectors | struct_definition | 7 | rust | DwollaCustomerResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Payme {} | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payme | api::PaymentToken for | impl api::PaymentToken for for Payme | null | null | null | null | null | null | null | null |
pub struct VenmoAdditionalData {
/// mobile number linked to venmo account
#[schema(value_type = Option<String>, example = "******* 3349")]
pub telephone_number: Option<MaskedPhoneNumber>,
} | crates/common_utils/src/payout_method_utils.rs | common_utils | struct_definition | 48 | rust | VenmoAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.FrmPreferredFlowTypes
{
"type": "string",
"enum": [
"pre",
"post"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 38 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"FrmPreferredFlowTypes"
] | null | null | null | null |
pub struct StaxCustomerRequest {
#[serde(skip_serializing_if = "Option::is_none")]
email: Option<Email>,
#[serde(skip_serializing_if = "Option::is_none")]
firstname: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/stax/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | StaxCustomerRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn add_entry_to_blocklist(
state: SessionState,
merchant_context: domain::MerchantContext,
body: api_blocklist::AddToBlocklistRequest,
) -> RouterResponse<api_blocklist::AddToBlocklistResponse> {
utils::insert_entry_into_blocklist(
&state,
merchant_context.get_merchant_account(... | crates/router/src/core/blocklist.rs | router | function_signature | 98 | rust | null | null | null | null | add_entry_to_blocklist | null | null | null | null | null | null | null |
File: crates/router/src/services/kafka/dispute_event.rs
Public functions: 1
Public structs: 1
use common_utils::{
ext_traits::StringExt,
types::{AmountConvertor, MinorUnit, StringMinorUnitForConnector},
};
use diesel_models::enums as storage_enums;
use masking::Secret;
use time::OffsetDateTime;
use crate::t... | crates/router/src/services/kafka/dispute_event.rs | router | full_file | 938 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn start_consumer<T: SchedulerAppState + 'static, U: SchedulerSessionState + 'static, F>(
state: &T,
settings: sync::Arc<SchedulerSettings>,
workflow_selector: impl workflows::ProcessTrackerWorkflows<U> + 'static + Copy + std::fmt::Debug,
(tx, mut rx) | crates/scheduler/src/consumer.rs | scheduler | function_signature | 72 | rust | null | null | null | null | start_consumer | null | null | null | null | null | null | null |
impl SmtpServerConfig {
/// Validation for the SMTP server client specific configs
pub fn validate(&self) -> Result<(), &'static str> {
use common_utils::{ext_traits::ConfigExt, fp_utils::when};
when(self.host.is_default_or_empty(), || {
Err("email.smtp.host must not be empty")
... | crates/external_services/src/email/smtp.rs | external_services | impl_block | 160 | rust | null | SmtpServerConfig | null | impl SmtpServerConfig | null | null | null | null | null | null | null | null |
pub struct ToggleAllKVRequest {
/// Status of KV for the specific merchant
#[schema(example = true)]
pub kv_enabled: bool,
} | crates/api_models/src/admin.rs | api_models | struct_definition | 32 | rust | ToggleAllKVRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Wise {
fn id(&self) -> &'static str {
"wise"
}
fn get_auth_header(
&self,
auth_type: &ConnectorAuthType,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let auth = wise::WiseAuthType::try_from(auth_type)
.change_c... | crates/hyperswitch_connectors/src/connectors/wise.rs | hyperswitch_connectors | impl_block | 529 | rust | null | Wise | ConnectorCommon for | impl ConnectorCommon for for Wise | null | null | null | null | null | null | null | null |
pub async fn refund_retrieve_with_gateway_creds(
state: web::Data<routes::AppState>,
qs_config: web::Data<serde_qs::Config>,
req: HttpRequest,
form_payload: web::Bytes,
) -> HttpResponse {
let refund_request: refund_types::RefundsRetrieveRequest = match qs_config
.deserialize_bytes(&form_pay... | crates/router/src/compatibility/stripe/refunds.rs | router | function_signature | 363 | rust | null | null | null | null | refund_retrieve_with_gateway_creds | null | null | null | null | null | null | null |
pub struct WorldpayEventResponse {
pub last_event: EventType,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<EventLinks>,
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 42 | rust | WorldpayEventResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.FeatureMatrixRequest
{
"type": "object",
"properties": {
"connectors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Connector"
},
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 68 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"FeatureMatrixRequest"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.RelayType
{
"type": "string",
"enum": [
"refund"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 32 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RelayType"
] | null | null | null | null |
pub struct NovalnetCaptureRequest {
pub transaction: NovalnetTransaction,
pub custom: NovalnetCustom,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 27 | rust | NovalnetCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generate_profile_payment_report(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<ReportRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GeneratePaymentReport;
Box::pin(api::server_wrap(
flow,
state... | crates/router/src/analytics.rs | router | function_signature | 410 | rust | null | null | null | null | generate_profile_payment_report | null | null | null | null | null | null | null |
pub fn get_id(&self) -> &common_utils::id_type::GlobalPaymentMethodId {
&self.id
} | crates/diesel_models/src/payment_method.rs | diesel_models | function_signature | 27 | rust | null | null | null | null | get_id | null | null | null | null | null | null | null |
pub fn create_client(
proxy_config: &Proxy,
client_certificate: Option<masking::Secret<String>>,
client_certificate_key: Option<masking::Secret<String>>,
ca_certificate: Option<masking::Secret<String>>,
) -> CustomResult<reqwest::Client, HttpClientError> {
// Case 1: Mutual TLS with client certifica... | crates/external_services/src/http_client/client.rs | external_services | function_signature | 507 | rust | null | null | null | null | create_client | null | null | null | null | null | null | null |
pub async fn update_payment_method_metadata_and_last_used(
state: &routes::SessionState,
key_store: &domain::MerchantKeyStore,
db: &dyn db::StorageInterface,
pm: domain::PaymentMethod,
pm_metadata: Option<serde_json::Value>,
storage_scheme: MerchantStorageScheme,
) -> errors::CustomResult<(), er... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 164 | rust | null | null | null | null | update_payment_method_metadata_and_last_used | null | null | null | null | null | null | null |
pub struct CustomerAccountLink {
customer: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | CustomerAccountLink | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConfigMerchantAdditionalDetails {
pub open_banking_recipient_data: Option<InputData>,
pub account_data: Option<InputData>,
pub iban: Option<Vec<InputData>>,
pub bacs: Option<Vec<InputData>>,
pub connector_recipient_id: Option<InputData>,
pub wallet_id: Option<InputData>,
pub faste... | crates/connector_configs/src/connector.rs | connector_configs | struct_definition | 135 | rust | ConfigMerchantAdditionalDetails | 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.