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 api::PaymentVoid for Worldpayvantiv {} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Worldpayvantiv | api::PaymentVoid for | impl api::PaymentVoid for for Worldpayvantiv | null | null | null | null | null | null | null | null |
pub async fn get_groups_and_resources_for_role_from_token(
state: SessionState,
user_from_token: UserFromToken,
) -> UserResponse<role_api::GroupsAndResources> {
let role_info = user_from_token.get_role_info_from_db(&state).await?;
let groups = role_info
.get_permission_groups()
.into_i... | crates/router/src/core/user_role/role.rs | router | function_signature | 142 | rust | null | null | null | null | get_groups_and_resources_for_role_from_token | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.AdditionalMerchantData
{
"oneOf": [
{
"type": "object",
"required": [
"open_banking_recipient_data"
],
"properties": {
"open_banking_recipient_data": {
"$ref": "#/components/schemas/MerchantRecipientData"
}
}
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 83 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"AdditionalMerchantData"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.SuccessBasedRoutingConfig
{
"type": "object",
"required": [
"decision_engine_configs"
],
"properties": {
"params": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DynamicRoutingConfigParams"
},
"nullable": true
},
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 157 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"SuccessBasedRoutingConfig"
] | null | null | null | null |
File: crates/hyperswitch_domain_models/src/payouts.rs
Public structs: 1
pub mod payout_attempt;
#[allow(clippy::module_inception)]
pub mod payouts;
use common_enums as storage_enums;
use common_utils::{consts, id_type};
use time::PrimitiveDateTime;
pub enum PayoutFetchConstraints {
Single { payout_id: id_type::... | crates/hyperswitch_domain_models/src/payouts.rs | hyperswitch_domain_models | full_file | 853 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BarclaycardAuthType {
pub(super) api_key: Secret<String>,
pub(super) merchant_account: Secret<String>,
pub(super) api_secret: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | BarclaycardAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub async fn backfill_metadata(
state: &SessionState,
user: &UserFromToken,
key: &DBEnum,
) -> UserResult<Option<DashboardMetadata>> {
let key_store = state
.store
.get_merchant_key_store_by_merchant_id(
&state.into(),
&user.merchant_id,
&state.store.g... | crates/router/src/core/user/dashboard_metadata.rs | router | function_signature | 643 | rust | null | null | null | null | backfill_metadata | null | null | null | null | null | null | null |
pub async fn payments_external_authentication(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsExternalAuthenticationRequest>,
path: web::Path<common_utils::id_type::PaymentId>,
) -> impl Responder {
let flow = Flow::PaymentsExternalAuthen... | crates/router/src/routes/payments.rs | router | function_signature | 256 | rust | null | null | null | null | payments_external_authentication | null | null | null | null | null | null | null |
pub async fn relay_retrieve() {} | crates/openapi/src/routes/relay.rs | openapi | function_signature | 8 | rust | null | null | null | null | relay_retrieve | null | null | null | null | null | null | null |
pub async fn refund_retrieve_core_with_refund_id(
state: SessionState,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
request: refunds::RefundsRetrieveRequest,
) -> errors::RouterResponse<refunds::RefundResponse> {
let refund_id = request.refund_id.clone();
let db = &*state... | crates/router/src/core/refunds_v2.rs | router | function_signature | 202 | rust | null | null | null | null | refund_retrieve_core_with_refund_id | null | null | null | null | null | null | null |
File: crates/storage_impl/src/redis/cache.rs
Public functions: 12
Public structs: 3
use std::{
any::Any,
borrow::Cow,
fmt::Debug,
sync::{Arc, LazyLock},
};
use common_utils::{
errors::{self, CustomResult},
ext_traits::ByteSliceExt,
};
use dyn_clone::DynClone;
use error_stack::{Report, Result... | crates/storage_impl/src/redis/cache.rs | storage_impl | full_file | 4,041 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_id_type_by_key_from_headers<T: FromStr>(
key: String,
headers: &HeaderMap,
) -> RouterResult<Option<T>> {
get_header_value_by_key(key.clone(), headers)?
.map(|str_value| T::from_str(str_value))
.transpose()
.map_err(|_err| {
error_stack::report!(errors::ApiErro... | crates/router/src/services/authentication.rs | router | function_signature | 110 | rust | null | null | null | null | get_id_type_by_key_from_headers | null | null | null | null | null | null | null |
impl<'a> NetworkTokenizationBuilder<'a, TokenizeWithPmId> {
pub fn new() -> Self {
Self {
state: std::marker::PhantomData,
customer: None,
card: None,
card_cvc: None,
network_token: None,
stored_card: None,
stored_token: Non... | crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs | router | impl_block | 387 | rust | null | NetworkTokenizationBuilder | null | impl NetworkTokenizationBuilder | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/customers.rs
pub use diesel_models::customers::{Customer, CustomerNew, CustomerUpdateInternal};
#[cfg(feature = "v2")]
pub use crate::types::domain::CustomerGeneralUpdate;
pub use crate::types::domain::CustomerUpdate;
| crates/router/src/types/storage/customers.rs | router | full_file | 58 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn server(config: routes::AppState) -> Scope {
web::scope("/webhooks")
.app_data(web::Data::new(config))
.service(
web::resource("/{merchant_id}/{connector_name}")
.route(
web::post().to(webhooks::receive_incoming_webhook::<... | crates/router/src/compatibility/stripe/app.rs | router | function_signature | 106 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl Responder {
use hyperswitch_domain_models::payments::PaymentIntentData;
let flow = Flow::PaymentsSessionToken;
let global_payment_id = path.into_inner();
tracing::Span::current().record("payment_id", global_payment_id.get_string_repr());
let internal_payload = internal_payload_types::Payments... | crates/router/src/routes/payments.rs | router | impl_block | 373 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl Serialize for EncryptedData {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
let data = String::from_utf8(self.data.peek().clone()).map_err(ser::Error::custom)?;
serializer.serialize_str(data.as_str())
}
} | crates/common_utils/src/types/keymanager.rs | common_utils | impl_block | 75 | rust | null | EncryptedData | Serialize for | impl Serialize for for EncryptedData | null | null | null | null | null | null | null | null |
pub struct UserOrgMerchantCreateRequest {
pub organization_name: Secret<String>,
pub organization_details: Option<pii::SecretSerdeValue>,
pub metadata: Option<pii::SecretSerdeValue>,
pub merchant_name: Secret<String>,
} | crates/api_models/src/user.rs | api_models | struct_definition | 52 | rust | UserOrgMerchantCreateRequest | null | null | null | null | null | null | null | null | null | null | null |
impl std::str::FromStr for PaymentReferenceId {
type Err = error_stack::Report<ValidationError>;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let cow_string = std::borrow::Cow::Owned(s.to_string());
Self::try_from(cow_string)
}
} | crates/common_utils/src/id_type/payment.rs | common_utils | impl_block | 69 | rust | null | PaymentReferenceId | std::str::FromStr for | impl std::str::FromStr for for PaymentReferenceId | null | null | null | null | null | null | null | null |
pub async fn payments_list(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
payload: web::Query<payment_types::PaymentListConstraints>,
) -> impl Responder {
let flow = Flow::PaymentsList;
let payload = payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
... | crates/router/src/routes/payments.rs | router | function_signature | 223 | rust | null | null | null | null | payments_list | null | null | null | null | null | null | null |
File: crates/api_models/src/events/external_service_auth.rs
use common_utils::events::{ApiEventMetric, ApiEventsType};
use crate::external_service_auth::{
ExternalSignoutTokenRequest, ExternalTokenResponse, ExternalVerifyTokenRequest,
ExternalVerifyTokenResponse,
};
impl ApiEventMetric for ExternalTokenRespo... | crates/api_models/src/events/external_service_auth.rs | api_models | full_file | 217 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentInfo
{
"type": "object",
"required": [
"paymentId",
"amount",
"currency",
"paymentType",
"paymentMethodType",
"paymentMethod"
],
"properties": {
"paymentId": {
"type": "string"
},
"amount": {
"$ref": "#/components/sche... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 211 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentInfo"
] | null | null | null | null |
impl api::PaymentCapture for Coingate {} | crates/hyperswitch_connectors/src/connectors/coingate.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Coingate | api::PaymentCapture for | impl api::PaymentCapture for for Coingate | null | null | null | null | null | null | null | null |
pub fn get_payment_experience(
connector: Connector,
payment_method_type: PaymentMethodType,
payment_method: PaymentMethod,
payment_experience: Option<api_models::enums::PaymentExperience>,
) -> Option<api_models::enums::PaymentExperience> {
match payment_method {
... | crates/connector_configs/src/transformer.rs | connector_configs | function_signature | 420 | rust | null | null | null | null | get_payment_experience | null | null | null | null | null | null | null |
pub struct Components {
subtotal: Option<f64>,
} | crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | Components | null | null | null | null | null | null | null | null | null | null | null |
pub struct StaxAuthType {
pub(super) api_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/stax/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | StaxAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct WellsfargoTokenInformation {
payment_instrument: Option<WellsfargoPaymentInstrument>,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | WellsfargoTokenInformation | null | null | null | null | null | null | null | null | null | null | null |
impl User {
pub async fn find_by_user_email(
conn: &PgPooledConn,
user_email: &pii::Email,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
users_dsl::email.eq(user_email.to_owned()),
)
.await
}
... | crates/diesel_models/src/query/user.rs | diesel_models | impl_block | 530 | rust | null | User | null | impl User | null | null | null | null | null | null | null | null |
pub struct EncryptableAddress {
pub line1: crypto::OptionalEncryptableSecretString,
pub line2: crypto::OptionalEncryptableSecretString,
pub line3: crypto::OptionalEncryptableSecretString,
pub state: crypto::OptionalEncryptableSecretString,
pub zip: crypto::OptionalEncryptableSecretString,
pub fi... | crates/diesel_models/src/address.rs | diesel_models | struct_definition | 133 | rust | EncryptableAddress | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_metrics(
pool: &AnalyticsProvider,
publishable_key: &String,
merchant_id: &common_utils::id_type::MerchantId,
req: GetActivePaymentsMetricRequest,
) -> AnalyticsResult<MetricsResponse<MetricsBucketResponse>> {
let mut metrics_accumulator: HashMap<
ActivePaymentsMetricsBucket... | crates/analytics/src/active_payments/core.rs | analytics | function_signature | 447 | rust | null | null | null | null | get_metrics | null | null | null | null | null | null | null |
pub async fn retrieve_payment_method_from_vault(
state: &routes::SessionState,
merchant_context: &domain::MerchantContext,
profile: &domain::Profile,
pm: &domain::PaymentMethod,
) -> RouterResult<pm_types::VaultRetrieveResponse> {
let is_external_vault_enabled = profile.is_external_vault_enabled();
... | crates/router/src/core/payment_methods/vault.rs | router | function_signature | 353 | rust | null | null | null | null | retrieve_payment_method_from_vault | null | null | null | null | null | null | null |
pub struct AddressDetails {
name: Secret<String>,
address_line_1: Secret<String>,
address_line_2: Option<Secret<String>>,
address_line_3: Option<Secret<String>>,
city: String,
state_or_region: Secret<String>,
postal_code: Secret<String>,
country_code: Option<common_enums::CountryAlpha2>,... | crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs | hyperswitch_connectors | struct_definition | 84 | rust | AddressDetails | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Affirm {} | crates/hyperswitch_connectors/src/connectors/affirm.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Affirm | api::RefundSync for | impl api::RefundSync for for Affirm | null | null | null | null | null | null | null | null |
pub struct OrganizationNew {
id: id_type::OrganizationId,
organization_name: Option<String>,
pub organization_details: Option<pii::SecretSerdeValue>,
pub metadata: Option<pii::SecretSerdeValue>,
pub created_at: time::PrimitiveDateTime,
pub modified_at: time::PrimitiveDateTime,
pub version: c... | crates/diesel_models/src/organization.rs | diesel_models | struct_definition | 107 | rust | OrganizationNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantIdAndProfileIdAuth {
pub merchant_id: id_type::MerchantId,
pub profile_id: id_type::ProfileId,
} | crates/router/src/services/authentication.rs | router | struct_definition | 32 | rust | MerchantIdAndProfileIdAuth | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payment_methods/tokenize.rs
Public functions: 3
Public structs: 4
use actix_multipart::form::{bytes::Bytes, text::Text, MultipartForm};
use api_models::{enums as api_enums, payment_methods as payment_methods_api};
use cards::CardNumber;
use common_utils::{
crypto::Encryptable,
id... | crates/router/src/core/payment_methods/tokenize.rs | router | full_file | 3,271 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ConfigKeyDelete;
let key = path.into_inner();
api::server_wrap(
flow,
state,
&req,
key,
|state, _, key, _| configs::config_delete(state, key),
&ADMIN_API_AUTH,
api_locking::LockAction::NotApplicable,
)
.await
... | crates/router/src/routes/configs.rs | router | impl_block | 82 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn update_gateway_score_helper_with_open_router(
state: &SessionState,
payment_attempt: &storage::PaymentAttempt,
profile_id: &id_type::ProfileId,
dynamic_routing_algo_ref: routing_types::DynamicRoutingAlgorithmRef,
) -> RouterResult<()> {
let is_success_rate_routing_enabled =
dyna... | crates/router/src/core/routing/helpers.rs | router | function_signature | 372 | rust | null | null | null | null | update_gateway_score_helper_with_open_router | null | null | null | null | null | null | null |
connectors::Bankofamerica,
connectors::Barclaycard,
connectors::Billwerk,
connectors::Bitpay,
connectors::Blackhawknetwork,
connectors::Bluecode,
connectors::Bluesnap,
connectors::Braintree,
connectors::Boku,
connectors::Breadpay,
connectors::Cashtocode,
connectors::Celer... | crates/hyperswitch_connectors/src/default_implementations.rs#chunk3 | hyperswitch_connectors | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/customers/customers--update.mdx
# Type: Doc File
---
openapi: post /customers/{customer_id}
--- | api-reference/v1/customers/customers--update.mdx | null | doc_file | 33 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Payme {} | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Payme | api::RefundExecute for | impl api::RefundExecute for for Payme | null | null | null | null | null | null | null | null |
pub async fn update_user_role(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<user_role_api::UpdateUserRoleRequest>,
) -> HttpResponse {
let flow = Flow::UpdateUserRole;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
state.clone()... | crates/router/src/routes/user_role.rs | router | function_signature | 128 | rust | null | null | null | null | update_user_role | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.GiftCardResponse
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/GiftCardAdditionalData"
}
],
"nullable": true
},
{
"type": "object"
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 71 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"GiftCardResponse"
] | null | null | null | null |
pub struct CustomerDeleteResponse {
pub id: id_type::CustomerId,
pub deleted: bool,
} | crates/router/src/compatibility/stripe/customers/types.rs | router | struct_definition | 22 | rust | CustomerDeleteResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_grpc_client_interface(&self) -> Arc<GrpcClients> {
#[cfg(any(feature = "dynamic_routing", feature = "revenue_recovery"))]
let client =
hyper_util::client::legacy::Client::builder(hyper_util::rt::TokioExecutor::new())
.http2_only(true)
.build_h... | crates/external_services/src/grpc_client.rs | external_services | function_signature | 440 | rust | null | null | null | null | get_grpc_client_interface | null | null | null | null | null | null | null |
pub struct BusinessCollectLinkConfig {
#[serde(flatten)]
pub config: BusinessGenericLinkConfig,
/// List of payment methods shown on collect UI
#[schema(value_type = Vec<EnabledPaymentMethod>, example = r#"[{"payment_method": "bank_transfer", "payment_method_types": ["ach", "bacs", "sepa"]}]"#)]
pu... | crates/api_models/src/admin.rs | api_models | struct_definition | 92 | rust | BusinessCollectLinkConfig | null | null | null | null | null | null | null | null | null | null | null |
pub async fn persist_individual_surcharge_details_in_redis(
&self,
state: &SessionState,
business_profile: &Profile,
) -> RouterResult<()> {
if !self.is_empty_result() {
let redis_conn = state
.store
.get_redis_conn()
.chang... | crates/router/src/core/payments/types.rs | router | function_signature | 313 | rust | null | null | null | null | persist_individual_surcharge_details_in_redis | null | null | null | null | null | null | null |
impl EventLogger {
#[track_caller]
pub(super) fn log_event<T: KafkaMessage>(&self, event: &T) {
logger::info!(event = ?event.masked_serialize().unwrap_or_else(|e| serde_json::json!({"error": e.to_string()})), event_type =? event.event_type(), event_id =? event.key(), log_type =? "event");
}
} | crates/router/src/events/event_logger.rs | router | impl_block | 87 | rust | null | EventLogger | null | impl EventLogger | null | null | null | null | null | null | null | null |
pub struct GocardlessError {
pub message: String,
pub code: u16,
pub errors: Vec<Error>,
#[serde(rename = "type")]
pub error_type: String,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | GocardlessError | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/dlocal.rs
Public functions: 1
#![allow(clippy::print_stdout)]
use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
... | crates/router/tests/connectors/dlocal.rs | router | full_file | 3,228 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundUpdateMems {
pub orig: Refund,
pub update_data: RefundUpdate,
} | crates/diesel_models/src/kv.rs | diesel_models | struct_definition | 25 | rust | RefundUpdateMems | null | null | null | null | null | null | null | null | null | null | null |
pub struct GroupsAndResources {
pub groups: Vec<PermissionGroup>,
pub resources: Vec<Resource>,
} | crates/api_models/src/user_role/role.rs | api_models | struct_definition | 23 | rust | GroupsAndResources | null | null | null | null | null | null | null | null | null | null | null |
pub struct RedirectPayload {
#[serde(rename = "PaRes")]
pa_res: Option<Secret<String>>,
#[serde(rename = "paymentId")]
payment_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | struct_definition | 41 | rust | RedirectPayload | null | null | null | null | null | null | null | null | null | null | null |
pub fn build_refund_sync_request(item: &RefundSyncRouterData) -> Result<Vec<u8>, Error> {
let transaction_type = transaction_type::REFUND.to_owned();
let auth = RedsysAuthType::try_from(&item.connector_auth_type)?;
let connector_transaction_id = item.request.connector_transaction_id.clone();
construct_s... | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | function_signature | 83 | rust | null | null | null | null | build_refund_sync_request | null | null | null | null | null | null | null |
pub struct PayoutLinkInitiateRequest {
#[schema(value_type = String)]
pub merchant_id: id_type::MerchantId,
#[schema(value_type = String)]
pub payout_id: id_type::PayoutId,
} | crates/api_models/src/payouts.rs | api_models | struct_definition | 49 | rust | PayoutLinkInitiateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn four_digits(&self) -> String {
self.peek().to_string()
} | crates/cards/src/lib.rs | cards | function_signature | 19 | rust | null | null | null | null | four_digits | null | null | null | null | null | null | null |
pub async fn routing_update_default_config_for_profile(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::ProfileId>,
json_payload: web::Json<Vec<routing_types::RoutableConnectorChoice>>,
transaction_type: &enums::TransactionType,
) -> impl Responder {
let rout... | crates/router/src/routes/routing.rs | router | function_signature | 309 | rust | null | null | null | null | routing_update_default_config_for_profile | null | null | null | null | null | null | null |
pub struct LoanInformation {
pub fees: Option<LoanFees>,
} | crates/hyperswitch_connectors/src/connectors/affirm/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | LoanInformation | null | null | null | null | null | null | null | null | null | null | null |
/// Convert the amount to its base denomination based on Currency and return f64
pub fn to_currency_base_unit_asf64(self, amount: i64) -> Result<f64, TryFromIntError> {
let amount_f64: f64 = u32::try_from(amount)?.into();
let amount = if self.is_zero_decimal_currency() {
amount_f64
... | crates/common_enums/src/enums.rs | common_enums | function_signature | 139 | rust | null | null | null | null | to_currency_base_unit_asf64 | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::{ext_traits::ConfigExt, fp_utils::when};
match self {
Self::Basic { username, password } => {
when(username.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationVa... | crates/analytics/src/opensearch.rs | analytics | function_signature | 184 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
pub struct ErrorInformation {
pub message: String,
pub reason: String,
pub details: Option<Vec<Details>>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 27 | rust | ErrorInformation | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router_derive/src/macros/generate_schema.rs
Public functions: 1
Public structs: 1
use std::collections::{HashMap, HashSet};
use indexmap::IndexMap;
use syn::{self, parse::Parse, parse_quote, punctuated::Punctuated, Token};
use crate::macros::helpers;
/// Parse schemas from attribute
/// Example
///
/... | crates/router_derive/src/macros/generate_schema.rs | router_derive | full_file | 1,949 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn debug_as_display_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ast = syn::parse_macro_input!(input as syn::DeriveInput);
let tokens =
macros::debug_as_display_inner(&ast).unwrap_or_else(|error| error.to_compile_error());
tokens.into()
} | crates/router_derive/src/lib.rs | router_derive | function_signature | 70 | rust | null | null | null | null | debug_as_display_derive | null | null | null | null | null | null | null |
pub struct BraintreeRefundResponseData {
pub refund_transaction: BraintreeRefundTransaction,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | BraintreeRefundResponseData | null | null | null | null | null | null | null | null | null | null | null |
pub struct EventDetails {
pub id: String,
pub payment_request_id: Option<String>,
pub amount: FloatMajorUnit,
pub currency: String,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | EventDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProfileWrapper {
pub profile: domain::Profile,
} | crates/router/src/core/admin.rs | router | struct_definition | 14 | rust | ProfileWrapper | null | null | null | null | null | null | null | null | null | null | null |
/// A trait for types that can be constructed from encoded data in the form of a String.
pub trait FromEncoded: Sized {
/// Constructs an instance of the type from the provided encoded input.
///
/// # Parameters
///
/// - `input`: A String containing the encoded data.
///
/// # Returns
... | crates/external_services/src/hashicorp_vault/core.rs | external_services | trait_definition | 193 | rust | null | null | FromEncoded | null | null | null | null | null | null | null | null | null |
pub struct UserMerchantCreate {
pub company_name: String,
pub product_type: Option<common_enums::MerchantProductType>,
pub merchant_account_type: Option<common_enums::MerchantAccountRequestType>,
} | crates/api_models/src/user.rs | api_models | struct_definition | 46 | rust | UserMerchantCreate | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_refund_body(
req: &BamboraapacRouterData<&types::RefundExecuteRouterData>,
) -> Result<Vec<u8>, Error> {
let receipt = req.router_data.request.connector_transaction_id.to_owned();
let auth_details = BamboraapacAuthType::try_from(&req.router_data.connector_auth_type)?;
let body = format!(
... | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | function_signature | 300 | rust | null | null | null | null | get_refund_body | null | null | null | null | null | null | null |
pub struct RedirectResponse {
pub param: Option<Secret<String>>,
pub json_payload: Option<pii::SecretSerdeValue>,
} | crates/diesel_models/src/types.rs | diesel_models | struct_definition | 29 | rust | RedirectResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Payme {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&PAYME_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*PAYME_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_... | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Payme | ConnectorSpecifications for | impl ConnectorSpecifications for for Payme | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs
Public functions: 1
Public structs: 24
use std::collections::HashMap;
use api_models::payments::PollConfig;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
pii::{self, Email, IpAddress},
types::MinorUnit,
};
u... | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | hyperswitch_connectors | full_file | 4,818 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct MandatePaymentRequest {
#[serde(rename = "DATEQ")]
pub date: String,
#[serde(rename = "TYPE")]
pub transaction_type: String,
#[serde(rename = "NUMQUESTION")]
pub paybox_request_number: String,
#[serde(rename = "MONTANT")]
pub amount: MinorUnit,
#[serde(rename = "REFERE... | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 239 | rust | MandatePaymentRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/openapi/src/routes/three_ds_decision_rule.rs
Public functions: 1
/// 3DS Decision - Execute
#[utoipa::path(
post,
path = "/three_ds_decision/execute",
request_body = ThreeDsDecisionRuleExecuteRequest,
responses(
(status = 200, description = "3DS Decision Rule Executed Successfully... | crates/openapi/src/routes/three_ds_decision_rule.rs | openapi | full_file | 147 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BitpayRefundRequest {
pub amount: FloatMajorUnit,
} | crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | BitpayRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn execute_authentication_token<
F: Clone + 'static,
Req: Debug + Clone + 'static,
Res: Debug + Clone + 'static,
>(
state: &SessionState,
connector: &api_types::ConnectorData,
router_data: &types::RouterData<F, Req, Res>,
) -> RouterResult<Option<types::AccessTokenAuthenticationRespons... | crates/router/src/core/payments/access_token.rs | router | function_signature | 594 | rust | null | null | null | null | execute_authentication_token | null | null | null | null | null | null | null |
pub fn get_payment_response_hash_key(&self) -> Option<String> {
self.payment_response_hash_key.clone().or(Some(
common_utils::crypto::generate_cryptographically_secure_random_string(64),
))
} | crates/api_models/src/admin.rs | api_models | function_signature | 47 | rust | null | null | null | null | get_payment_response_hash_key | null | null | null | null | null | null | null |
File: crates/analytics/src/api_event/types.rs
use api_models::analytics::api_event::{ApiEventDimensions, ApiEventFilters};
use error_stack::ResultExt;
use crate::{
query::{QueryBuilder, QueryFilter, QueryResult, ToSql},
types::{AnalyticsCollection, AnalyticsDataSource},
};
impl<T> QueryFilter<T> for ApiEvent... | crates/analytics/src/api_event/types.rs | analytics | full_file | 258 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/db/customers.rs
pub use hyperswitch_domain_models::customer::{CustomerInterface, CustomerListConstraints};
| crates/router/src/db/customers.rs | router | full_file | 26 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PazeWalletData
{
"type": "object",
"required": [
"complete_response"
],
"properties": {
"complete_response": {
"type": "string"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 56 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PazeWalletData"
] | null | null | null | null |
impl Capturable for PaymentsRejectData {} | crates/router/src/types.rs | router | impl_block | 8 | rust | null | PaymentsRejectData | Capturable for | impl Capturable for for PaymentsRejectData | null | null | null | null | null | null | null | null |
File: crates/openapi/src/routes/merchant_account.rs
Public functions: 10
#[cfg(feature = "v1")]
/// Merchant Account - Create
///
/// Create a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.
#[utoipa::path(
post,
path = "/accounts... | crates/openapi/src/routes/merchant_account.rs | openapi | full_file | 2,366 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Prophetpay {} | crates/hyperswitch_connectors/src/connectors/prophetpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Prophetpay | api::RefundSync for | impl api::RefundSync for for Prophetpay | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/merchant-account/merchant-account--update.mdx
# Type: Doc File
---
openapi: post /accounts/{account_id}
--- | api-reference/v1/merchant-account/merchant-account--update.mdx | null | doc_file | 35 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl EmailClient for AwsSes {
type RichText = Body;
fn convert_to_rich_text(
&self,
intermediate_string: IntermediateString,
) -> CustomResult<Self::RichText, EmailError> {
let email_body = Body::builder()
.html(
Content::builder()
.da... | crates/external_services/src/email/ses.rs | external_services | impl_block | 386 | rust | null | AwsSes | EmailClient for | impl EmailClient for for AwsSes | null | null | null | null | null | null | null | null |
/// Maps from proto WebhookEventType enum values to IncomingWebhookEvent variants
pub fn from_ucs_event_type(event_type: i32) -> Self {
match event_type {
0 => Self::EventNotSupported,
// Payment intent events
1 => Self::PaymentIntentFailure,
2 => Self::Paymen... | crates/api_models/src/webhooks.rs | api_models | function_signature | 573 | rust | null | null | null | null | from_ucs_event_type | null | null | null | null | null | null | null |
pub struct CurrencyFactors {
/// The factor that will be multiplied to provide Currency output
pub to_factor: Decimal,
/// The factor that will be multiplied to provide for the base output
pub from_factor: Decimal,
} | crates/currency_conversion/src/types.rs | currency_conversion | struct_definition | 48 | rust | CurrencyFactors | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CreateApiKeyRequest
{
"type": "object",
"description": "The request body for creating an API Key.",
"required": [
"name",
"expiration"
],
"properties": {
"name": {
"type": "string",
"description": "A unique name for the API Key to help you identif... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 196 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CreateApiKeyRequest"
] | null | null | null | null |
pub fn get_connector_test_mode(&self) -> Option<bool> {
todo!()
} | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 20 | rust | null | null | null | null | get_connector_test_mode | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/routing/rule/evaluate"
{
"post": {
"tags": [
"Routing"
],
"summary": "Routing - Rule Evaluate",
"description": "Evaluate routing rules",
"operationId": "Evaluate routing rules (alternative)",
"requestBody": {
"content": {
"application/json": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 281 | .json | null | null | null | null | null | openapi_spec | paths | [
"/routing/rule/evaluate"
] | null | null | null | null |
pub async fn save_card_and_network_token_in_locker(
state: &SessionState,
customer_id: id_type::CustomerId,
payment_method_status: common_enums::PaymentMethodStatus,
payment_method_data: domain::PaymentMethodData,
vault_operation: Option<hyperswitch_domain_models::payments::VaultOperation>,
paym... | crates/router/src/core/payments/tokenization.rs | router | function_signature | 1,137 | rust | null | null | null | null | save_card_and_network_token_in_locker | null | null | null | null | null | null | null |
impl api::Refund for Archipel {} | crates/hyperswitch_connectors/src/connectors/archipel.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Archipel | api::Refund for | impl api::Refund for for Archipel | null | null | null | null | null | null | null | null |
pub struct ApplePayPaymentInformation {
tokenized_card: TokenizedCard,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | ApplePayPaymentInformation | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/intelligent-router-api-reference/success-rate/update-success-rate-window.mdx
# Type: Doc File
---
openapi: post /success_rate.SuccessRateCalculator/UpdateSuccessRateWindow
--- | api-reference/intelligent-router-api-reference/success-rate/update-success-rate-window.mdx | null | doc_file | 43 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Paybox {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/paybox.rs | hyperswitch_connectors | struct_definition | 26 | rust | Paybox | null | null | null | null | null | null | null | null | null | null | null |
pub async fn perform_success_based_routing<F, D>(
state: &SessionState,
routable_connectors: Vec<api_routing::RoutableConnectorChoice>,
profile_id: &common_utils::id_type::ProfileId,
merchant_id: &common_utils::id_type::MerchantId,
payment_id: &common_utils::id_type::PaymentId,
success_based_rou... | crates/router/src/core/payments/routing.rs | router | function_signature | 1,491 | rust | null | null | null | null | perform_success_based_routing | null | null | null | null | null | null | null |
pub struct SessionRoutingChoice {
pub connector: api_oss::ConnectorData,
pub payment_method_type: api_enums::PaymentMethodType,
} | crates/router/src/types/api/routing.rs | router | struct_definition | 32 | rust | SessionRoutingChoice | null | null | null | null | null | null | null | null | null | null | null |
impl Cybersource {
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
consts::BASE64_ENGINE.encode(payload_digest)
}
pub fn generate_signature(
&self,
auth: cybersource::CybersourceAuthType,
host: ... | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | impl_block | 533 | rust | null | Cybersource | null | impl Cybersource | null | null | null | null | null | null | null | null |
pub struct Verify; | crates/router/src/routes/app.rs | router | struct_definition | 4 | rust | Verify | null | null | null | null | null | null | null | null | null | null | null |
pub struct AciCaptureRequest {
#[serde(flatten)]
pub txn_details: TransactionDetails,
} | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | AciCaptureRequest | 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.