text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/cryptopay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct NovalnetPaymentsResponse {
result: ResultData,
transaction: Option<NovalnetPaymentsResponseTransactionData>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | NovalnetPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaysafePaymentsResponse {
pub id: String,
pub merchant_ref_num: Option<String>,
pub status: PaysafePaymentStatus,
pub settlements: Option<Vec<PaysafeSettlementResponse>>,
} | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | PaysafePaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct InvalidFileStorageConfig(&'static str); | crates/external_services/src/file_storage.rs | external_services | struct_definition | 11 | rust | InvalidFileStorageConfig | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/compatibility/stripe/payment_intents/types.rs
Public functions: 1
Public structs: 20
use std::str::FromStr;
use api_models::payments;
use common_types::payments as common_payments_types;
use common_utils::{
crypto::Encryptable,
date_time,
ext_traits::StringExt,
id_type,
p... | crates/router/src/compatibility/stripe/payment_intents/types.rs | router | full_file | 7,797 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_payment_method_proxy_card_core(
state: &SessionState,
req: api::PaymentMethodCreate,
merchant_context: &domain::MerchantContext,
profile: &domain::Profile,
merchant_id: &id_type::MerchantId,
customer_id: &id_type::GlobalCustomerId,
payment_method_id: id_type::GlobalPaymen... | crates/router/src/core/payment_methods.rs | router | function_signature | 648 | rust | null | null | null | null | create_payment_method_proxy_card_core | null | null | null | null | null | null | null |
pub struct AirwallexThreeDsData {
acs_response: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | AirwallexThreeDsData | null | null | null | null | null | null | null | null | null | null | null |
pub struct RetrieveCardRespPayload {
pub card: Option<Card>,
pub enc_card_data: Option<Secret<String>>,
} | crates/router/src/core/payment_methods/transformers.rs | router | struct_definition | 26 | rust | RetrieveCardRespPayload | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentsResponseData {
pub fn get_connector_metadata(&self) -> Option<masking::Secret<serde_json::Value>> {
match self {
Self::TransactionResponse {
connector_metadata, ..
}
| Self::PreProcessingResponse {
connector_metadata, ..
... | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | impl_block | 835 | rust | null | PaymentsResponseData | null | impl PaymentsResponseData | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Bluesnap {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&BLUESNAP_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*BLUESNAP_SUPPORTED_PAYMENT_METHODS)
}
fn get_s... | crates/hyperswitch_connectors/src/connectors/bluesnap.rs | hyperswitch_connectors | impl_block | 111 | rust | null | Bluesnap | ConnectorSpecifications for | impl ConnectorSpecifications for for Bluesnap | null | null | null | null | null | null | null | null |
/// Masked serialization.
///
/// the default behaviour for secrets is to serialize in exposed format since the common use cases
/// for storing the secret to database or sending it over the network requires the secret to be exposed
/// This method allows to serialize the secret in masked format if needed for logs or o... | crates/masking/src/serde.rs | masking | function_signature | 105 | rust | null | null | null | null | masked_serialize | null | null | null | null | null | null | null |
impl Health {
pub fn server(state: AppState) -> Scope {
web::scope("/v2/health")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::get().to(health)))
.service(web::resource("/ready").route(web::get().to(deep_health_check)))
}
} | crates/router/src/routes/app.rs | router | impl_block | 74 | rust | null | Health | null | impl Health | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Worldpay {} | crates/hyperswitch_connectors/src/connectors/worldpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Worldpay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Worldpay | null | null | null | null | null | null | null | null |
pub struct Card {
pub card_number: cards::CardNumber,
pub card_exp_month: Secret<String>,
pub card_exp_year: Secret<String>,
pub card_cvc: Secret<String>,
pub card_issuer: Option<String>,
pub card_network: Option<common_enums::CardNetwork>,
pub card_type: Option<String>,
pub card_issuing... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 132 | rust | Card | null | null | null | null | null | null | null | null | null | null | null |
pub struct ListCountriesCurrenciesResponse {
pub currencies: HashSet<api_enums::Currency>,
pub countries: HashSet<CountryCodeWithName>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 31 | rust | ListCountriesCurrenciesResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct GpaymentsAuthenticationRequest {
pub acct_number: CardNumber,
pub authentication_ind: String,
pub browser_info_collected: BrowserInfoCollected,
pub card_expiry_date: String,
#[serde(rename = "notificationURL")]
pub notification_url: String,
pub merchant_id: common_utils::id_type::... | crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs | hyperswitch_connectors | struct_definition | 140 | rust | GpaymentsAuthenticationRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/flows/session_flow.rs
use api_models::{admin as admin_types, payments as payment_types};
use async_trait::async_trait;
use common_utils::{
ext_traits::ByteSliceExt,
request::RequestContent,
types::{AmountConvertor, StringMajorUnitForConnector},
};
use error_stack::{Rep... | crates/router/src/core/payments/flows/session_flow.rs#chunk0 | router | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_merchant_account_from_db(
&self,
state: SessionState,
) -> UserResult<MerchantAccount> {
let key_manager_state = &(&state).into();
let key_store = state
.store
.get_merchant_key_store_by_merchant_id(
key_manager_state,
... | crates/router/src/utils/user.rs | router | function_signature | 241 | rust | null | null | null | null | get_merchant_account_from_db | null | null | null | null | null | null | null |
impl IncomingWebhook for Iatapay {
fn get_webhook_source_verification_algorithm(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn crypto::VerifySignature + Send>, errors::ConnectorError> {
Ok(Box::new(crypto::HmacSha256))
}
fn get_webhook_source_ver... | crates/hyperswitch_connectors/src/connectors/iatapay.rs | hyperswitch_connectors | impl_block | 981 | rust | null | Iatapay | IncomingWebhook for | impl IncomingWebhook for for Iatapay | null | null | null | null | null | null | null | null |
Documentation: api-reference/intelligent-router-api-reference/contract-routing/update-contract-information-for-an-entity.mdx
# Type: Doc File
---
openapi: post /contract_routing.ContractScoreCalculator/UpdateContract
--- | api-reference/intelligent-router-api-reference/contract-routing/update-contract-information-for-an-entity.mdx | null | doc_file | 44 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Thunes {} | crates/hyperswitch_connectors/src/connectors/thunes.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Thunes | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Thunes | null | null | null | null | null | null | null | null |
pub struct RoutingEventsResult {
pub merchant_id: common_utils::id_type::MerchantId,
pub profile_id: common_utils::id_type::ProfileId,
pub payment_id: String,
pub routable_connectors: String,
pub payment_connector: Option<String>,
pub request_id: Option<String>,
pub flow: String,
pub url... | crates/analytics/src/routing_events/events.rs | analytics | struct_definition | 159 | rust | RoutingEventsResult | null | null | null | null | null | null | null | null | null | null | null |
File: connector-template/test.rs
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::{
types::{self, api, storage::enums,
}};
use crate::utils::{self, ConnectorActions};
use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct {{project-name | down... | connector-template/test.rs | connector-template | full_file | 2,954 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_acs_signed_content(&self) -> Option<String> {
if let Self::Challenge(challenge_params) = self {
challenge_params.acs_signed_content.clone()
} else {
None
}
} | crates/hyperswitch_domain_models/src/router_request_types/authentication.rs | hyperswitch_domain_models | function_signature | 48 | rust | null | null | null | null | get_acs_signed_content | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ProgramConnectorSelection
{
"type": "object",
"description": "The program, having a default connector selection and\na bunch of rules. Also can hold arbitrary metadata.",
"required": [
"defaultSelection",
"rules",
"metadata"
],
"properties": {
"defaultSel... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 136 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ProgramConnectorSelection"
] | null | null | null | null |
pub struct AdyenPlatformAccountHolder {
description: String,
id: String,
} | crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs | hyperswitch_connectors | struct_definition | 19 | rust | AdyenPlatformAccountHolder | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_user_id(&self) -> String {
self.user_id.clone()
} | crates/router/src/types/domain/user.rs | router | function_signature | 19 | rust | null | null | null | null | get_user_id | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::IncomingWebhookReceive;
let (merchant_id, connector_id) = path.into_inner();
let is_relay_webhook = true;
Box::pin(api::server_wrap(
flow.clone(),
state,
&req,
(),
|state, auth, _, req_state| {
let merchant_context = ... | crates/router/src/routes/webhooks.rs | router | impl_block | 187 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn payouts_create(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<payout_types::PayoutCreateRequest>,
) -> HttpResponse {
let flow = Flow::PayoutsCreate;
Box::pin(api::server_wrap(
flow,
state,
&req,
json_payload.into_inner(),
... | crates/router/src/routes/payouts.rs | router | function_signature | 181 | rust | null | null | null | null | payouts_create | null | null | null | null | null | null | null |
impl PaymentMethodsUpdateForm {
pub fn validate_and_get_payment_method_records(self) -> UpdateValidationResult {
let records = parse_update_csv(self.file.data.to_bytes()).map_err(|e| {
errors::ApiErrorResponse::PreconditionFailed {
message: e.to_string(),
}
})... | crates/router/src/core/payment_methods/migration.rs | router | impl_block | 77 | rust | null | PaymentMethodsUpdateForm | null | impl PaymentMethodsUpdateForm | null | null | null | null | null | null | null | null |
pub fn apply_changeset(self, source: PayoutAttempt) -> PayoutAttempt {
let PayoutAttemptUpdateInternal {
payout_token,
connector_payout_id,
status,
error_message,
error_code,
is_eligible,
business_country,
business_l... | crates/diesel_models/src/payout_attempt.rs | diesel_models | function_signature | 354 | rust | null | null | null | null | apply_changeset | null | null | null | null | null | null | null |
pub struct BlackhawknetworkVerifyAccountRequest {
pub account_number: Secret<String>,
pub product_line_id: Secret<String>,
pub account_type: AccountType,
#[serde(skip_serializing_if = "Option::is_none")]
pub pin: Option<Secret<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub c... | crates/hyperswitch_connectors/src/connectors/blackhawknetwork/transformers.rs | hyperswitch_connectors | struct_definition | 107 | rust | BlackhawknetworkVerifyAccountRequest | null | null | null | null | null | null | null | null | null | null | null |
let body_bytes = bytes::Bytes::copy_from_slice(body);
let parsed_param: GetnetWebhookNotificationResponse =
parse_url_encoded_to_struct(body_bytes)
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
let response_base64 = &parsed_param.response_base64.peek();
let dec... | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 789 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Subscription {
pub async fn find_by_merchant_id_subscription_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
subscription_id: String,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
... | crates/diesel_models/src/query/subscription.rs | diesel_models | impl_block | 282 | rust | null | Subscription | null | impl Subscription | null | null | null | null | null | null | null | null |
pub struct ForteMeta {
pub auth_id: String,
} | crates/hyperswitch_connectors/src/connectors/forte/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | ForteMeta | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/configs.rs
Public functions: 1
Public structs: 3
use std::convert::From;
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use serde::{Deserialize, Serialize};
use crate::schema::configs;
#[derive(Default, Clone, Debug, Insertable, Serialize, Deserialize)]
... | crates/diesel_models/src/configs.rs | diesel_models | full_file | 333 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct HelcimMetaData {
pub preauth_transaction_id: u64,
} | crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | HelcimMetaData | null | null | null | null | null | null | null | null | null | null | null |
impl<T: DatabaseStore> PayoutAttemptInterface for RouterStore<T> {} | crates/storage_impl/src/lib.rs | storage_impl | impl_block | 16 | rust | null | RouterStore | PayoutAttemptInterface for | impl PayoutAttemptInterface for for RouterStore | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for CtpMastercard {} | crates/hyperswitch_connectors/src/connectors/ctp_mastercard.rs | hyperswitch_connectors | impl_block | 9 | rust | null | CtpMastercard | ConnectorSpecifications for | impl ConnectorSpecifications for for CtpMastercard | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Deutschebank {
fn id(&self) -> &'static str {
"deutschebank"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, con... | crates/hyperswitch_connectors/src/connectors/deutschebank.rs | hyperswitch_connectors | impl_block | 394 | rust | null | Deutschebank | ConnectorCommon for | impl ConnectorCommon for for Deutschebank | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.AcquirerData
{
"type": "object",
"description": "Represents data about the acquirer used in the 3DS decision rule.",
"required": [
"country"
],
"properties": {
"country": {
"$ref": "#/components/schemas/Country"
},
"fraud_rate": {
"type": "num... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 122 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"AcquirerData"
] | null | null | null | null |
pub struct CryptopayPaymentsResponse {
pub data: CryptopayPaymentResponseData,
} | crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | CryptopayPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardRange {
pub scheme_id: netcetera_types::SchemeId,
pub directory_server_id: Option<String>,
pub acs_protocol_versions: Vec<AcsProtocolVersion>,
#[serde(rename = "threeDSMethodDataForm")]
pub three_ds_method_data_form: Option<ThreeDSMethodDataForm>,
pub highest_common_supported_vers... | crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs | hyperswitch_connectors | struct_definition | 80 | rust | CardRange | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Gpayments {
fn get_webhook_object_reference_id(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<ObjectReferenceId, ConnectorError> {
Err(report!(ConnectorError::WebhooksNotImplemented))
}
fn get_webhook_event_type(
&self,
... | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | impl_block | 173 | rust | null | Gpayments | IncomingWebhook for | impl IncomingWebhook for for Gpayments | null | null | null | null | null | null | null | null |
pub struct PaymentReceipt {
pub approved_amount: ApprovedAmount,
pub processor_response_details: Option<ProcessorResponseDetails>,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | PaymentReceipt | null | null | null | null | null | null | null | null | null | null | null |
pub async fn post_payment_frm_core<F, D>(
state: &SessionState,
req_state: ReqState,
merchant_context: &domain::MerchantContext,
payment_data: &mut D,
frm_info: &mut FrmInfo<F, D>,
frm_configs: FrmConfigsObject,
customer: &Option<domain::Customer>,
should_continue_capture: &mut bool,
) -... | crates/router/src/core/fraud_check.rs | router | function_signature | 631 | rust | null | null | null | null | post_payment_frm_core | null | null | null | null | null | null | null |
pub async fn payouts_confirm(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<payout_types::PayoutCreateRequest>,
path: web::Path<id_type::PayoutId>,
) -> HttpResponse {
let flow = Flow::PayoutsConfirm;
let mut payload = json_payload.into_inner();
let payout_id = path.i... | crates/router/src/routes/payouts.rs | router | function_signature | 289 | rust | null | null | null | null | payouts_confirm | null | null | null | null | null | null | null |
pub async fn make_payout_data(
_state: &SessionState,
_merchant_context: &domain::MerchantContext,
_auth_profile_id: Option<id_type::ProfileId>,
_req: &payouts::PayoutRequest,
locale: &str,
) -> RouterResult<PayoutData> {
todo!()
} | crates/router/src/core/payouts.rs | router | function_signature | 74 | rust | null | null | null | null | make_payout_data | null | null | null | null | null | null | null |
pub fn flat_struct_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input = parse_macro_input!(input as syn::DeriveInput);
let name = &input.ident;
let expanded = quote::quote! {
impl #name {
pub fn flat_struct(&self) -> std::collections::HashMap<String, String> {... | crates/router_derive/src/lib.rs | router_derive | function_signature | 315 | rust | null | null | null | null | flat_struct_derive | null | null | null | null | null | null | null |
pub fn into_inner(self) -> FredRedisValue {
self.inner
} | crates/redis_interface/src/types.rs | redis_interface | function_signature | 17 | rust | null | null | null | null | into_inner | null | null | null | null | null | null | null |
pub struct RazorpayPaymentWebhookPayload {
// pub entity: WebhookPaymentEntity,
// } | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | RazorpayPaymentWebhookPayload | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayboxErrorResponse {
pub status_code: u16,
pub code: String,
pub message: String,
pub reason: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | PayboxErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
impl<T: FromStr + Display + Default> Default for DBEnumWrapper<T> {
fn default() -> Self {
Self(T::default())
}
} | crates/analytics/src/types.rs | analytics | impl_block | 34 | rust | null | DBEnumWrapper | Default for | impl Default for for DBEnumWrapper | null | null | null | null | null | null | null | null |
impl api::Refund for Blackhawknetwork {} | crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Blackhawknetwork | api::Refund for | impl api::Refund for for Blackhawknetwork | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Globepay {} | crates/hyperswitch_connectors/src/connectors/globepay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Globepay | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Globepay | null | null | null | null | null | null | null | null |
pub async fn delete_surcharge_decision_config(
state: SessionState,
merchant_context: domain::MerchantContext,
) -> RouterResponse<()> {
use common_utils::ext_traits::ValueExt;
use storage_impl::redis::cache;
use super::routing::helpers::update_merchant_active_algorithm_ref;
let db = state.sto... | crates/router/src/core/surcharge_decision_config.rs | router | function_signature | 361 | rust | null | null | null | null | delete_surcharge_decision_config | null | null | null | null | null | null | null |
pub struct MerchantAccount {
pub merchant_id: String,
pub gateway_success_rate_based_decider_input: Option<String>,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 26 | rust | MerchantAccount | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/api/connector_onboarding.rs
pub mod paypal;
| crates/router/src/types/api/connector_onboarding.rs | router | full_file | 17 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn to_field_value_pairs(
&self,
request_id: String,
global_id: String,
) -> crate::StorageResult<Vec<(&str, String)>> {
let pushed_at = common_utils::date_time::now_unix_timestamp();
Ok(vec![
(
"typed_sql",
serde_json::to_strin... | crates/diesel_models/src/kv.rs | diesel_models | function_signature | 119 | rust | null | null | null | null | to_field_value_pairs | null | null | null | null | null | null | null |
pub struct CybersourceConsumerAuthInformationEnrollmentResponse {
access_token: Option<Secret<String>>,
step_up_url: Option<String>,
//Added to segregate the three_ds_data in a separate struct
#[serde(flatten)]
validate_response: CybersourceConsumerAuthValidateResponse,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 63 | rust | CybersourceConsumerAuthInformationEnrollmentResponse | null | null | null | null | null | null | null | null | null | null | null |
impl std::ops::DerefMut for PayoutsMandateReference {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
} | crates/diesel_models/src/payment_method.rs | diesel_models | impl_block | 43 | rust | null | PayoutsMandateReference | std::ops::DerefMut for | impl std::ops::DerefMut for for PayoutsMandateReference | null | null | null | null | null | null | null | null |
File: crates/analytics/src/types.rs
Public structs: 1
use std::{fmt::Display, str::FromStr};
use common_utils::{
errors::{CustomResult, ErrorSwitch, ParsingError},
events::{ApiEventMetric, ApiEventsType},
impl_api_event_type,
};
use error_stack::{report, Report, ResultExt};
use super::query::QueryBuildi... | crates/analytics/src/types.rs | analytics | full_file | 990 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn relay_retrieve(
state: SessionState,
merchant_context: domain::MerchantContext,
profile_id_optional: Option<id_type::ProfileId>,
req: relay_api_models::RelayRetrieveRequest,
) -> RouterResponse<relay_api_models::RelayResponse> {
let db = state.store.as_ref();
let key_manager_state =... | crates/router/src/core/relay.rs | router | function_signature | 717 | rust | null | null | null | null | relay_retrieve | null | null | null | null | null | null | null |
pub struct BarclaycardRefundResponse {
id: String,
status: BarclaycardRefundStatus,
error_information: Option<BarclaycardErrorInformation>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | BarclaycardRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Archipel {
pub const fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/archipel.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Archipel | null | impl Archipel | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Billwerk {
fn id(&self) -> &'static str {
"billwerk"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors:... | crates/hyperswitch_connectors/src/connectors/billwerk.rs | hyperswitch_connectors | impl_block | 434 | rust | null | Billwerk | ConnectorCommon for | impl ConnectorCommon for for Billwerk | null | null | null | null | null | null | null | null |
pub struct BluesnapThreeDsResult {
three_d_secure: Option<BluesnapThreeDsReference>,
pub status: String,
pub code: Option<String>,
pub info: Option<RedirectErrorMessage>,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | BluesnapThreeDsResult | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Mpgs {} | crates/hyperswitch_connectors/src/connectors/mpgs.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Mpgs | api::PaymentCapture for | impl api::PaymentCapture for for Mpgs | null | null | null | null | null | null | null | null |
pub async fn update(
conn: &PgPooledConn,
attempt_id: String,
merchant_id: &common_utils::id_type::MerchantId,
dynamic_routing_stat: DynamicRoutingStatsUpdate,
) -> StorageResult<Self> {
generics::generic_update_with_results::<
<Self as HasTable>::Table,
... | crates/diesel_models/src/query/dynamic_routing_stats.rs | diesel_models | function_signature | 174 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
File: crates/router/src/db/mandate.rs
use common_utils::id_type;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::storage::{self as storage_types, enums::MerchantStorageScheme},
};
#[async_trait::async_trait]
pub trait MandateInterface {
async fn find_mandate_by_merchant_id_mand... | crates/router/src/db/mandate.rs | router | full_file | 5,725 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Bluecode {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&BLUECODE_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*BLUECODE_SUPPORTED_PAYMENT_METHODS)
}
fn get_s... | crates/hyperswitch_connectors/src/connectors/bluecode.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Bluecode | ConnectorSpecifications for | impl ConnectorSpecifications for for Bluecode | null | null | null | null | null | null | null | null |
pub struct RazorpayErrorResponse {
pub error: RazorpayError,
} | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | RazorpayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeutschebankMandate {
reference: Secret<String>,
signed_on: String,
} | crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | DeutschebankMandate | null | null | null | null | null | null | null | null | null | null | null |
pub struct CheckoutErrorResponse {
pub request_id: Option<String>,
pub error_type: Option<String>,
pub error_codes: Option<Vec<String>>,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 31 | rust | CheckoutErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct QueryTransactionResult {
query_response: QueryResponse,
} | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | QueryTransactionResult | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Vgs {} | crates/hyperswitch_connectors/src/connectors/vgs.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Vgs | api::Payment for | impl api::Payment for for Vgs | null | null | null | null | null | null | null | null |
pub struct CofContract {
#[serde(rename = "type")]
recurring_type: RecurringType,
} | crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | CofContract | null | null | null | null | null | null | null | null | null | null | null |
pub struct VoltAuthType {
pub(super) username: Secret<String>,
pub(super) password: Secret<String>,
pub(super) client_id: Secret<String>,
pub(super) client_secret: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | VoltAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct BillingAddress {
pub city: Option<String>,
pub country_code: Option<CountryAlpha2>,
pub house_number: Option<Secret<String>>,
pub state: Option<Secret<String>>,
pub state_code: Option<Secret<String>>,
pub street: Option<Secret<String>>,
pub zip: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs | hyperswitch_connectors | struct_definition | 71 | rust | BillingAddress | null | null | null | null | null | null | null | null | null | null | null |
pub struct GlobepayConnectorMetadata {
image_data_url: url::Url,
} | crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | GlobepayConnectorMetadata | null | null | null | null | null | null | null | null | null | null | null |
pub fn update_feature(
&mut self,
enabled_feature: DynamicRoutingFeatures,
dynamic_routing_type: DynamicRoutingType,
) {
match dynamic_routing_type {
DynamicRoutingType::SuccessRateBasedRouting => {
self.success_based_algorithm = Some(SuccessBasedAlgorithm... | crates/api_models/src/routing.rs | api_models | function_signature | 176 | rust | null | null | null | null | update_feature | null | null | null | null | null | null | null |
pub struct SubmitSingleRefundResponse {
submit_single_refund_result: SubmitSingleRefundResult,
} | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | SubmitSingleRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_role_with_groups(
state: SessionState,
user_from_token: UserFromToken,
role: role_api::GetRoleRequest,
) -> UserResponse<role_api::RoleInfoWithGroupsResponse> {
let role_info = roles::RoleInfo::from_role_id_org_id_tenant_id(
&state,
&role.role_id,
&user_from_toke... | crates/router/src/core/user_role/role.rs | router | function_signature | 224 | rust | null | null | null | null | get_role_with_groups | null | null | null | null | null | null | null |
pub fn payments_create_intent() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 7 | rust | null | null | null | null | payments_create_intent | null | null | null | null | null | null | null |
pub fn get_email(&self) -> UserEmail {
self.email.clone()
} | crates/router/src/types/domain/user.rs | router | function_signature | 18 | rust | null | null | null | null | get_email | null | null | null | null | null | null | null |
pub struct WorldpayvantivRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | WorldpayvantivRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl MerchantKeyStoreInterface for KafkaStore {
async fn insert_merchant_key_store(
&self,
state: &KeyManagerState,
merchant_key_store: domain::MerchantKeyStore,
key: &Secret<Vec<u8>>,
) -> CustomResult<domain::MerchantKeyStore, errors::StorageError> {
self.diesel_store
... | crates/router/src/db/kafka_store.rs | router | impl_block | 443 | rust | null | KafkaStore | MerchantKeyStoreInterface for | impl MerchantKeyStoreInterface for for KafkaStore | null | null | null | null | null | null | null | null |
Documentation: crates/hyperswitch_domain_models/README.md
# Type: Doc File
# Hyperswitch domain models
Represents the data/domain models used by the business/domain layer | crates/hyperswitch_domain_models/README.md | null | doc_file | 38 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn new(redis: &RedisSettings) -> error_stack::Result<Self, StorageError> {
Ok(Self {
addresses: Default::default(),
configs: Default::default(),
merchant_accounts: Default::default(),
merchant_connector_accounts: Default::default(),
payment_a... | crates/storage_impl/src/mock_db.rs | storage_impl | function_signature | 373 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub async fn totp_begin(state: web::Data<AppState>, req: HttpRequest) -> HttpResponse {
let flow = Flow::TotpBegin;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
(),
|state, user, _, _| user_core::begin_totp(state, user),
&auth::SinglePurposeJWTAuth(TokenP... | crates/router/src/routes/user.rs | router | function_signature | 104 | rust | null | null | null | null | totp_begin | null | null | null | null | null | null | null |
pub struct TsysCaptureRequest {
#[serde(rename = "deviceID")]
device_id: Secret<String>,
transaction_key: Secret<String>,
transaction_amount: StringMinorUnit,
#[serde(rename = "transactionID")]
transaction_id: String,
#[serde(rename = "developerID")]
developer_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs | hyperswitch_connectors | struct_definition | 70 | rust | TsysCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_by_merchant_id_event_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
event_id: &str,
event: EventUpdateInternal,
) -> StorageResult<Self> {
generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable... | crates/diesel_models/src/query/events.rs | diesel_models | function_signature | 133 | rust | null | null | null | null | update_by_merchant_id_event_id | null | null | null | null | null | null | null |
pub fn get_secret(self) -> String {
self.0
} | crates/router/src/types/domain/user.rs | router | function_signature | 16 | rust | null | null | null | null | get_secret | null | null | null | null | null | null | null |
pub struct NovalnetApplePay {
wallet_data: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | NovalnetApplePay | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/payments/helpers.rs
Public functions: 1
use error_stack::ResultExt;
use crate::{
core::errors::{self, RouterResult},
logger,
types::{self, api},
utils::{Encode, ValueExt},
};
#[cfg(feature = "v1")]
pub fn populate_browser_info(
req: &actix_web::HttpRequest,
pay... | crates/router/src/routes/payments/helpers.rs | router | full_file | 622 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl GetCaptureMethod for PaymentsCancelData {
fn get_capture_method(&self) -> Option<enums::CaptureMethod> {
None
}
} | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | impl_block | 32 | rust | null | PaymentsCancelData | GetCaptureMethod for | impl GetCaptureMethod for for PaymentsCancelData | null | null | null | null | null | null | null | null |
pub(crate) fn is_webhook_delivery_retryable_error(&self) -> bool {
match self {
Self::MerchantConfigNotFound
| Self::MerchantWebhookDetailsNotFound
| Self::MerchantWebhookUrlNotConfigured
| Self::OutgoingWebhookResponseEncodingFailed => false,
Self::W... | crates/router/src/core/errors.rs | router | function_signature | 159 | rust | null | null | null | null | is_webhook_delivery_retryable_error | null | null | null | null | null | null | null |
pub async fn payments_approve(
state: web::Data<app::AppState>,
http_req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsApproveRequest>,
path: web::Path<common_utils::id_type::PaymentId>,
) -> impl Responder {
let mut payload = json_payload.into_inner();
let payment_id =... | crates/router/src/routes/payments.rs | router | function_signature | 454 | rust | null | null | null | null | payments_approve | null | null | null | null | null | null | null |
pub struct RecurringMetadata {
frequency: Frequency,
amount: ChargeAmount,
} | crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | RecurringMetadata | 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.