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 Authentication {
pub authentication_id: common_utils::id_type::AuthenticationId,
pub merchant_id: common_utils::id_type::MerchantId,
pub authentication_connector: Option<String>,
pub connector_authentication_id: Option<String>,
pub authentication_data: Option<Value>,
pub payment_metho... | crates/hyperswitch_domain_models/src/authentication.rs | hyperswitch_domain_models | struct_definition | 610 | rust | Authentication | null | null | null | null | null | null | null | null | null | null | null |
pub async fn contract_based_routing_update_configs() {} | crates/openapi/src/routes/routing.rs | openapi | function_signature | 10 | rust | null | null | null | null | contract_based_routing_update_configs | null | null | null | null | null | null | null |
impl RequestPaymentMethodTypes {
/// Get payment_method_type
#[cfg(feature = "v1")]
pub fn get_payment_method_type(&self) -> Option<api_enums::PaymentMethodType> {
Some(self.payment_method_type)
}
} | crates/api_models/src/payment_methods.rs | api_models | impl_block | 54 | rust | null | RequestPaymentMethodTypes | null | impl RequestPaymentMethodTypes | null | null | null | null | null | null | null | null |
Documentation: crates/storage_impl/README.md
# Type: Doc File
# Storage implementations
Storage backend implementations for data structures & objects.
| crates/storage_impl/README.md | null | doc_file | 28 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct FileMetadataNew {
pub file_id: String,
pub merchant_id: common_utils::id_type::MerchantId,
pub file_name: Option<String>,
pub file_size: i32,
pub file_type: String,
pub provider_file_id: Option<String>,
pub file_upload_provider: Option<common_enums::FileUploadProvider>,
pub av... | crates/diesel_models/src/file.rs | diesel_models | struct_definition | 125 | rust | FileMetadataNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlacetopayCard {
number: cards::CardNumber,
expiration: Secret<String>,
cvv: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | PlacetopayCard | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Trustpayments {} | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Trustpayments | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Trustpayments | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ApiKeyRevoke;
let key_id = path.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
&key_id,
|state,
auth::AuthenticationDataWithoutProfile {
merchant_account, ..
},
key_id,
_|... | crates/router/src/routes/api_keys.rs | router | impl_block | 158 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ThreeDsDecisionRuleExecuteResponse
{
"type": "object",
"description": "Represents the response from executing a 3DS decision rule.",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/components/schemas/ThreeDSDecision"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 82 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ThreeDsDecisionRuleExecuteResponse"
] | null | null | null | null |
impl Ebanx {
pub fn new() -> &'static Self {
&Self {
#[cfg(feature = "payouts")]
amount_converter: &FloatMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 45 | rust | null | Ebanx | null | impl Ebanx | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/trustpayments.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
... | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | full_file | 4,733 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ElavonSyncResponse {
pub ssl_trans_status: TransactionSyncStatus,
pub ssl_transaction_type: SyncTransactionType,
pub ssl_txn_id: String,
} | crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | ElavonSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BankDebitResponse
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/BankDebitAdditionalData"
}
],
"nullable": true
},
{
"type": "object"
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 73 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BankDebitResponse"
] | null | null | null | null |
impl api::PaymentVoid for Zen {} | crates/hyperswitch_connectors/src/connectors/zen.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Zen | api::PaymentVoid for | impl api::PaymentVoid for for Zen | null | null | null | null | null | null | null | null |
impl PaymentMethodsController for PmCards<'_> {
#[cfg(feature = "v1")]
#[instrument(skip_all)]
#[allow(clippy::too_many_arguments)]
async fn create_payment_method(
&self,
req: &api::PaymentMethodCreate,
customer_id: &id_type::CustomerId,
payment_method_id: &str,
l... | crates/router/src/core/payment_methods/cards.rs#impl_block_chunk0 | router | impl_block_chunk | 8,189 | rust | null | PmCards | PaymentMethodsController for | impl PaymentMethodsController for for PmCards | null | null | null | null | null | null | null | 0 |
pub struct PaysafeRefundRequest {
pub merchant_ref_num: String,
pub amount: MinorUnit,
} | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | PaysafeRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
/// Middleware for recording request-response metrics
pub struct RequestResponseMetrics; | crates/router/src/middleware.rs | router | struct_definition | 14 | rust | RequestResponseMetrics | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/accounts"
{
"post": {
"tags": [
"Merchant Account"
],
"summary": "Merchant Account - Create",
"description": "Create a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.",
"operationId": ... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 396 | .json | null | null | null | null | null | openapi_spec | paths | [
"/accounts"
] | null | null | null | null |
impl Flexiti {
fn get_default_header() -> (String, masking::Maskable<String>) {
(
"x-reference-id".to_string(),
Uuid::new_v4().to_string().into(),
)
}
} | crates/hyperswitch_connectors/src/connectors/flexiti.rs | hyperswitch_connectors | impl_block | 50 | rust | null | Flexiti | null | impl Flexiti | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
web::scope("/organization")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::post().to(admin::organization_create)))
.service(
web::resource("/{id}")
.route(web::get().to(admin... | crates/router/src/routes/app.rs | router | function_signature | 88 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl ConnectorTransactionIdTrait for Capture {
fn get_optional_connector_transaction_id(&self) -> Option<&String> {
match self
.connector_capture_id
.as_ref()
.map(|capture_id| capture_id.get_txn_id(self.processor_capture_data.as_ref()))
.transpose()
{... | crates/diesel_models/src/query/capture.rs | diesel_models | impl_block | 128 | rust | null | Capture | ConnectorTransactionIdTrait for | impl ConnectorTransactionIdTrait for for Capture | null | null | null | null | null | null | null | null |
/// Validates the file storage configuration.
pub fn validate(&self) -> Result<(), InvalidFileStorageConfig> {
match self {
#[cfg(feature = "aws_s3")]
Self::AwsS3 { aws_s3 } => aws_s3.validate(),
Self::FileSystem => Ok(()),
}
} | crates/external_services/src/file_storage.rs | external_services | function_signature | 66 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
OpenAPI Block Path: components.securitySchemes
{
"admin_api_key": {
"type": "apiKey",
"in": "header",
"name": "api-key",
"description": "Admin API keys allow you to perform some privileged actions such as creating a merchant account and Merchant Connector account."
},
"api_key": {
"type": "api... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 297 | .json | null | null | null | null | null | openapi_spec | components | [
"securitySchemes"
] | null | null | null | null |
pub fn log_event<T: KafkaMessage>(&self, event: &T) -> MQResult<()> {
router_env::logger::debug!("Logging Kafka Event {event:?}");
let topic = self.get_topic(event.event_type());
self.producer
.0
.send(
BaseRecord::to(topic)
.key(&event... | crates/router/src/services/kafka.rs | router | function_signature | 215 | rust | null | null | null | null | log_event | null | null | null | null | null | null | null |
pub struct GcashRedirection {} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 7 | rust | GcashRedirection | null | null | null | null | null | null | null | null | null | null | null |
pub struct CybersourceRsyncResponse {
id: String,
application_information: Option<RsyncApplicationInformation>,
error_information: Option<CybersourceErrorInformation>,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | CybersourceRsyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct NuveiCardDetails {
card: payment_method_data::Card,
three_d: Option<ThreeD>,
card_holder_name: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | NuveiCardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct CustomerDeviceDataInput {
pub platform: Option<CustomerDevicePlatform>,
pub device_type: Option<CustomerDeviceType>,
pub display_size: Option<CustomerDeviceDisplaySize>,
} | crates/euclid/src/backend/inputs.rs | euclid | struct_definition | 38 | rust | CustomerDeviceDataInput | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_connector_name_as_string(&self) -> String {
self.connector_name.clone()
} | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 21 | rust | null | null | null | null | get_connector_name_as_string | null | null | null | null | null | null | null |
impl api::PaymentCapture for Deutschebank {} | crates/hyperswitch_connectors/src/connectors/deutschebank.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Deutschebank | api::PaymentCapture for | impl api::PaymentCapture for for Deutschebank | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/merchant_account.rs
Public functions: 7
Public structs: 4
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
pii, type_nam... | crates/hyperswitch_domain_models/src/merchant_account.rs | hyperswitch_domain_models | full_file | 6,754 | null | null | null | null | null | null | null | null | null | null | null | null | null |
CnpOnlineResponse,
SetupMandateRequestData,
PaymentsResponseData,
>,
) -> Result<Self, Self::Error> {
match item.response.authorization_response.as_ref() {
Some(auth_response) => {
let status =
get_attempt_status(Wor... | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs#chunk2 | hyperswitch_connectors | chunk | 8,184 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/bamboraapac.rs
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, XmlExt},
reques... | crates/hyperswitch_connectors/src/connectors/bamboraapac.rs | hyperswitch_connectors | full_file | 6,221 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Bitpay {} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bitpay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Bitpay | null | null | null | null | null | null | null | null |
pub async fn list_invitations_for_user(
state: SessionState,
user_from_token: auth::UserIdFromAuth,
) -> UserResponse<Vec<user_role_api::ListInvitationForUserResponse>> {
let user_roles = state
.global_store
.list_user_roles_by_user_id(ListUserRolesByUserIdPayload {
user_id: &use... | crates/router/src/core/user_role.rs | router | function_signature | 1,230 | rust | null | null | null | null | list_invitations_for_user | null | null | null | null | null | null | null |
pub fn get_cookie_from_header(headers: &HeaderMap) -> RouterResult<&str> {
let cookie = headers
.get(cookies::get_cookie_header())
.ok_or(report!(errors::ApiErrorResponse::CookieNotFound))?;
cookie
.to_str()
.change_context(errors::ApiErrorResponse::InvalidCookie)
} | crates/router/src/services/authentication.rs | router | function_signature | 71 | rust | null | null | null | null | get_cookie_from_header | null | null | null | null | null | null | null |
pub async fn list_routing_configs(
state: web::Data<AppState>,
req: HttpRequest,
query: web::Query<RoutingRetrieveQuery>,
transaction_type: Option<enums::TransactionType>,
) -> impl Responder {
let flow = Flow::RoutingRetrieveDictionary;
Box::pin(oss_api::server_wrap(
flow,
state... | crates/router/src/routes/routing.rs | router | function_signature | 260 | rust | null | null | null | null | list_routing_configs | null | null | null | null | null | null | null |
pub fn extract_card_network(&self) -> Option<common_enums::CardNetwork> {
self.payment_method_data
.as_ref()
.and_then(|value| {
value
.clone()
.parse_value::<api_models::payments::AdditionalPaymentData>(
"Ad... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 101 | rust | null | null | null | null | extract_card_network | null | null | null | null | null | null | null |
impl Default for DrainerSettings {
fn default() -> Self {
Self {
stream_name: "DRAINER_STREAM".into(),
num_partitions: 64,
max_read_count: 100,
shutdown_interval: 1000, // in milliseconds
loop_interval: 100, // in milliseconds
}
}
... | crates/drainer/src/settings.rs | drainer | impl_block | 80 | rust | null | DrainerSettings | Default for | impl Default for for DrainerSettings | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.OrganizationUpdateRequest
{
"type": "object",
"required": [
"platform_merchant_id"
],
"properties": {
"organization_name": {
"type": "string",
"description": "Name of the organization",
"nullable": true
},
"organization_details": {
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 188 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"OrganizationUpdateRequest"
] | null | null | null | null |
pub struct TokenData {
/// The specific token data retrieved from the vault
pub specific_token_data: SecretSerdeValue,
/// The type of vault connector being used (e.g., VGS)
pub vault_connector: VaultConnectors,
} | crates/injector/src/types.rs | injector | struct_definition | 54 | rust | TokenData | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BacsBankTransfer
{
"type": "object",
"required": [
"bank_account_number",
"bank_sort_code"
],
"properties": {
"bank_name": {
"type": "string",
"description": "Bank name",
"example": "Deutsche Bank",
"nullable": true
},
"bank_coun... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 269 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BacsBankTransfer"
] | null | null | null | null |
pub fn make_value_node<M: Metadata>(
&mut self,
value: NodeValue<V>,
info: Option<&'static str>,
metadata: Option<M>,
) -> NodeId {
self.value_map.get(&value).copied().unwrap_or_else(|| {
let node_id = self.nodes.push(Node::new(NodeType::Value(value.clone())));
... | crates/hyperswitch_constraint_graph/src/builder.rs | hyperswitch_constraint_graph | function_signature | 141 | rust | null | null | null | null | make_value_node | null | null | null | null | null | null | null |
pub struct Execute; | crates/hyperswitch_domain_models/src/router_flow_types/refunds.rs | hyperswitch_domain_models | struct_definition | 4 | rust | Execute | null | null | null | null | null | null | null | null | null | null | null |
pub struct ApprovedAmount {
pub total: FloatMajorUnit,
pub currency: Currency,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | ApprovedAmount | null | null | null | null | null | null | null | null | null | null | null |
pub struct CheckoutMethod {
pub redirect: RedirectUrl,
} | crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | CheckoutMethod | null | null | null | null | null | null | null | null | null | null | null |
impl<O> BackendOutput<O> {
// get_connector_selection
pub fn get_output(&self) -> &O {
&self.connector_selection
}
} | crates/euclid/src/backend.rs | euclid | impl_block | 35 | rust | null | BackendOutput | null | impl BackendOutput | null | null | null | null | null | null | null | null |
pub(crate) fn get_stream_key_flag(&self, stream_index: u8) -> String {
format!("{}_in_use", self.get_drainer_stream_name(stream_index))
} | crates/drainer/src/stream.rs | drainer | function_signature | 38 | rust | null | null | null | null | get_stream_key_flag | null | null | null | null | null | null | null |
/// Creates a new AWS S3 file storage client.
pub(super) async fn new(config: &AwsFileStorageConfig) -> Self {
let region_provider = RegionProviderChain::first_try(Region::new(config.region.clone()));
let sdk_config = aws_config::from_env().region(region_provider).load().await;
Self {
... | crates/external_services/src/file_storage/aws_s3.rs | external_services | function_signature | 94 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/router/src/events/routing_api_logs.rs
pub use hyperswitch_interfaces::events::routing_api_logs::RoutingEvent;
use super::EventType;
use crate::services::kafka::KafkaMessage;
impl KafkaMessage for RoutingEvent {
fn event_type(&self) -> EventType {
EventType::RoutingApiLogs
}
fn key(&... | crates/router/src/events/routing_api_logs.rs | router | full_file | 113 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_connector_config(key: &str) -> JsResult {
let key = api_model_enums::Connector::from_str(key)
.map_err(|_| "Invalid key received".to_string())?;
let res = connector::ConnectorConfig::get_connector_config(key)?;
Ok(serde_wasm_bindgen::to_value(&res)?)
} | crates/euclid_wasm/src/lib.rs | euclid_wasm | function_signature | 74 | rust | null | null | null | null | get_connector_config | null | null | null | null | null | null | null |
pub fn get_viz_digraph(&self) -> Graph {
graph!(
strict di id!("constraint_graph"),
self.nodes
.iter()
.map(|(node_id, node)| Self::build_node(node_id, node))
.map(Stmt::Node)
.chain(self.edges.va... | crates/hyperswitch_constraint_graph/src/graph.rs | hyperswitch_constraint_graph | function_signature | 90 | rust | null | null | null | null | get_viz_digraph | null | null | null | null | null | null | null |
pub async fn elimination_routing_update_configs(
state: SessionState,
request: routing_types::EliminationRoutingConfig,
algorithm_id: common_utils::id_type::RoutingId,
profile_id: common_utils::id_type::ProfileId,
) -> RouterResponse<routing_types::RoutingDictionaryRecord> {
metrics::ROUTING_UPDATE_... | crates/router/src/core/routing.rs | router | function_signature | 763 | rust | null | null | null | null | elimination_routing_update_configs | null | null | null | null | null | null | null |
pub struct PreAuthenticationDetails {
pub threeds_server_transaction_id: Option<String>,
pub maximum_supported_3ds_version: Option<common_utils::types::SemanticVersion>,
pub connector_authentication_id: Option<String>,
pub three_ds_method_data: Option<String>,
pub three_ds_method_url: Option<String>... | crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs | hyperswitch_domain_models | struct_definition | 103 | rust | PreAuthenticationDetails | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/analytics/api_event.rs
Public functions: 1
Public structs: 5
use std::{
collections::hash_map::DefaultHasher,
hash::{Hash, Hasher},
};
use super::{NameDescription, TimeRange};
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
pub struct ApiLogsRequest {
#[serde(fl... | crates/api_models/src/analytics/api_event.rs | api_models | full_file | 888 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CardRedirectData
{
"oneOf": [
{
"type": "object",
"required": [
"knet"
],
"properties": {
"knet": {
"type": "object"
}
}
},
{
"type": "object",
"required": [
"benefit"
],
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 206 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardRedirectData"
] | null | null | null | null |
pub fn add_granularity_in_mins(&mut self, granularity: Granularity) -> QueryResult<()> {
let interval = match granularity {
Granularity::OneMin => "1",
Granularity::FiveMin => "5",
Granularity::FifteenMin => "15",
Granularity::ThirtyMin => "30",
Granul... | crates/analytics/src/query.rs | analytics | function_signature | 137 | rust | null | null | null | null | add_granularity_in_mins | null | null | null | null | null | null | null |
pub fn make_dsl_input(
payments_dsl_input: &routing::PaymentsDslInput<'_>,
) -> RoutingResult<dsl_inputs::BackendInput> {
let mandate_data = dsl_inputs::MandateData {
mandate_acceptance_type: payments_dsl_input.setup_mandate.as_ref().and_then(
|mandate_data| {
mandate_data
... | crates/router/src/core/payments/routing.rs | router | function_signature | 893 | rust | null | null | null | null | make_dsl_input | null | null | null | null | null | null | null |
pub async fn find_resources<D, R, M>(
&self,
state: &KeyManagerState,
key_store: &MerchantKeyStore,
execute_query: R,
) -> error_stack::Result<Vec<D>, StorageError>
where
D: Debug + Sync + Conversion,
R: futures::Future<
Output = error_stack::Resul... | crates/storage_impl/src/lib.rs | storage_impl | function_signature | 238 | rust | null | null | null | null | find_resources | null | null | null | null | null | null | null |
pub struct WorldpayxmlAuthType {
pub(super) api_username: Secret<String>,
pub(super) api_password: Secret<String>,
pub(super) merchant_code: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | WorldpayxmlAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct RetryFeatureData {
/// indicates if step_up retry is possible
pub step_up_possible: bool,
/// indicates if retry with pan is possible
pub clear_pan_possible: bool,
/// indicates if retry with alternate network possible
pub alternate_network_possible: bool,
/// decision to be taken... | crates/common_types/src/domain.rs | common_types | struct_definition | 94 | rust | RetryFeatureData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_payment_metrics(
&self,
metric: &PaymentMetrics,
dimensions: &[PaymentDimensions],
auth: &AuthInfo,
filters: &PaymentFilters,
granularity: Option<Granularity>,
time_range: &TimeRange,
) -> types::MetricsResult<HashSet<(PaymentMetricsBucketIden... | crates/analytics/src/lib.rs | analytics | function_signature | 579 | rust | null | null | null | null | get_payment_metrics | null | null | null | null | null | null | null |
pub fn get_total_amount(&self) -> MinorUnit {
self.net_amount.get_total_amount()
} | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 22 | rust | null | null | null | null | get_total_amount | null | null | null | null | null | null | null |
pub fn close(&self) {
self.running.store(false, atomic::Ordering::SeqCst);
} | crates/drainer/src/handler.rs | drainer | function_signature | 24 | rust | null | null | null | null | close | null | null | null | null | null | null | null |
pub struct UserUpdateInternal {
name: Option<String>,
password: Option<Secret<String>>,
is_verified: Option<bool>,
last_modified_at: PrimitiveDateTime,
totp_status: Option<TotpStatus>,
totp_secret: Option<Encryption>,
totp_recovery_codes: Option<Vec<Secret<String>>>,
last_password_modifi... | crates/diesel_models/src/user.rs | diesel_models | struct_definition | 89 | rust | UserUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Trustpay {
fn get_webhook_object_reference_id(
&self,
request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
let details: trustpay::TrustpayWebhookResponse = request
... | crates/hyperswitch_connectors/src/connectors/trustpay.rs | hyperswitch_connectors | impl_block | 1,572 | rust | null | Trustpay | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Trustpay | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payment-methods/payment-method--set-default-payment-method-for-customer.mdx
# Type: Doc File
---
openapi: post /{customer_id}/payment_methods/{payment_method_id}/default
--- | api-reference/v1/payment-methods/payment-method--set-default-payment-method-for-customer.mdx | null | doc_file | 48 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn contains_key(&self, key: K) -> bool {
key.get_id() < self.data.len()
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | function_signature | 26 | rust | null | null | null | null | contains_key | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/globepay.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use common_enums::enums;
use common_utils::{
crypto::{self, GenerateDigest},
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, Requ... | crates/hyperswitch_connectors/src/connectors/globepay.rs | hyperswitch_connectors | full_file | 4,797 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct OpayoRefundRequest {
pub amount: MinorUnit,
} | crates/hyperswitch_connectors/src/connectors/opayo/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | OpayoRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct BlikBankRedirectAdditionalData {
#[schema(value_type = Option<String>, example = "3GD9MO")]
pub blik_code: Option<String>,
} | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 36 | rust | BlikBankRedirectAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundListConstraints {
pub payment_id: Option<common_utils::id_type::PaymentId>,
pub refund_id: Option<String>,
pub profile_id: Option<Vec<common_utils::id_type::ProfileId>>,
pub limit: Option<i64>,
pub offset: Option<i64>,
pub time_range: Option<common_utils::types::TimeRange>,
... | crates/hyperswitch_domain_models/src/refunds.rs | hyperswitch_domain_models | struct_definition | 153 | rust | RefundListConstraints | null | null | null | null | null | null | null | null | null | null | null |
pub struct OnboardTransferMethodRequest {
pub country_code: enums::CountryAlpha2,
pub currency_code: Currency,
#[serde(rename = "type")]
pub transfer_method_type: TransferMethodType,
pub display_name: Secret<String>,
pub bank_account: BankAccount,
pub profile: Profile,
} | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | hyperswitch_connectors | struct_definition | 67 | rust | OnboardTransferMethodRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct NovalnetCard {
card_number: CardNumber,
card_expiry_month: Secret<String>,
card_expiry_year: Secret<String>,
card_cvc: Secret<String>,
card_holder: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | NovalnetCard | null | null | null | null | null | null | null | null | null | null | null |
pub struct TrustpaymentsCard {
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
complete: bool,
} | crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs | hyperswitch_connectors | struct_definition | 41 | rust | TrustpaymentsCard | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Novalnet {
fn validate_psync_reference_id(
&self,
data: &PaymentsSyncData,
_is_three_ds: bool,
_status: enums::AttemptStatus,
_connector_meta_data: Option<common_utils::pii::SecretSerdeValue>,
) -> CustomResult<(), errors::ConnectorError> {
... | crates/hyperswitch_connectors/src/connectors/novalnet.rs | hyperswitch_connectors | impl_block | 251 | rust | null | Novalnet | ConnectorValidation for | impl ConnectorValidation for for Novalnet | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Bluesnap {
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_ve... | crates/hyperswitch_connectors/src/connectors/bluesnap.rs | hyperswitch_connectors | impl_block | 1,102 | rust | null | Bluesnap | IncomingWebhook for | impl IncomingWebhook for for Bluesnap | null | null | null | null | null | null | null | null |
pub fn get_credentials(
&self,
) -> CustomResult<&PaypalConnectorCredentials, errors::ConnectorError> {
match self {
Self::TemporaryAuth => Err(errors::ConnectorError::InvalidConnectorConfig {
config: "TemporaryAuth found in connector_account_details",
}
... | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | function_signature | 80 | rust | null | null | null | null | get_credentials | null | null | null | null | null | null | null |
pub struct BokuPaymentsResponse {
charge_status: String, // xml parse only string to fields
charge_id: String,
hosted: Option<HostedUrlResponse>,
} | crates/hyperswitch_connectors/src/connectors/boku/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | BokuPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/hipay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/common_utils/src/keymanager.rs
Public functions: 4
//! Consists of all the common functions to use the Keymanager.
use core::fmt::Debug;
use std::str::FromStr;
use base64::Engine;
use error_stack::ResultExt;
use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode};
use masking::{PeekInterface... | crates/common_utils/src/keymanager.rs | common_utils | full_file | 1,956 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn is_three_decimal_currency(self) -> bool {
match self {
Self::BHD | Self::IQD | Self::JOD | Self::KWD | Self::LYD | Self::OMR | Self::TND => {
true
}
Self::AED
| Self::AFN
| Self::ALL
| Self::AMD
| Self::AO... | crates/common_enums/src/enums.rs | common_enums | function_signature | 1,113 | rust | null | null | null | null | is_three_decimal_currency | null | null | null | null | null | null | null |
pub struct MonerisAuthResponse {
access_token: Secret<String>,
token_type: String,
expires_in: String,
} | crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | MonerisAuthResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorTypeAndConnectorName<'_> {
fn get_routable_connector(&self) -> RouterResult<Option<api_enums::RoutableConnectors>> {
let mut routable_connector =
api_enums::RoutableConnectors::from_str(&self.connector_name.to_string()).ok();
let vault_connector =
api_enums::co... | crates/router/src/core/admin.rs | router | impl_block | 580 | rust | null | ConnectorTypeAndConnectorName | null | impl ConnectorTypeAndConnectorName | null | null | null | null | null | null | null | null |
pub async fn payment_methods_session_confirm(
state: SessionState,
req_state: routes::app::ReqState,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
payment_method_session_id: id_type::GlobalPaymentMethodSessionId,
request: payment_methods::PaymentMethodSessionConfirmRequest... | crates/router/src/core/payment_methods.rs | router | function_signature | 1,291 | rust | null | null | null | null | payment_methods_session_confirm | null | null | null | null | null | null | null |
pub struct PaypalSourceVerificationResponse {
pub verification_status: PaypalSourceVerificationStatus,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | PaypalSourceVerificationResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ToggleDynamicRouting;
let wrapper = routing_types::ToggleDynamicRoutingWrapper {
feature_to_enable: query.into_inner().enable,
profile_id: path.into_inner().profile_id,
};
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
... | crates/router/src/routes/routing.rs | router | impl_block | 264 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payments/metrics/sessionized_metrics/payment_processed_amount.rs
use std::collections::HashSet;
use api_models::analytics::{
payments::{PaymentDimensions, PaymentFilters, PaymentMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use diese... | crates/analytics/src/payments/metrics/sessionized_metrics/payment_processed_amount.rs | analytics | full_file | 1,120 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_mandate(
state: SessionState,
merchant_context: domain::MerchantContext,
req: mandates::MandateId,
) -> RouterResponse<mandates::MandateResponse> {
let mandate = state
.store
.as_ref()
.find_mandate_by_merchant_id_mandate_id(
merchant_context.get_merc... | crates/router/src/core/mandate.rs | router | function_signature | 188 | rust | null | null | null | null | get_mandate | null | null | null | null | null | null | null |
pub struct AwsFileStorageConfig {
/// The AWS region to send file uploads
region: String,
/// The AWS s3 bucket to send file uploads
bucket_name: String,
} | crates/external_services/src/file_storage/aws_s3.rs | external_services | struct_definition | 41 | rust | AwsFileStorageConfig | null | null | null | null | null | null | null | null | null | null | null |
impl TempLockerCardSupport {
#[instrument(skip_all)]
async fn create_payment_method_data_in_temp_locker(
state: &routes::SessionState,
payment_token: &str,
card: api::CardDetailFromLocker,
pm: &domain::PaymentMethod,
merchant_key_store: &domain::MerchantKeyStore,
) ->... | crates/router/src/core/payment_methods/cards.rs | router | impl_block | 584 | rust | null | TempLockerCardSupport | null | impl TempLockerCardSupport | null | null | null | null | null | null | null | null |
pub struct CryptoData {
pub pay_currency: Option<String>,
pub network: Option<String>,
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 21 | rust | CryptoData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs
Public structs: 24
use masking::Secret;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayPaymentsRequest {
pub transaction_reference: String,
pub mer... | crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs | hyperswitch_connectors | full_file | 2,427 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_key(&self) -> Option<dir::DirKey> {
match self {
Self::Assertion(val) => Some(val.get_key()),
Self::Negation(vals) => vals.first().map(|v| (*v).get_key()),
}
} | crates/euclid/src/dssa/types.rs | euclid | function_signature | 57 | rust | null | null | null | null | get_key | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PayoutConnectors
{
"type": "string",
"enum": [
"adyen",
"adyenplatform",
"cybersource",
"ebanx",
"nomupay",
"payone",
"paypal",
"stripe",
"wise"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 75 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PayoutConnectors"
] | null | null | null | null |
pub struct ThreeDsAuthDetails {
pub three_ds_server_trans_id: String,
pub acs_trans_id: String,
pub acs_reference_number: String,
pub acs_operator_id: Option<String>,
pub ds_reference_number: String,
pub ds_trans_id: String,
pub sdk_trans_id: Option<String>,
pub trans_status: common_enum... | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 205 | rust | ThreeDsAuthDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn routing_retrieve_config(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::RoutingId>,
) -> impl Responder {
let algorithm_id = path.into_inner();
let flow = Flow::RoutingRetrieveConfig;
Box::pin(oss_api::server_wrap(
flow,
state,
... | crates/router/src/routes/routing.rs | router | function_signature | 241 | rust | null | null | null | null | routing_retrieve_config | null | null | null | null | null | null | null |
pub fn get_co_badged_card_data(&self) -> Option<payment_methods::CoBadgedCardData> {
todo!()
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | function_signature | 30 | rust | null | null | null | null | get_co_badged_card_data | null | null | null | null | null | null | null |
impl<T: DatabaseStore> KVRouterStore<T> {
pub fn from_store(
store: RouterStore<T>,
drainer_stream_name: String,
drainer_num_partitions: u8,
ttl_for_kv: u32,
soft_kill: Option<bool>,
) -> Self {
let request_id = store.request_id.clone();
Self {
... | crates/storage_impl/src/kv_router_store.rs | storage_impl | impl_block | 2,860 | rust | null | KVRouterStore | null | impl KVRouterStore | null | null | null | null | null | null | null | null |
pub struct RetriesAmountAccumulator {
pub total: Option<i64>,
} | crates/analytics/src/payments/accumulator.rs | analytics | struct_definition | 19 | rust | RetriesAmountAccumulator | 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.