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 PaymentAttemptListData<F>
where
F: Clone,
{
pub flow: PhantomData<F>,
pub payment_attempt_list: Vec<PaymentAttempt>,
} | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | struct_definition | 36 | rust | PaymentAttemptListData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_apple_pay_wallet_data(&self) -> Option<&ApplePayWalletData> {
if let Self::ApplePay(apple_pay_wallet_data) = self {
Some(apple_pay_wallet_data)
} else {
None
}
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | function_signature | 55 | rust | null | null | null | null | get_apple_pay_wallet_data | null | null | null | null | null | null | null |
pub struct BitpayRouterData<T> {
pub amount: FloatMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | BitpayRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn skip(self, user: UserFromStorage, state: &SessionState) -> UserResult<Self> {
let flows = self.origin.get_flows();
let index = flows
.iter()
.position(|flow| flow == &self.get_flow())
.ok_or(UserErrors::InternalServerError)?;
let remaining_flows =... | crates/router/src/types/domain/user/decision_manager.rs | router | function_signature | 177 | rust | null | null | null | null | skip | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs
Public functions: 1
Public structs: 35
use std::collections::HashMap;
use cards::CardNumber;
use common_enums::{enums, AttemptStatus, CaptureMethod, Currency, RefundStatus};
use common_utils::{
errors::CustomResult, ext_traits::ValueExt... | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct VerifyConnectorData {
pub connector: ConnectorEnum,
pub connector_auth: types::ConnectorAuthType,
pub card_details: domain::Card,
} | crates/router/src/types/api/verify_connector.rs | router | struct_definition | 34 | rust | VerifyConnectorData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/user_key_store.rs
Public functions: 3
use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
schema::user_key_store::dsl,
user_key_store::{UserKeyStore, UserKeyStoreNew},
PgPooledConn, StorageResult,
};
impl UserKeyStoreNew {
p... | crates/diesel_models/src/query/user_key_store.rs | diesel_models | full_file | 314 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub(crate) fn enum_nums_inner(ts: TokenStream) -> TokenStream {
let derive_input = syn::parse_macro_input!(ts as syn::DeriveInput);
let enum_obj = match derive_input.data {
syn::Data::Enum(e) => e,
_ => return error().into(),
};
let enum_name = derive_input.ident;
let mut match_ar... | crates/euclid_macros/src/inner/enum_nums.rs | euclid_macros | function_signature | 216 | rust | null | null | null | null | enum_nums_inner | null | null | null | null | null | null | null |
impl api::PaymentVoid for CtpMastercard {} | crates/hyperswitch_connectors/src/connectors/ctp_mastercard.rs | hyperswitch_connectors | impl_block | 11 | rust | null | CtpMastercard | api::PaymentVoid for | impl api::PaymentVoid for for CtpMastercard | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Riskified {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&RISKIFIED_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
None
}
fn get_supported_webhook_flows(&self) -> Opt... | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 93 | rust | null | Riskified | ConnectorSpecifications for | impl ConnectorSpecifications for for Riskified | null | null | null | null | null | null | null | null |
pub struct TransactionError {
pub errors: Vec<ErrorObject>,
pub credit_card: Option<CreditCardError>,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | TransactionError | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Multisafepay {} | crates/hyperswitch_connectors/src/connectors/multisafepay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Multisafepay | api::Payment for | impl api::Payment for for Multisafepay | null | null | null | null | null | null | null | null |
impl api::Payment for Nmi {} | crates/hyperswitch_connectors/src/connectors/nmi.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Nmi | api::Payment for | impl api::Payment for for Nmi | null | null | null | null | null | null | null | null |
impl ProfileUpdateInternal {
pub fn apply_changeset(self, source: Profile) -> Profile {
let Self {
profile_name,
modified_at,
return_url,
enable_payment_response_hash,
payment_response_hash_key,
redirect_to_merchant_with_http_post,
... | crates/diesel_models/src/business_profile.rs | diesel_models | impl_block | 1,337 | rust | null | ProfileUpdateInternal | null | impl ProfileUpdateInternal | null | null | null | null | null | null | null | null |
pub fn collect(self) -> AuthEventMetricsBucketValue {
AuthEventMetricsBucketValue {
authentication_count: self.authentication_count.collect(),
authentication_attempt_count: self.authentication_attempt_count.collect(),
authentication_success_count: self.authentication_success_... | crates/analytics/src/auth_events/accumulator.rs | analytics | function_signature | 182 | rust | null | null | null | null | collect | null | null | null | null | null | null | null |
pub async fn update_mca(
state: &SessionState,
merchant_id: common_utils::id_type::MerchantId,
connector_id: common_utils::id_type::MerchantConnectorAccountId,
auth_details: oss_types::ConnectorAuthType,
) -> RouterResult<oss_api_types::MerchantConnectorResponse> {
let connector_auth_json = auth_det... | crates/router/src/core/connector_onboarding/paypal.rs | router | function_signature | 432 | rust | null | null | null | null | update_mca | null | null | null | null | null | null | null |
impl PaymentIntentUpdate {
pub fn is_confirm_operation(&self) -> bool {
matches!(self, Self::ConfirmIntent { .. })
}
} | crates/hyperswitch_domain_models/src/payments/payment_intent.rs | hyperswitch_domain_models | impl_block | 32 | rust | null | PaymentIntentUpdate | null | impl PaymentIntentUpdate | null | null | null | null | null | null | null | null |
impl PaymentAttemptInterface for KafkaStore {
type Error = errors::StorageError;
#[cfg(feature = "v1")]
async fn insert_payment_attempt(
&self,
payment_attempt: storage::PaymentAttemptNew,
storage_scheme: MerchantStorageScheme,
) -> CustomResult<storage::PaymentAttempt, errors::S... | crates/router/src/db/kafka_store.rs | router | impl_block | 2,798 | rust | null | KafkaStore | PaymentAttemptInterface for | impl PaymentAttemptInterface for for KafkaStore | null | null | null | null | null | null | null | null |
pub struct CeleroAddressResponse {
first_name: Option<Secret<String>>,
last_name: Option<Secret<String>>,
address_line_1: Option<Secret<String>>,
address_line_2: Option<Secret<String>>,
city: Option<String>,
state: Option<Secret<String>>,
postal_code: Option<Secret<String>>,
country: Opt... | crates/hyperswitch_connectors/src/connectors/celero/transformers.rs | hyperswitch_connectors | struct_definition | 100 | rust | CeleroAddressResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexRefundRequest {
// Unique ID to be sent for each transaction/operation request to the connector
request_id: String,
amount: Option<StringMajorUnit>,
reason: Option<String>,
//Identifier for the PaymentIntent for which Refund is requested
payment_intent_id: String,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 68 | rust | AirwallexRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn call_psync_api(
state: &SessionState,
global_payment_id: &id_type::GlobalPaymentId,
revenue_recovery_data: &revenue_recovery_types::RevenueRecoveryPaymentData,
) -> RouterResult<payments_domain::PaymentStatusData<api_types::PSync>> {
let operation = payments::operations::PaymentGet;
let... | crates/router/src/core/revenue_recovery/api.rs | router | function_signature | 388 | rust | null | null | null | null | call_psync_api | null | null | null | null | null | null | null |
pub async fn relay_retrieve(
state: web::Data<app::AppState>,
path: web::Path<common_utils::id_type::RelayId>,
req: actix_web::HttpRequest,
query_params: web::Query<api_models::relay::RelayRetrieveBody>,
) -> impl Responder {
let flow = Flow::RelayRetrieve;
let relay_retrieve_request = api_model... | crates/router/src/routes/relay.rs | router | function_signature | 291 | rust | null | null | null | null | relay_retrieve | null | null | null | null | null | null | null |
impl api::Refund for Hipay {} | crates/hyperswitch_connectors/src/connectors/hipay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Hipay | api::Refund for | impl api::Refund for for Hipay | null | null | null | null | null | null | null | null |
impl ReconToken {
pub async fn new_token(
user_id: String,
merchant_id: id_type::MerchantId,
settings: &Settings,
org_id: id_type::OrganizationId,
profile_id: id_type::ProfileId,
tenant_id: Option<id_type::TenantId>,
role_info: authorization::roles::RoleInfo,
... | crates/router/src/services/authentication.rs | router | impl_block | 267 | rust | null | ReconToken | null | impl ReconToken | null | null | null | null | null | null | null | null |
pub fn get_next_action_api(
&self,
base_url: String,
authentication_id: String,
) -> CustomResult<NextAction, errors::ParsingError> {
let url = format!("{base_url}/authentication/{authentication_id}/authenticate");
Ok(NextAction {
url: url::Url::parse(&url).change... | crates/api_models/src/authentication.rs | api_models | function_signature | 100 | rust | null | null | null | null | get_next_action_api | null | null | null | null | null | null | null |
pub struct ThreeDSData {
#[serde(rename = "threeDSTransactionId")]
pub three_ds_transaction_id: Option<Secret<String>>,
pub cavv: Secret<String>,
pub eci: Option<String>,
pub xid: Option<Secret<String>>,
#[serde(rename = "threeDSVersion")]
pub three_ds_version: Option<String>,
#[serde(re... | crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs | hyperswitch_connectors | struct_definition | 93 | rust | ThreeDSData | null | null | null | null | null | null | null | null | null | null | null |
pub struct GpaymentsPreAuthVersionCallRequest {
pub acct_number: CardNumber,
pub merchant_id: common_utils::id_type::MerchantId,
} | crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs | hyperswitch_connectors | struct_definition | 33 | rust | GpaymentsPreAuthVersionCallRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct CybersourceTokenInformation {
payment_instrument: Option<CybersoucrePaymentInstrument>,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | CybersourceTokenInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct SignUpWithMerchantIdRequest {
pub name: Secret<String>,
pub email: pii::Email,
pub password: Secret<String>,
pub company_name: String,
} | crates/api_models/src/user.rs | api_models | struct_definition | 38 | rust | SignUpWithMerchantIdRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn validate_maximum_refund_against_payment_attempt(
all_refunds: &[diesel_refund::Refund],
refund_max_attempts: usize,
) -> CustomResult<(), RefundValidationError> {
utils::when(all_refunds.len() > refund_max_attempts, || {
Err(report!(RefundValidationError::MaxRefundCountReached))
})
} | crates/router/src/core/utils/refunds_validator.rs | router | function_signature | 75 | rust | null | null | null | null | validate_maximum_refund_against_payment_attempt | null | null | null | null | null | null | null |
pub fn get_connector_label(&self, profile_name: String) -> String {
match self.connector_label.clone() {
Some(connector_label) => connector_label,
None => format!("{}_{}", self.connector_name, profile_name),
}
} | crates/api_models/src/admin.rs | api_models | function_signature | 52 | rust | null | null | null | null | get_connector_label | null | null | null | null | null | null | null |
impl api::Refund for Nexinets {} | crates/hyperswitch_connectors/src/connectors/nexinets.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Nexinets | api::Refund for | impl api::Refund for for Nexinets | null | null | null | null | null | null | null | null |
fn handle_bank_redirects_error_response(
response: ErrorResponseBankRedirect,
status_code: u16,
previous_attempt_status: enums::AttemptStatus,
) -> CustomResult<
(
enums::AttemptStatus,
Option<ErrorResponse>,
PaymentsResponseData,
),
errors::ConnectorError,
> {
let s... | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 8,184 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CustomerPaymentMethodsListResponse
{
"type": "object",
"required": [
"customer_payment_methods"
],
"properties": {
"customer_payment_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomerPaymentMethod"
},
"des... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 143 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CustomerPaymentMethodsListResponse"
] | null | null | null | null |
pub fn add_browser_data(mut self, browser_info: BrowserInformation) -> Result<Self, Error> {
self.browser_accept_header = Some(browser_info.get_accept_header()?);
self.browser_user_agent = Some(browser_info.get_user_agent()?);
self.browser_java_enabled = Some(browser_info.get_java_enabled()?);
... | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | function_signature | 175 | rust | null | null | null | null | add_browser_data | null | null | null | null | null | null | null |
pub struct VoltRouterData<T> {
pub amount: MinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | hyperswitch_connectors | struct_definition | 48 | rust | VoltRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Paysafe {} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paysafe | api::PaymentToken for | impl api::PaymentToken for for Paysafe | null | null | null | null | null | null | null | null |
pub struct Sale {
#[serde(rename = "@id")]
pub id: String,
#[serde(rename = "@reportGroup")]
pub report_group: String,
#[serde(rename = "@customerId", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
pub order_id: String,
pub amount: MinorUnit,
pub order_sou... | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs | hyperswitch_connectors | struct_definition | 288 | rust | Sale | null | null | null | null | null | null | null | null | null | null | null |
pub async fn kv_wrapper<'a, T, D, S>(
store: &KVRouterStore<D>,
op: KvOperation<'a, S>,
partition_key: PartitionKey<'a>,
) -> CustomResult<KvResult<T>, RedisError>
where
T: de::DeserializeOwned,
D: crate::database::store::DatabaseStore,
S: serde::Serialize + Debug + KvStorePartition + UniqueCons... | crates/storage_impl/src/redis/kv_store.rs | storage_impl | function_signature | 812 | rust | null | null | null | null | kv_wrapper | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Facilitapay {
async fn verify_webhook_source(
&self,
request: &webhooks::IncomingWebhookRequestDetails<'_>,
_merchant_id: &common_utils::id_type::MerchantId,
connector_webhook_details: Option<common_utils::pii::SecretSerdeValue>,
_connector_... | crates/hyperswitch_connectors/src/connectors/facilitapay.rs | hyperswitch_connectors | impl_block | 1,090 | rust | null | Facilitapay | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Facilitapay | null | null | null | null | null | null | null | null |
impl TraceUrlAssert {
fn compare_url(&self, url: &str) -> bool {
match self {
Self::Match(value) => url == value,
Self::EndsWith(end) => url.ends_with(end),
}
}
} | crates/router_env/src/logger/setup.rs | router_env | impl_block | 53 | rust | null | TraceUrlAssert | null | impl TraceUrlAssert | null | null | null | null | null | null | null | null |
pub fn get_id(&self) -> &id_type::PaymentId {
self.payment_id
} | crates/router/src/services/kafka/payment_intent_event.rs | router | function_signature | 22 | rust | null | null | null | null | get_id | null | null | null | null | null | null | null |
pub async fn validate_card_testing_guard_checks(
state: &SessionState,
request: &api::PaymentsRequest,
payment_method_data: Option<&api_models::payments::PaymentMethodData>,
customer_id: &Option<common_utils::id_type::CustomerId>,
business_profile: &domain::Profile,
) -> RouterResult<Option<CardTest... | crates/router/src/core/card_testing_guard/utils.rs | router | function_signature | 621 | rust | null | null | null | null | validate_card_testing_guard_checks | null | null | null | null | null | null | null |
pub struct CheckbookPaymentsRequest {
name: Secret<String>,
recipient: pii::Email,
amount: FloatMajorUnit,
description: String,
} | crates/hyperswitch_connectors/src/connectors/checkbook/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | CheckbookPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
### Refactors
* **api_models:** enhance accepted countries/currencies types (#807) (f9ef3135)
* **services:** make AppState impl generic using AppStateInfo (#805) (642c3f3a)
- - -
## 0.5.2 (2023-03-24)
### Chores
* prepare for building production Docker images (#794) (6ddc30eb)
### Bug Fixes
* **connector:*... | CHANGELOG.md#chunk63 | null | doc_chunk | 4,829 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/sdk_events/metrics/payment_attempts.rs
use std::collections::HashSet;
use api_models::analytics::{
sdk_events::{
SdkEventDimensions, SdkEventFilters, SdkEventMetricsBucketIdentifier, SdkEventNames,
},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
... | crates/analytics/src/sdk_events/metrics/payment_attempts.rs | analytics | full_file | 791 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BoletoVoucherData
{
"type": "object",
"properties": {
"social_security_number": {
"type": "string",
"description": "The shopper's social security number (CPF or CNPJ)",
"nullable": true
},
"bank_number": {
"type": "string",
"descriptio... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 407 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BoletoVoucherData"
] | null | null | null | null |
impl SubscriptionNew {
#[allow(clippy::too_many_arguments)]
pub fn new(
subscription_id: String,
status: String,
billing_processor: Option<String>,
payment_method_id: Option<String>,
merchant_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>,
... | crates/diesel_models/src/subscription.rs | diesel_models | impl_block | 207 | rust | null | SubscriptionNew | null | impl SubscriptionNew | null | null | null | null | null | null | null | null |
pub async fn get_network_token(
state: &routes::SessionState,
customer_id: id_type::CustomerId,
network_token_requestor_ref_id: String,
tokenization_service: &settings::NetworkTokenizationService,
) -> CustomResult<pm_types::TokenResponse, errors::NetworkTokenizationError> {
let mut request = servic... | crates/router/src/core/payment_methods/network_tokenization.rs | router | function_signature | 518 | rust | null | null | null | null | get_network_token | null | null | null | null | null | null | null |
pub fn merge_transaction_responses(
auth_response: &Self,
capture_response: &Self,
) -> Result<Self, error_stack::Report<ApiErrorResponse>> {
match (auth_response, capture_response) {
(
Self::TransactionResponse {
resource_id: _,
... | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | function_signature | 436 | rust | null | null | null | null | merge_transaction_responses | null | null | null | null | null | null | null |
File: crates/router/src/core.rs
pub mod admin;
pub mod api_keys;
pub mod api_locking;
#[cfg(feature = "v1")]
pub mod apple_pay_certificates_migration;
pub mod authentication;
#[cfg(feature = "v1")]
pub mod blocklist;
pub mod cache;
pub mod card_testing_guard;
pub mod cards_info;
pub mod conditional_config;
pub mod con... | crates/router/src/core.rs | router | full_file | 422 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct GpaymentsPostAuthenticationResponse {
pub authentication_value: Option<Secret<String>>,
pub trans_status: AuthStatus,
pub eci: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs | hyperswitch_connectors | struct_definition | 35 | rust | GpaymentsPostAuthenticationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct StoreCardRespPayload {
pub card_reference: String,
pub duplication_check: Option<DataDuplicationCheck>,
} | crates/router/src/core/payment_methods/transformers.rs | router | struct_definition | 26 | rust | StoreCardRespPayload | null | null | null | null | null | null | null | null | null | null | null |
error_reason: None,
capture_method: None,
connector_response_reference_id: None,
multiple_capture_count: None,
surcharge_amount: None,
tax_amount: None,
amount_capturable: None,
merchant_conne... | crates/diesel_models/src/payment_attempt.rs#chunk3 | diesel_models | chunk | 8,184 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PayoutConfirmRequest
{
"type": "object",
"required": [
"client_secret"
],
"properties": {
"merchant_order_reference_id": {
"type": "string",
"description": "Your unique identifier for this payout or order. This ID helps you reconcile payouts on your sys... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 1,708 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PayoutConfirmRequest"
] | null | null | null | null |
pub struct TransactionProcessingDetails {
order_id: String,
transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | TransactionProcessingDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_resource<D, R>(
&self,
state: &KeyManagerState,
key_store: &MerchantKeyStore,
mut resources: MutexGuard<'_, Vec<D>>,
resource_updated: D,
filter_fn: impl Fn(&&mut D) -> bool,
error_message: String,
) -> CustomResult<R, StorageError>
whe... | crates/storage_impl/src/mock_db.rs | storage_impl | function_signature | 197 | rust | null | null | null | null | update_resource | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/cards_info.rs
use common_utils::errors;
use diesel_models::cards_info;
#[async_trait::async_trait]
pub trait CardsInfoInterface {
type Error;
async fn get_card_info(
&self,
_card_iin: &str,
) -> errors::CustomResult<Option<cards_info::CardInfo>, S... | crates/hyperswitch_domain_models/src/cards_info.rs | hyperswitch_domain_models | full_file | 168 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentAttempt {
/// Payment id for the payment attempt
pub payment_id: id_type::GlobalPaymentId,
/// Merchant id for the payment attempt
pub merchant_id: id_type::MerchantId,
/// Amount details for the payment attempt
pub amount_details: AttemptAmountDetails,
/// Status of the pa... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | struct_definition | 1,251 | rust | PaymentAttempt | null | null | null | null | null | null | null | null | null | null | null |
impl utils::MultipleCaptureSyncResponse for Box<PaymentsResponse> {
fn get_connector_capture_id(&self) -> String {
self.action_id.clone().unwrap_or("".into())
}
fn get_capture_attempt_status(&self) -> AttemptStatus {
get_attempt_status_bal((self.status.clone(), self.balances.clone()))
}... | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | impl_block | 149 | rust | null | Box | utils::MultipleCaptureSyncResponse for | impl utils::MultipleCaptureSyncResponse for for Box | null | null | null | null | null | null | null | null |
pub async fn payments_redirect_response_with_creds_identifier(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
path: web::Path<(
common_utils::id_type::PaymentId,
common_utils::id_type::MerchantId,
String,
String,
) | crates/router/src/routes/payments.rs | router | function_signature | 67 | rust | null | null | null | null | payments_redirect_response_with_creds_identifier | null | null | null | null | null | null | null |
pub async fn update_with_capture_id(
self,
conn: &PgPooledConn,
capture: CaptureUpdate,
) -> StorageResult<Self> {
match generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
_,
_,
>(
... | crates/diesel_models/src/query/capture.rs | diesel_models | function_signature | 142 | rust | null | null | null | null | update_with_capture_id | null | null | null | null | null | null | null |
impl OrganizationInterface for KafkaStore {
async fn insert_organization(
&self,
organization: OrganizationNew,
) -> CustomResult<Organization, StorageError> {
self.diesel_store.insert_organization(organization).await
}
async fn find_organization_by_org_id(
&self,
... | crates/router/src/db.rs | router | impl_block | 169 | rust | null | KafkaStore | OrganizationInterface for | impl OrganizationInterface for for KafkaStore | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.NullObject
{
"default": null,
"nullable": true
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 25 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"NullObject"
] | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/boku.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::{BytesExt, Optio... | crates/hyperswitch_connectors/src/connectors/boku.rs | hyperswitch_connectors | full_file | 5,942 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ThreeDSecureIoMetaData {
pub mcc: String,
pub merchant_country_code: String,
pub merchant_name: String,
} | crates/hyperswitch_connectors/src/connectors/threedsecureio/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | ThreeDSecureIoMetaData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Fiserv {} | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Fiserv | api::PaymentVoid for | impl api::PaymentVoid for for Fiserv | null | null | null | null | null | null | null | null |
pub fn increment_webhook_outgoing_received_count(merchant_id: &common_utils::id_type::MerchantId) {
metrics::WEBHOOK_OUTGOING_RECEIVED_COUNT.add(
1,
router_env::metric_attributes!((MERCHANT_ID, merchant_id.clone())),
)
} | crates/router/src/core/webhooks/utils.rs | router | function_signature | 59 | rust | null | null | null | null | increment_webhook_outgoing_received_count | null | null | null | null | null | null | null |
pub struct CardDetailUpdate {
/// Card Holder Name
#[schema(value_type = String,example = "John Doe")]
pub card_holder_name: Option<masking::Secret<String>>,
/// Card Holder's Nick Name
#[schema(value_type = Option<String>,example = "John Doe")]
pub nick_name: Option<masking::Secret<String>>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 78 | rust | CardDetailUpdate | null | null | null | null | null | null | null | null | null | null | null |
pub struct FluidData {
value: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | FluidData | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayloadCardResponse {
pub card_brand: String,
pub card_number: String, // Masked card number like "xxxxxxxxxxxx4242"
pub card_type: String,
pub expiry: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/payload/responses.rs | hyperswitch_connectors | struct_definition | 49 | rust | PayloadCardResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/routing_events/events.rs
Public functions: 1
Public structs: 1
use api_models::analytics::{routing_events::RoutingEventsRequest, Granularity};
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use time::PrimitiveDateTime;
use crate::{
query::{Aggregate, GroupByCla... | crates/analytics/src/routing_events/events.rs | analytics | full_file | 597 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlaidBankAccountCredentialsEFT {
pub account_id: String,
pub account: String,
pub institution: String,
pub branch: String,
} | crates/pm_auth/src/connector/plaid/transformers.rs | pm_auth | struct_definition | 36 | rust | PlaidBankAccountCredentialsEFT | null | null | null | null | null | null | null | null | null | null | null |
pub struct ShippingAddress {
pub salutation: Option<Secret<String>>,
pub first_name: Option<Secret<String>>,
pub last_name: Option<Secret<String>>,
pub address: Option<Secret<String>>,
pub cell: Option<Secret<String>>,
pub phone: Option<Secret<String>>,
pub zip: Option<Secret<String>>,
p... | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 170 | rust | ShippingAddress | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Payu {} | crates/hyperswitch_connectors/src/connectors/payu.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payu | api::Refund for | impl api::Refund for for Payu | null | null | null | null | null | null | null | null |
pub struct SessionRoutingPmTypeInput<'a> {
state: &'a SessionState,
key_store: &'a domain::MerchantKeyStore,
attempt_id: &'a str,
routing_algorithm: &'a MerchantAccountRoutingAlgorithm,
backend_input: dsl_inputs::BackendInput,
allowed_connectors: FxHashMap<String, api::GetToken>,
profile_id:... | crates/router/src/core/payments/routing.rs | router | struct_definition | 93 | rust | SessionRoutingPmTypeInput | null | null | null | null | null | null | null | null | null | null | null |
impl FrmMetricsBucketIdentifier {
pub fn new(
frm_status: Option<String>,
frm_name: Option<String>,
frm_transaction_type: Option<String>,
normalized_time_range: TimeRange,
) -> Self {
Self {
frm_status,
frm_name,
frm_transaction_type,
... | crates/api_models/src/analytics/frm.rs | api_models | impl_block | 85 | rust | null | FrmMetricsBucketIdentifier | null | impl FrmMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
Box::new(DokuBankData::try_from(item)?),
)),
BankTransferData::BniVaBankTransfer {} => Ok(AdyenPaymentMethod::BniVa(Box::new(
DokuBankData::try_from(item)?,
))),
BankTransferData::BriVaBankTransfer {} => Ok(AdyenPaymentMethod::BriVa(Box::ne... | crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs#chunk3 | hyperswitch_connectors | chunk | 8,189 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProfileAcquirerCreate {
/// The merchant id assigned by the acquirer
#[schema(value_type= String,example = "M123456789")]
pub acquirer_assigned_merchant_id: String,
/// merchant name
#[schema(value_type= String,example = "NewAge Retailer")]
pub merchant_name: String,
/// Network p... | crates/api_models/src/profile_acquirer.rs | api_models | struct_definition | 283 | rust | ProfileAcquirerCreate | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Trustpayments {} | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Trustpayments | api::Payment for | impl api::Payment for for Trustpayments | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.NextActionType
{
"type": "string",
"enum": [
"redirect_to_url",
"display_qr_code",
"invoke_sdk_client",
"trigger_api",
"display_bank_transfer_information",
"display_wait_screen",
"collect_otp",
"redirect_inside_popup"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 77 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"NextActionType"
] | null | null | null | null |
pub async fn payment_connector_list_profile() {} | crates/openapi/src/routes/merchant_account.rs | openapi | function_signature | 9 | rust | null | null | null | null | payment_connector_list_profile | null | null | null | null | null | null | null |
impl PaymentVoid for Signifyd {} | crates/hyperswitch_connectors/src/connectors/signifyd.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Signifyd | PaymentVoid for | impl PaymentVoid for for Signifyd | null | null | null | null | null | null | null | null |
pub trait ActivePaymentsMetricAnalytics: LoadRow<ActivePaymentsMetricRow> {} | crates/analytics/src/active_payments/metrics.rs | analytics | trait_definition | 16 | rust | null | null | ActivePaymentsMetricAnalytics | null | null | null | null | null | null | null | null | null |
pub struct OpensearchResultsTotal {
pub value: u64,
} | crates/api_models/src/analytics/search.rs | api_models | struct_definition | 17 | rust | OpensearchResultsTotal | null | null | null | null | null | null | null | null | null | null | null |
pub struct DummyConnectorPaymentData {
pub attempt_id: String,
pub payment_id: common_utils::id_type::PaymentId,
pub status: DummyConnectorStatus,
pub amount: i64,
pub eligible_amount: i64,
pub currency: Currency,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub created: Primit... | crates/router/src/routes/dummy_connector/types.rs | router | struct_definition | 126 | rust | DummyConnectorPaymentData | null | null | null | null | null | null | null | null | null | null | null |
impl fmt::Display for BokuChargeType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Hosted => write!(f, "hosted"),
}
}
} | crates/hyperswitch_connectors/src/connectors/boku/transformers.rs | hyperswitch_connectors | impl_block | 54 | rust | null | BokuChargeType | fmt::Display for | impl fmt::Display for for BokuChargeType | null | null | null | null | null | null | null | null |
/// Three letter (lowercase) prefix corresponding to the current environment.
/// Either `dev`, `snd` or `prd`.
pub fn prefix_for_env() -> &'static str {
match which() {
Env::Development => "dev",
Env::Sandbox => "snd",
Env::Production => "prd",
}
} | crates/router_env/src/env.rs | router_env | function_signature | 70 | rust | null | null | null | null | prefix_for_env | null | null | null | null | null | null | null |
impl Routing {
pub fn server(state: AppState) -> Scope {
#[allow(unused_mut)]
let mut route = web::scope("/routing")
.app_data(web::Data::new(state.clone()))
.service(
web::resource("/active").route(web::get().to(|state, req, query_params| {
... | crates/router/src/routes/app.rs | router | impl_block | 1,478 | rust | null | Routing | null | impl Routing | null | null | null | null | null | null | null | null |
pub struct RefundDistributionBody {
pub distribution_for: RefundDistributions,
pub distribution_cardinality: QueryLimit,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 27 | rust | RefundDistributionBody | null | null | null | null | null | null | null | null | null | null | null |
impl EmailData for BizEmailProd {
async fn get_email_data(&self, _base_url: &str) -> CustomResult<EmailContents, EmailError> {
let body = html::get_html_body(EmailBody::BizEmailProd {
user_name: self.user_name.clone().expose(),
poc_email: self.poc_email.clone().expose(),
... | crates/router/src/services/email/types.rs | router | impl_block | 165 | rust | null | BizEmailProd | EmailData for | impl EmailData for for BizEmailProd | null | null | null | null | null | null | null | null |
pub async fn update_trackers<F: Clone, Req>(
state: &SessionState,
router_data: RouterData<F, Req, AuthenticationResponseData>,
authentication: storage::Authentication,
acquirer_details: Option<super::types::AcquirerDetails>,
merchant_key_store: &hyperswitch_domain_models::merchant_key_store::Mercha... | crates/router/src/core/authentication/utils.rs | router | function_signature | 1,138 | rust | null | null | null | null | update_trackers | null | null | null | null | null | null | null |
/// This is the url to which the customer will be redirected to, after completing the redirection flow
pub fn create_finish_redirection_url(
&self,
base_url: &str,
publishable_key: &str,
) -> CustomResult<url::Url, errors::api_error_response::ApiErrorResponse> {
let finish_redire... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 155 | rust | null | null | null | null | create_finish_redirection_url | null | null | null | null | null | null | null |
impl PayoutLink {
pub async fn update_payout_link(
self,
conn: &PgPooledConn,
payout_link_update: PayoutLinkUpdate,
) -> StorageResult<Self> {
generics::generic_update_with_results::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::link_id.eq(self.link_id.t... | crates/diesel_models/src/query/generic_link.rs | diesel_models | impl_block | 173 | rust | null | PayoutLink | null | impl PayoutLink | null | null | null | null | null | null | null | null |
pub async fn initiate_payout_link(
_state: SessionState,
_merchant_context: domain::MerchantContext,
_req: payouts::PayoutLinkInitiateRequest,
_request_headers: &header::HeaderMap,
_locale: String,
) -> RouterResponse<services::GenericLinkFormData> {
todo!()
} | crates/router/src/core/payout_link.rs | router | function_signature | 72 | rust | null | null | null | null | initiate_payout_link | null | null | null | null | null | null | null |
pub struct Worldline; | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | struct_definition | 5 | rust | Worldline | null | null | null | null | null | null | null | null | null | null | null |
pub struct TransactionDecisionData {
external_status: TransactionStatus,
reason: Option<String>,
amount: StringMajorUnit,
currency: Currency,
#[serde(with = "common_utils::custom_serde::iso8601")]
decided_at: PrimitiveDateTime,
payment_details: Vec<TransactionPaymentDetails>,
} | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | struct_definition | 67 | rust | TransactionDecisionData | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayeezyCard {
#[serde(rename = "type")]
pub card_type: PayeezyCardType,
pub cardholder_name: Secret<String>,
pub card_number: CardNumber,
pub exp_date: Secret<String>,
pub cvv: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs | hyperswitch_connectors | struct_definition | 60 | rust | PayeezyCard | null | null | null | null | null | null | null | null | null | null | null |
impl Breadpay {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Breadpay | null | impl Breadpay | null | null | null | null | null | null | null | null |
impl DynamicRoutingClientConfig {
/// establish connection with the server
pub fn get_dynamic_routing_connection(
self,
client: Client,
) -> Result<Option<RoutingStrategy>, Box<dyn std::error::Error>> {
match self {
Self::Enabled { host, port, .. } => {
le... | crates/external_services/src/grpc_client/dynamic_routing.rs | external_services | impl_block | 201 | rust | null | DynamicRoutingClientConfig | null | impl DynamicRoutingClientConfig | 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.