text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts/helpers.rs | crate: router
use api_models::{enums, payment_methods::Card, payouts};
use common_utils::{
crypto::Encryptable,
encryption::Encryption,
errors::CustomResult,
ext_traits::{AsyncExt, StringExt},
fp_utils, id_type, payout_m... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts/helpers.rs | crate: router
})
})
})
});
Ok(connector_transfer_method_id)
}
#[cfg(all(
any(feature = "v1", feature = "v2"),
not(feature = "payment_methods_v2")
))]
pub async fn... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use api_models::payouts::PayoutVendorAccountDetails;
use hyperswitch_domain_models::{
address::{Address, Addres... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
"Šibenik-Knin County" => Ok(Self::SibenikKninCounty),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.i... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_enums::{
enums,
enums::{
AlbaniaStatesAbbreviation, AndorraStatesAbbreviation, AttemptStatus,
AustriaStatesAbbreviation, BelarusStatesAbbreviation, BelgiumStatesAbbreviation,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
}
}
pub trait WalletData {
fn get_wallet_token(&self) -> Result<Secret<String>, Error>;
fn get_wallet_token_as_json<T>(&self, wallet_name: String) -> Result<T, Error>
where
T: serde::d... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use hyperswitch_domain_models::{
address::{Address, AddressDetails, PhoneDetails},
mandates,
network_tokenization::NetworkTokenNumber,
payment_method_data::{self, Card, CardDetailsForNetworkTra... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use once_cell::sync::Lazy;
use regex::Regex;
type Error = error_stack::Report<errors::ConnectorError>;
/// Normaliz... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use rand::Rng;
pub fn generate_12_digit_number() -> u64 {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
#[cfg(feature = "v1")]
fn get_cryptogram(&self) -> Option<Secret<String>> {
self.token_cryptogram.clone()
}
#[cfg(feature = "v2")]
fn get_cryptogram(&self) -> Option<Secret<String... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
}
}
pub trait RecurringMandateData {
fn get_original_payment_amount(&self) -> Result<i64, Error>;
fn get_original_payment_currency(&self) -> Result<enums::Currency, Error>;
}
impl RecurringMandate... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
&self,
) -> Result<hyperswitch_domain_models::router_request_types::CustomerDetails, Error> {
self.customer_details
.clone()
.ok_or_else(missing_field_err("customer_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
pub fn is_html_response(response: &str) -> bool {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use serde_json::Value;
pub fn collect_and_sort_values_by_removing_signature(
value: &Value,
signature: &String,
) -> Vec<String> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use serde_json::Value;
pub fn collect_values_by_removing_signature(value: &Value, signature: &String) -> Vec<String> {
{
Value::Null => vec!["null".to_owned()],<|fim_suffix|>
<|fim_middle|>
Value::Object(obj) ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
}
#[cfg(test)]
mod tests {
use crate::utils;
#[test]
fn test_image_data_source_url() {
let qr_image_data_source_url = utils::QrImage::new_from_data("Hyperswitch".to_string());
asse... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
fn test_image_data_source_url() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
"Šumadija District" => Ok(Self::ŠumadijaDistrict),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
"Vlorë" => Ok(Self::Vlore),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use std::{
collections::{HashMap, HashSet},
marker::PhantomData,
str::FromStr,
};
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use api_models::payments;
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
}
fn get_currency(&self) -> Result<enums::Currency, Error> {
self.currency.ok_or_else(missing_field_err("currency"))
}
fn get_amount(&self) -> Result<i64, Error> {
self.amount.o... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
fn connector_mandate_id(&self) -> Option<String>;
}
impl PaymentsPreProcessingRequestData for PaymentsPreProcessingData {
fn get_email(&self) -> Result<Email, Error> {
self.email.clone().ok_or... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use api_models::payments;
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
.ok_or_else(missing_field_err("webhook_url"))
}
fn get_optional_language_from_browser_info(&self) -> Option<String> {
self.browser_info
.clone()
.and_then(|browser_info| br... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::NetworkMandateId(network_transaction_id)) => {
Some(network_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::ConnectorMandateId(connector_manda... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use api_models::payments;
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use api_models::payments;
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
types::{AmountCo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/utils.rs | crate: hyperswitch_connectors
use common_utils::{
consts::BASE64_ENGINE,
errors::{CustomResult, ParsingError, ReportSwitchExt},
ext_traits::{OptionExt, StringExt, ValueExt},
id_type,
pii::{self, Email, IpAddress},
t... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | crate: hyperswitch_connectors | connector: wellsfargo
data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response(
&self,
res: Response,
event_builder: Option<... | ast_fragments |
// file: hyperswitch/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | crate: hyperswitch_connectors | connector: wellsfargo
req: &MandateRevokeRouterData,
connectors: &Connectors,
) -> CustomResult<Option<Request>, errors::ConnectorError> {
Ok(Some(
RequestBuilder::ne... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | crate: hyperswitch_connectors | connector: wellsfargo
use common_utils::{
consts,
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
types::{AmountCon... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | crate: hyperswitch_connectors | connector: wellsfargo
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
}
impl Refund for Wellsfargo {}... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | crate: hyperswitch_connectors | connector: wellsfargo
})
}
Err(error_msg) => {
event_builder.map(|event| event.set_error(serde_json::json!({"error": res.response.escap... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.