text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/types/primitive_wrappers.rs | crate: common_utils
fn from(value: bool) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/types/authentication.rs | crate: common_utils
/// Get string representation of enclosed ID type
pub fn to_str(&self) -> &str {
{
Self::Payment(id) => id.get_string_repr(),<|fim_suffix|>
<|fim_middle|>
Self::PaymentMethodSession(id) => id.get_string_repr(),... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/organization.rs | crate: common_utils
use crate::errors::{CustomResult, ValidationError};
/// Get an organization id from String
pub fn try_from_string(org_id: String) -> CustomResult<Self, ValidationError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/profile.rs | crate: common_utils
fn from(val: ProfileId) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/profile.rs | crate: common_utils
use std::str::FromStr;
fn from_str(s: &str) -> Result<Self, Self::Err> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/profile.rs | crate: common_utils
fn get_api_event_type(&self) -> Option<crate::events::ApiEventsType> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/merchant_connector_account.rs | crate: common_utils
use crate::errors::{CustomResult, ValidationError};
/// Get a merchant connector account id from String
pub fn wrap(merchant_connector_account_id: String) -> CustomResult<Self, ValidationError> {
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
fn t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
fn test_global_id_deser() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
fn test_global_id_from_string() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
fn test_global_id_generate() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
fn test_cell_id_from_str() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use diesel::{backend::Backend, deserialize::FromSql, serialize::ToSql, sql_types};
fn to_sql<'b>(
&'b self,
out: &mut diesel::serialize::Output<'b, '_, DB>,
) -> diesel::serialize::Result {
self.0 .0 .0.t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
pub(... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
pub(... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
/// Get the string representation of the cell id
fn get_string_repr(&self) -> &str {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use error_stack::ResultExt;
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, Lengt... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
fn f... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
use crate::{
consts::{CELL_IDENTIFIER_LENGTH, MAX_GLOBAL_ID_LENGTH, MIN_GLOBAL_ID_LENGTH},
errors, generate_time_ordered_id,
id_type::{AlphaNumericId, AlphaNumericIdError, LengthId, LengthIdError},
};
fn f... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id.rs | crate: common_utils
fn prefix(self) -> &'static str {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
fn from_str(s: &str) -> Result<Self, Self::Err> {
let cow_string = std::borrow::Cow::Owned(s.to_string());
Self::try_from(cow_string)
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
fn from(val: PaymentId) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
use crate::{
errors::{CustomResult, ValidationError},
generate_id_with_default_len,
id_type::{AlphaNumericId, LengthId},
};
/// Wrap a string inside PaymentId
pub fn wrap(payment_id_string: String) -> Cu... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
use crate::{
errors::{CustomResult, ValidationError},
generate_id_with_default_len,
id_type::{AlphaNumericId, LengthId},
};
/// Generate a test payment id with prefix test_
pub fn generate_test_payment_i... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
/// Get external authentication request poll id
pub fn get_external_authentication_request_poll_id(&self) -> String {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
/// Generate a key for pm_auth
pub fn get_pm_auth_key(&self) -> String {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
use crate::{
errors::{CustomResult, ValidationError},
generate_id_with_default_len,
id_type::{AlphaNumericId, LengthId},
};
/// Generate a client id for the payment id
pub fn generate_client_secret(&self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
/// Get the attempt id for the payment id based on the attempt count
pub fn get_attempt_id(&self, attempt_count: i16) -> String {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
use crate::{
errors::{CustomResult, ValidationError},
generate_id_with_default_len,
id_type::{AlphaNumericId, LengthId},
};
/// Get payment id in the format of irrelevant_payment_id_in_{
<|fim_suffix|>
<... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/payment.rs | crate: common_utils
/// Get the hash key to be stored in redis
pub fn get_hash_key_for_kv_store(&self) -> String {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/api_key.rs | crate: common_utils
/// Generate Api Key Id from prefix
pub fn generate_key_id(prefix: &'static str) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
fn to_sql<'b>(
&'b self,
out: &mut diesel::serialize::Output<'b, '_, DB>,
) -> diesel::serialize::Result {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
fn build(row: Self::Row) -> diesel::deserialize::Result<Self> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
use crate::{
errors::CustomResult,
id_type::global_id::{CellId, GlobalEntity, GlobalId},
};
fn from_sql(value: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
let global_id = GlobalId::from_s... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
use crate::{
errors::CustomResult,
id_type::global_id::{CellId, GlobalEntity, GlobalId},
};
/// Construct a new GlobalPaymentMethodId from a string
pub fn generate_from_string(value: String... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
use error_stack::ResultExt;
use crate::{
errors::CustomResult,
id_type::global_id::{CellId, GlobalEntity, GlobalId},
};
/// Create a new GlobalPaymentMethodId from cell id information
pub f... | ast_fragments |
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
use crate::{
errors::CustomResult,
id_type::global_id::{CellId, GlobalEntity, GlobalId},
};
fn get_api_event_type(&self) -> Option<crate::events::ApiEventsType> {
Some(crate::events::ApiEventsType::Pa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
/// Construct a redis key from the id to be stored in redis
pub fn get_redis_key(&self) -> String {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
/// Get the string representation of the id
pub fn get_string_repr(&self) -> &str {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/payment_methods.rs | crate: common_utils
use error_stack::ResultExt;
use crate::{
errors::CustomResult,
id_type::global_id::{CellId, GlobalEntity, GlobalId},
};
/// Create a new GlobalPaymentMethodSessionId from cell id informatio... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/refunds.rs | crate: common_utils
use error_stack::ResultExt;
use crate::{errors, generate_id_with_default_len, generate_time_ordered_id_without_prefix, types};
fn try_from(value: std::borrow::Cow<'static, str>) -> Result<Self, Self::Error> {
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/refunds.rs | crate: common_utils
use crate::{errors, generate_id_with_default_len, generate_time_ordered_id_without_prefix, types};
/// Generate a new GlobalRefundId from a cell id
pub fn generate(cell_id: &crate::id_type::CellId) -> Self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_utils/src/id_type/global_id/refunds.rs | crate: common_utils
/// Get string representation of the id
pub fn get_string_repr(&self) -> &str {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use serde_json::Value;
fn test_get_common_mandate_reference_with_payments_and_payouts_details() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use serde_json::Value;
fn test_get_common_mandate_reference_payouts_only() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use serde_json::Value;
fn test_get_common_mandate_reference_payments_only() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use common_enums::enums::MerchantStorageScheme;
use common_utils::{crypto::Encryptable, encryption::Encryption, types::keymanager::ToEncryptable};
use common_utils::{
crypto::OptionalEncryp... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use api_models::payment_methods::PaymentMethodsData;
use common_enums::enums::MerchantStorageScheme;
use common_utils::{crypto::Encryptable, encryption::Encryption, types::keymanager::ToEncrypt... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::OptionalEncryptableValue,
errors::{CustomResult, ParsingError, ValidationError},
id_type, pii, type_name,
types::keymanager,
};
use crate::{
addr... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use serde_json::Value;
fn test_get_common_mandate_reference_invalid_data() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
fn test_get_common_mandate_reference_empty_details() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use crate::{
mandates::{self, CommonMandateReference},
merchant_key_store::MerchantKeyStore,
type_encryption::{crypto_operation, AsyncLift, CryptoOperation},
};
pub fn apply_changes... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
fn from(update: PaymentMethodsSessionUpdateEnum) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use common_enums::enums::MerchantStorageScheme;
use crate::{
mandates::{self, CommonMandateReference},
merchant_key_store::MerchantKeyStore,
type_encryption::{crypto_operation, Asyn... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use common_enums::enums::MerchantStorageScheme;
use crate::{
mandates::{self, CommonMandateReference},
merchant_key_store::MerchantKeyStore,
type_encryption::{crypto_operation, Asyn... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::OptionalEncryptableValue,
errors::{CustomResult, ParsingError, ValidationError},
id_type, pii, type_name,
types::keymanager,
};
use crate::{
mand... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use diesel_models::{enums as storage_enums, PaymentMethodUpdate};
use crate::{
mandates::{self, CommonMandateReference},
merchant_key_store::MerchantKeyStore,
type_encryption::{cryp... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use diesel_models::{enums as storage_enums, PaymentMethodUpdate};
use crate::{
mandates::{self, CommonMandateReference},
merchant_key_store::MerchantKeyStore,
type_encryption::{cryp... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::OptionalEncryptableValue,
errors::{CustomResult, ParsingError, ValidationError},
id_type, pii, type_name,
types::keymanager,
};
use crate::{
mand... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
pub fn generate(id: String) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_methods.rs | crate: hyperswitch_domain_models
use crate::{
mandates::{self, CommonMandateReference},
merchant_key_store::MerchantKeyStore,
type_encryption::{crypto_operation, AsyncLift, CryptoOperation},
};
pub fn get_string_re... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
pub fn new(
shipping: Option<Address>,
billing: Option<Address>,
payment_method_billing: Option<Address>,
should_unify_address: Opti... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
pub fn get_payment_billing(&self) -> Option<&Address> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
pub fn get_request_payment_method_billing(&self) -> Option<&Address> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
/// Unify the billing details from `payment_method_data.[payment_method_data].billing details`.
/// Here the `self` takes precedence
pub fn unify_with_payme... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
/// Unify the billing details from `payment_method_data.[payment_method_data].billing details`.
/// Here the fields passed in payment_method_data_billing ta... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
pub fn get_payment_method_billing(&self) -> Option<&Address> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payment_address.rs | crate: hyperswitch_domain_models
use crate::address::Address;
pub fn get_shipping(&self) -> Option<&Address> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_account.rs | crate: hyperswitch_domain_models
fn from(item: MerchantAccountSetter) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payouts.rs | crate: hyperswitch_domain_models
use common_utils::{consts, id_type};
fn from(value: api_models::payouts::PayoutListFilterConstraints) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payouts.rs | crate: hyperswitch_domain_models
use common_utils::{consts, id_type};
fn from(value: common_utils::types::TimeRange) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/payouts.rs | crate: hyperswitch_domain_models
use common_utils::{consts, id_type};
fn from(value: api_models::payouts::PayoutListConstraints) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii, type_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii, type_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii, type_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use std::collections::HashMap;
/// This functions flattens the payment methods enabled from the connector accounts
/// Retains the connector name and payment method in every ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use std::collections::HashMap;
use diesel_models::merchant_connector_account::{
BillingAccountReference as DieselBillingAccountReference,
MerchantConnectorAccountFeatureMetad... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use diesel_models::merchant_connector_account::{
BillingAccountReference as DieselBillingAccountReference,
MerchantConnectorAccountFeatureMetadata as DieselMerchantConnectorA... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use std::collections::HashMap;
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use std::collections::HashMap;
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii, type_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use crate::errors::{self, api_error_response};
pub fn get_connector_name_as_string(&self) -> String {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use masking::{PeekInterface, Secret};
use serde_json::Value;
use crate::errors::{self, api_error_response};
pub fn get_connector_wallets_details(&self) -> Option<Secret<Value>> {
<|f... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use std::collections::HashMap;
use common_utils::transformers::ForeignTryFrom;
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{Cu... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use crate::errors::{self, api_error_response};
pub fn is_disabled(&self) -> bool {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii, type_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use crate::errors::{self, api_error_response};
pub fn get_connector_test_mode(&self) -> Option<bool> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crate: hyperswitch_domain_models
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii, type_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/configs.rs | crate: hyperswitch_domain_models
use common_enums::ApplicationError;
/// function to satisfy connector param validation macro
pub fn validate(&self, _parent_field: &str) -> Result<(), ApplicationError> {
<|fim_suffix|>
<|fim_middl... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/bulk_tokenization.rs | crate: hyperswitch_domain_models
use api_models::{payment_methods as payment_methods_api, payments as payments_api};
use common_utils::{
errors,
ext_traits::OptionExt,
id_type, pii,
transformers::{ForeignFrom... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/bulk_tokenization.rs | crate: hyperswitch_domain_models
use api_models::{payment_methods as payment_methods_api, payments as payments_api};
use crate::{
address::{Address, AddressDetails, PhoneDetails},
router_request_types::CustomerDetail... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/bulk_tokenization.rs | crate: hyperswitch_domain_models
use api_models::{payment_methods as payment_methods_api, payments as payments_api};
use crate::{
address::{Address, AddressDetails, PhoneDetails},
router_request_types::CustomerDetail... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_domain_models/src/bulk_tokenization.rs | crate: hyperswitch_domain_models
use api_models::{payment_methods as payment_methods_api, payments as payments_api};
use common_utils::{
errors,
ext_traits::OptionExt,
id_type, pii,
transformers::{ForeignFrom... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.