repo stringclasses 4
values | file_path stringlengths 6 193 | extension stringclasses 23
values | content stringlengths 0 1.73M | token_count int64 0 724k | __index_level_0__ int64 0 10.8k |
|---|---|---|---|---|---|
hyperswitch | crates/hyperswitch_connectors/src/connectors/opennode/transformers.rs | .rs | use std::collections::HashMap;
use common_enums::{enums, AttemptStatus};
use common_utils::request::Method;
use hyperswitch_domain_models::{
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::ResponseId,
router_response_types::{PaymentsResp... | 2,064 | 2,206 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | .rs | use common_enums::enums;
use common_utils::{id_type, pii::Email, request::Method, types::MinorUnit};
use hyperswitch_domain_models::{
payment_method_data::{BankRedirectData, PaymentMethodData},
router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},
router_flow_types::refunds::Execute,
... | 4,615 | 2,207 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | .rs | 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},
router_data::{ConnectorAuthType, RouterData},
router_request_types::ResponseId,
router_re... | 3,135 | 2,208 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs | .rs | use std::collections::HashMap;
use common_enums::{enums, Currency};
use common_utils::{ext_traits::OptionExt, pii, request::Method, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
rou... | 2,611 | 2,209 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs | .rs | use std::collections::HashMap;
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::enums;
use common_utils::{
errors::CustomResult, ext_traits::Encode, request::Method, types::FloatMajorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{BankRedirectData, P... | 5,388 | 2,210 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | .rs | #[cfg(feature = "payouts")]
use common_enums::enums::PayoutEntityType;
use common_enums::{enums, Currency, PayoutStatus};
use common_utils::{pii::Email, types::FloatMajorUnit};
use hyperswitch_domain_models::router_data::ConnectorAuthType;
#[cfg(feature = "payouts")]
use hyperswitch_domain_models::{
router_response... | 3,896 | 2,211 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | .rs | use api_models::payments::QrCodeInformation;
use common_enums::enums;
use common_utils::{errors::CustomResult, ext_traits::Encode, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{BankTransferData, PaymentMethodData},
router_data::{AccessToken, Connecto... | 3,644 | 2,212 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/boku/transformers.rs | .rs | use std::fmt;
use common_enums::enums;
use common_utils::{request::Method, types::MinorUnit};
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, WalletData},
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::Response... | 3,933 | 2,213 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | .rs | use std::collections::BTreeMap;
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::{Encode, OptionExt, ValueExt},
request::Method,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{Card, Paym... | 14,577 | 2,214 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | .rs | use api_models::payments::AdditionalPaymentData;
use bytes::Bytes;
use common_enums::enums;
use common_utils::{
date_time::DateFormat, errors::CustomResult, ext_traits::ValueExt, types::MinorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_... | 9,565 | 2,215 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/paystack/transformers.rs | .rs | use common_enums::{enums, Currency};
use common_utils::{pii::Email, request::Method, types::MinorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{BankRedirectData, PaymentMethodData},
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
router_flow_types::ref... | 3,552 | 2,216 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | .rs | #[cfg(feature = "payouts")]
use api_models::payouts::{PayoutMethodData, Wallet as WalletPayout};
use api_models::{enums, webhooks::IncomingWebhookEvent};
use base64::Engine;
use common_enums::enums as storage_enums;
#[cfg(feature = "payouts")]
use common_utils::pii::Email;
use common_utils::{consts, errors::CustomResul... | 23,676 | 2,217 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/zen/transformers.rs | .rs | use cards::CardNumber;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::{OptionExt, ValueExt},
pii::{self},
request::Method,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{
BankDebitData, BankRedirectData, BankTransferData,... | 9,401 | 2,218 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | .rs | use common_enums::enums::{self, AttemptStatus};
use common_utils::{ext_traits::Encode, pii, request::Method, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, WalletData},
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
... | 6,910 | 2,219 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | .rs | use std::str::FromStr;
use common_enums::enums;
use common_utils::{id_type, pii::Email, request::Method, types::StringMajorUnit};
use error_stack::report;
use hyperswitch_domain_models::{
payment_method_data::{BankRedirectData, Card, PayLaterData, PaymentMethodData, WalletData},
router_data::{ConnectorAuthType... | 6,548 | 2,220 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/aci/aci_result_codes.rs | .rs | pub(super) const FAILURE_CODES: [&str; 501] = [
"100.370.100",
"100.370.110",
"100.370.111",
"100.380.100",
"100.380.101",
"100.380.110",
"100.380.201",
"100.380.305",
"100.380.306",
"100.380.401",
"100.380.501",
"100.395.502",
"100.396.101",
"100.400.000",
"1... | 7,656 | 2,221 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | .rs | use common_enums::{enums, Currency};
use common_utils::{consts::BASE64_ENGINE, date_time, types::MinorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
ro... | 3,905 | 2,222 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | .rs | use common_enums::enums::{self, AttemptStatus};
use common_utils::{
errors::{CustomResult, ParsingError},
ext_traits::ByteSliceExt,
request::Method,
types::MinorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, WalletData},
router_data... | 11,192 | 2,223 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | .rs | use common_enums::enums;
use common_utils::types::MinorUnit;
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
router_request_types::{
PaymentsAuthorizeData, PaymentsCaptureData, PaymentsS... | 7,073 | 2,224 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs | .rs | use cards::CardNumber;
use common_enums::{enums, AttemptStatus, CaptureMethod, Currency, PaymentMethod};
use common_utils::{errors::ParsingError, ext_traits::Encode};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData}... | 4,330 | 2,225 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver/transformers.rs | .rs | use common_enums::enums;
use common_utils::types::StringMinorUnit;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::ResponseId,
router_response_types::{PaymentsRe... | 1,802 | 2,226 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/opayo/transformers.rs | .rs | use common_enums::enums;
use common_utils::types::MinorUnit;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::{Execute, RSync},
router_request_types::ResponseId,
router_response_types::{PaymentsResponseData, Ref... | 1,790 | 2,227 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs | .rs | use common_enums::enums;
use common_utils::{request::Method, types::FloatMajorUnit};
use hyperswitch_domain_models::{
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::ResponseId,
router_response_types::{PaymentsResponseData, RedirectForm, ... | 2,197 | 2,228 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | .rs | use std::collections::HashMap;
use cards::CardNumber;
use common_enums::enums;
use common_utils::{pii, request::Method, types::FloatMajorUnit};
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
router_flow_types::refunds::{... | 5,760 | 2,229 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs | .rs | use common_enums::enums;
use common_utils::{pii::Email, request::Method};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::{refunds::Execute, RSync},
router_request_types::ResponseId,
... | 4,452 | 2,230 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs | .rs | #[cfg(feature = "v2")]
use std::str::FromStr;
use common_enums::enums;
#[cfg(all(feature = "revenue_recovery", feature = "v2"))]
use common_utils::id_type;
use common_utils::{errors::CustomResult, ext_traits::ByteSliceExt, types::StringMinorUnit};
use error_stack::ResultExt;
#[cfg(all(feature = "revenue_recovery", fea... | 4,033 | 2,231 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | .rs | use api_models::webhooks::IncomingWebhookEvent;
use base64::Engine;
use cards::CardNumber;
use common_enums::{enums, AttemptStatus, CaptureMethod, CountryAlpha2};
use common_utils::{
consts::BASE64_ENGINE,
errors::CustomResult,
pii::{Email, IpAddress},
types::FloatMajorUnit,
};
use error_stack::ResultEx... | 8,674 | 2,232 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/globalpay/response.rs | .rs | use common_enums::Currency;
use common_utils::types::StringMinorUnit;
use masking::Secret;
use serde::{Deserialize, Serialize};
use super::requests;
#[derive(Debug, Serialize, Deserialize)]
pub struct GlobalpayPaymentsResponse {
/// A unique identifier for the merchant account set by Global Payments.
pub acco... | 3,484 | 2,233 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/globalpay/transformers.rs | .rs | use common_utils::{
crypto::{self, GenerateDigest},
errors::ParsingError,
pii,
request::Method,
types::{AmountConvertor, MinorUnit, StringMinorUnit, StringMinorUnitForConnector},
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data,
router_data::{AccessToken, C... | 4,544 | 2,234 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs | .rs | use common_utils::types::StringMinorUnit;
use masking::Secret;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize)]
pub struct GlobalPayRouterData<T> {
pub amount: StringMinorUnit,
pub router_data: T,
}
#[derive(Debug, Serialize)]
pub struct GlobalpayCancelRouterData<T> {
pub amount: Option<St... | 7,105 | 2,235 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/forte/transformers.rs | .rs | use cards::CardNumber;
use common_enums::enums;
use common_utils::types::FloatMajorUnit;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::ResponseId,
router_respo... | 4,436 | 2,236 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs | .rs | use common_enums::enums::{AttemptStatus, BankNames, CaptureMethod, CountryAlpha2, Currency};
use common_utils::{pii::Email, request::Method};
use hyperswitch_domain_models::{
payment_method_data::{BankRedirectData, PaymentMethodData},
router_data::{ConnectorAuthType, RouterData},
router_flow_types::{
... | 5,672 | 2,237 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | .rs | use std::collections::HashMap;
use api_models::payments::SessionToken;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
pii::{self, Email},
request::Method,
types::StringMajorUnit,
};
use error_stack::{report, ResultExt};
use hyperswitch_domain_models::{
payment_method_data::{Bank... | 15,691 | 2,238 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | .rs | use common_enums::enums;
use common_utils::{
pii::{self, Email},
types::FloatMajorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, UpiCollectData, UpiData},
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execut... | 10,514 | 2,239 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs | .rs | use common_enums::enums;
use common_utils::{ext_traits::Encode, types::MinorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, WalletData},
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
router_request_types::ResponseId,
router_resp... | 3,256 | 2,240 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs | .rs | use std::collections::HashMap;
use cards::CardNumber;
use common_enums::{enums, PaymentMethod};
use common_utils::{ext_traits::ValueExt, pii::Email, types::MinorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{BankDebitData, PaymentMethodData},
router_data::{AccessToken... | 8,725 | 2,241 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs | .rs | use common_enums::enums::{self, AuthenticationType};
use common_utils::pii::IpAddress;
use hyperswitch_domain_models::{
payment_method_data::{Card, PaymentMethodData},
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
router_flow_types::refunds::Execute,
router_request_types::{
Browse... | 3,837 | 2,242 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs | .rs | use cards::CardNumber;
use common_enums::{enums, Currency};
use common_utils::{pii::Email, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, ErrorResponse, RouterData},
router_flow_types::refunds::{E... | 4,744 | 2,243 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | .rs | use common_enums::enums::CaptureMethod;
use common_utils::types::MinorUnit;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{AccessToken, ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::{PaymentsCancelData, Respons... | 5,317 | 2,244 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs | .rs | #[cfg(all(feature = "revenue_recovery", feature = "v2"))]
use std::str::FromStr;
use common_enums::enums;
use common_utils::{errors::CustomResult, ext_traits::ByteSliceExt, pii, types::MinorUnit};
use error_stack::ResultExt;
#[cfg(all(feature = "revenue_recovery", feature = "v2"))]
use hyperswitch_domain_models::reven... | 4,854 | 2,245 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | .rs | use std::collections::HashMap;
use api_models::webhooks::IncomingWebhookEvent;
use cards::CardNumber;
use common_enums::{enums, enums as api_enums};
use common_utils::{
consts, ext_traits::OptionExt, pii::Email, request::Method, types::StringMinorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::... | 12,231 | 2,246 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | .rs | use common_enums::{enums, CountryAlpha2, UsStatesAbbreviation};
use common_utils::{
id_type,
pii::{self, IpAddress},
};
use hyperswitch_domain_models::{
address::AddressDetails,
payment_method_data::{BankDebitData, PaymentMethodData},
router_data::{ConnectorAuthType, PaymentMethodToken, RouterData},... | 6,595 | 2,247 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | .rs | use std::collections::HashMap;
use common_enums::enums;
use common_utils::{pii, request::Method};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_request_types::ResponseId,
router_response_ty... | 2,962 | 2,248 |
hyperswitch | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | .rs | use base64::Engine;
use common_enums::{enums, FutureUsage};
use common_utils::{consts, ext_traits::OptionExt, pii};
use hyperswitch_domain_models::{
payment_method_data::{
ApplePayWalletData, GooglePayWalletData, PaymentMethodData, SamsungPayWalletData,
WalletData,
},
router_data::{
... | 19,206 | 2,249 |
hyperswitch | crates/common_types/Cargo.toml | .toml | [package]
name = "common_types"
description = "Types shared across the request/response types and database types"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[features]
default = []
v1 = ["common_utils/v1"]
v2 = ["common_utils/v2"]
[dependencies]
diesel = "2.2.3"
... | 229 | 2,250 |
hyperswitch | crates/common_types/src/payments.rs | .rs | //! Payment related types
use std::collections::HashMap;
use common_enums::enums;
use common_utils::{errors, events, impl_to_sql_from_sql_json, types::MinorUnit};
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use euclid::frontend::{
ast::Program,
dir::{DirKeyKind, EuclidDirFilter},
};
use serde::{... | 2,103 | 2,251 |
hyperswitch | crates/common_types/src/domain.rs | .rs | //! Common types
use common_enums::enums;
use common_utils::{impl_to_sql_from_sql_json, types::MinorUnit};
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
#[derive(
Serialize, Deserialize, Debug, Clone, PartialEq, Eq, FromSqlRow, AsExpression, T... | 491 | 2,252 |
hyperswitch | crates/common_types/src/customers.rs | .rs | //! Customer related types
/// HashMap containing MerchantConnectorAccountId and corresponding customer id
#[cfg(feature = "v2")]
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, diesel::AsExpression)]
#[diesel(sql_type = diesel::sql_types::Jsonb)]
#[serde(transparent)]
pub struct ConnectorCustome... | 224 | 2,253 |
hyperswitch | crates/common_types/src/primitive_wrappers.rs | .rs | pub use bool_wrappers::*;
mod bool_wrappers {
use std::ops::Deref;
use serde::{Deserialize, Serialize};
/// Bool that represents if Extended Authorization is Applied or not
#[derive(
Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, diesel::expression::AsExpression,
)]
#[diese... | 1,422 | 2,254 |
hyperswitch | crates/common_types/src/consts.rs | .rs | //! Constants that are used in the domain level.
/// API version
#[cfg(feature = "v1")]
pub const API_VERSION: common_enums::ApiVersion = common_enums::ApiVersion::V1;
/// API version
#[cfg(feature = "v2")]
pub const API_VERSION: common_enums::ApiVersion = common_enums::ApiVersion::V2;
| 78 | 2,255 |
hyperswitch | crates/common_types/src/refunds.rs | .rs | //! Refund related types
use common_utils::impl_to_sql_from_sql_json;
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
use crate::domain::{AdyenSplitData, XenditSplitSubMerchantData};
#[derive(
Serialize, Deserialize, Debug, Clone, PartialEq, Eq... | 400 | 2,256 |
hyperswitch | crates/common_types/src/lib.rs | .rs | //! Types shared across the request/response types and database types
#![warn(missing_docs, missing_debug_implementations)]
pub mod consts;
pub mod customers;
pub mod domain;
pub mod payment_methods;
pub mod payments;
/// types that are wrappers around primitive types
pub mod primitive_wrappers;
pub mod refunds;
| 64 | 2,257 |
hyperswitch | crates/common_types/src/payment_methods.rs | .rs | //! Common types to be used in payment methods
use diesel::{
backend::Backend,
deserialize,
deserialize::FromSql,
serialize::ToSql,
sql_types::{Json, Jsonb},
AsExpression, Queryable,
};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
/// Details of all the payment methods enabled fo... | 2,319 | 2,258 |
hyperswitch | crates/openapi/Cargo.toml | .toml | [package]
name = "openapi"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[dependencies]
# Third party crates
serde_json = "1.0.115"
utoipa = { version = "4.2.0", features = ["preserve_order", "preserve_path_order", "time"] }
# First party crates
api_models = { versi... | 250 | 2,259 |
hyperswitch | crates/openapi/src/openapi_v2.rs | .rs | use crate::routes;
#[derive(utoipa::OpenApi)]
#[openapi(
info(
title = "Hyperswitch - API Documentation",
contact(
name = "Hyperswitch Support",
url = "https://hyperswitch.io",
email = "hyperswitch@juspay.in"
),
// terms_of_service = "https://www.... | 8,051 | 2,260 |
hyperswitch | crates/openapi/src/openapi.rs | .rs | use crate::routes;
#[derive(utoipa::OpenApi)]
#[openapi(
info(
title = "Hyperswitch - API Documentation",
contact(
name = "Hyperswitch Support",
url = "https://hyperswitch.io",
email = "hyperswitch@juspay.in"
),
// terms_of_service = "https://www.... | 8,140 | 2,261 |
hyperswitch | crates/openapi/src/main.rs | .rs | #[cfg(feature = "v1")]
mod openapi;
#[cfg(feature = "v2")]
mod openapi_v2;
mod routes;
#[allow(clippy::print_stdout)] // Using a logger is not necessary here
fn main() {
#[cfg(all(feature = "v1", feature = "v2"))]
compile_error!("features v1 and v2 are mutually exclusive, please enable only one of them");
... | 408 | 2,262 |
hyperswitch | crates/openapi/src/lib.rs | .rs | pub mod routes;
| 4 | 2,263 |
hyperswitch | crates/openapi/src/routes.rs | .rs | #![allow(unused)]
pub mod api_keys;
pub mod blocklist;
pub mod customers;
pub mod disputes;
pub mod gsm;
pub mod mandates;
pub mod merchant_account;
pub mod merchant_connector_account;
pub mod organization;
pub mod payment_link;
pub mod payment_method;
pub mod payments;
pub mod payouts;
pub mod poll;
pub mod profile;
... | 95 | 2,264 |
hyperswitch | crates/openapi/src/routes/payment_link.rs | .rs | /// Payments Link - Retrieve
///
/// To retrieve the properties of a Payment Link. This may be used to get the status of a previously initiated payment or next action for an ongoing payment
#[utoipa::path(
get,
path = "/payment_link/{payment_link_id}",
params(
("payment_link_id" = String, Path, desc... | 182 | 2,265 |
hyperswitch | crates/openapi/src/routes/merchant_account.rs | .rs | #[cfg(feature = "v1")]
/// Merchant Account - Create
///
/// 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.
#[utoipa::path(
post,
path = "/accounts",
request_body(
content = MerchantAccountCreate,
examp... | 2,347 | 2,266 |
hyperswitch | crates/openapi/src/routes/organization.rs | .rs | #[cfg(feature = "v1")]
/// Organization - Create
///
/// Create a new organization
#[utoipa::path(
post,
path = "/organization",
request_body(
content = OrganizationCreateRequest,
examples(
(
"Create an organization with organization_name" = (
... | 1,095 | 2,267 |
hyperswitch | crates/openapi/src/routes/disputes.rs | .rs | /// Disputes - Retrieve Dispute
/// Retrieves a dispute
#[utoipa::path(
get,
path = "/disputes/{dispute_id}",
params(
("dispute_id" = String, Path, description = "The identifier for dispute")
),
responses(
(status = 200, description = "The dispute was retrieved successfully", body = ... | 901 | 2,268 |
hyperswitch | crates/openapi/src/routes/api_keys.rs | .rs | #[cfg(feature = "v1")]
/// API Key - Create
///
/// Create a new API Key for accessing our APIs from your servers. The plaintext API Key will be
/// displayed only once on creation, so ensure you store it securely.
#[utoipa::path(
post,
path = "/api_keys/{merchant_id}",
params(("merchant_id" = String, Path,... | 1,748 | 2,269 |
hyperswitch | crates/openapi/src/routes/relay.rs | .rs | /// Relay - Create
///
/// Creates a relay request.
#[utoipa::path(
post,
path = "/relay",
request_body(
content = RelayRequest,
examples((
"Create a relay request" = (
value = json!({
"connector_resource_id": "7256228702616471803954",
... | 448 | 2,270 |
hyperswitch | crates/openapi/src/routes/payments.rs | .rs | /// Payments - Create
///
/// **Creates a payment object when amount and currency are passed.**
///
/// This API is also used to create a mandate by passing the `mandate_object`.
///
/// Depending on the user journey you wish to achieve, you may opt to complete all the steps in a single request **by attaching a payment... | 7,042 | 2,271 |
hyperswitch | crates/openapi/src/routes/mandates.rs | .rs | /// Mandates - Retrieve Mandate
///
/// Retrieves a mandate created using the Payments/Create API
#[utoipa::path(
get,
path = "/mandates/{mandate_id}",
params(
("mandate_id" = String, Path, description = "The identifier for mandate")
),
responses(
(status = 200, description = "The ma... | 760 | 2,272 |
hyperswitch | crates/openapi/src/routes/routing.rs | .rs | #[cfg(feature = "v1")]
/// Routing - Create
///
/// Create a routing config
#[utoipa::path(
post,
path = "/routing",
request_body = RoutingConfigRequest,
responses(
(status = 200, description = "Routing config created", body = RoutingDictionaryRecord),
(status = 400, description = "Reque... | 3,612 | 2,273 |
hyperswitch | crates/openapi/src/routes/revenue_recovery.rs | .rs | #[cfg(feature = "v2")]
/// Revenue Recovery - Retrieve
///
/// Retrieve the Revenue Recovery Payment Info
#[utoipa::path(
get,
path = "/v2/process_tracker/revenue_recovery_workflow/{revenue_recovery_id}",
params(
("recovery_recovery_id" = String, Path, description = "The payment intent id"),
),
... | 204 | 2,274 |
hyperswitch | crates/openapi/src/routes/customers.rs | .rs | /// Customers - Create
///
/// Creates a customer object and stores the customer details to be reused for future payments.
/// Incase the customer already exists in the system, this API will respond with the customer details.
#[utoipa::path(
post,
path = "/customers",
request_body (
content = Custo... | 1,581 | 2,275 |
hyperswitch | crates/openapi/src/routes/payment_method.rs | .rs | /// PaymentMethods - Create
///
/// Creates and stores a payment method against a customer.
/// In case of cards, this API should be used only by PCI compliant merchants.
#[utoipa::path(
post,
path = "/payment_methods",
request_body (
content = PaymentMethodCreate,
examples (( "Save a card"... | 4,898 | 2,276 |
hyperswitch | crates/openapi/src/routes/refunds.rs | .rs | /// Refunds - Create
///
/// Creates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded
#[utoipa::path(
post,
path = "/refunds",
request_body(
content = RefundRe... | 1,541 | 2,277 |
hyperswitch | crates/openapi/src/routes/gsm.rs | .rs | /// Gsm - Create
///
/// Creates a GSM (Global Status Mapping) Rule. A GSM rule is used to map a connector's error message/error code combination during a particular payments flow/sub-flow to Hyperswitch's unified status/error code/error message combination. It is also used to decide the next action in the flow - retry... | 558 | 2,278 |
hyperswitch | crates/openapi/src/routes/payouts.rs | .rs | /// Payouts - Create
#[utoipa::path(
post,
path = "/payouts/create",
request_body=PayoutsCreateRequest,
responses(
(status = 200, description = "Payout created", body = PayoutCreateResponse),
(status = 400, description = "Missing Mandatory fields")
),
tag = "Payouts",
operati... | 1,765 | 2,279 |
hyperswitch | crates/openapi/src/routes/merchant_connector_account.rs | .rs | /// Merchant Connector - Create
///
/// Creates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.
#[cfg(feature = "v1")]
#[utoipa::path(
post,
path = "/accounts/{account_id}/connecto... | 2,430 | 2,280 |
hyperswitch | crates/openapi/src/routes/profile.rs | .rs | // ******************************************** V1 profile routes ******************************************** //
#[cfg(feature = "v1")]
/// Profile - Create
///
/// Creates a new *profile* for a merchant
#[utoipa::path(
post,
path = "/account/{account_id}/business_profile",
params (
("account_id" ... | 2,906 | 2,281 |
hyperswitch | crates/openapi/src/routes/blocklist.rs | .rs | #[utoipa::path(
post,
path = "/blocklist/toggle",
params (
("status" = bool, Query, description = "Boolean value to enable/disable blocklist"),
),
responses(
(status = 200, description = "Blocklist guard enabled/disabled", body = ToggleBlocklistResponse),
(status = 400, descr... | 462 | 2,282 |
hyperswitch | crates/openapi/src/routes/webhook_events.rs | .rs | /// Events - List
///
/// List all Events associated with a Merchant Account or Profile.
#[utoipa::path(
get,
path = "/events/{merchant_id}",
params(
(
"merchant_id" = String,
Path,
description = "The unique identifier for the Merchant Account."
),
... | 1,353 | 2,283 |
hyperswitch | crates/openapi/src/routes/poll.rs | .rs | /// Poll - Retrieve Poll Status
#[utoipa::path(
get,
path = "/poll/status/{poll_id}",
params(
("poll_id" = String, Path, description = "The identifier for poll")
),
responses(
(status = 200, description = "The poll status was retrieved successfully", body = PollResponse),
(st... | 128 | 2,284 |
hyperswitch | crates/pm_auth/Cargo.toml | .toml | [package]
name = "pm_auth"
description = "Open banking services"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
readme = "README.md"
license.workspace = true
[features]
v1 = ["api_models/v1", "common_utils/v1"]
[dependencies]
# First party crates
api_models = { version = "0.1.0", path = "../... | 274 | 2,285 |
hyperswitch | crates/pm_auth/README.md | .md | # Payment Method Auth Services
An open banking services for payment method auth validation
| 16 | 2,286 |
hyperswitch | crates/pm_auth/src/core.rs | .rs | pub mod errors;
| 4 | 2,287 |
hyperswitch | crates/pm_auth/src/consts.rs | .rs | pub const REQUEST_TIME_OUT: u64 = 30; // will timeout after the mentioned limit
pub const REQUEST_TIMEOUT_ERROR_CODE: &str = "TIMEOUT"; // timeout error code
pub const REQUEST_TIMEOUT_ERROR_MESSAGE: &str = "Connector did not respond in specified time"; // error message for timed out request
pub const NO_ERROR_CODE: &st... | 96 | 2,288 |
hyperswitch | crates/pm_auth/src/types.rs | .rs | pub mod api;
use std::marker::PhantomData;
use api::auth_service::{BankAccountCredentials, ExchangeToken, LinkToken, RecipientCreate};
use api_models::enums as api_enums;
use common_enums::{CountryAlpha2, PaymentMethod, PaymentMethodType};
use common_utils::{id_type, types};
use masking::Secret;
#[derive(Debug, Clon... | 1,432 | 2,289 |
hyperswitch | crates/pm_auth/src/lib.rs | .rs | pub mod connector;
pub mod consts;
pub mod core;
pub mod types;
| 16 | 2,290 |
hyperswitch | crates/pm_auth/src/connector.rs | .rs | pub mod plaid;
pub use self::plaid::Plaid;
| 15 | 2,291 |
hyperswitch | crates/pm_auth/src/types/api.rs | .rs | pub mod auth_service;
use std::fmt::Debug;
use common_utils::{
errors::CustomResult,
request::{Request, RequestContent},
};
use masking::Maskable;
use crate::{
core::errors::ConnectorError,
types::{
self as auth_types,
api::auth_service::{AuthService, PaymentInitiation},
},
};
#[... | 1,259 | 2,292 |
hyperswitch | crates/pm_auth/src/types/api/auth_service.rs | .rs | use crate::types::{
BankAccountCredentialsRequest, BankAccountCredentialsResponse, ExchangeTokenRequest,
ExchangeTokenResponse, LinkTokenRequest, LinkTokenResponse, RecipientCreateRequest,
RecipientCreateResponse,
};
pub trait AuthService:
super::ConnectorCommon
+ AuthServiceLinkToken
+ AuthSer... | 250 | 2,293 |
hyperswitch | crates/pm_auth/src/connector/plaid.rs | .rs | pub mod transformers;
use std::fmt::Debug;
use common_utils::{
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
};
use error_stack::ResultExt;
use masking::{Mask, Maskable};
use transformers as plaid;
use crate::{
core::errors,
types::{
self as auth_types,
... | 3,130 | 2,294 |
hyperswitch | crates/pm_auth/src/connector/plaid/transformers.rs | .rs | use std::collections::HashMap;
use common_enums::{PaymentMethod, PaymentMethodType};
use common_utils::{id_type, types as util_types};
use masking::{PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use crate::{core::errors, types};
#[derive(Debug, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_ca... | 3,357 | 2,295 |
hyperswitch | crates/pm_auth/src/core/errors.rs | .rs | #[derive(Debug, thiserror::Error, PartialEq)]
pub enum ConnectorError {
#[error("Failed to obtain authentication type")]
FailedToObtainAuthType,
#[error("Missing required field: {field_name}")]
MissingRequiredField { field_name: &'static str },
#[error("Failed to execute a processing step: {0:?}")]
... | 225 | 2,296 |
hyperswitch | crates/kgraph_utils/Cargo.toml | .toml | [package]
name = "kgraph_utils"
description = "Utilities for constructing and working with Knowledge Graphs"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[features]
dummy_connector = ["api_models/dummy_connector", "euclid/dummy_connector"]
v1 = ["api_models/v1", "co... | 370 | 2,297 |
hyperswitch | crates/kgraph_utils/benches/evaluation.rs | .rs | #![allow(unused, clippy::expect_used)]
use std::{collections::HashMap, str::FromStr};
use api_models::{
admin as admin_api, enums as api_enums, payment_methods::RequestPaymentMethodTypes,
};
use common_utils::types::MinorUnit;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use euclid::{
... | 1,305 | 2,298 |
hyperswitch | crates/kgraph_utils/src/mca.rs | .rs | use std::str::FromStr;
use api_models::{
admin as admin_api, enums as api_enums, payment_methods::RequestPaymentMethodTypes,
refunds::MinorUnit,
};
use euclid::{
dirval,
frontend::{ast, dir},
types::{NumValue, NumValueRefinement},
};
use hyperswitch_constraint_graph as cgraph;
use strum::IntoEnumIt... | 12,742 | 2,299 |
hyperswitch | crates/kgraph_utils/src/transformers.rs | .rs | use api_models::enums as api_enums;
use euclid::{
backend::BackendInput,
dirval,
dssa::types::AnalysisErrorType,
frontend::{ast, dir},
types::{NumValue, StrValue},
};
use crate::error::KgraphError;
pub trait IntoContext {
fn into_context(self) -> Result<Vec<dir::DirValue>, KgraphError>;
}
imp... | 12,357 | 2,300 |
hyperswitch | crates/kgraph_utils/src/types.rs | .rs | use std::collections::{HashMap, HashSet};
use api_models::enums as api_enums;
use serde::Deserialize;
#[derive(Debug, Deserialize, Clone, Default)]
pub struct CountryCurrencyFilter {
pub connector_configs: HashMap<api_enums::RoutableConnectors, PaymentMethodFilters>,
pub default_configs: Option<PaymentMethodF... | 261 | 2,301 |
hyperswitch | crates/kgraph_utils/src/lib.rs | .rs | pub mod error;
pub mod mca;
pub mod transformers;
pub mod types;
| 17 | 2,302 |
hyperswitch | crates/kgraph_utils/src/error.rs | .rs | #[cfg(feature = "v2")]
use common_enums::connector_enums;
use euclid::{dssa::types::AnalysisErrorType, frontend::dir};
#[derive(Debug, thiserror::Error, serde::Serialize)]
#[serde(tag = "type", content = "info", rename_all = "snake_case")]
pub enum KgraphError {
#[error("Invalid connector name encountered: '{0}'")]... | 205 | 2,303 |
hyperswitch | crates/external_services/Cargo.toml | .toml | [package]
name = "external_services"
description = "Interactions of the router with external systems"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
readme = "README.md"
license.workspace = true
[features]
aws_kms = ["dep:aws-config", "dep:aws-sdk-kms"]
email = ["dep:aws-config"]
aws_s3 = ["d... | 774 | 2,304 |
hyperswitch | crates/external_services/build.rs | .rs | #[allow(clippy::expect_used)]
fn main() -> Result<(), Box<dyn std::error::Error>> {
#[cfg(feature = "dynamic_routing")]
{
// Get the directory of the current crate
let proto_path = router_env::workspace_path().join("proto");
let success_rate_proto_file = proto_path.join("success_rate.pr... | 219 | 2,305 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.