text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub fn supports_create_recipient(self, payout_method: Option<PayoutType>) -> bool {
matches!((self, payout_method), (_, Some(PayoutType::Bank)))
} | crates/common_enums/src/connector_enums.rs | common_enums | function_signature | 38 | rust | null | null | null | null | supports_create_recipient | null | null | null | null | null | null | null |
pub struct GocardlessRefund {
amount: MinorUnit,
metadata: RefundMetaData,
links: RefundLink,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 29 | rust | GocardlessRefund | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankOfAmericaErrorInformation {
reason: Option<String>,
message: Option<String>,
details: Option<Vec<Details>>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 29 | rust | BankOfAmericaErrorInformation | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payment_methods_session_update_payment_method(
state: SessionState,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
payment_method_session_id: id_type::GlobalPaymentMethodSessionId,
request: payment_methods::PaymentMethodSessionUpdateSavedPaymentMethod,
) -> RouterR... | crates/router/src/core/payment_methods.rs | router | function_signature | 271 | rust | null | null | null | null | payment_methods_session_update_payment_method | null | null | null | null | null | null | null |
pub struct RetryLimitsConfig(pub HashMap<CardNetwork, NetworkRetryConfig>); | crates/router/src/types/storage/revenue_recovery.rs | router | struct_definition | 15 | rust | RetryLimitsConfig | null | null | null | null | null | null | null | null | null | null | null |
specific_features: None,
},
);
stripe_supported_payment_methods.add(
common_enums::PaymentMethod::BankRedirect,
PaymentMethodType::Sofort,
PaymentMethodDetails {
mandates: common_enums::FeatureStatus::Supported,
refunds: common_enums::FeatureS... | crates/hyperswitch_connectors/src/connectors/stripe.rs#chunk3 | hyperswitch_connectors | chunk | 346 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankInfo {
pub swift: Option<Secret<String>>,
pub name: Option<String>,
#[serde(rename = "id")]
pub bank_id: Secret<String>,
pub code: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs | hyperswitch_connectors | struct_definition | 47 | rust | BankInfo | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.GsmDeleteRequest
{
"type": "object",
"required": [
"connector",
"flow",
"sub_flow",
"code",
"message"
],
"properties": {
"connector": {
"type": "string",
"description": "The connector through which payment has gone through"
},
"f... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 202 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"GsmDeleteRequest"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.SepaAndBacsBillingDetails
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The Email ID for SEPA and BACS billing",
"example": "example@me.com",
"nullable": true
},
"name": {
"type": "string",
"des... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 123 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"SepaAndBacsBillingDetails"
] | null | null | null | null |
Documentation: api-reference/v2/organization/organization--merchant-account--list.mdx
# Type: Doc File
---
openapi: get /v2/organizations/{id}/merchant-accounts
--- | api-reference/v2/organization/organization--merchant-account--list.mdx | null | doc_file | 42 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/routing/deactivate"
{
"post": {
"tags": [
"Routing"
],
"summary": "Routing - Deactivate",
"description": "Deactivates a routing config",
"operationId": "Deactivate a routing config",
"requestBody": {
"content": {
"application/json": {
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 276 | .json | null | null | null | null | null | openapi_spec | paths | [
"/routing/deactivate"
] | null | null | null | null |
impl Default for GenericLinkNew {
fn default() -> Self {
let now = common_utils::date_time::now();
Self {
link_id: String::default(),
primary_reference: String::default(),
merchant_id: common_utils::id_type::MerchantId::default(),
created_at: Some(now... | crates/diesel_models/src/generic_link.rs | diesel_models | impl_block | 146 | rust | null | GenericLinkNew | Default for | impl Default for for GenericLinkNew | null | null | null | null | null | null | null | null |
pub struct NordeaRouterData<T> {
pub amount: StringMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/nordea/requests.rs | hyperswitch_connectors | struct_definition | 25 | rust | NordeaRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Authipay {
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/authipay.rs | hyperswitch_connectors | impl_block | 210 | rust | null | Authipay | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Authipay | null | null | null | null | null | null | null | null |
pub async fn health() -> impl actix_web::Responder {
logger::info!("Drainer health was called");
actix_web::HttpResponse::Ok().body("Drainer health is good")
} | crates/drainer/src/health_check.rs | drainer | function_signature | 42 | rust | null | null | null | null | health | null | null | null | null | null | null | null |
pub async fn payment_intents_update(
state: web::Data<routes::AppState>,
qs_config: web::Data<serde_qs::Config>,
req: HttpRequest,
form_payload: web::Bytes,
path: web::Path<common_utils::id_type::PaymentId>,
) -> HttpResponse {
let payment_id = path.into_inner();
let stripe_payload: types::S... | crates/router/src/compatibility/stripe/payment_intents.rs | router | function_signature | 530 | rust | null | null | null | null | payment_intents_update | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Nordea {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&*NORDEA_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*NORDEA_SUPPORTED_PAYMENT_METHODS)
}
fn get_suppor... | crates/hyperswitch_connectors/src/connectors/nordea.rs | hyperswitch_connectors | impl_block | 143 | rust | null | Nordea | ConnectorSpecifications for | impl ConnectorSpecifications for for Nordea | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/payout_attempt.rs
Public functions: 9
use std::collections::HashSet;
use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{
associations::HasTable,
query_dsl::methods::{DistinctDsl, FilterDsl, SelectDsl},
BoolExpressionMethods, ExpressionMethods,
};
use error_stack::{r... | crates/diesel_models/src/query/payout_attempt.rs | diesel_models | full_file | 1,804 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.UpiData
{
"oneOf": [
{
"type": "object",
"required": [
"upi_collect"
],
"properties": {
"upi_collect": {
"$ref": "#/components/schemas/UpiCollectData"
}
}
},
{
"type": "object",
"required": [... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 132 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"UpiData"
] | null | null | null | null |
File: crates/router/src/db/merchant_key_store.rs
use common_utils::types::keymanager::KeyManagerState;
use error_stack::{report, ResultExt};
use masking::Secret;
use router_env::{instrument, tracing};
#[cfg(feature = "accounts_cache")]
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
... | crates/router/src/db/merchant_key_store.rs | router | full_file | 3,434 | null | null | null | null | null | null | null | null | null | null | null | null | null |
### Refactors
- **refunds_v2:** Refactor api event metric for refunds v2 apis ([#8041](https://github.com/juspay/hyperswitch/pull/8041)) ([`bc4bab9`](https://github.com/juspay/hyperswitch/commit/bc4bab935fa6a08e04f45b2ea5f36ac621b703c8))
- **success_based:** Add support for exploration ([#8158](https://github.com/jus... | CHANGELOG.md#chunk7 | null | doc_chunk | 8,104 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_org_sankey(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<TimeRange>,
) -> impl Responder {
let flow = AnalyticsFlow::GetSankey;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
... | crates/router/src/analytics.rs | router | function_signature | 245 | rust | null | null | null | null | get_org_sankey | null | null | null | null | null | null | null |
File: crates/router/src/core/revenue_recovery.rs
Public functions: 5
pub mod api;
pub mod transformers;
pub mod types;
use api_models::{enums, process_tracker::revenue_recovery, webhooks};
use common_utils::{
self,
errors::CustomResult,
ext_traits::{OptionExt, ValueExt},
id_type,
};
use diesel_models:... | crates/router/src/core/revenue_recovery.rs | router | full_file | 6,823 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl User {
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/user").app_data(web::Data::new(state.clone()));
route = route
.service(web::resource("").route(web::get().to(user::get_user_details)))
.service(web::resource("/signin").route(web::post().to(us... | crates/router/src/routes/app.rs | router | impl_block | 2,672 | rust | null | User | null | impl User | null | null | null | null | null | null | null | null |
impl Authentication {
pub fn is_separate_authn_required(&self) -> bool {
self.maximum_supported_version
.as_ref()
.is_some_and(|version| version.get_major() == 2)
}
} | crates/diesel_models/src/authentication.rs | diesel_models | impl_block | 48 | rust | null | Authentication | null | impl Authentication | null | null | null | null | null | null | null | null |
pub async fn payouts_create_core(
state: SessionState,
merchant_context: domain::MerchantContext,
req: payouts::PayoutCreateRequest,
) -> RouterResponse<payouts::PayoutCreateResponse> {
// Validate create request
let (payout_id, payout_method_data, profile_id, customer, payment_method) =
val... | crates/router/src/core/payouts.rs | router | function_signature | 413 | rust | null | null | null | null | payouts_create_core | null | null | null | null | null | null | null |
pub struct Money {
amount: StringMajorUnit,
currency: String,
} | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | Money | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentAttemptRecord; | crates/router/src/core/payments/operations/payment_attempt_record.rs | router | struct_definition | 6 | rust | PaymentAttemptRecord | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentIntent {
#[cfg(feature = "v1")]
pub fn get_id(&self) -> &id_type::PaymentId {
&self.payment_id
}
#[cfg(feature = "v2")]
pub fn get_id(&self) -> &id_type::GlobalPaymentId {
&self.id
}
#[cfg(feature = "v2")]
/// This is the url to which the customer will be re... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | impl_block | 1,130 | rust | null | PaymentIntent | null | impl PaymentIntent | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Itaubank {} | crates/hyperswitch_connectors/src/connectors/itaubank.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Itaubank | api::PaymentVoid for | impl api::PaymentVoid for for Itaubank | null | null | null | null | null | null | null | null |
pub struct AchVerification {
result_code_raw: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | AchVerification | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardExpirationYear(StrongSecret<u16>); | crates/cards/src/lib.rs | cards | struct_definition | 13 | rust | CardExpirationYear | null | null | null | null | null | null | null | null | null | null | null |
/// Panics if `json_payload` array does not contain one `GetFrmMetricRequest` element.
pub async fn get_frm_metrics(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<[GetFrmMetricRequest; 1]>,
) -> impl Responder {
#[allow(clippy::expect_used)]
... | crates/router/src/analytics.rs | router | function_signature | 251 | rust | null | null | null | null | get_frm_metrics | null | null | null | null | null | null | null |
pub struct GlobalpayRefreshTokenResponse {
pub token: Secret<String>,
pub seconds_to_expire: i64,
} | crates/hyperswitch_connectors/src/connectors/globalpay/response.rs | hyperswitch_connectors | struct_definition | 26 | rust | GlobalpayRefreshTokenResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Ebanx {} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Ebanx | api::PaymentVoid for | impl api::PaymentVoid for for Ebanx | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Stripe {
fn id(&self) -> &'static str {
"stripe"
}
fn common_get_content_type(&self) -> &'static str {
"application/x-www-form-urlencoded"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
// &self.base_url
connectors.stripe.... | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 478 | rust | null | Stripe | ConnectorCommon for | impl ConnectorCommon for for Stripe | null | null | null | null | null | null | null | null |
pub struct ValidateResult {
pub merchant_id: common_utils::id_type::MerchantId,
pub storage_scheme: enums::MerchantStorageScheme,
pub requeue: bool,
} | crates/router/src/core/payments/operations.rs | router | struct_definition | 38 | rust | ValidateResult | null | null | null | null | null | null | null | null | null | null | null |
pub async fn fetch_merchant_id_payment_method_id_customer_id_from_callback_mapper(
&self,
state: &SessionState,
) -> RouterResult<(id_type::MerchantId, String, id_type::CustomerId)> {
let network_token_requestor_ref_id = &self.get_network_token_requestor_ref_id();
let db = &*state.s... | crates/router/src/core/webhooks/network_tokenization_incoming.rs | router | function_signature | 148 | rust | null | null | null | null | fetch_merchant_id_payment_method_id_customer_id_from_callback_mapper | null | null | null | null | null | null | null |
pub struct WalletPayment {
#[serde(rename = "type")]
pub payment_type: PaymentType,
pub wallet_token: Secret<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_address: Option<BillingAddress>,
} | crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs | hyperswitch_connectors | struct_definition | 54 | rust | WalletPayment | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.GpayTokenizationSpecification
{
"type": "object",
"required": [
"type",
"parameters"
],
"properties": {
"type": {
"type": "string",
"description": "The token specification type(ex: PAYMENT_GATEWAY)"
},
"parameters": {
"$ref": "#/compon... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 96 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"GpayTokenizationSpecification"
] | null | null | null | null |
pub struct DecryptDataResponse {
pub data: DecryptedData,
} | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 15 | rust | DecryptDataResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_name(&self) -> Secret<String> {
self.name.clone().get_secret()
} | crates/router/src/types/domain/user.rs | router | function_signature | 22 | rust | null | null | null | null | get_name | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RequestSurchargeDetails
{
"type": "object",
"description": "Details of surcharge applied on this payment, if applicable",
"required": [
"surcharge_amount"
],
"properties": {
"surcharge_amount": {
"type": "integer",
"format": "int64",
"example": ... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 133 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RequestSurchargeDetails"
] | null | null | null | null |
impl common_utils::events::ApiEventMetric for ClientSecretResponse {
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
Some(common_utils::events::ApiEventsType::Miscellaneous)
}
} | crates/api_models/src/ephemeral_key.rs | api_models | impl_block | 53 | rust | null | ClientSecretResponse | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for ClientSecretResponse | null | null | null | null | null | null | null | null |
pub struct AvsResponse {
street_match: Option<String>,
postal_code_match: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | AvsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_paze_wallet_data(&self) -> Option<&PazeWalletData> {
if let Self::Paze(paze_wallet_data) = self {
Some(paze_wallet_data)
} else {
None
}
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | function_signature | 52 | rust | null | null | null | null | get_paze_wallet_data | null | null | null | null | null | null | null |
pub struct RefundFilters {
#[serde(default)]
pub currency: Vec<Currency>,
#[serde(default)]
pub refund_status: Vec<RefundStatus>,
#[serde(default)]
pub connector: Vec<String>,
#[serde(default)]
pub refund_type: Vec<RefundType>,
#[serde(default)]
pub profile_id: Vec<id_type::Profi... | crates/api_models/src/analytics/refunds.rs | api_models | struct_definition | 109 | rust | RefundFilters | null | null | null | null | null | null | null | null | null | null | null |
impl MerchantId {
/// Create a Merchant id from MerchantName
pub fn from_merchant_name(merchant_name: MerchantName) -> Self {
let merchant_name_string = merchant_name.into_inner();
let merchant_id_prefix = merchant_name_string.trim().to_lowercase().replace(' ', "");
let alphanumeric_id... | crates/common_utils/src/id_type/merchant.rs | common_utils | impl_block | 456 | rust | null | MerchantId | null | impl MerchantId | null | null | null | null | null | null | null | null |
pub struct NuveiPaymentsRequest {
pub time_stamp: String,
pub session_token: Secret<String>,
pub merchant_id: Secret<String>,
pub merchant_site_id: Secret<String>,
pub client_request_id: Secret<String>,
pub amount: StringMajorUnit,
pub currency: enums::Currency,
/// This ID uniquely iden... | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 227 | rust | NuveiPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct HelcimCaptureRequest {
pre_auth_transaction_id: u64,
amount: FloatMajorUnit,
ip_address: Secret<String, IpAddress>,
#[serde(skip_serializing_if = "Option::is_none")]
ecommerce: Option<bool>,
} | crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs | hyperswitch_connectors | struct_definition | 56 | rust | HelcimCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentSession for Cybersource {} | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Cybersource | PaymentSession for | impl PaymentSession for for Cybersource | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Datatrans {
fn id(&self) -> &'static str {
"datatrans"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connector... | crates/hyperswitch_connectors/src/connectors/datatrans.rs | hyperswitch_connectors | impl_block | 597 | rust | null | Datatrans | ConnectorCommon for | impl ConnectorCommon for for Datatrans | null | null | null | null | null | null | null | null |
pub struct ConnectionConfig {
/// Base URL of the connector endpoint
pub base_url: String,
/// Path to append to the base URL for the specific endpoint
pub endpoint_path: String,
/// HTTP method to use for the request
pub http_method: HttpMethod,
/// HTTP headers ... | crates/injector/src/types.rs | injector | struct_definition | 255 | rust | ConnectionConfig | null | null | null | null | null | null | null | null | null | null | null |
impl ProphetpayActionType {
fn get_action_type(&self) -> i8 {
match self {
Self::Charge => 1,
Self::Refund => 3,
Self::Inquiry => 7,
}
}
} | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | impl_block | 53 | rust | null | ProphetpayActionType | null | impl ProphetpayActionType | null | null | null | null | null | null | null | null |
impl LabelInformation {
pub fn update_target_time(&mut self, new: &Self) {
self.target_time = new.target_time;
}
pub fn update_target_count(&mut self, new: &Self) {
self.target_count = new.target_count;
}
} | crates/api_models/src/routing.rs | api_models | impl_block | 59 | rust | null | LabelInformation | null | impl LabelInformation | null | null | null | null | null | null | null | null |
pub trait ResourceExt {
fn entities(&self) -> Vec<EntityType>;
} | crates/router_derive/src/macros/generate_permissions.rs | router_derive | trait_definition | 18 | rust | null | null | ResourceExt | null | null | null | null | null | null | null | null | null |
pub amount: i64,
pub currency: String,
pub charge: String,
pub status: Shift4RefundStatus,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum Shift4RefundStatus {
Successful,
Processing,
#[default]
Failed,
}
impl TryFro... | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 635 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn str_value(input: &str) -> ParseResult<&str, ast::ValueType> {
error::context(
"str_value",
combinator::map(string_str, ast::ValueType::StrValue),
)(input)
} | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 50 | rust | null | null | null | null | str_value | null | null | null | null | null | null | null |
Documentation: crates/diesel_models/README.md
# Type: Doc File
# Storage Models
Database models shared across `router` and other crates.
| crates/diesel_models/README.md | null | doc_file | 31 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Noon {
fn id(&self) -> &'static str {
"noon"
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.noon.base_url.as_ref()
}
fn build_error_respo... | crates/hyperswitch_connectors/src/connectors/noon.rs | hyperswitch_connectors | impl_block | 419 | rust | null | Noon | ConnectorCommon for | impl ConnectorCommon for for Noon | null | null | null | null | null | null | null | null |
impl api::RefundSync for Xendit {} | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Xendit | api::RefundSync for | impl api::RefundSync for for Xendit | null | null | null | null | null | null | null | null |
pub fn get_refund_dimensions() -> Vec<NameDescription> {
RefundDimensions::iter().map(Into::into).collect()
} | crates/analytics/src/utils.rs | analytics | function_signature | 30 | rust | null | null | null | null | get_refund_dimensions | null | null | null | null | null | null | null |
File: crates/api_models/src/payment_methods.rs
Public functions: 8
Public structs: 107
use std::collections::{HashMap, HashSet};
#[cfg(feature = "v2")]
use std::str::FromStr;
use cards::CardNumber;
#[cfg(feature = "v1")]
use common_utils::crypto::OptionalEncryptableName;
use common_utils::{
consts::SURCHARGE_PE... | crates/api_models/src/payment_methods.rs#chunk0 | api_models | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConfigUpdateInternal {
pub fn create_config(self, source: Config) -> Config {
Config { ..source }
}
} | crates/diesel_models/src/configs.rs | diesel_models | impl_block | 28 | rust | null | ConfigUpdateInternal | null | impl ConfigUpdateInternal | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Cybersource {
fn validate_mandate_payment(
&self,
pm_type: Option<enums::PaymentMethodType>,
pm_data: PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::collections::HashSet::from([
PaymentM... | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | impl_block | 125 | rust | null | Cybersource | ConnectorValidation for | impl ConnectorValidation for for Cybersource | null | null | null | null | null | null | null | null |
pub async fn payments_create_intent(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsCreateIntentRequest>,
) -> impl Responder {
use hyperswitch_domain_models::payments::PaymentIntentData;
let flow = Flow::PaymentsCreateIntent;
let he... | crates/router/src/routes/payments.rs | router | function_signature | 417 | rust | null | null | null | null | payments_create_intent | null | null | null | null | null | null | null |
impl Capturable for PaymentsCancelData {
fn get_captured_amount<F>(
&self,
_amount_captured: Option<i64>,
payment_data: &PaymentData<F>,
) -> Option<i64>
where
F: Clone,
{
// return previously captured amount
payment_data
.payment_intent
... | crates/router/src/types.rs | router | impl_block | 383 | rust | null | PaymentsCancelData | Capturable for | impl Capturable for for PaymentsCancelData | null | null | null | null | null | null | null | null |
impl AuthenticationStatus {
pub fn is_terminal_status(self) -> bool {
match self {
Self::Started | Self::Pending => false,
Self::Success | Self::Failed => true,
}
}
pub fn is_failed(self) -> bool {
self == Self::Failed
}
} | crates/common_enums/src/enums.rs | common_enums | impl_block | 65 | rust | null | AuthenticationStatus | null | impl AuthenticationStatus | null | null | null | null | null | null | null | null |
pub struct GenericExpiredLinkData {
pub title: String,
pub message: String,
pub theme: String,
} | crates/hyperswitch_domain_models/src/api.rs | hyperswitch_domain_models | struct_definition | 26 | rust | GenericExpiredLinkData | null | null | null | null | null | null | null | null | null | null | null |
pub struct NexixpayConnectorMetaData {
pub three_d_s_auth_result: Option<ThreeDSAuthResult>,
pub three_d_s_auth_response: Option<Secret<String>>,
pub authorization_operation_id: Option<String>,
pub capture_operation_id: Option<String>,
pub cancel_operation_id: Option<String>,
pub psync_flow: Nex... | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | struct_definition | 76 | rust | NexixpayConnectorMetaData | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Prophetpay {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&PROPHETPAY_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*PROPHETPAY_SUPPORTED_PAYMENT_METHODS)
}
fn... | crates/hyperswitch_connectors/src/connectors/prophetpay.rs | hyperswitch_connectors | impl_block | 111 | rust | null | Prophetpay | ConnectorSpecifications for | impl ConnectorSpecifications for for Prophetpay | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentMethodResponse
{
"type": "object",
"required": [
"merchant_id",
"payment_method_id",
"payment_method"
],
"properties": {
"merchant_id": {
"type": "string",
"description": "Unique identifier for a merchant",
"example": "merchant_1671... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 775 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentMethodResponse"
] | null | null | null | null |
.map(|s| format!("{s:?}").to_uppercase())
.unwrap_or_else(|| "UNKNOWN".to_string());
let to_sign = transformers::concat_strings(&[
secret_str.to_string(),
notification.chargeback_amount.unwrap_or_default(),
... | crates/hyperswitch_connectors/src/connectors/nuvei.rs#chunk1 | hyperswitch_connectors | chunk | 2,358 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/gsm/get"
{
"post": {
"tags": [
"Gsm"
],
"summary": "Gsm - Get",
"description": "Retrieves a Gsm Rule",
"operationId": "Retrieve Gsm Rule",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 212 | .json | null | null | null | null | null | openapi_spec | paths | [
"/gsm/get"
] | null | null | null | null |
pub struct AuthenticationInfo {
pub authentication_type: Option<String>,
pub authentication_reasons: Option<Vec<String>>,
pub consent_received: bool,
pub is_authenticated: bool,
pub locale: Option<String>,
pub supported_card_brands: Option<String>,
pub encrypted_payload: Option<Secret<String... | crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs | hyperswitch_domain_models | struct_definition | 65 | rust | AuthenticationInfo | null | null | null | null | null | null | null | null | null | null | null |
pub struct Links {
#[serde(rename = "self")]
self_: Option<Link>,
checkout: Option<Link>,
dashboard: Option<Link>,
documentation: Option<Link>,
} | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | Links | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_gateway_score_with_open_router(
state: &SessionState,
payment_connector: api_routing::RoutableConnectorChoice,
profile_id: &common_utils::id_type::ProfileId,
merchant_id: &common_utils::id_type::MerchantId,
payment_id: &common_utils::id_type::PaymentId,
payment_status: common... | crates/router/src/core/payments/routing.rs | router | function_signature | 522 | rust | null | null | null | null | update_gateway_score_with_open_router | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/payme/transformers.rs
Public structs: 30
use std::collections::HashMap;
use api_models::enums::{AuthenticationType, PaymentMethod};
use common_enums::enums;
use common_utils::{
pii,
types::{MinorUnit, StringMajorUnit},
};
use error_stack::ResultExt;
use hype... | crates/hyperswitch_connectors/src/connectors/payme/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,185 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Address {
pub country: enums::CountryAlpha2,
pub state_province: Secret<String>,
pub street: Secret<String>,
pub city: String,
pub postal_code: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | Address | null | null | null | null | null | null | null | null | null | null | null |
pub struct RoutingVolumeSplitResponse {
pub split: u8,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 15 | rust | RoutingVolumeSplitResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct RecoveryDeciderClientConfig {
/// Base URL of the Recovery Decider service
pub base_url: String,
} | crates/external_services/src/grpc_client/revenue_recovery/recovery_decider_client.rs | external_services | struct_definition | 27 | rust | RecoveryDeciderClientConfig | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Prophetpay {} | crates/hyperswitch_connectors/src/connectors/prophetpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Prophetpay | api::PaymentSession for | impl api::PaymentSession for for Prophetpay | null | null | null | null | null | null | null | null |
pub struct PreAuthentication; | crates/hyperswitch_domain_models/src/router_flow_types/authentication.rs | hyperswitch_domain_models | struct_definition | 5 | rust | PreAuthentication | null | null | null | null | null | null | null | null | null | null | null |
impl std::fmt::Display for RoutingApproach {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Exploitation => write!(f, "Exploitation"),
Self::Exploration => write!(f, "Exploration"),
Self::Elimination => write!(f, "Elimination"),
... | crates/router/src/core/payments/routing/utils.rs | router | impl_block | 129 | rust | null | RoutingApproach | std::fmt::Display for | impl std::fmt::Display for for RoutingApproach | null | null | null | null | null | null | null | null |
impl api::PaymentsCompleteAuthorize for Barclaycard {} | crates/hyperswitch_connectors/src/connectors/barclaycard.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Barclaycard | api::PaymentsCompleteAuthorize for | impl api::PaymentsCompleteAuthorize for for Barclaycard | null | null | null | null | null | null | null | null |
pub struct WeChatPayQr {} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 8 | rust | WeChatPayQr | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentLinkBackgroundImageConfig {
pub url: common_utils::types::Url,
pub position: Option<common_enums::ElementPosition>,
pub size: Option<common_enums::ElementSize>,
} | crates/diesel_models/src/business_profile.rs | diesel_models | struct_definition | 46 | rust | PaymentLinkBackgroundImageConfig | null | null | null | null | null | null | null | null | null | null | null |
pub(super) fn validate_payout_list_request(
req: &payouts::PayoutListConstraints,
) -> CustomResult<(), errors::ApiErrorResponse> {
use common_utils::consts::PAYOUTS_LIST_MAX_LIMIT_GET;
utils::when(
req.limit > PAYOUTS_LIST_MAX_LIMIT_GET || req.limit < 1,
|| {
Err(errors::ApiErr... | crates/router/src/core/payouts/validator.rs | router | function_signature | 120 | rust | null | null | null | null | validate_payout_list_request | null | null | null | null | null | null | null |
pub fn from_option_secret_value(
value: Option<common_utils::pii::SecretSerdeValue>,
) -> common_utils::errors::CustomResult<Self, common_utils::errors::ParsingError> {
value
.parse_value::<Self>("ConnectorAuthType")
.change_context(common_utils::errors::ParsingError::StructP... | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | function_signature | 83 | rust | null | null | null | null | from_option_secret_value | null | null | null | null | null | null | null |
pub struct References {
pub merchant_reference: String,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | References | null | null | null | null | null | null | null | null | null | null | null |
pub struct StripeConnectErrorResponse {
pub error: ErrorDetails,
} | crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs | hyperswitch_connectors | struct_definition | 14 | rust | StripeConnectErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_updated_vault_data(
existing_vault_data: Option<&Self>,
payment_method_data: &payment_method_data::PaymentMethodData,
) -> Option<Self> {
match (existing_vault_data, payment_method_data) {
(None, payment_method_data::PaymentMethodData::Card(card)) => {
... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 336 | rust | null | null | null | null | get_updated_vault_data | null | null | null | null | null | null | null |
pub async fn list_merchant_account(
state: SessionState,
organization_id: api_models::organization::OrganizationId,
) -> RouterResponse<Vec<api::MerchantAccountResponse>> {
let merchant_accounts = state
.store
.list_merchant_accounts_by_organization_id(
&(&state).into(),
... | crates/router/src/core/admin.rs | router | function_signature | 182 | rust | null | null | null | null | list_merchant_account | null | null | null | null | null | null | null |
pub struct TransactionFraudInfo {
fraud_session_id: String,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | TransactionFraudInfo | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponse {
id: String,
status: RefundStatus,
} | crates/hyperswitch_connectors/src/connectors/bluecode/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl GlobalStorageInterface for Store {
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
Box::new(self.clone())
}
} | crates/router/src/db.rs | router | impl_block | 41 | rust | null | Store | GlobalStorageInterface for | impl GlobalStorageInterface for for Store | null | null | null | null | null | null | null | null |
pub fn new(
tenant_id: common_utils::id_type::TenantId,
connector_name: String,
flow: &str,
request: serde_json::Value,
url: String,
method: Method,
payment_id: String,
merchant_id: common_utils::id_type::MerchantId,
request_id: Option<&RequestId>,... | crates/hyperswitch_interfaces/src/events/connector_api_logs.rs | hyperswitch_interfaces | function_signature | 270 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct NordeaPaymentsConfirmResponse {
/// HATEOAS inspired links: 'rel' and 'href'
#[serde(rename = "_links")]
pub links: Option<Vec<NordeaResponseLinks>>,
/// Error description
pub errors: Option<Vec<NordeaPaymentsConfirmErrorObject>>,
/// External response header
pub group_header: Opt... | crates/hyperswitch_connectors/src/connectors/nordea/responses.rs | hyperswitch_connectors | struct_definition | 118 | rust | NordeaPaymentsConfirmResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Blackhawknetwork {} | crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Blackhawknetwork | api::RefundExecute for | impl api::RefundExecute for for Blackhawknetwork | null | null | null | null | null | null | null | null |
File: crates/router/src/db/gsm.rs
use diesel_models::gsm as storage;
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait GsmInterface {
as... | crates/router/src/db/gsm.rs | router | full_file | 1,655 | null | null | 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.