text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
impl VerifyConnectorData {
fn get_payment_authorize_data(&self) -> types::PaymentsAuthorizeData {
types::PaymentsAuthorizeData {
payment_method_data: domain::PaymentMethodData::Card(self.card_details.clone()),
email: None,
customer_name: None,
amount: 1000,
... | crates/router/src/types/api/verify_connector.rs | router | impl_block | 904 | rust | null | VerifyConnectorData | null | impl VerifyConnectorData | null | null | null | null | null | null | null | null |
pub struct PayeezyPaymentsResponse {
pub correlation_id: String,
pub transaction_status: PayeezyPaymentStatus,
pub validation_status: String,
pub transaction_type: PayeezyTransactionType,
pub transaction_id: String,
pub transaction_tag: Option<String>,
pub method: Option<String>,
pub amo... | crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs | hyperswitch_connectors | struct_definition | 127 | rust | PayeezyPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Get the expiry date in MMYY format from the Google Pay pre-decrypt data
pub fn get_expiry_date_as_mmyy(&self) -> Result<Secret<String>, errors::ValidationError> {
let year = self.get_two_digit_expiry_year()?.expose();
let month = self.get_expiry_month()?.clone().expose();
Ok(Secret::new(... | crates/common_types/src/payments.rs | common_types | function_signature | 85 | rust | null | null | null | null | get_expiry_date_as_mmyy | null | null | null | null | null | null | null |
impl api::RefundExecute for Opennode {} | crates/hyperswitch_connectors/src/connectors/opennode.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Opennode | api::RefundExecute for | impl api::RefundExecute for for Opennode | null | null | null | null | null | null | null | null |
pub async fn call_connector_service_prerequisites<F, RouterDReq, ApiRequest, D>(
state: &SessionState,
req_state: ReqState,
merchant_context: &domain::MerchantContext,
connector: api::ConnectorData,
operation: &BoxedOperation<'_, F, ApiRequest, D>,
payment_data: &mut D,
customer: &Option<dom... | crates/router/src/core/payments.rs | router | function_signature | 549 | rust | null | null | null | null | call_connector_service_prerequisites | null | null | null | null | null | null | null |
pub struct PaymentMethodInfo {
pub id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | PaymentMethodInfo | null | null | null | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
web::scope("/v2/tokenize")
.app_data(web::Data::new(state))
.service(
web::resource("")
.route(web::post().to(tokenization_routes::create_token_vault_api)),
)
.service(
w... | crates/router/src/routes/app.rs | router | function_signature | 93 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payments/payments-link--retrieve.mdx
# Type: Doc File
---
openapi: get /payment_link/{payment_link_id}
--- | api-reference/v1/payments/payments-link--retrieve.mdx | null | doc_file | 36 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl Payment for Plaid {} | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 6 | rust | null | Plaid | Payment for | impl Payment for for Plaid | null | null | null | null | null | null | null | null |
pub struct GenericLinkState {
pub link_id: String,
pub primary_reference: String,
pub merchant_id: common_utils::id_type::MerchantId,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub created_at: PrimitiveDateTime,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub last_modi... | crates/diesel_models/src/generic_link.rs | diesel_models | struct_definition | 162 | rust | GenericLinkState | null | null | null | null | null | null | null | null | null | null | null |
pub async fn delete_payment_intents(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Vec<PaymentIntent>> {
let query = diesel::delete(<PaymentIntent>::table())
.filter(payment_intent_dsl::merchant_id.eq(merchant_id.to_owned()))
.filter(payment_intent_... | crates/diesel_models/src/query/user/sample_data.rs | diesel_models | function_signature | 220 | rust | null | null | null | null | delete_payment_intents | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id(
conn: &PgPooledConn,
identifier: &common_utils::id_type::MerchantId,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::id.eq(identifier.to_owned()),
)
.await
} | crates/diesel_models/src/query/merchant_account.rs | diesel_models | function_signature | 78 | rust | null | null | null | null | find_by_merchant_id | null | null | null | null | null | null | null |
pub struct CalContractScoreEventRequest {
pub id: String,
pub params: String,
pub labels: Vec<String>,
pub config: Option<ContractBasedRoutingConfig>,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 39 | rust | CalContractScoreEventRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn new_token(
user_id: String,
merchant_id: id_type::MerchantId,
role_id: String,
settings: &Settings,
org_id: id_type::OrganizationId,
profile_id: id_type::ProfileId,
tenant_id: Option<id_type::TenantId>,
) -> UserResult<String> {
let exp_du... | crates/router/src/services/authentication.rs | router | function_signature | 162 | rust | null | null | null | null | new_token | null | null | null | null | null | null | null |
pub async fn create_platform_account() {} | crates/openapi/src/routes/platform.rs | openapi | function_signature | 8 | rust | null | null | null | null | create_platform_account | null | null | null | null | null | null | null |
pub struct PlacetopayRefundResponse {
status: PlacetopayRefundStatusResponse,
internal_reference: u64,
} | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | hyperswitch_connectors | struct_definition | 31 | rust | PlacetopayRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_hypersense_token(state: web::Data<AppState>, req: HttpRequest) -> HttpResponse {
let flow = Flow::HypersenseTokenRequest;
Box::pin(api::server_wrap(
flow,
state,
&req,
(),
|state, user, _, _| {
external_service_auth::generate_external_token(
... | crates/router/src/routes/hypersense.rs | router | function_signature | 124 | rust | null | null | null | null | get_hypersense_token | null | null | null | null | null | null | null |
pub struct PayoutAttemptUpdateInternal {
pub payout_token: Option<String>,
pub connector_payout_id: Option<String>,
pub status: Option<storage_enums::PayoutStatus>,
pub error_message: Option<String>,
pub error_code: Option<String>,
pub is_eligible: Option<bool>,
pub business_country: Option<... | crates/diesel_models/src/payout_attempt.rs | diesel_models | struct_definition | 209 | rust | PayoutAttemptUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
impl Worldline {
pub fn generate_authorization_token(
&self,
auth: worldline::WorldlineAuthType,
http_method: Method,
content_type: &str,
date: &str,
endpoint: &str,
) -> CustomResult<String, errors::ConnectorError> {
let signature_data: String = format!(
... | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | impl_block | 302 | rust | null | Worldline | null | impl Worldline | null | null | null | null | null | null | null | null |
pub struct PayuPaymentsRequest {
customer_ip: Secret<String, IpAddress>,
merchant_pos_id: Secret<String>,
total_amount: MinorUnit,
currency_code: enums::Currency,
description: String,
pay_methods: PayuPaymentMethod,
continue_url: Option<String>,
ext_order_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/payu/transformers.rs | hyperswitch_connectors | struct_definition | 70 | rust | PayuPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
/// Generate a client id for the payment id
pub fn generate_client_secret(&self) -> String {
generate_id_with_default_len(&format!("{}_secret", self.get_string_repr()))
} | crates/common_utils/src/id_type/payment.rs | common_utils | function_signature | 41 | rust | null | null | null | null | generate_client_secret | null | null | null | null | null | null | null |
pub async fn api_key_update() {} | crates/openapi/src/routes/api_keys.rs | openapi | function_signature | 8 | rust | null | null | null | null | api_key_update | null | null | null | null | null | null | null |
impl api::PayoutFulfill for Wise {} | crates/hyperswitch_connectors/src/connectors/wise.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Wise | api::PayoutFulfill for | impl api::PayoutFulfill for for Wise | null | null | null | null | null | null | null | null |
pub struct WebhookTransformData {
pub event_type: api_models::webhooks::IncomingWebhookEvent,
pub source_verified: bool,
pub webhook_content: Option<payments_grpc::WebhookResponseContent>,
pub response_ref_id: Option<String>,
} | crates/router/src/core/unified_connector_service/transformers.rs | router | struct_definition | 57 | rust | WebhookTransformData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update(
self,
conn: &PgPooledConn,
relay: RelayUpdateInternal,
) -> StorageResult<Self> {
match generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
_,
_,
>(conn, dsl::id.eq(sel... | crates/diesel_models/src/query/relay.rs | diesel_models | function_signature | 126 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Wellsfargopayout {} | crates/hyperswitch_connectors/src/connectors/wellsfargopayout.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Wellsfargopayout | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Wellsfargopayout | null | null | null | null | null | null | null | null |
pub struct RecurlyLineItems {
#[serde(rename = "type")]
pub invoice_type: RecurlyInvoiceLineItemType,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub start_date: PrimitiveDateTime,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub end_date: PrimitiveDateTime,
} | crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs | hyperswitch_connectors | struct_definition | 83 | rust | RecurlyLineItems | null | null | null | null | null | null | null | null | null | null | null |
pub struct CustomerPaymentMethodResponseItem {
/// The unique identifier of the payment method.
#[schema(value_type = String, example = "12345_pm_01926c58bc6e77c09e809964e72af8c8")]
pub id: id_type::GlobalPaymentMethodId,
/// Temporary Token for payment method in vault which gets refreshed for every pa... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 667 | rust | CustomerPaymentMethodResponseItem | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Mollie {} | crates/hyperswitch_connectors/src/connectors/mollie.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Mollie | api::PaymentSync for | impl api::PaymentSync for for Mollie | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RelayRequest
{
"type": "object",
"required": [
"connector_resource_id",
"connector_id",
"type"
],
"properties": {
"connector_resource_id": {
"type": "string",
"description": "The identifier that is associated to a resource at the connector refer... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 242 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RelayRequest"
] | null | null | null | null |
impl MerchantAccount {
pub fn server(state: AppState) -> Scope {
web::scope("/v2/merchant-accounts")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::post().to(admin::merchant_account_create)))
.service(
web::scope("/{id}")
... | crates/router/src/routes/app.rs | router | impl_block | 182 | rust | null | MerchantAccount | null | impl MerchantAccount | null | null | null | null | null | null | null | null |
File: crates/router/src/services/jwt.rs
Public functions: 2
use common_utils::errors::CustomResult;
use error_stack::ResultExt;
use jsonwebtoken::{encode, EncodingKey, Header};
use masking::PeekInterface;
use crate::{configs::Settings, core::errors::UserErrors};
pub fn generate_exp(
exp_duration: std::time::Dur... | crates/router/src/services/jwt.rs | router | full_file | 237 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/routing/default/profile/{profile_id}"
{
"post": {
"tags": [
"Routing"
],
"summary": "Routing - Update Default For Profile",
"description": "Update default config for profiles",
"operationId": "Update default configs for all profiles",
"parameters": [
{
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 372 | .json | null | null | null | null | null | openapi_spec | paths | [
"/routing/default/profile/{profile_id}"
] | null | null | null | null |
/// Get a merchant id for internal use only
pub fn get_internal_user_merchant_id(merchant_id: &str) -> Self {
let alphanumeric_id = AlphaNumericId::new_unchecked(merchant_id.to_string());
let length_id = LengthId::new_unchecked(alphanumeric_id);
Self(length_id)
} | crates/common_utils/src/id_type/merchant.rs | common_utils | function_signature | 69 | rust | null | null | null | null | get_internal_user_merchant_id | null | null | null | null | null | null | null |
pub fn from_pii_email(email: pii::Email) -> UserResult<Self> {
let email_string = email.expose().map(|inner| inner.to_lowercase());
Self::new(email_string)
} | crates/router/src/types/domain/user.rs | router | function_signature | 44 | rust | null | null | null | null | from_pii_email | null | null | null | null | null | null | null |
pub fn payments_incremental_authorization() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 9 | rust | null | null | null | null | payments_incremental_authorization | null | null | null | null | null | null | null |
File: crates/router/src/core/errors/error_handlers.rs
Public functions: 2
use actix_web::{body, dev::ServiceResponse, middleware::ErrorHandlerResponse, ResponseError};
use http::StatusCode;
use super::ApiErrorResponse;
use crate::logger;
pub fn custom_error_handlers<B: body::MessageBody + 'static>(
res: ServiceR... | crates/router/src/core/errors/error_handlers.rs | router | full_file | 304 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn from(
response: Result<router_response_types::RefundsResponseData, ErrorResponse>,
) -> Self {
match response {
Err(error) => Self::ErrorUpdate {
error_code: error.code,
error_message: error.reason.unwrap_or(error.message),
status: c... | crates/hyperswitch_domain_models/src/relay.rs | hyperswitch_domain_models | function_signature | 117 | rust | null | null | null | null | from | null | null | null | null | null | null | null |
pub struct StripePayoutResponse {
pub id: id_type::PayoutId,
pub amount: i64,
pub currency: String,
pub payout_type: Option<common_enums::PayoutType>,
pub status: StripePayoutStatus,
pub name: Option<masking::Secret<String>>,
pub email: Option<Email>,
pub phone: Option<masking::Secret<St... | crates/router/src/compatibility/stripe/webhooks.rs | router | struct_definition | 155 | rust | StripePayoutResponse | null | null | null | null | null | null | null | null | null | null | null |
impl std::fmt::Display for PaymentOutcome {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Authorized => write!(f, "authorized"),
Self::Refused => write!(f, "refused"),
Self::SentForSettlement => write!(f, "sentForSettlement"),
... | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | impl_block | 234 | rust | null | PaymentOutcome | std::fmt::Display for | impl std::fmt::Display for for PaymentOutcome | null | null | null | null | null | null | null | null |
pub struct PaymentAttempts; | crates/api_models/src/analytics/sdk_events.rs | api_models | struct_definition | 5 | rust | PaymentAttempts | null | null | null | null | null | null | null | null | null | null | null |
impl<T> SingleOrListElement<T> {
pub fn new_single(value: T) -> Self {
Self::Single(value)
}
pub fn new_list(value: Vec<T>) -> Self {
Self::List(value)
}
} | crates/hyperswitch_connectors/src/connectors/netcetera/netcetera_types.rs | hyperswitch_connectors | impl_block | 52 | rust | null | SingleOrListElement | null | impl SingleOrListElement | null | null | null | null | null | null | null | null |
pub struct NovalnetRefundTransaction {
tid: String,
amount: Option<StringMinorUnit>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | NovalnetRefundTransaction | null | null | null | null | null | null | null | null | null | null | null |
pub async fn call_to_locker(
_state: &SessionState,
_payment_methods: Vec<domain::PaymentMethod>,
_customer_id: &id_type::CustomerId,
_merchant_id: &id_type::MerchantId,
_merchant_context: &domain::MerchantContext,
) -> CustomResult<usize, errors::ApiErrorResponse> {
todo!()
} | crates/router/src/core/locker_migration.rs | router | function_signature | 79 | rust | null | null | null | null | call_to_locker | null | null | null | null | null | null | null |
impl Flexiti {
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/flexiti.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Flexiti | null | impl Flexiti | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs
Public structs: 14
use common_enums::enums;
use common_utils::{
pii::{self, Email},
types::StringMajorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, WalletData},
... | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | hyperswitch_connectors | full_file | 3,210 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NetceteraAuthType {
pub(super) certificate: Secret<String>,
pub(super) private_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs | hyperswitch_connectors | struct_definition | 29 | rust | NetceteraAuthType | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Archipel {
fn id(&self) -> &'static str {
"archipel"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn get_auth_header(
&self,
_auth_type: &ConnectorAuthType,
) -> CustomResult<Vec<(String, Maskable<Strin... | crates/hyperswitch_connectors/src/connectors/archipel.rs | hyperswitch_connectors | impl_block | 438 | rust | null | Archipel | ConnectorCommon for | impl ConnectorCommon for for Archipel | null | null | null | null | null | null | null | null |
impl ConnectorErrorTypeMapping for Paypal {
fn get_connector_error_type(
&self,
error_code: String,
_error_message: String,
) -> ConnectorErrorType {
match error_code.as_str() {
"CANNOT_BE_NEGATIVE" => ConnectorErrorType::UserError,
"CANNOT_BE_ZERO_OR_NEGA... | crates/hyperswitch_connectors/src/connectors/paypal.rs | hyperswitch_connectors | impl_block | 1,632 | rust | null | Paypal | ConnectorErrorTypeMapping for | impl ConnectorErrorTypeMapping for for Paypal | null | null | null | null | null | null | null | null |
pub async fn get_org_dispute_filters(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<api_models::analytics::GetDisputeFilterRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GetDisputeFilters;
Box::pin(api::server_wrap(
fl... | crates/router/src/analytics.rs | router | function_signature | 248 | rust | null | null | null | null | get_org_dispute_filters | null | null | null | null | null | null | null |
pub struct UserFromSinglePurposeToken {
pub user_id: String,
pub origin: domain::Origin,
pub path: Vec<TokenPurpose>,
pub tenant_id: Option<id_type::TenantId>,
} | crates/router/src/services/authentication.rs | router | struct_definition | 45 | rust | UserFromSinglePurposeToken | null | null | null | null | null | null | null | null | null | null | null |
{
*should_continue_confirm_transaction = false;
}
Some(authentication_store)
}
None => None,
};
Ok(())
}
async fn apply_three_ds_authentication_strategy<'a>(
&'a self,
state: &SessionStat... | crates/router/src/core/payments/operations/payment_confirm.rs#chunk1 | router | chunk | 8,176 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/common_utils/src/metrics.rs
//! Utilities for metrics
pub mod utils;
| crates/common_utils/src/metrics.rs | common_utils | full_file | 19 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn initiate_secure_payment_link(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
path: web::Path<(
common_utils::id_type::MerchantId,
common_utils::id_type::PaymentId,
) | crates/router/src/routes/payment_link.rs | router | function_signature | 56 | rust | null | null | null | null | initiate_secure_payment_link | null | null | null | null | null | null | null |
pub struct RefundFlowData {
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: Option<common_utils::id_type::CustomerId>,
pub payment_id: String,
pub attempt_id: String,
pub status: common_enums::AttemptStatus,
pub payment_method: common_enums::PaymentMethod,
pub connector_... | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 151 | rust | RefundFlowData | null | null | null | null | null | null | null | null | null | null | null |
pub struct KlarnaDetails {
country_code: enums::CountryAlpha2,
billing: Option<Billing>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | KlarnaDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConnectorsList {
pub connectors: Vec<String>,
} | crates/router/src/types.rs | router | struct_definition | 14 | rust | ConnectorsList | null | null | null | null | null | null | null | null | null | null | null |
pub async fn user_signup(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<user_api::SignUpRequest>,
) -> HttpResponse {
let flow = Flow::UserSignUp;
let req_payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow.clone(),
state,
&ht... | crates/router/src/routes/user.rs | router | function_signature | 140 | rust | null | null | null | null | user_signup | null | null | null | null | null | null | null |
pub struct CoBadgedCardRequest {
pub merchant_category_code: common_enums::DecisionEngineMerchantCategoryCode,
pub acquirer_country: common_enums::CountryAlpha2,
pub co_badged_card_data: Option<DebitRoutingRequestData>,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 55 | rust | CoBadgedCardRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuditEvent {
#[serde(flatten)]
event_type: AuditEventType,
#[serde(with = "common_utils::custom_serde::iso8601")]
created_at: PrimitiveDateTime,
} | crates/router/src/events/audit_events.rs | router | struct_definition | 45 | rust | AuditEvent | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeviceDetails {
pub ip_address: Secret<String, IpAddress>,
} | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | DeviceDetails | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::IncomingWebhookReceive;
let (merchant_id, connector_id_or_name) = path.into_inner();
Box::pin(api::server_wrap(
flow.clone(),
state,
&req,
(),
|state, auth, _, req_state| {
let merchant_context = domain::MerchantContext::... | crates/router/src/routes/webhooks.rs | router | impl_block | 175 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct ApiKeys; | crates/router/src/routes/app.rs | router | struct_definition | 5 | rust | ApiKeys | null | null | null | null | null | null | null | null | null | null | null |
pub struct RateAccumulator {
pub won_count: i64,
pub challenged_count: i64,
pub lost_count: i64,
pub total: i64,
} | crates/analytics/src/disputes/accumulators.rs | analytics | struct_definition | 43 | rust | RateAccumulator | null | null | null | null | null | null | null | null | null | null | null |
pub fn generate_12_digit_number() -> u64 {
let mut rng = rand::thread_rng();
rng.gen_range(100_000_000_000..=999_999_999_999)
}
/// Normalizes a string by converting to lowercase, performing NFKD normalization(https://unicode.org/reports/tr15/#Description_Norm),and removing special characters and spaces.
pub ... | crates/hyperswitch_connectors/src/utils.rs#chunk9 | hyperswitch_connectors | chunk | 2,835 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/external_services/src/http_client.rs
Public functions: 1
use common_utils::{consts, errors::CustomResult, request::Request};
use hyperswitch_interfaces::{errors::HttpClientError, types::Proxy};
use request::{HeaderExt, RequestBuilderExt};
use router_env::{instrument, logger, tracing};
/// client module
p... | crates/external_services/src/http_client.rs | external_services | full_file | 1,506 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/rapyd.rs
use std::str::FromStr;
use futures::future::OptionFuture;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use serial_test::serial;
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
struct Rapyd;
impl ConnectorA... | crates/router/tests/connectors/rapyd.rs | router | full_file | 1,373 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthipayPaymentsResponse {
#[serde(rename = "type")]
response_type: Option<String>,
client_request_id: String,
api_trace_id: String,
ipg_transaction_id: String,
order_id: String,
transaction_type: String,
payment_token: Option<PaymentToken>,
transaction_origin: Option<Stri... | crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs | hyperswitch_connectors | struct_definition | 181 | rust | AuthipayPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct ContractLabelInformationEventRequest {
pub label: String,
pub target_count: u64,
pub target_time: u64,
pub current_count: u64,
} | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 42 | rust | ContractLabelInformationEventRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/business_profile.rs
Public functions: 15
Public structs: 6
use std::borrow::Cow;
use common_enums::enums as api_enums;
use common_types::{domain::AcquirerConfig, primitive_wrappers};
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
d... | crates/hyperswitch_domain_models/src/business_profile.rs#chunk0 | hyperswitch_domain_models | chunk | 8,185 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BluesnapGooglePayObject {
payment_method_data: utils::GooglePayWalletData,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | BluesnapGooglePayObject | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/core.rs
Public functions: 1
use api_models::analytics::GetInfoResponse;
use crate::{types::AnalyticsDomain, utils};
pub async fn get_domain_info(
domain: AnalyticsDomain,
) -> crate::errors::AnalyticsResult<GetInfoResponse> {
let info = match domain {
AnalyticsDomain::Paym... | crates/analytics/src/core.rs | analytics | full_file | 429 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayoutVendorAccountDetails {
pub vendor_details: PayoutVendorDetails,
pub individual_details: PayoutIndividualDetails,
} | crates/api_models/src/payouts.rs | api_models | struct_definition | 29 | rust | PayoutVendorAccountDetails | null | null | null | null | null | null | null | null | null | null | null |
impl Default for WiseHttpStatus {
fn default() -> Self {
Self::String("".to_string())
}
} | crates/hyperswitch_connectors/src/connectors/wise/transformers.rs | hyperswitch_connectors | impl_block | 25 | rust | null | WiseHttpStatus | Default for | impl Default for for WiseHttpStatus | null | null | null | null | null | null | null | null |
pub fn get_single_use_token_from_payment_method_token(
token: Secret<String>,
mca_id: id_type::MerchantConnectorAccountId,
) -> Self {
Self {
token,
merchant_connector_id: mca_id,
}
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | function_signature | 53 | rust | null | null | null | null | get_single_use_token_from_payment_method_token | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/operations/tax_calculation.rs
Public structs: 1
use std::marker::PhantomData;
use api_models::enums::FrmSuggestion;
use async_trait::async_trait;
use common_utils::{ext_traits::AsyncExt, types::keymanager::KeyManagerState};
use error_stack::ResultExt;
use masking::PeekInterface;... | crates/router/src/core/payments/operations/tax_calculation.rs | router | full_file | 3,498 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Default for MerchantAccountRoutingAlgorithm {
fn default() -> Self {
Self::V1(routing_types::RoutingAlgorithmRef::default())
}
} | crates/router/src/core/payments/routing.rs | router | impl_block | 33 | rust | null | MerchantAccountRoutingAlgorithm | Default for | impl Default for for MerchantAccountRoutingAlgorithm | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Amazonpay {} | crates/hyperswitch_connectors/src/connectors/amazonpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Amazonpay | api::PaymentSession for | impl api::PaymentSession for for Amazonpay | null | null | null | null | null | null | null | null |
pub async fn validate_email_domain_auth_type_using_db(
state: &SessionState,
email: &domain::UserEmail,
required_auth_type: UserAuthType,
) -> UserResult<()> {
let domain = email.extract_domain()?;
let user_auth_methods = state
.store
.list_user_authentication_methods_for_email_domai... | crates/router/src/utils/user.rs | router | function_signature | 140 | rust | null | null | null | null | validate_email_domain_auth_type_using_db | null | null | null | null | null | null | null |
pub struct RefundRequest {
#[serde(rename = "@reportGroup")]
pub report_group: String,
#[serde(rename = "@id")]
pub id: String,
#[serde(rename = "@customerId", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
pub cnp_txn_id: String,
pub amount: MinorUnit,
} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs | hyperswitch_connectors | struct_definition | 80 | rust | RefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct UpdateContractEventResponse {
pub status: ContractUpdationStatusEventResponse,
} | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 20 | rust | UpdateContractEventResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ExternalVerifyTokenResponse {
pub fn get_user_id(&self) -> &str {
match self {
Self::Hypersense { user_id, .. } => user_id,
}
}
} | crates/api_models/src/external_service_auth.rs | api_models | impl_block | 45 | rust | null | ExternalVerifyTokenResponse | null | impl ExternalVerifyTokenResponse | null | null | null | null | null | null | null | null |
pub async fn connector_list() {} | crates/openapi/src/routes/merchant_connector_account.rs | openapi | function_signature | 7 | rust | null | null | null | null | connector_list | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for ExtendedCardInfoChoice {} | crates/api_models/src/admin.rs | api_models | impl_block | 15 | rust | null | ExtendedCardInfoChoice | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for ExtendedCardInfoChoice | null | null | null | null | null | null | null | null |
impl api::Payment for Chargebee {} | crates/hyperswitch_connectors/src/connectors/chargebee.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Chargebee | api::Payment for | impl api::Payment for for Chargebee | null | null | null | null | null | null | null | null |
impl Responder {
#[allow(clippy::expect_used)]
// safety: This shouldn't panic owing to the data type
let payload = json_payload
.into_inner()
.to_vec()
.pop()
.expect("Couldn't get GetRefundMetricRequest");
let flow = AnalyticsFlow::GetRef... | crates/router/src/analytics.rs | router | impl_block | 332 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct InstructedAmount {
/// Monetary amount of the payment. Max (digits+decimals): FI SEPA: (9+2); SE:(11+2); DK:(7+2); NO:(7+2)
pub amount: StringMajorUnit,
/// Currency code according to ISO 4217.
/// NB: Possible value depends on the type of the payment.
/// For domestic payment it should b... | crates/hyperswitch_connectors/src/connectors/nordea/requests.rs | hyperswitch_connectors | struct_definition | 140 | rust | InstructedAmount | null | null | null | null | null | null | null | null | null | null | null |
pub async fn pre_payment_frm_core<F, Req, D>(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payment_data: &mut D,
frm_info: &mut FrmInfo<F, D>,
frm_configs: FrmConfigsObject,
customer: &Option<domain::Customer>,
should_continue_transaction: &mut bool,
should_continue_... | crates/router/src/core/fraud_check.rs | router | function_signature | 624 | rust | null | null | null | null | pre_payment_frm_core | null | null | null | null | null | null | null |
File: crates/router/src/types/api/mandates.rs
use ::payment_methods::controller::PaymentMethodsController;
use api_models::mandates;
pub use api_models::mandates::{MandateId, MandateResponse, MandateRevokedResponse};
use common_utils::ext_traits::OptionExt;
use error_stack::ResultExt;
use serde::{Deserialize, Serializ... | crates/router/src/types/api/mandates.rs | router | full_file | 1,445 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/itaubank.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::{fmt::Write, sync::LazyLock};
use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits... | crates/hyperswitch_connectors/src/connectors/itaubank.rs | hyperswitch_connectors | full_file | 6,355 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlacetopayErrorResponse {
pub status: PlacetopayError,
} | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | PlacetopayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_card_vault_data(&self) -> Option<payment_method_data::Card> {
match self {
Self::Card(card_data) => Some(card_data.clone()),
Self::NetworkToken(_network_token_data) => None,
Self::CardAndNetworkToken(vault_data) => Some(vault_data.card_data.clone()),
}
... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 74 | rust | null | null | null | null | get_card_vault_data | null | null | null | null | null | null | null |
File: crates/router/src/types/api/disputes.rs
Public structs: 6
pub use hyperswitch_interfaces::{
api::disputes::{
AcceptDispute, DefendDispute, Dispute, DisputeSync, FetchDisputes, SubmitEvidence,
},
disputes::DisputePayload,
};
use masking::{Deserialize, Serialize};
use crate::types;
#[derive(... | crates/router/src/types/api/disputes.rs | router | full_file | 601 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn contract_based_routing_update_configs(
state: SessionState,
request: routing_types::ContractBasedRoutingConfig,
merchant_context: domain::MerchantContext,
algorithm_id: common_utils::id_type::RoutingId,
profile_id: common_utils::id_type::ProfileId,
) -> RouterResponse<routing_types::Rou... | crates/router/src/core/routing.rs | router | function_signature | 1,042 | rust | null | null | null | null | contract_based_routing_update_configs | null | null | null | null | null | null | null |
pub async fn retrieve_payment_link(
state: SessionState,
payment_link_id: String,
) -> RouterResponse<api_models::payments::RetrievePaymentLinkResponse> {
let db = &*state.store;
let payment_link_config = db
.find_payment_link_by_payment_link_id(&payment_link_id)
.await
.to_not_f... | crates/router/src/core/payment_link.rs | router | function_signature | 181 | rust | null | null | null | null | retrieve_payment_link | null | null | null | null | null | null | null |
pub fn spawn_error_handlers(&self, tx: mpsc::Sender<() | crates/drainer/src/handler.rs | drainer | function_signature | 16 | rust | null | null | null | null | spawn_error_handlers | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for RoutingEvaluateRequest {} | crates/api_models/src/routing.rs | api_models | impl_block | 14 | rust | null | RoutingEvaluateRequest | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for RoutingEvaluateRequest | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/blocklist.rs
Public functions: 5
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
blocklist::{Blocklist, BlocklistNew},
schema::blocklist::dsl,
PgPooledConn, StorageResult,
};
impl BlocklistNew {
pu... | crates/diesel_models/src/query/blocklist.rs | diesel_models | full_file | 590 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn add_outer_select_column(&mut self, column: impl ToSql<T>) -> QueryResult<()> {
self.outer_select.push(
column
.to_sql(&self.table_engine)
.change_context(QueryBuildingError::SqlSerializeError)
.attach_printable("Error serializing outer select co... | crates/analytics/src/query.rs | analytics | function_signature | 73 | rust | null | null | null | null | add_outer_select_column | null | null | null | null | null | null | null |
pub async fn mock_get_payment_method<'a>(
state: &routes::SessionState,
key_store: &domain::MerchantKeyStore,
card_id: &'a str,
) -> errors::CustomResult<payment_methods::GetPaymentMethodResponse, errors::VaultError> {
let db = &*state.store;
let locker_mock_up = db
.find_locker_by_card_id(c... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 283 | rust | null | null | null | null | mock_get_payment_method | 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.