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 TransactionData {
#[serde(rename = "id")]
pub transaction_id: String,
pub value: StringMajorUnit,
pub status: FacilitapayPaymentStatus,
pub currency: api_models::enums::Currency,
pub exchange_currency: api_models::enums::Currency,
// Details about the destination account (Require... | crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs | hyperswitch_connectors | struct_definition | 366 | rust | TransactionData | null | null | null | null | null | null | null | null | null | null | null |
recurring_model: if item.router_data.request.is_mandate_payment() {
Some(MandateType::Unscheduled)
} else {
None
},
recurring_id: item
.router_data
.request
.mandate_id
.clone(... | crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 3,156 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/domain/user_key_store.rs
Public structs: 1
use common_utils::{
crypto::Encryptable,
date_time, type_name,
types::keymanager::{Identifier, KeyManagerState},
};
use error_stack::ResultExt;
use hyperswitch_domain_models::type_encryption::{crypto_operation, CryptoOperation};
use ... | crates/router/src/types/domain/user_key_store.rs | router | full_file | 488 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct DwollaWebhookDetails {
pub id: String,
pub resource_id: String,
pub topic: String,
pub correlation_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs | hyperswitch_connectors | struct_definition | 36 | rust | DwollaWebhookDetails | null | null | null | null | null | null | null | null | null | null | null |
pub fn create_authorization_header(
&self,
auth: amazonpay::AmazonpayAuthType,
canonical_uri: &str,
http_method: &Method,
hashed_payload: &str,
header: &[(String, Maskable<String>) | crates/hyperswitch_connectors/src/connectors/amazonpay.rs | hyperswitch_connectors | function_signature | 54 | rust | null | null | null | null | create_authorization_header | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Bitpay {} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bitpay | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Bitpay | null | null | null | null | null | null | null | null |
pub struct TsysCancelRequest {
#[serde(rename = "deviceID")]
device_id: Secret<String>,
transaction_key: Secret<String>,
#[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 | 62 | rust | TsysCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BankType
{
"type": "string",
"enum": [
"checking",
"savings"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 37 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BankType"
] | null | null | null | null |
impl RetryLimitsConfig {
pub fn get_network_config(&self, network: Option<CardNetwork>) -> &NetworkRetryConfig {
// Hardcoded fallback default config
static DEFAULT_CONFIG: NetworkRetryConfig = NetworkRetryConfig {
max_retries_per_day: 20,
max_retry_count_for_thirty_day: 20,
... | crates/router/src/types/storage/revenue_recovery.rs | router | impl_block | 123 | rust | null | RetryLimitsConfig | null | impl RetryLimitsConfig | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Barclaycard {} | crates/hyperswitch_connectors/src/connectors/barclaycard.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Barclaycard | api::PaymentSync for | impl api::PaymentSync for for Barclaycard | null | null | null | null | null | null | null | null |
impl ChargebeeInvoiceBody {
pub fn get_invoice_webhook_data_from_body(
body: &[u8],
) -> CustomResult<Self, errors::ConnectorError> {
let webhook_body = body
.parse_struct::<Self>("ChargebeeInvoiceBody")
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;... | crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs | hyperswitch_connectors | impl_block | 81 | rust | null | ChargebeeInvoiceBody | null | impl ChargebeeInvoiceBody | null | null | null | null | null | null | null | null |
pub struct MandateMetaData {
payment_reference: String,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | MandateMetaData | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthenticationData {
pub eci: Option<String>,
pub cavv: Secret<String>,
pub threeds_server_transaction_id: Option<String>,
pub message_version: Option<common_utils::types::SemanticVersion>,
pub ds_trans_id: Option<String>,
pub created_at: time::PrimitiveDateTime,
pub challenge_cod... | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 134 | rust | AuthenticationData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SCA {
pub compliance: String,
pub compliance_reason: String,
pub method: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option<SCAResult>,
} | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | SCA | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_analysis_trace(self) -> Result<Weak<AnalysisTrace<V>>, Self> {
match self {
Self::AnalysisError(trace) => Ok(trace),
_ => Err(self),
}
} | crates/hyperswitch_constraint_graph/src/error.rs | hyperswitch_constraint_graph | function_signature | 44 | rust | null | null | null | null | get_analysis_trace | null | null | null | null | null | null | null |
pub struct NoonRevokeMandateRequest {
api_operation: NoonApiOperations,
subscription: NoonSubscriptionObject,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | NoonRevokeMandateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct DataAuthResponse {
authorize_credit_card: AuthChargeCreditCard,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | DataAuthResponse | null | null | null | null | null | null | null | null | null | null | null |
**Full Changelog:** [`v1.98.0...v1.99.0`](https://github.com/juspay/hyperswitch/compare/v1.98.0...v1.99.0)
- - -
## 1.98.0 (2023-12-11)
### Features
- **connector:** Accept connector_transaction_id in error_response of connector flows for Trustpay ([#3060](https://github.com/juspay/hyperswitch/pull/3060)) ([`f53b09... | CHANGELOG.md#chunk44 | null | doc_chunk | 8,154 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl RoleName {
pub fn new(name: String) -> UserResult<Self> {
let is_empty_or_whitespace = name.trim().is_empty();
let is_too_long = name.graphemes(true).count() > consts::user_role::MAX_ROLE_NAME_LENGTH;
if is_empty_or_whitespace || is_too_long || name.contains(' ') {
Err(User... | crates/router/src/types/domain/user.rs | router | impl_block | 118 | rust | null | RoleName | null | impl RoleName | null | null | null | null | null | null | null | null |
impl PayoutsInterface for KafkaStore {} | crates/router/src/db/kafka_store.rs | router | impl_block | 9 | rust | null | KafkaStore | PayoutsInterface for | impl PayoutsInterface for for KafkaStore | null | null | null | null | null | null | null | null |
pub struct PaypalCaptureResponse {
id: String,
status: PaypalPaymentStatus,
amount: Option<OrderAmount>,
invoice_id: Option<String>,
final_capture: bool,
payment_source: Option<PaymentSourceItemResponse>,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | PaypalCaptureResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_amount_to_capture(&self) -> Option<MinorUnit> {
self.amount_to_capture
} | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 24 | rust | null | null | null | null | get_amount_to_capture | null | null | null | null | null | null | null |
pub struct DummyConnectorPaymentCompleteRequest {
pub attempt_id: String,
pub confirm: bool,
} | crates/router/src/routes/dummy_connector/types.rs | router | struct_definition | 22 | rust | DummyConnectorPaymentCompleteRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct InputData {
pub name: String,
pub label: String,
pub placeholder: String,
pub required: bool,
#[serde(flatten)]
pub input_type: InputType,
} | crates/connector_configs/src/common_config.rs | connector_configs | struct_definition | 44 | rust | InputData | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Iatapay {} | crates/hyperswitch_connectors/src/connectors/iatapay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Iatapay | api::Payment for | impl api::Payment for for Iatapay | null | null | null | null | null | null | null | null |
#[cfg(all(feature = "v1", feature = "dynamic_routing"))]
business_profile,
))
.await?;
Ok(payment_data)
}
}
#[cfg(feature = "v1")]
#[async_trait]
impl<F: Clone> PostUpdateTracker<F, PaymentData<F>, types::PaymentsRejectData> for PaymentResponse {
async fn update... | crates/router/src/core/payments/operations/payment_response.rs#chunk1 | router | chunk | 8,185 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn customers_delete(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<id_type::GlobalCustomerId>,
) -> impl Responder {
let flow = Flow::CustomersDelete;
let id = path.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
id,
... | crates/router/src/routes/customers.rs | router | function_signature | 210 | rust | null | null | null | null | customers_delete | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/operations/proxy_payments_intent.rs
Public structs: 1
use api_models::payments::ProxyPaymentsRequest;
use async_trait::async_trait;
use common_enums::enums;
use common_utils::types::keymanager::ToEncryptable;
use error_stack::ResultExt;
use hyperswitch_domain_models::{
paymen... | crates/router/src/core/payments/operations/proxy_payments_intent.rs | router | full_file | 4,020 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardResponseObject {
suffix: Option<String>,
prefix: Option<String>,
expiration_month: Option<Secret<String>>,
expiration_year: Option<Secret<String>>,
#[serde(rename = "type")]
card_type: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 52 | rust | CardResponseObject | null | null | null | null | null | null | null | null | null | null | null |
pub struct DummyConnectorCard {
name: Secret<String>,
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/dummyconnector/transformers.rs | hyperswitch_connectors | struct_definition | 42 | rust | DummyConnectorCard | null | null | null | null | null | null | null | null | null | null | null |
pub struct Amount {
pub amount: StringMajorUnit,
pub currency: String,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | Amount | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethods; | crates/router/src/routes/app.rs | router | struct_definition | 5 | rust | PaymentMethods | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProfileLevel {
pub tenant_id: id_type::TenantId,
pub org_id: id_type::OrganizationId,
pub merchant_id: id_type::MerchantId,
pub profile_id: id_type::ProfileId,
} | crates/router/src/types/domain/user.rs | router | struct_definition | 50 | rust | ProfileLevel | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/opayo.rs
use std::str::FromStr;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct OpayoTest;
impl ConnectorActions for OpayoTest {}
impl utils::Connector ... | crates/router/tests/connectors/opayo.rs | router | full_file | 3,119 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl GlobalTokenId {
/// Get string representation of the id
pub fn get_string_repr(&self) -> &str {
self.0.get_string_repr()
}
///Get GlobalTokenId from a string
pub fn from_string(token_string: &str) -> CustomResult<Self, ValidationError> {
let token = super::GlobalId::from_string... | crates/common_utils/src/id_type/global_id/token.rs | common_utils | impl_block | 178 | rust | null | GlobalTokenId | null | impl GlobalTokenId | null | null | null | null | null | null | null | null |
pub struct Server {
pub port: u16,
pub workers: usize,
pub host: String,
} | crates/drainer/src/settings.rs | drainer | struct_definition | 25 | rust | Server | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentChargeType
{
"oneOf": [
{
"type": "object",
"required": [
"Stripe"
],
"properties": {
"Stripe": {
"$ref": "#/components/schemas/StripeChargeType"
}
}
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 72 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentChargeType"
] | null | null | null | null |
pub async fn update_payment_method_status_internal(
state: &SessionState,
key_store: &domain::MerchantKeyStore,
storage_scheme: enums::MerchantStorageScheme,
status: enums::PaymentMethodStatus,
payment_method_id: &id_type::GlobalPaymentMethodId,
) -> RouterResult<domain::PaymentMethod> {
let db ... | crates/router/src/core/payment_methods.rs | router | function_signature | 239 | rust | null | null | null | null | update_payment_method_status_internal | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_convertor: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/bankofamerica.rs | hyperswitch_connectors | function_signature | 29 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl api::MandateSetup for Hipay {} | crates/hyperswitch_connectors/src/connectors/hipay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Hipay | api::MandateSetup for | impl api::MandateSetup for for Hipay | null | null | null | null | null | null | null | null |
pub struct EphemeralKeyNew {
pub id: String,
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: common_utils::id_type::CustomerId,
pub secret: String,
} | crates/diesel_models/src/ephemeral_key.rs | diesel_models | struct_definition | 48 | rust | EphemeralKeyNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct Session; | crates/hyperswitch_domain_models/src/router_flow_types/payments.rs | hyperswitch_domain_models | struct_definition | 4 | rust | Session | null | null | null | null | null | null | null | null | null | null | null |
pub struct FulfilmentData {
fulfillment_id: String,
#[serde(with = "common_utils::custom_serde::iso8601")]
created_at: PrimitiveDateTime,
status: Option<FulfillmentRequestStatus>,
tracking_company: String,
tracking_number: String,
tracking_url: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | struct_definition | 69 | rust | FulfilmentData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn send_verification_mail(
state: SessionState,
req: user_api::SendVerifyEmailRequest,
auth_id: Option<String>,
theme_id: Option<String>,
) -> UserResponse<()> {
let user_email = domain::UserEmail::from_pii_email(req.email)?;
utils::user::validate_email_domain_auth_type_using_db(
... | crates/router/src/core/user.rs | router | function_signature | 361 | rust | null | null | null | null | send_verification_mail | null | null | null | null | null | null | null |
/// Extracts the inner value from the wrapper
pub fn into_inner(self) -> T {
self.0
} | crates/diesel_models/src/lib.rs | diesel_models | function_signature | 27 | rust | null | null | null | null | into_inner | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RefundListRequest
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/TimeRange"
}
],
"nullable": true
},
{
"type": "object",
"properties": {
"payment_id": {
"type": "string",
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 511 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RefundListRequest"
] | null | null | null | null |
File: crates/router/src/db/unified_translations.rs
use diesel_models::unified_translations as storage;
use error_stack::report;
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait UnifiedTranslationsInterface {
asyn... | crates/router/src/db/unified_translations.rs | router | full_file | 949 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Xendit {} | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Xendit | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Xendit | null | null | null | null | null | null | null | null |
pub struct UpiCollectAdditionalData {
/// Masked VPA ID
#[schema(value_type = Option<String>, example = "ab********@okhdfcbank")]
pub vpa_id: Option<MaskedUpiVpaId>,
} | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 54 | rust | UpiCollectAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
pub struct DomainInjectorRequest {
/// Token data retrieved from the vault for replacement
pub token_data: DomainTokenData,
/// Payload template containing token references to be processed
pub connector_payload: DomainConnectorPayload,
/// HTTP connection configuration for making... | crates/injector/src/types.rs | injector | struct_definition | 68 | rust | DomainInjectorRequest | null | null | null | null | null | null | null | null | null | null | null |
Web Documentation: Using postman | Hyperswitch
# Type: Web Doc
Create a Hyperswitch account
Hyperswitch operates on a multi-tenant architecture, enabling a single application server to support multiple merchants. To create a new merchant account, follow these steps:
Locate the Admin API Key
:
Find the
config/docker_... | https://docs.hyperswitch.io/hyperswitch-open-source/account-setup/using-postman | null | web_doc_file | 1,308 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/hyperswitch-open-source/account-setup/using-postman | Using postman | Hyperswitch | null |
pub struct Paysafe {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | struct_definition | 26 | rust | Paysafe | null | null | null | null | null | null | null | null | null | null | null |
impl GetPaymentMethodType for UpiData {
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
match self {
Self::UpiCollect(_) => api_enums::PaymentMethodType::UpiCollect,
Self::UpiIntent(_) => api_enums::PaymentMethodType::UpiIntent,
}
}
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 77 | rust | null | UpiData | GetPaymentMethodType for | impl GetPaymentMethodType for for UpiData | null | null | null | null | null | null | null | null |
pub struct SinglePurposeToken {
pub user_id: String,
pub purpose: TokenPurpose,
pub origin: domain::Origin,
pub path: Vec<TokenPurpose>,
pub exp: u64,
pub tenant_id: Option<id_type::TenantId>,
} | crates/router/src/services/authentication.rs | router | struct_definition | 58 | rust | SinglePurposeToken | null | null | null | null | null | null | null | null | null | null | null |
pub struct RazorpaySyncItem {
id: String,
status: RazorpayStatus,
} | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | RazorpaySyncItem | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/payments/{payment_id}/post_session_tokens"
{
"post": {
"tags": [
"Payments"
],
"summary": "Payments - Post Session Tokens",
"operationId": "Create Post Session Tokens for a Payment",
"parameters": [
{
"name": "payment_id",
"in": "path",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 309 | .json | null | null | null | null | null | openapi_spec | paths | [
"/payments/{payment_id}/post_session_tokens"
] | null | null | null | null |
pub async fn get_filters_for_refunds(
state: SessionState,
merchant_context: domain::MerchantContext,
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
) -> RouterResponse<api_models::refunds::RefundListFilters> {
let merchant_connector_accounts = if let services::ApplicationResponse::Json... | crates/router/src/core/refunds.rs | router | function_signature | 317 | rust | null | null | null | null | get_filters_for_refunds | null | null | null | null | null | null | null |
pub struct CardInfoCreateRequest {
pub card_iin: String,
pub card_issuer: Option<String>,
pub card_network: Option<enums::CardNetwork>,
pub card_type: Option<String>,
pub card_subtype: Option<String>,
pub card_issuing_country: Option<String>,
pub bank_code_id: Option<String>,
pub bank_co... | crates/api_models/src/cards_info.rs | api_models | struct_definition | 98 | rust | CardInfoCreateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn should_create_connector_transfer_method(
payout_data: &PayoutData,
connector_data: &api::ConnectorData,
) -> RouterResult<Option<String>> {
let connector_transfer_method_id = payout_data.payment_method.as_ref().and_then(|pm| {
let common_mandate_reference = pm
.get_common_mandate_... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 214 | rust | null | null | null | null | should_create_connector_transfer_method | null | null | null | null | null | null | null |
pub fn is_separate_authn_required(&self) -> bool {
self.maximum_supported_version
.as_ref()
.is_some_and(|version| version.get_major() == 2)
} | crates/diesel_models/src/authentication.rs | diesel_models | function_signature | 43 | rust | null | null | null | null | is_separate_authn_required | null | null | null | null | null | null | null |
pub fn validate_payout_link_render_request_and_get_allowed_domains(
request_headers: &header::HeaderMap,
payout_link: &PayoutLink,
) -> RouterResult<HashSet<String>> {
let link_id = payout_link.link_id.to_owned();
let link_data = payout_link.link_data.to_owned();
let is_test_mode_enabled = link_dat... | crates/router/src/core/payouts/validator.rs | router | function_signature | 769 | rust | null | null | null | null | validate_payout_link_render_request_and_get_allowed_domains | null | null | null | null | null | null | null |
impl RedisValue {
pub fn new(value: FredRedisValue) -> Self {
Self { inner: value }
}
pub fn into_inner(self) -> FredRedisValue {
self.inner
}
pub fn from_bytes(val: Vec<u8>) -> Self {
Self {
inner: FredRedisValue::Bytes(val.into()),
}
}
pub fn fr... | crates/redis_interface/src/types.rs | redis_interface | impl_block | 107 | rust | null | RedisValue | null | impl RedisValue | null | null | null | null | null | null | null | null |
pub fn build_payment_data(
self,
status: DummyConnectorStatus,
next_action: Option<DummyConnectorNextAction>,
return_url: Option<String>,
) -> DummyConnectorPaymentData {
DummyConnectorPaymentData {
attempt_id: self.attempt_id,
payment_id: self.payment... | crates/router/src/routes/dummy_connector/types.rs | router | function_signature | 132 | rust | null | null | null | null | build_payment_data | null | null | null | null | null | null | null |
pub struct Message {
#[serde(rename = "Transaction")]
transaction: RedsysSyncRequest,
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | Message | null | null | null | null | null | null | null | null | null | null | null |
pub struct Program {
pub globals: Globals,
pub default_selection: Output,
// #[schema(value_type=RuleConnectorSelection)]
pub rules: Vec<Rule>,
// #[schema(value_type=HashMap<String, serde_json::Value>)]
pub metadata: Option<Metadata>,
} | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 61 | rust | Program | null | null | null | null | null | null | null | null | null | null | null |
impl MandateAmountData {
pub fn get_end_date(
&self,
format: date_time::DateFormat,
) -> error_stack::Result<Option<String>, ParsingError> {
self.end_date
.map(|date| {
date_time::format_date(date, format)
.change_context(ParsingError::Date... | crates/hyperswitch_domain_models/src/mandates.rs | hyperswitch_domain_models | impl_block | 108 | rust | null | MandateAmountData | null | impl MandateAmountData | null | null | null | null | null | null | null | null |
pub struct PaymentFlowData {
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: Option<common_utils::id_type::CustomerId>,
pub connector_customer: Option<String>,
pub payment_id: String,
pub attempt_id: String,
pub status: common_enums::AttemptStatus,
pub payment_method: co... | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 387 | rust | PaymentFlowData | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentsCompleteAuthorize for Globalpay {} | crates/hyperswitch_connectors/src/connectors/globalpay.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Globalpay | PaymentsCompleteAuthorize for | impl PaymentsCompleteAuthorize for for Globalpay | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
web::scope("/v2/proxy")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::post().to(proxy::proxy)))
} | crates/router/src/routes/app.rs | router | function_signature | 50 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl PaymentAttemptNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<PaymentAttempt> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/payment_attempt.rs | diesel_models | impl_block | 42 | rust | null | PaymentAttemptNew | null | impl PaymentAttemptNew | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Square {} | crates/hyperswitch_connectors/src/connectors/square.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Square | api::PaymentCapture for | impl api::PaymentCapture for for Square | null | null | null | null | null | null | null | null |
pub struct RefundReasonDistributionRow {
pub count: i64,
pub total: i64,
pub refund_reason: String,
} | crates/analytics/src/refunds/accumulator.rs | analytics | struct_definition | 32 | rust | RefundReasonDistributionRow | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/db/user_role.rs
Public structs: 2
use common_utils::id_type;
use diesel_models::{
enums::{self, UserStatus},
user_role as storage,
};
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, C... | crates/router/src/db/user_role.rs | router | full_file | 4,402 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payouts/payouts--cancel.mdx
# Type: Doc File
---
openapi: post /payouts/{payout_id}/cancel
--- | api-reference/v1/payouts/payouts--cancel.mdx | null | doc_file | 40 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn confirm_intent_with_external_vault_proxy(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<api_models::payments::ExternalVaultProxyPaymentsRequest>,
path: web::Path<common_utils::id_type::GlobalPaymentId>,
) -> impl Responder {
use hyperswitch_domain... | crates/router/src/routes/payments.rs | router | function_signature | 559 | rust | null | null | null | null | confirm_intent_with_external_vault_proxy | null | null | null | null | null | null | null |
impl RetrieveFile for Checkout {} | crates/hyperswitch_connectors/src/connectors/checkout.rs | hyperswitch_connectors | impl_block | 6 | rust | null | Checkout | RetrieveFile for | impl RetrieveFile for for Checkout | null | null | null | null | null | null | null | null |
pub struct MerchantAccount; | crates/router/src/routes/app.rs | router | struct_definition | 5 | rust | MerchantAccount | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_lineage(
conn: &PgPooledConn,
lineage: ThemeLineage,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
Self::lineage_filter(lineage),
)
.await
} | crates/diesel_models/src/query/user/theme.rs | diesel_models | function_signature | 70 | rust | null | null | null | null | find_by_lineage | null | null | null | null | null | null | null |
File: crates/router/src/routes/api_keys.rs
Public functions: 10
use actix_web::{web, HttpRequest, Responder};
use router_env::{instrument, tracing, Flow};
use super::app::AppState;
use crate::{
core::{api_keys, api_locking},
services::{api, authentication as auth, authorization::permissions::Permission},
... | crates/router/src/routes/api_keys.rs | router | full_file | 2,550 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayoutCreateRequest {
/// Unique identifier for the payout. This ensures idempotency for multiple payouts that have been done by a single merchant. This field is auto generated and is returned in the API response, **not required to be included in the Payout Create/Update Request.**
#[schema(
... | crates/api_models/src/payouts.rs | api_models | struct_definition | 2,214 | rust | PayoutCreateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct SecretStateContainer<T, S: SecretState> {
inner: T,
marker: PhantomData<S>,
} | crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs | hyperswitch_interfaces | struct_definition | 26 | rust | SecretStateContainer | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs
Public structs: 30
use api_models::{payments::AdditionalPaymentData, webhooks::IncomingWebhookEvent};
use common_enums::{Currency, FraudCheckStatus};
use common_utils::{
ext_traits::ValueExt,
id_type,
pii::Email,
types::{... | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | full_file | 4,538 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GenerateDisputeReport;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
json_payload.into_inner(),
|state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move {
... | crates/router/src/analytics.rs | router | impl_block | 372 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Nuvei {
fn validate_mandate_payment(
&self,
pm_type: Option<enums::PaymentMethodType>,
pm_data: PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::collections::HashSet::from([
PaymentMethodD... | crates/hyperswitch_connectors/src/connectors/nuvei.rs | hyperswitch_connectors | impl_block | 127 | rust | null | Nuvei | ConnectorValidation for | impl ConnectorValidation for for Nuvei | null | null | null | null | null | null | null | null |
pub struct RefundListMetaData {
/// The list of available connector filters
pub connector: Vec<String>,
/// The list of available currency filters
#[schema(value_type = Vec<Currency>)]
pub currency: Vec<enums::Currency>,
/// The list of available refund status filters
#[schema(value_type = V... | crates/api_models/src/refunds.rs | api_models | struct_definition | 90 | rust | RefundListMetaData | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentUpdate; | crates/router/src/core/payments/operations/payment_update.rs | router | struct_definition | 5 | rust | PaymentUpdate | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankDetails {
#[serde(rename = "bankAccount.holder")]
pub account_holder: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | BankDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct OutgoingWebhookRequestContent {
/// The request body sent in the webhook.
#[schema(value_type = String)]
#[serde(alias = "payload")]
pub body: Secret<String>,
/// The request headers sent in the webhook.
#[schema(
value_type = Vec<(String, String)>,
example = json!([[... | crates/api_models/src/webhook_events.rs | api_models | struct_definition | 108 | rust | OutgoingWebhookRequestContent | null | null | null | null | null | null | null | null | null | null | null |
pub struct Payme {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
apple_pay_google_pay_amount_converter:
&'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
amount_converter_webhooks: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | struct_definition | 75 | rust | Payme | null | null | null | null | null | null | null | null | null | null | null |
pub struct RecurlyInvoiceBillingAddress {
pub street1: Option<Secret<String>>,
pub street2: Option<Secret<String>>,
pub region: Option<Secret<String>>,
pub country: Option<enums::CountryAlpha2>,
pub postal_code: Option<Secret<String>>,
pub city: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs | hyperswitch_connectors | struct_definition | 68 | rust | RecurlyInvoiceBillingAddress | null | null | null | null | null | null | null | null | null | null | null |
pub struct NexixpayPaymentsCaptureRequest {
amount: StringMinorUnit,
currency: Currency,
} | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | NexixpayPaymentsCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthenticationData {
pub merchant_account: domain::MerchantAccount,
pub key_store: domain::MerchantKeyStore,
pub profile: domain::Profile,
pub platform_merchant_account: Option<domain::MerchantAccount>,
} | crates/router/src/services/authentication.rs | router | struct_definition | 49 | rust | AuthenticationData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_processes_by_time_status(
conn: &PgPooledConn,
time_lower_limit: PrimitiveDateTime,
time_upper_limit: PrimitiveDateTime,
status: enums::ProcessTrackerStatus,
limit: Option<i64>,
version: enums::ApiVersion,
) -> StorageResult<Vec<Self>> {
gene... | crates/diesel_models/src/query/process_tracker.rs | diesel_models | function_signature | 164 | rust | null | null | null | null | find_processes_by_time_status | null | null | null | null | null | null | null |
pub struct MerchantDefinedInformation {
key: u8,
value: String,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | MerchantDefinedInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct Disputes; | crates/router/src/routes/app.rs | router | struct_definition | 6 | rust | Disputes | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_connector_name(&self) -> String {
self.connector_name.clone()
} | crates/api_models/src/admin.rs | api_models | function_signature | 19 | rust | null | null | null | null | get_connector_name | null | null | null | null | null | null | null |
impl EventsHandler {
pub fn log_event<T: KafkaMessage>(&self, event: &T) {
match self {
Self::Kafka(kafka) => kafka.log_event(event).unwrap_or_else(|e| {
logger::error!("Failed to log event: {:?}", e);
}),
Self::Logs(logger) => logger.log_event(event),
... | crates/router/src/events.rs | router | impl_block | 128 | rust | null | EventsHandler | null | impl EventsHandler | null | null | null | null | null | null | null | null |
impl api::UasAuthentication for UnifiedAuthenticationService {} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs | hyperswitch_connectors | impl_block | 11 | rust | null | UnifiedAuthenticationService | api::UasAuthentication for | impl api::UasAuthentication for for UnifiedAuthenticationService | null | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UserAuthenticationMethod> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/user_authentication_method.rs | diesel_models | function_signature | 35 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
pub struct ReferenceTransactionDetails {
reference_transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | ReferenceTransactionDetails | 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.