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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
impl<'a> KafkaRefund<'a> {
pub fn from_storage(refund: &'a Refund) -> Self {
let Refund {
payment_id,
merchant_id,
connector_transaction_id,
connector,
connector_refund_id,
external_reference_id,
refund_type,
tot... | crates/router/src/services/kafka/refund.rs | router | impl_block | 450 | rust | null | KafkaRefund | null | impl KafkaRefund | null | null | null | null | null | null | null | null |
pub struct RefundResponse {} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 6 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Authipay {
fn validate_connector_against_payment_request(
&self,
capture_method: Option<enums::CaptureMethod>,
_payment_method: enums::PaymentMethod,
_pmt: Option<enums::PaymentMethodType>,
) -> CustomResult<(), errors::ConnectorError> {
let c... | crates/hyperswitch_connectors/src/connectors/authipay.rs | hyperswitch_connectors | impl_block | 153 | rust | null | Authipay | ConnectorValidation for | impl ConnectorValidation for for Authipay | null | null | null | null | null | null | null | null |
pub fn supports_payout_eligibility(self, payout_method: Option<PayoutType>) -> bool {
matches!((self, payout_method), (_, Some(PayoutType::Card)))
} | crates/common_enums/src/connector_enums.rs | common_enums | function_signature | 40 | rust | null | null | null | null | supports_payout_eligibility | null | null | null | null | null | null | null |
impl Checkout {
pub fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
amount_converter_webhooks: &StringMinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/checkout.rs | hyperswitch_connectors | impl_block | 45 | rust | null | Checkout | null | impl Checkout | null | null | null | null | null | null | null | null |
pub async fn verify_recon_token(
state: SessionState,
user_with_role: authentication::UserFromTokenWithRoleInfo,
) -> UserResponse<recon_api::VerifyTokenResponse> {
let user = user_with_role.user;
let user_in_db = user
.get_user_from_db(&state)
.await
.attach_printable_lazy(|| {
... | crates/router/src/core/recon.rs | router | function_signature | 242 | rust | null | null | null | null | verify_recon_token | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RedirectResponse
{
"type": "object",
"properties": {
"param": {
"type": "string",
"nullable": true
},
"json_payload": {
"type": "object",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 68 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RedirectResponse"
] | null | null | null | null |
/// A trait defining an engine for interacting with HashiCorp Vault.
pub trait Engine: Sized {
/// The associated type representing the return type of the engine's operations.
type ReturnType<'b, T>
where
T: 'b,
Self: 'b;
/// Reads data from HashiCorp Vault at the specified location.
... | crates/external_services/src/hashicorp_vault/core.rs | external_services | trait_definition | 160 | rust | null | null | Engine | null | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Barclaycard {} | crates/hyperswitch_connectors/src/connectors/barclaycard.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Barclaycard | api::PaymentSession for | impl api::PaymentSession for for Barclaycard | null | null | null | null | null | null | null | null |
pub struct CheckoutWebhookBody {
#[serde(rename = "type")]
pub transaction_type: CheckoutWebhookEventType,
pub data: CheckoutWebhookData,
#[serde(rename = "_links")]
pub links: Links,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 49 | rust | CheckoutWebhookBody | null | null | null | null | null | null | null | null | null | null | null |
pub struct Apm {
#[serde(alias = "provider_redirect_url")]
pub redirect_url: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/globalpay/response.rs | hyperswitch_connectors | struct_definition | 24 | rust | Apm | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GetRefundFilters;
Box::pin(api::server_wrap(
flow,
state,
&req,
json_payload.into_inner(),
|state, auth: AuthenticationData, req: GetRefundFilterRequest, _| async move {
let org_id = au... | crates/router/src/analytics.rs | router | impl_block | 235 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn from_storage(authentication: &'a Authentication) -> Self {
Self {
created_at: authentication.created_at.assume_utc(),
modified_at: authentication.modified_at.assume_utc(),
authentication_id: &authentication.authentication_id,
merchant_id: &authentication.me... | crates/router/src/services/kafka/authentication_event.rs | router | function_signature | 443 | rust | null | null | null | null | from_storage | null | null | null | null | null | null | null |
pub async fn delete_decision_engine_merchant(
state: &SessionState,
profile_id: &id_type::ProfileId,
) -> RouterResult<()> {
let path = format!(
"{}/{}",
DECISION_ENGINE_MERCHANT_BASE_ENDPOINT,
profile_id.get_string_repr()
);
routing_utils::ConfigApiClient::send_decision_engi... | crates/router/src/core/routing/helpers.rs | router | function_signature | 146 | rust | null | null | null | null | delete_decision_engine_merchant | null | null | null | null | null | null | null |
let payment_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.id.clone()),
redirection_data: Box::new(redirection_data),
mandate_reference: Box::new(None),
connector_metadata: None,
network_txn_id: None,
... | crates/hyperswitch_connectors/src/connectors/zen/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 1,610 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/unified_connector_service/transformers.rs
Public functions: 3
Public structs: 1
use std::collections::HashMap;
use api_models::payments::QrCodeInformation;
use common_enums::{AttemptStatus, AuthenticationType};
use common_utils::{ext_traits::Encode, request::Method};
use diesel_models::... | crates/router/src/core/unified_connector_service/transformers.rs#chunk0 | router | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<T: DatabaseStore> PayoutAttemptInterface for KVRouterStore<T> {} | crates/storage_impl/src/kv_router_store.rs | storage_impl | impl_block | 17 | rust | null | KVRouterStore | PayoutAttemptInterface for | impl PayoutAttemptInterface for for KVRouterStore | null | null | null | null | null | null | null | null |
pub fn convert_to_payment_method_update(
self,
storage_scheme: MerchantStorageScheme,
) -> PaymentMethodUpdateInternal {
let mut update_internal: PaymentMethodUpdateInternal = self.into();
update_internal.updated_by = Some(storage_scheme.to_string());
update_internal
} | crates/diesel_models/src/payment_method.rs | diesel_models | function_signature | 59 | rust | null | null | null | null | convert_to_payment_method_update | null | null | null | null | null | null | null |
impl api::Refund for Bluecode {} | crates/hyperswitch_connectors/src/connectors/bluecode.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bluecode | api::Refund for | impl api::Refund for for Bluecode | null | null | null | null | null | null | null | null |
pub struct FiservemeaRouterData<T> {
pub amount: StringMajorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs | hyperswitch_connectors | struct_definition | 53 | rust | FiservemeaRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Digitalvirgo {} | crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Digitalvirgo | api::PaymentSync for | impl api::PaymentSync for for Digitalvirgo | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Bambora {
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/bambora.rs | hyperswitch_connectors | impl_block | 214 | rust | null | Bambora | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Bambora | null | null | null | null | null | null | null | null |
impl masking::SerializableSecret for PaymentMethodType {} | crates/common_enums/src/enums.rs | common_enums | impl_block | 10 | rust | null | PaymentMethodType | masking::SerializableSecret for | impl masking::SerializableSecret for for PaymentMethodType | null | null | null | null | null | null | null | null |
File: crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs
use std::collections::HashSet;
use api_models::analytics::{
auth_events::{AuthEventDimensions, AuthEventFilters, AuthEventMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_enums::{AuthenticationStatus, DecoupledAuthenticat... | crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs | analytics | full_file | 1,105 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.StaticRoutingAlgorithm
{
"oneOf": [
{
"type": "object",
"required": [
"type",
"data"
],
"properties": {
"type": {
"type": "string",
"enum": [
"single"
]
},
"data": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 468 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"StaticRoutingAlgorithm"
] | null | null | null | null |
pub fn validate_for_valid_refunds(
payment_attempt: &hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt,
connector: api_models::enums::Connector,
) -> RouterResult<()> {
let payment_method_type = payment_attempt.payment_method_type;
match payment_method_type {
diesel_models::e... | crates/router/src/core/utils/refunds_validator.rs | router | function_signature | 188 | rust | null | null | null | null | validate_for_valid_refunds | null | null | null | null | null | null | null |
pub struct GsmRetrieveRequest {
/// The connector through which payment has gone through
#[schema(value_type = Connector)]
pub connector: api_enums::Connector,
/// The flow in which the code and message occurred for a connector
pub flow: String,
/// The sub_flow in which the code and message occ... | crates/api_models/src/gsm.rs | api_models | struct_definition | 110 | rust | GsmRetrieveRequest | null | null | null | null | null | null | null | null | null | null | null |
impl behaviour::Conversion for PaymentIntent {
type DstType = DieselPaymentIntent;
type NewDstType = DieselPaymentIntentNew;
async fn convert(self) -> CustomResult<Self::DstType, ValidationError> {
let Self {
merchant_id,
amount_details,
status,
amoun... | crates/hyperswitch_domain_models/src/payments/payment_intent.rs | hyperswitch_domain_models | impl_block | 3,047 | rust | null | PaymentIntent | behaviour::Conversion for | impl behaviour::Conversion for for PaymentIntent | null | null | null | null | null | null | null | null |
pub fn values(&self) -> slice::Iter<'_, V> {
self.data.iter()
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | function_signature | 22 | rust | null | null | null | null | values | null | null | null | null | null | null | null |
pub async fn routing_update_default_config(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::ProfileId>,
json_payload: web::Json<Vec<routing_types::RoutableConnectorChoice>>,
) -> impl Responder {
let wrapper = routing_types::ProfileDefaultRoutingConfig {
... | crates/router/src/routes/routing.rs | router | function_signature | 307 | rust | null | null | null | null | routing_update_default_config | null | null | null | null | null | null | null |
impl DisputeMetricsBucketIdentifier {
pub fn new(
dispute_stage: Option<DisputeStage>,
connector: Option<String>,
currency: Option<Currency>,
normalized_time_range: TimeRange,
) -> Self {
Self {
dispute_stage,
connector,
currency,
... | crates/api_models/src/analytics/disputes.rs | api_models | impl_block | 84 | rust | null | DisputeMetricsBucketIdentifier | null | impl DisputeMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
pub struct WorldpayPartialRequest {
pub value: PaymentValue,
pub reference: String,
} | crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs | hyperswitch_connectors | struct_definition | 21 | rust | WorldpayPartialRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Novalnet {} | crates/hyperswitch_connectors/src/connectors/novalnet.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Novalnet | api::PaymentSession for | impl api::PaymentSession for for Novalnet | null | null | null | null | null | null | null | null |
/// Dummy handler for signals in windows (empty)
pub fn handle(&self) -> Self {
self.clone()
} | crates/common_utils/src/signals.rs | common_utils | function_signature | 26 | rust | null | null | null | null | handle | null | null | null | null | null | null | null |
pub fn voucher_next_steps_check(
payment_attempt: storage::PaymentAttempt,
) -> RouterResult<Option<api_models::payments::VoucherNextStepData>> {
let voucher_next_step = if let Some(diesel_models::enums::PaymentMethod::Voucher) =
payment_attempt.payment_method
{
let voucher_next_steps: Optio... | crates/router/src/core/payments/transformers.rs | router | function_signature | 166 | rust | null | null | null | null | voucher_next_steps_check | null | null | null | null | null | null | null |
"27" => Some("Retry after 4 days"),
"28" => Some("Retry after 6 days"),
"29" => Some("Retry after 8 days"),
"30" => Some("Retry after 10 days"),
"40" => Some("Card is a consumer non-reloadable prepaid card"),
"41" => Some("Card is a consumer single-use virtual card number... | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs#chunk3 | hyperswitch_connectors | chunk | 580 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BillwerkRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | BillwerkRouterData | null | null | null | null | null | null | null | null | null | null | null |
/// Middleware for attaching default response headers. Headers with the same key already set in a
/// response will not be overwritten.
pub fn default_response_headers() -> actix_web::middleware::DefaultHeaders {
use actix_web::http::header;
let default_headers_middleware = actix_web::middleware::DefaultHeader... | crates/router/src/middleware.rs | router | function_signature | 183 | rust | null | null | null | null | default_response_headers | null | null | null | null | null | null | null |
pub struct CountryCodeWithName {
pub code: api_enums::CountryAlpha2,
pub name: api_enums::Country,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 29 | rust | CountryCodeWithName | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/compatibility/stripe/refunds/types.rs
Public structs: 3
use std::{convert::From, default::Default};
use common_utils::pii;
use serde::{Deserialize, Serialize};
use crate::types::api::{admin, refunds};
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug)]
pub struct StripeCreateRefu... | crates/router/src/compatibility/stripe/refunds/types.rs | router | full_file | 717 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<V> ConstraintGraphBuilder<V>
where
V: ValueNode,
{
pub fn new() -> Self {
Self {
domain: DenseMap::new(),
nodes: DenseMap::new(),
edges: DenseMap::new(),
domain_identifier_map: FxHashMap::default(),
value_map: FxHashMap::default(),
... | crates/hyperswitch_constraint_graph/src/builder.rs | hyperswitch_constraint_graph | impl_block | 1,642 | rust | null | ConstraintGraphBuilder | null | impl ConstraintGraphBuilder | null | null | null | null | null | null | null | null |
pub struct AutomationConfigs {
pub hs_base_url: Option<String>,
pub hs_api_key: Option<String>,
pub hs_api_keys: Option<String>,
pub hs_webhook_url: Option<String>,
pub hs_test_env: Option<String>,
pub hs_test_browser: Option<String>,
pub chrome_profile_path: Option<String>,
pub firefox_... | crates/test_utils/src/connector_auth.rs | test_utils | struct_definition | 239 | rust | AutomationConfigs | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/role.rs
Public structs: 3
use common_utils::id_type;
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use time::PrimitiveDateTime;
use crate::{enums, schema::roles};
#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
#[diesel(table_name = roles, pr... | crates/diesel_models/src/role.rs | diesel_models | full_file | 653 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ApiEvent {
#[allow(clippy::too_many_arguments)]
pub fn new(
tenant_id: common_utils::id_type::TenantId,
merchant_id: Option<common_utils::id_type::MerchantId>,
api_flow: &impl FlowMetric,
request_id: &RequestId,
latency: u128,
status_code: i64,
reques... | crates/router/src/events/api_logs.rs | router | impl_block | 369 | rust | null | ApiEvent | null | impl ApiEvent | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
amount_converter_to_string_minor_unit: &StringMinorUnitForConnector,
amount_converter_float_major_unit: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/bluesnap.rs | hyperswitch_connectors | function_signature | 57 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl RequiredFieldsForEnabledPaymentMethodTypes {
fn perform_surcharge_calculation(
self,
) -> RequiredFieldsAndSurchargeForEnabledPaymentMethodTypes {
// TODO: Perform surcharge calculation
let details_with_surcharge = self
.0
.into_iter()
.map(
... | crates/router/src/core/payments/payment_methods.rs | router | impl_block | 168 | rust | null | RequiredFieldsForEnabledPaymentMethodTypes | null | impl RequiredFieldsForEnabledPaymentMethodTypes | null | null | null | null | null | null | null | null |
pub fn get_tax_on_surcharge(&self) -> Option<MinorUnit> {
self.tax_on_surcharge
} | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 26 | rust | null | null | null | null | get_tax_on_surcharge | null | null | null | null | null | null | null |
pub fn new(
payment_method: Option<String>,
platform: Option<String>,
browser_name: Option<String>,
source: Option<String>,
component: Option<String>,
payment_experience: Option<String>,
time_bucket: Option<String>,
) -> Self {
Self {
payme... | crates/api_models/src/analytics/sdk_events.rs | api_models | function_signature | 87 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/router_env/src/cargo_workspace.rs
Public functions: 2
/// Sets the `CARGO_WORKSPACE_MEMBERS` environment variable to include a comma-separated list of
/// names of all crates in the current cargo workspace.
///
/// This function should be typically called within build scripts, so that the environment var... | crates/router_env/src/cargo_workspace.rs | router_env | full_file | 555 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RedsysSyncRequest {
#[serde(rename = "Ds_MerchantCode")]
ds_merchant_code: Secret<String>,
#[serde(rename = "Ds_Terminal")]
ds_terminal: Secret<String>,
#[serde(rename = "Ds_Order")]
ds_order: String,
#[serde(rename = "Ds_TransactionType")]
ds_transaction_type: String,
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 79 | rust | RedsysSyncRequest | null | null | null | null | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for EventRetrieveResponse {
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
Some(common_utils::events::ApiEventsType::Events {
merchant_id: self.event_information.merchant_id.clone(),
})
}
} | crates/api_models/src/webhook_events.rs | api_models | impl_block | 66 | rust | null | EventRetrieveResponse | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for EventRetrieveResponse | null | null | null | null | null | null | null | null |
pub struct ArchipelPaymentsResponse {
order: ArchipelOrderResponse,
transaction_id: String,
transaction_date: String,
transaction_result: ArchipelPaymentStatus,
error: Option<ArchipelErrorMessage>,
financial_network_code: Option<String>,
issuer_transaction_id: Option<String>,
response_co... | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 86 | rust | ArchipelPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
"Viseu District" => Ok(Self::ViseuDistrict),
"Évora District" => Ok(Self::EvoraDistrict),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
im... | crates/hyperswitch_connectors/src/utils.rs#chunk4 | hyperswitch_connectors | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UserRole> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/user_role.rs | diesel_models | function_signature | 34 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
pub struct JuspaythreedsserverPaymentsRequest {
amount: StringMinorUnit,
card: JuspaythreedsserverCard,
} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | JuspaythreedsserverPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Chargebee {
fn id(&self) -> &'static str {
"chargebee"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/x-www-form-urlencoded"
}
fn base_url<'a>... | crates/hyperswitch_connectors/src/connectors/chargebee.rs | hyperswitch_connectors | impl_block | 422 | rust | null | Chargebee | ConnectorCommon for | impl ConnectorCommon for for Chargebee | null | null | null | null | null | null | null | null |
pub struct PaymentMethodsCallCount; | crates/api_models/src/analytics/sdk_events.rs | api_models | struct_definition | 7 | rust | PaymentMethodsCallCount | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Powertranz {} | crates/hyperswitch_connectors/src/connectors/powertranz.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Powertranz | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Powertranz | null | null | null | null | null | null | null | null |
pub struct UserDeprecated; | crates/router/src/routes/app.rs | router | struct_definition | 5 | rust | UserDeprecated | null | null | null | null | null | null | null | null | null | null | null |
pub struct FacilitapayPerson {
pub document_number: Secret<String>,
pub document_type: DocumentType,
pub social_name: Secret<String>,
pub fiscal_country: CountryAlpha2,
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<pii::Email>,
#[serde(skip_serializing_if = "Option::is_... | crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs | hyperswitch_connectors | struct_definition | 343 | rust | FacilitapayPerson | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConsumerSettings {
pub disabled: bool,
pub consumer_group: String,
} | crates/scheduler/src/settings.rs | scheduler | struct_definition | 19 | rust | ConsumerSettings | null | null | null | null | null | null | null | null | null | null | null |
pub struct PhoneNumber {
/// Country Code of the phone, limited to 1-3 characters
#[serde(rename = "cc")]
country_code: Option<String>,
subscriber: Option<masking::Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/netcetera/netcetera_types.rs | hyperswitch_connectors | struct_definition | 47 | rust | PhoneNumber | null | null | null | null | null | null | null | null | null | null | null |
impl RelayRequestInner<RelayRefund> {
pub fn from_relay_request(relay_request: relay_api_models::RelayRequest) -> RouterResult<Self> {
match relay_request.data {
Some(relay_api_models::RelayData::Refund(ref_data)) => Ok(Self {
connector_resource_id: relay_request.connector_resour... | crates/router/src/core/relay.rs | router | impl_block | 135 | rust | null | RelayRequestInner | null | impl RelayRequestInner | null | null | null | null | null | null | null | null |
File: crates/router/src/types/api/verify_connector/paypal.rs
use error_stack::ResultExt;
use super::{VerifyConnector, VerifyConnectorData};
use crate::{
connector,
core::errors,
routes::SessionState,
services,
types::{self, api},
};
#[async_trait::async_trait]
impl VerifyConnector for connector::... | crates/router/src/types/api/verify_connector/paypal.rs | router | full_file | 403 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/api/admin.rs
Public functions: 1
Public structs: 1
use std::collections::HashMap;
#[cfg(feature = "v2")]
pub use api_models::admin;
pub use api_models::{
admin::{
MaskedHeaders, MerchantAccountCreate, MerchantAccountDeleteResponse,
MerchantAccountResponse, MerchantA... | crates/router/src/types/api/admin.rs | router | full_file | 4,461 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardPaymentInformation {
card: Card,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | CardPaymentInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct RevenueRecoveryRecordBackRequest {
pub merchant_reference_id: common_utils::id_type::PaymentReferenceId,
pub amount: common_utils::types::MinorUnit,
pub currency: enums::Currency,
pub payment_method_type: Option<common_enums::PaymentMethodType>,
pub attempt_status: common_enums::AttemptSt... | crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs | hyperswitch_domain_models | struct_definition | 103 | rust | RevenueRecoveryRecordBackRequest | null | null | null | null | null | null | null | null | null | null | null |
/// Converts a `prost_types::Timestamp` to an `time::PrimitiveDateTime`.
pub fn convert_from_prost_timestamp(
ts: &prost_types::Timestamp,
) -> error_stack::Result<time::PrimitiveDateTime, DateTimeConversionError> {
let timestamp_nanos = i128::from(ts.seconds) * 1_000_000_000 + i128::from(ts.nan... | crates/external_services/src/lib.rs | external_services | function_signature | 145 | rust | null | null | null | null | convert_from_prost_timestamp | null | null | null | null | null | null | null |
impl FrmMetricsAccumulator {
pub fn collect(self) -> FrmMetricsBucketValue {
FrmMetricsBucketValue {
frm_blocked_rate: self.frm_blocked_rate.collect(),
frm_triggered_attempts: self.frm_triggered_attempts.collect(),
}
}
} | crates/analytics/src/frm/accumulator.rs | analytics | impl_block | 54 | rust | null | FrmMetricsAccumulator | null | impl FrmMetricsAccumulator | null | null | null | null | null | null | null | null |
impl UserAuthenticationMethodInterface for KafkaStore {
async fn insert_user_authentication_method(
&self,
user_authentication_method: storage::UserAuthenticationMethodNew,
) -> CustomResult<storage::UserAuthenticationMethod, errors::StorageError> {
self.diesel_store
.insert_... | crates/router/src/db/kafka_store.rs | router | impl_block | 413 | rust | null | KafkaStore | UserAuthenticationMethodInterface for | impl UserAuthenticationMethodInterface for for KafkaStore | null | null | null | null | null | null | null | null |
impl<Secret, MaskingStrategy> Eq for StrongSecret<Secret, MaskingStrategy>
where
Self: PeekInterface<Secret>,
Secret: ZeroizableSecret + StrongEq,
{
} | crates/masking/src/strong_secret.rs | masking | impl_block | 41 | rust | null | StrongSecret | Eq for | impl Eq for for StrongSecret | null | null | null | null | null | null | null | null |
pub struct Trustpayments {
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | struct_definition | 27 | rust | Trustpayments | null | null | null | null | null | null | null | null | null | null | null |
impl Tokenio {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
fn create_jwt_token(
&self,
auth: &tokenio::TokenioAuthType,
method: &str,
path: &str,
body: &RequestContent,
connectors: &Co... | crates/hyperswitch_connectors/src/connectors/tokenio.rs | hyperswitch_connectors | impl_block | 1,383 | rust | null | Tokenio | null | impl Tokenio | null | null | null | null | null | null | null | null |
pub async fn get_theme_using_lineage(
state: web::Data<AppState>,
req: HttpRequest,
query: web::Query<ThemeLineage>,
) -> HttpResponse {
let flow = Flow::GetThemeUsingLineage;
let lineage = query.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
lineage... | crates/router/src/routes/user/theme.rs | router | function_signature | 127 | rust | null | null | null | null | get_theme_using_lineage | null | null | null | null | null | null | null |
File: crates/router/src/routes/lock_utils.rs
use router_env::Flow;
#[derive(Clone, Debug, strum::Display)]
#[strum(serialize_all = "snake_case")]
pub enum ApiIdentifier {
Payments,
Refunds,
Webhooks,
Organization,
MerchantAccount,
MerchantConnector,
Configs,
Customers,
Ephemeral,
... | crates/router/src/routes/lock_utils.rs | router | full_file | 2,978 | null | null | null | null | null | null | null | null | null | null | null | null | null |
profile_id: storage_model.profile_id,
status: storage_model.status,
attempt_count: storage_model.attempt_count,
confirm: storage_model.confirm,
payout_link_id: storage_model.payout_link_id,
client_secret: storage_model.client_secret,
pr... | crates/storage_impl/src/payouts/payouts.rs#chunk1 | storage_impl | chunk | 385 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantIdAuth(pub id_type::MerchantId); | crates/router/src/services/authentication.rs | router | struct_definition | 12 | rust | MerchantIdAuth | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
Public functions: 2
Public structs: 48
use std::collections::HashMap;
use api_models::payments::SessionToken;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
pii::{self, Email},
request::Method,
types::{Fl... | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,189 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id_payout_attempt_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
payout_attempt_id: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::merchant_id
... | crates/diesel_models/src/query/payout_attempt.rs | diesel_models | function_signature | 115 | rust | null | null | null | null | find_by_merchant_id_payout_attempt_id | null | null | null | null | null | null | null |
pub async fn update_with_specific_fields(
conn: &PgPooledConn,
identifier: &common_utils::id_type::MerchantId,
merchant_account: MerchantAccountUpdateInternal,
) -> StorageResult<Self> {
generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Tabl... | crates/diesel_models/src/query/merchant_account.rs | diesel_models | function_signature | 99 | rust | null | null | null | null | update_with_specific_fields | null | null | null | null | null | null | null |
pub struct TokenizationUpdateInternal {
pub updated_at: PrimitiveDateTime,
pub flag: Option<common_enums::enums::TokenizationFlag>,
} | crates/diesel_models/src/tokenization.rs | diesel_models | struct_definition | 32 | rust | TokenizationUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
impl super::sdk_events::filters::SdkEventFilterAnalytics for ClickhouseClient {} | crates/analytics/src/clickhouse.rs | analytics | impl_block | 17 | rust | null | ClickhouseClient | super::sdk_events::filters::SdkEventFilterAnalytics for | impl super::sdk_events::filters::SdkEventFilterAnalytics for for ClickhouseClient | null | null | null | null | null | null | null | null |
pub async fn get_connector_customer_payment_processor_tokens(
state: &SessionState,
connector_customer_id: &str,
) -> CustomResult<HashMap<String, PaymentProcessorTokenStatus>, errors::StorageError> {
let redis_conn =
state
.store
.get_redis_conn()... | crates/router/src/types/storage/revenue_recovery_redis_operation.rs | router | function_signature | 346 | rust | null | null | null | null | get_connector_customer_payment_processor_tokens | null | null | null | null | null | null | null |
impl ConnectorValidation for Dwolla {
//TODO: implement functions when support enabled
} | crates/hyperswitch_connectors/src/connectors/dwolla.rs | hyperswitch_connectors | impl_block | 18 | rust | null | Dwolla | ConnectorValidation for | impl ConnectorValidation for for Dwolla | null | null | null | null | null | null | null | null |
impl DynamicRoutingStatsNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<DynamicRoutingStats> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/dynamic_routing_stats.rs | diesel_models | impl_block | 44 | rust | null | DynamicRoutingStatsNew | null | impl DynamicRoutingStatsNew | null | null | null | null | null | null | null | null |
impl api::PayoutCancel for Nomupay {} | crates/hyperswitch_connectors/src/connectors/nomupay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Nomupay | api::PayoutCancel for | impl api::PayoutCancel for for Nomupay | null | null | null | null | null | null | null | null |
pub struct TrustpaymentsPaymentsRequest {
amount: StringMinorUnit,
card: TrustpaymentsCard,
} | crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | TrustpaymentsPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Mollie {} | crates/hyperswitch_connectors/src/connectors/mollie.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Mollie | api::PaymentVoid for | impl api::PaymentVoid for for Mollie | null | null | null | null | null | null | null | null |
impl GsmFeatureData {
/// Retrieves the retry feature data if it exists.
pub fn get_retry_feature_data(&self) -> Option<RetryFeatureData> {
match self {
Self::Retry(data) => Some(data.clone()),
}
}
/// Retrieves the decision from the retry feature data.
pub fn get_decisi... | crates/common_types/src/domain.rs | common_types | impl_block | 102 | rust | null | GsmFeatureData | null | impl GsmFeatureData | null | null | null | null | null | null | null | null |
impl MockDb {
pub async fn new(redis: &RedisSettings) -> error_stack::Result<Self, StorageError> {
Ok(Self {
addresses: Default::default(),
configs: Default::default(),
merchant_accounts: Default::default(),
merchant_connector_accounts: Default::default(),
... | crates/storage_impl/src/mock_db.rs | storage_impl | impl_block | 1,148 | rust | null | MockDb | null | impl MockDb | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.HyperswitchConnectorCategory
{
"type": "string",
"description": "Connector Access Method",
"enum": [
"payment_gateway",
"alternative_payment_method",
"bank_acquirer",
"payout_processor",
"authentication_provider",
"fraud_and_risk_management_provider",... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 93 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"HyperswitchConnectorCategory"
] | null | null | null | null |
pub struct BacsBankDebitAdditionalData {
/// Partially masked account number for Bacs payment method
#[schema(value_type = String, example = "0001****3456")]
pub account_number: MaskedBankAccount,
/// Partially masked sort code for Bacs payment method
#[schema(value_type = String, example = "108800... | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 131 | rust | BacsBankDebitAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
pub struct ThreeDsMethodDataForm {
pub three_ds_method_data: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | ThreeDsMethodDataForm | null | null | null | null | null | null | null | null | null | null | null |
pub fn is_payout_quote_call_required(self) -> bool {
matches!(self, Self::Wise)
} | crates/common_enums/src/connector_enums.rs | common_enums | function_signature | 25 | rust | null | null | null | null | is_payout_quote_call_required | null | null | null | null | null | null | null |
File: crates/hyperswitch_constraint_graph/src/types.rs
Public functions: 6
Public structs: 9
use std::{
any::Any,
fmt, hash,
ops::{Deref, DerefMut},
sync::Arc,
};
use rustc_hash::{FxHashMap, FxHashSet};
use crate::{dense_map::impl_entity, error::AnalysisTrace};
pub trait KeyNode: fmt::Debug + Clon... | crates/hyperswitch_constraint_graph/src/types.rs | hyperswitch_constraint_graph | full_file | 1,464 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/configs/settings.rs
Public functions: 11
Public structs: 78
use std::{
collections::{HashMap, HashSet},
path::PathBuf,
sync::Arc,
};
#[cfg(feature = "olap")]
use analytics::{opensearch::OpenSearchConfig, ReportConfig};
use api_models::enums;
use common_utils::{ext_traits::ConfigE... | crates/router/src/configs/settings.rs#chunk0 | router | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn is_updatable(&self) -> bool {
self.is_updatable
} | crates/router/src/services/authorization/roles.rs | router | function_signature | 19 | rust | null | null | null | null | is_updatable | null | null | null | null | null | null | null |
pub fn get_organization_type(&self) -> common_enums::OrganizationType {
self.organization_type.unwrap_or_default()
} | crates/diesel_models/src/organization.rs | diesel_models | function_signature | 26 | rust | null | null | null | null | get_organization_type | null | null | null | null | null | null | null |
pub struct ShippingInformation {
first_name: Secret<String>,
last_name: Secret<String>,
address_1: Secret<String>,
address_2: Secret<String>,
city: Secret<String>,
postal_code: Secret<String>,
province: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | ShippingInformation | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::RecoveryIncomingWebhookReceive;
let (merchant_id, profile_id, connector_id) = path.into_inner();
Box::pin(api::server_wrap(
flow.clone(),
state,
&req,
(),
|state, auth, _, req_state| {
let merchant_context = domain::Merch... | crates/router/src/routes/recovery_webhooks.rs | router | impl_block | 190 | rust | null | Responder | null | impl Responder | 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.