text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub struct UserFromTokenWithRoleInfo {
pub user: UserFromToken,
pub role_info: authorization::roles::RoleInfo,
} | crates/router/src/services/authentication.rs | router | struct_definition | 30 | rust | UserFromTokenWithRoleInfo | null | null | null | null | null | null | null | null | null | null | null |
pub struct CustomerNew {
pub customer_id: common_utils::id_type::CustomerId,
pub merchant_id: common_utils::id_type::MerchantId,
pub name: Option<Encryption>,
pub email: Option<Encryption>,
pub phone: Option<Encryption>,
pub description: Option<Description>,
pub phone_country_code: Option<St... | crates/diesel_models/src/customers.rs | diesel_models | struct_definition | 150 | rust | CustomerNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardStored; | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | struct_definition | 5 | rust | CardStored | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/file.rs
Public structs: 3
use common_utils::custom_serde;
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use masking::{Deserialize, Serialize};
use crate::schema::file_metadata;
#[derive(Clone, Debug, Deserialize, Insertable, Serialize, router_derive::Debu... | crates/diesel_models/src/file.rs | diesel_models | full_file | 692 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentIntentUpdateFields {
pub amount: Option<MinorUnit>,
pub currency: Option<common_enums::Currency>,
pub shipping_cost: Option<MinorUnit>,
pub tax_details: Option<diesel_models::TaxDetails>,
pub skip_external_tax_calculation: Option<common_enums::TaxCalculationOverride>,
pub skip_... | crates/hyperswitch_domain_models/src/payments/payment_intent.rs | hyperswitch_domain_models | struct_definition | 494 | rust | PaymentIntentUpdateFields | null | null | null | null | null | null | null | null | null | null | null |
impl UploadFile for Adyen {} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Adyen | UploadFile for | impl UploadFile for for Adyen | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BrowserInformation
{
"type": "object",
"description": "Browser information to be used for 3DS 2.0",
"properties": {
"color_depth": {
"type": "integer",
"format": "int32",
"description": "Color depth supported by the browser",
"nullable": true,
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 560 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BrowserInformation"
] | null | null | null | null |
pub fn payments_update_intent() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 7 | rust | null | null | null | null | payments_update_intent | null | null | null | null | null | null | null |
pub struct ThreeDSecureResData {
pub redirect_url: Option<Url>,
} | crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | ThreeDSecureResData | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payments/payments--cancel.mdx
# Type: Doc File
---
openapi: post /payments/{payment_id}/cancel
--- | api-reference/v1/payments/payments--cancel.mdx | null | doc_file | 35 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Ebanx {} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Ebanx | api::PaymentSync for | impl api::PaymentSync for for Ebanx | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payouts/retry.rs
Public functions: 8
use std::vec::IntoIter;
use common_enums::PayoutRetryType;
use error_stack::ResultExt;
use router_env::{
logger,
tracing::{self, instrument},
};
use super::{call_connector_payout, PayoutData};
use crate::{
core::{
errors::{self, R... | crates/router/src/core/payouts/retry.rs | router | full_file | 2,469 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payouts_update(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<id_type::PayoutId>,
json_payload: web::Json<payout_types::PayoutCreateRequest>,
) -> HttpResponse {
let flow = Flow::PayoutsUpdate;
let payout_id = path.into_inner();
let mut payout_update_payload = js... | crates/router/src/routes/payouts.rs | router | function_signature | 228 | rust | null | null | null | null | payouts_update | null | null | null | null | null | null | null |
pub async fn ephemeral_key_create(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<api_models::ephemeral_key::EphemeralKeyCreateRequest>,
) -> HttpResponse {
let flow = Flow::EphemeralKeyCreate;
let payload = json_payload.into_inner();
api::server_wrap(
flow,
... | crates/router/src/routes/ephemeral_key.rs | router | function_signature | 182 | rust | null | null | null | null | ephemeral_key_create | null | null | null | null | null | null | null |
pub async fn make_payout_method_data(
state: &SessionState,
payout_method_data: Option<&api::PayoutMethodData>,
payout_token: Option<&str>,
customer_id: &id_type::CustomerId,
merchant_id: &id_type::MerchantId,
payout_type: Option<api_enums::PayoutType>,
merchant_key_store: &domain::MerchantK... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 1,062 | rust | null | null | null | null | make_payout_method_data | null | null | null | null | null | null | null |
pub fn payments_dynamic_tax_calculation() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 9 | rust | null | null | null | null | payments_dynamic_tax_calculation | null | null | null | null | null | null | null |
pub struct BlackhawknetworkVerifyAccountResponse {
account: AccountInformation,
} | crates/hyperswitch_connectors/src/connectors/blackhawknetwork/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | BlackhawknetworkVerifyAccountResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generic_update<T, V, P>(
conn: &PgPooledConn,
predicate: P,
values: V,
) -> StorageResult<usize>
where
T: FilterDsl<P> + HasTable<Table = T> + Table + 'static,
V: AsChangeset<Target = <Filter<T, P> as HasTable>::Table> + Debug,
Filter<T, P>: IntoUpdateTarget,
UpdateStatement<
... | crates/diesel_models/src/query/generics.rs | diesel_models | function_signature | 262 | rust | null | null | null | null | generic_update | null | null | null | null | null | null | null |
pub struct PaymentMethodCollectLinkDetails {
pub publishable_key: masking::Secret<String>,
pub client_secret: masking::Secret<String>,
pub pm_collect_link_id: String,
pub customer_id: id_type::CustomerId,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub session_expiry: time::PrimitiveD... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 121 | rust | PaymentMethodCollectLinkDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardPaymentRequest {
#[serde(rename = "type")]
pub payment_type: PaymentMethodType,
pub card: CardInfo,
pub reusability: TransactionType,
pub reference_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 48 | rust | CardPaymentRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentCaptureResponse {
pub action_id: String,
pub reference: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | PaymentCaptureResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ResponsePaymentMethodsEnabled
{
"type": "object",
"required": [
"payment_method",
"payment_method_types"
],
"properties": {
"payment_method": {
"$ref": "#/components/schemas/PaymentMethod"
},
"payment_method_types": {
"type": "array",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 123 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ResponsePaymentMethodsEnabled"
] | null | null | null | null |
pub async fn link_routing_config(
state: SessionState,
merchant_context: domain::MerchantContext,
authentication_profile_id: Option<common_utils::id_type::ProfileId>,
algorithm_id: common_utils::id_type::RoutingId,
transaction_type: enums::TransactionType,
) -> RouterResponse<routing_types::RoutingD... | crates/router/src/core/routing.rs | router | function_signature | 2,181 | rust | null | null | null | null | link_routing_config | null | null | null | null | null | null | null |
impl ConnectorCommon for Tokenio {
fn id(&self) -> &'static str {
"tokenio"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'... | crates/hyperswitch_connectors/src/connectors/tokenio.rs | hyperswitch_connectors | impl_block | 340 | rust | null | Tokenio | ConnectorCommon for | impl ConnectorCommon for for Tokenio | null | null | null | null | null | null | null | null |
pub struct CheckoutRefundResponse {
pub(super) status: u16,
pub(super) response: RefundResponse,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | CheckoutRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn relay(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
payload: web::Json<api_models::relay::RelayRequest>,
) -> impl Responder {
let flow = Flow::Relay;
let payload = payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
p... | crates/router/src/routes/relay.rs | router | function_signature | 240 | rust | null | null | null | null | relay | null | null | null | null | null | null | null |
impl RecoveryPaymentAttempt {
pub fn get_attempt_triggered_by(&self) -> Option<common_enums::TriggeredBy> {
self.feature_metadata.as_ref().and_then(|metadata| {
metadata
.revenue_recovery
.as_ref()
.map(|recovery| recovery.attempt_triggered_by)
... | crates/hyperswitch_domain_models/src/revenue_recovery.rs | hyperswitch_domain_models | impl_block | 71 | rust | null | RecoveryPaymentAttempt | null | impl RecoveryPaymentAttempt | null | null | null | null | null | null | null | null |
pub fn identifier(input: &str) -> ParseResult<&str, String> {
error::context(
"identifier",
combinator::map(
sequence::pair(
complete::take_while1(|c: char| c.is_ascii_alphabetic() || c == '_'),
complete::take_while(|c: char| c.is_ascii_alphanumeric() || c... | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 111 | rust | null | null | null | null | identifier | null | null | null | null | null | null | null |
File: crates/redis_interface/src/lib.rs
Public functions: 7
Public structs: 4
//! Intermediate module for encapsulate all the redis related functionality
//!
//! Provides structs to represent redis connection and all functions that redis provides and
//! are used in the `router` crate. Abstractions for creating a ne... | crates/redis_interface/src/lib.rs | redis_interface | full_file | 1,905 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn profile_retrieve(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::ProfileId>,
) -> HttpResponse {
let flow = Flow::ProfileRetrieve;
let profile_id = path.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
... | crates/router/src/routes/profiles.rs | router | function_signature | 184 | rust | null | null | null | null | profile_retrieve | null | null | null | null | null | null | null |
pub fn build_payout_link_html(
link_data: &GenericLinkFormData,
locale: &str,
) -> CustomResult<String, errors::ApiErrorResponse> {
let document = include_str!("../../core/generic_link/payout_link/initiate/index.html");
let styles = include_str!("../../core/generic_link/payout_link/initiate/styles.css")... | crates/router/src/services/api/generic_link_response.rs | router | function_signature | 389 | rust | null | null | null | null | build_payout_link_html | null | null | null | null | null | null | null |
pub struct AcceptDisputeRequestData {
pub dispute_id: String,
pub connector_dispute_id: String,
pub dispute_status: storage_enums::DisputeStatus,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 38 | rust | AcceptDisputeRequestData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/kv.rs
pub use diesel_models::kv::{
AddressUpdateMems, DBOperation, Insertable, PaymentAttemptUpdateMems, PaymentIntentUpdateMems,
RefundUpdateMems, TypedSql, Updateable,
};
| crates/router/src/types/storage/kv.rs | router | full_file | 57 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl WebhookResponseTracker {
#[cfg(feature = "v1")]
pub fn get_payment_id(&self) -> Option<common_utils::id_type::PaymentId> {
match self {
Self::Payment { payment_id, .. }
| Self::Refund { payment_id, .. }
| Self::Dispute { payment_id, .. } => Some(payment_id.to_own... | crates/api_models/src/webhooks.rs | api_models | impl_block | 403 | rust | null | WebhookResponseTracker | null | impl WebhookResponseTracker | null | null | null | null | null | null | null | null |
pub fn payments_update_metadata() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 7 | rust | null | null | null | null | payments_update_metadata | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Worldpayxml {} | crates/hyperswitch_connectors/src/connectors/worldpayxml.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Worldpayxml | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Worldpayxml | null | null | null | null | null | null | null | null |
pub struct HipayErrorResponse {
pub code: u8,
pub message: String,
pub description: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs | hyperswitch_connectors | struct_definition | 27 | rust | HipayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Celero {} | crates/hyperswitch_connectors/src/connectors/celero.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Celero | api::Refund for | impl api::Refund for for Celero | null | null | null | null | null | null | null | null |
pub fn is_pending(self) -> bool {
matches!(
self,
Self::ChallengeRequired | Self::ChallengeRequiredDecoupledAuthentication
)
} | crates/common_enums/src/enums.rs | common_enums | function_signature | 34 | rust | null | null | null | null | is_pending | null | null | null | null | null | null | null |
pub async fn payment_methods_session_retrieve(
state: SessionState,
merchant_context: domain::MerchantContext,
payment_method_session_id: id_type::GlobalPaymentMethodSessionId,
) -> RouterResponse<payment_methods::PaymentMethodSessionResponse> {
let db = state.store.as_ref();
let key_manager_state =... | crates/router/src/core/payment_methods.rs | router | function_signature | 235 | rust | null | null | null | null | payment_methods_session_retrieve | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ThirdPartySdkSessionResponse
{
"type": "object",
"required": [
"secrets"
],
"properties": {
"secrets": {
"$ref": "#/components/schemas/SecretInfoToInitiateSdk"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 68 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ThirdPartySdkSessionResponse"
] | null | null | null | null |
pub struct RedsysCardData {
card_number: cards::CardNumber,
expiry_date: Secret<String>,
cvv2: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | RedsysCardData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/storage_impl/src/cards_info.rs
pub use diesel_models::{CardInfo, UpdateCardInfo};
use error_stack::report;
use hyperswitch_domain_models::cards_info::CardsInfoInterface;
use router_env::{instrument, tracing};
use crate::{
errors::StorageError,
kv_router_store::KVRouterStore,
redis::kv_store::... | crates/storage_impl/src/cards_info.rs | storage_impl | full_file | 833 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ArchipelCaptureOrderRequest {
amount: MinorUnit,
} | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | ArchipelCaptureOrderRequest | null | null | null | null | null | null | null | null | null | null | null |
impl Payments {
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/v2/payments").app_data(web::Data::new(state));
route = route
.service(
web::resource("/create-intent")
.route(web::post().to(payments::payments_create_intent)),
... | crates/router/src/routes/app.rs | router | impl_block | 786 | rust | null | Payments | null | impl Payments | null | null | null | null | null | null | null | null |
pub struct KlarnaRouterData<T> {
amount: MinorUnit,
router_data: T,
} | crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | KlarnaRouterData | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CustomerDefaultPaymentMethodResponse
{
"type": "object",
"required": [
"customer_id",
"payment_method"
],
"properties": {
"default_payment_method_id": {
"type": "string",
"description": "The unique identifier of the Payment method",
"example":... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 238 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CustomerDefaultPaymentMethodResponse"
] | null | null | null | null |
impl UnifiedTranslationsNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UnifiedTranslations> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/unified_translations.rs | diesel_models | impl_block | 42 | rust | null | UnifiedTranslationsNew | null | impl UnifiedTranslationsNew | null | null | null | null | null | null | null | null |
impl masking::SerializableSecret for OrderDetailsWithAmount {} | crates/diesel_models/src/types.rs | diesel_models | impl_block | 11 | rust | null | OrderDetailsWithAmount | masking::SerializableSecret for | impl masking::SerializableSecret for for OrderDetailsWithAmount | null | null | null | null | null | null | null | null |
pub fn create_payment_method_metadata(
metadata: Option<&pii::SecretSerdeValue>,
connector_token: Option<(String, String) | crates/router/src/core/payments/tokenization.rs | router | function_signature | 29 | rust | null | null | null | null | create_payment_method_metadata | null | null | null | null | null | null | null |
impl DefaultFallbackRoutingConfigUpdate<'_> {
async fn retrieve_and_update_default_fallback_routing_algorithm_if_routable_connector_exists(
&self,
) -> RouterResult<()> {
let profile_wrapper = ProfileWrapper::new(self.business_profile.clone());
let default_routing_config_for_profile =
... | crates/router/src/core/admin.rs | router | impl_block | 464 | rust | null | DefaultFallbackRoutingConfigUpdate | null | impl DefaultFallbackRoutingConfigUpdate | null | null | null | null | null | null | null | null |
pub async fn proxy_for_payments_operation_core<F, Req, Op, FData, D>(
state: &SessionState,
req_state: ReqState,
merchant_context: domain::MerchantContext,
profile_id_from_auth_layer: Option<id_type::ProfileId>,
operation: Op,
req: Req,
call_connector_action: CallConnectorAction,
auth_fl... | crates/router/src/core/payments.rs | router | function_signature | 1,293 | rust | null | null | null | null | proxy_for_payments_operation_core | null | null | null | null | null | null | null |
/// Derives validation functionality for structs with string-based fields that have
/// schema attributes specifying constraints like minimum and maximum lengths.
///
/// This macro generates a `validate()` method that checks if string based fields
/// meet the length requirements specified in their schema attributes.
... | crates/router_derive/src/lib.rs | router_derive | macro | 500 | rust | null | null | null | null | null | null | null | null | proc_derive | null | null | null |
pub struct ThreeDSecure {
browser: Option<BamboraBrowserInfo>, //Needed only in case of 3Ds 2.0. Need to update request for this.
enabled: bool,
version: Option<i64>,
auth_required: Option<bool>,
} | crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs | hyperswitch_connectors | struct_definition | 58 | rust | ThreeDSecure | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update(
self,
conn: &PgPooledConn,
merchant_connector_account: MerchantConnectorAccountUpdateInternal,
) -> StorageResult<Self> {
match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>(
conn,
self.merchant_connector_id.to_owned... | crates/diesel_models/src/query/merchant_connector_account.rs | diesel_models | function_signature | 123 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
impl HasSchemaParameters for Field {
fn get_schema_parameters(&self) -> syn::Result<SchemaParameters> {
let mut output = SchemaParameters::default();
let mut value_type_keyword = None;
let mut min_length_keyword = None;
let mut max_length_keyword = None;
let mut example_keyw... | crates/router_derive/src/macros/schema/helpers.rs | router_derive | impl_block | 366 | rust | null | Field | HasSchemaParameters for | impl HasSchemaParameters for for Field | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Getnet {} | crates/hyperswitch_connectors/src/connectors/getnet.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Getnet | api::PaymentSession for | impl api::PaymentSession for for Getnet | null | null | null | null | null | null | null | null |
pub fn make_all_aggregator<M: Metadata>(
&mut self,
nodes: &[(NodeId, Relation, Strength) | crates/hyperswitch_constraint_graph/src/builder.rs | hyperswitch_constraint_graph | function_signature | 26 | rust | null | null | null | null | make_all_aggregator | null | null | null | null | null | null | null |
pub struct AciWebhookNotification {
#[serde(rename = "type")]
pub event_type: AciWebhookEventType,
pub action: Option<AciWebhookAction>,
pub payload: serde_json::Value,
} | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | struct_definition | 48 | rust | AciWebhookNotification | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Paystack {
//TODO: implement functions when support enabled
} | crates/hyperswitch_connectors/src/connectors/paystack.rs | hyperswitch_connectors | impl_block | 18 | rust | null | Paystack | ConnectorValidation for | impl ConnectorValidation for for Paystack | null | null | null | null | null | null | null | null |
pub struct ErrorDistributionRow {
pub count: i64,
pub total: i64,
pub error_message: String,
} | crates/analytics/src/payments/accumulator.rs | analytics | struct_definition | 30 | rust | ErrorDistributionRow | null | null | null | null | null | null | null | null | null | null | null |
pub struct VerifyTokenResponse {
pub merchant_id: id_type::MerchantId,
pub user_email: pii::Email,
#[serde(skip_serializing_if = "Option::is_none")]
pub acl: Option<String>,
} | crates/api_models/src/recon.rs | api_models | struct_definition | 48 | rust | VerifyTokenResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Decryption functionality
pub fn decrypt(&self, data: impl AsRef<[u8]>) -> Vec<u8> {
data.as_ref().into()
} | crates/external_services/src/no_encryption/core.rs | external_services | function_signature | 37 | rust | null | null | null | null | decrypt | null | null | null | null | null | null | null |
pub struct ErrorDetails {
pub message: String,
pub extensions: Option<AdditionalErrorDetails>,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | ErrorDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct Request {
pub url: String,
pub headers: Headers,
pub method: Method,
pub certificate: Option<Secret<String>>,
pub certificate_key: Option<Secret<String>>,
pub body: Option<RequestContent>,
pub ca_certificate: Option<Secret<String>>,
} | crates/common_utils/src/request.rs | common_utils | struct_definition | 61 | rust | Request | null | null | null | null | null | null | null | null | null | null | null |
pub fn make_dsl_input_for_surcharge(
payment_attempt: &oss_storage::PaymentAttempt,
payment_intent: &oss_storage::PaymentIntent,
billing_address: Option<Address>,
) -> RoutingResult<dsl_inputs::BackendInput> {
let mandate_data = dsl_inputs::MandateData {
mandate_acceptance_type: None,
ma... | crates/router/src/core/payments/routing.rs | router | function_signature | 431 | rust | null | null | null | null | make_dsl_input_for_surcharge | null | null | null | null | null | null | null |
impl api::PaymentSync for Coingate {} | crates/hyperswitch_connectors/src/connectors/coingate.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Coingate | api::PaymentSync for | impl api::PaymentSync for for Coingate | null | null | null | null | null | null | null | null |
pub fn get_refund_sync_body(req: &types::RefundSyncRouterData) -> Result<Vec<u8>, Error> {
let auth_details = BamboraapacAuthType::try_from(&req.connector_auth_type)?;
let body = format!(
r#"
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dts="... | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | function_signature | 331 | rust | null | null | null | null | get_refund_sync_body | null | null | null | null | null | null | null |
pub trait ActivePaymentsMetricAccumulator {
type MetricOutput;
fn add_metrics_bucket(&mut self, metrics: &ActivePaymentsMetricRow);
fn collect(self) -> Self::MetricOutput;
} | crates/analytics/src/active_payments/accumulator.rs | analytics | trait_definition | 43 | rust | null | null | ActivePaymentsMetricAccumulator | null | null | null | null | null | null | null | null | null |
pub struct BlackhawknetworkTokenResponse {
pub access_token: Secret<String>,
pub expires_in: i64,
} | crates/hyperswitch_connectors/src/connectors/blackhawknetwork/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | BlackhawknetworkTokenResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/payments.rs
Public functions: 55
Public structs: 1
use crate::{
core::api_locking::{self, GetLockingInput},
services::authorization::permissions::Permission,
};
pub mod helpers;
use actix_web::{web, Responder};
use error_stack::report;
use hyperswitch_domain_models::payments::H... | crates/router/src/routes/payments.rs#chunk0 | router | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayboxAuthType {
pub(super) site: Secret<String>,
pub(super) rang: Secret<String>,
pub(super) cle: Secret<String>,
pub(super) merchant_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | PayboxAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub async fn fetch_disputes(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
json_payload: web::Query<dispute_types::DisputeFetchQueryData>,
) -> HttpResponse {
let flow = Flow::DisputesList;
let connector_id = path.into_inner();
let payload = json_payload.into_inner()... | crates/router/src/routes/disputes.rs | router | function_signature | 247 | rust | null | null | null | null | fetch_disputes | null | null | null | null | null | null | null |
impl api::PayoutFulfill for Paypal {} | crates/hyperswitch_connectors/src/connectors/paypal.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Paypal | api::PayoutFulfill for | impl api::PayoutFulfill for for Paypal | null | null | null | null | null | null | null | null |
impl EmailData for WelcomeToCommunity {
async fn get_email_data(&self, _base_url: &str) -> CustomResult<EmailContents, EmailError> {
let body = html::get_html_body(EmailBody::WelcomeToCommunity);
Ok(EmailContents {
subject: "Thank you for signing up on Hyperswitch Dashboard!".to_string(... | crates/router/src/services/email/types.rs | router | impl_block | 107 | rust | null | WelcomeToCommunity | EmailData for | impl EmailData for for WelcomeToCommunity | null | null | null | null | null | null | null | null |
pub async fn find_users_by_user_ids(
conn: &PgPooledConn,
user_ids: Vec<String>,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<
<Self as HasTable>::Table,
_,
<<Self as HasTable>::Table as diesel::Table>::PrimaryKey,
_,
>(co... | crates/diesel_models/src/query/user.rs | diesel_models | function_signature | 98 | rust | null | null | null | null | find_users_by_user_ids | null | null | null | null | null | null | null |
pub struct NordeaPaymentsRequest {
/// Creditor of the payment
#[serde(rename = "creditor")]
pub creditor_account: CreditorAccount,
/// Debtor of the payment
#[serde(rename = "debtor")]
pub debitor_account: DebitorAccount,
/// Free text reference that can be provided by the PSU.
/// This... | crates/hyperswitch_connectors/src/connectors/nordea/requests.rs | hyperswitch_connectors | struct_definition | 584 | rust | NordeaPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_connector_customer_in_customers(
connector_label: &str,
customer: Option<&domain::Customer>,
connector_customer_id: Option<String>,
) -> Option<storage::CustomerUpdate> {
let mut connector_customer_map = customer
.and_then(|customer| customer.connector_customer.clone().expose... | crates/router/src/core/payments/customers.rs | router | function_signature | 206 | rust | null | null | null | null | update_connector_customer_in_customers | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/generics.rs
Public functions: 12
use std::fmt::Debug;
use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{
associations::HasTable,
debug_query,
dsl::{Find, IsNotNull, Limit},
helper_types::{Filter, IntoBoxed},
insertable::CanInsertInSingleQuery,
pg::{Pg, ... | crates/diesel_models/src/query/generics.rs | diesel_models | full_file | 4,480 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthenticationErrorInformation {
pub rmsg: String,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | AuthenticationErrorInformation | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentsPreProcessing for Airwallex {} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Airwallex | api::PaymentsPreProcessing for | impl api::PaymentsPreProcessing for for Airwallex | null | null | null | null | null | null | null | null |
pub struct SurchargeDecisionConfigs {
pub surcharge_details: Option<SurchargeDetailsOutput>,
} | crates/api_models/src/surcharge_decision_configs.rs | api_models | struct_definition | 21 | rust | SurchargeDecisionConfigs | null | null | null | null | null | null | null | null | null | null | null |
impl Parse for DieselEnumMeta {
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
let lookahead = input.lookahead1();
if lookahead.peek(diesel_keyword::storage_type) {
let keyword = input.parse()?;
input.parse::<syn::Token![=]>()?;
let value = in... | crates/router_derive/src/macros/diesel.rs | router_derive | impl_block | 102 | rust | null | DieselEnumMeta | Parse for | impl Parse for for DieselEnumMeta | null | null | null | null | null | null | null | null |
pub async fn perform_post_authentication(
state: &SessionState,
key_store: &domain::MerchantKeyStore,
business_profile: domain::Profile,
authentication_id: common_utils::id_type::AuthenticationId,
payment_id: &common_utils::id_type::PaymentId,
) -> CustomResult<
hyperswitch_domain_models::router... | crates/router/src/core/authentication.rs | router | function_signature | 551 | rust | null | null | null | null | perform_post_authentication | null | null | null | null | null | null | null |
impl FlowMetric for AnalyticsFlow {} | crates/analytics/src/lib.rs | analytics | impl_block | 7 | rust | null | AnalyticsFlow | FlowMetric for | impl FlowMetric for for AnalyticsFlow | null | null | null | null | null | null | null | null |
pub struct IfStatement {
#[schema(value_type=Vec<Comparison>)]
pub condition: IfCondition,
pub nested: Option<Vec<IfStatement>>,
} | crates/euclid/src/frontend/ast.rs | euclid | struct_definition | 34 | rust | IfStatement | null | null | null | null | null | null | null | null | null | null | null |
impl Coinbase {
pub fn new() -> &'static Self {
&Self {
amount_convertor: &StringMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/coinbase.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Coinbase | null | impl Coinbase | null | null | null | null | null | null | null | null |
pub struct StripebillingWebhookLineDataPeriod {
#[serde(with = "common_utils::custom_serde::timestamp")]
pub end: PrimitiveDateTime,
#[serde(with = "common_utils::custom_serde::timestamp")]
pub start: PrimitiveDateTime,
} | crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | StripebillingWebhookLineDataPeriod | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> NetworkTokenizationBuilder<'a, CardDetailsAssigned> {
pub fn set_customer(
self,
customer: &'a api::CustomerDetails,
) -> NetworkTokenizationBuilder<'a, CustomerAssigned> {
NetworkTokenizationBuilder {
state: std::marker::PhantomData,
customer: Some(custo... | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | impl_block | 155 | rust | null | NetworkTokenizationBuilder | null | impl NetworkTokenizationBuilder | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/santander/transformers.rs
Public functions: 3
Public structs: 34
use std::collections::HashMap;
use api_models::payments::{QrCodeInformation, VoucherNextStepData};
use common_enums::{enums, AttemptStatus};
use common_utils::{
errors::CustomResult,
ext_trait... | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Fiuu {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/fiuu.rs | hyperswitch_connectors | impl_block | 35 | rust | null | Fiuu | null | impl Fiuu | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
use api_models::webhooks as webhook_type;
web::scope("/webhooks/relay")
.app_data(web::Data::new(state))
.service(web::resource("/{merchant_id}/{connector_id}").route(
web::post().to(receive_incoming_relay_webhook::<webhoo... | crates/router/src/routes/app.rs | router | function_signature | 87 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl api::PaymentVoid for Katapult {} | crates/hyperswitch_connectors/src/connectors/katapult.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Katapult | api::PaymentVoid for | impl api::PaymentVoid for for Katapult | null | null | null | null | null | null | null | null |
self.set_key_if_not_exists_and_get_value(key, (*value).to_owned(), ttl)
});
let del_result = futures::future::try_join_all(futures)
.await
.change_context(errors::RedisError::SetFailed)?;
Ok(del_result)
}
/// Sets a value in Redis if not already pre... | crates/redis_interface/src/commands.rs#chunk1 | redis_interface | chunk | 4,146 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.EnabledPaymentMethod
{
"type": "object",
"description": "Object for EnabledPaymentMethod",
"required": [
"payment_method",
"payment_method_types"
],
"properties": {
"payment_method": {
"$ref": "#/components/schemas/PaymentMethod"
},
"payment_met... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 135 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"EnabledPaymentMethod"
] | null | null | null | null |
File: crates/router/src/core/pm_auth/transformers.rs
use pm_auth::types as pm_auth_types;
use crate::{core::errors, types, types::transformers::ForeignTryFrom};
impl From<types::MerchantAccountData> for pm_auth_types::MerchantAccountData {
fn from(from: types::MerchantAccountData) -> Self {
match from {
... | crates/router/src/core/pm_auth/transformers.rs | router | full_file | 604 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn set_time_range(&mut self, time_range: OpensearchTimeRange) -> QueryResult<()> {
self.time_range = Some(time_range);
Ok(())
} | crates/analytics/src/opensearch.rs | analytics | function_signature | 37 | rust | null | null | null | null | set_time_range | null | null | null | null | null | null | null |
pub fn is_verified(&self) -> bool {
self.0.is_verified
} | crates/router/src/types/domain/user.rs | router | function_signature | 19 | rust | null | null | null | null | is_verified | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/breadpay.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use base64::Engine;
use common_enums::{enums, CallConnectorAction, PaymentAction};
use common_utils::{
consts::BASE64_ENGINE,
errors::CustomResult,
ext_tra... | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | full_file | 6,275 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl StoreLockerReq {
pub fn update_requestor_card_reference(&mut self, card_reference: Option<String>) {
match self {
Self::LockerCard(c) => c.requestor_card_reference = card_reference,
Self::LockerGeneric(_) => (),
}
}
} | crates/router/src/core/payment_methods/transformers.rs | router | impl_block | 58 | rust | null | StoreLockerReq | null | impl StoreLockerReq | 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.