id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
hyperswitch_fn_hyperswitch_connectors_853847201170161722 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_country(&self) -> Result<&api_models::enums::CountryAlpha2, Error> {
self.country
.as_ref()
.ok_or_else(missing_field_err("address.country"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_country",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_4375808894930890181 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_combined_address_line(&self) -> Result<Secret<String>, Error> {
Ok(Secret::new(format!(
"{},{}",
self.get_line1()?.peek(),
self.get_line2()?.peek()
)))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_combined_address_line",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4514567034754409103 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn to_state_code(&self) -> Result<Secret<String>, Error> {
let country = self.get_country()?;
let state = self.get_state()?;
match country {
api_models::enums::CountryAlpha2::US => Ok(Secret::new(
UsStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::CA => Ok(Secret::new(
CanadaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::AL => Ok(Secret::new(
AlbaniaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::AD => Ok(Secret::new(
AndorraStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::AT => Ok(Secret::new(
AustriaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::BY => Ok(Secret::new(
BelarusStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::BA => Ok(Secret::new(
BosniaAndHerzegovinaStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::BG => Ok(Secret::new(
BulgariaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::HR => Ok(Secret::new(
CroatiaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::CZ => Ok(Secret::new(
CzechRepublicStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::DK => Ok(Secret::new(
DenmarkStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::FI => Ok(Secret::new(
FinlandStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::FR => Ok(Secret::new(
FranceStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::DE => Ok(Secret::new(
GermanyStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::GR => Ok(Secret::new(
GreeceStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::HU => Ok(Secret::new(
HungaryStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::IS => Ok(Secret::new(
IcelandStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::IE => Ok(Secret::new(
IrelandStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::LV => Ok(Secret::new(
LatviaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::IT => Ok(Secret::new(
ItalyStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::JP => Ok(Secret::new(
JapanStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::LI => Ok(Secret::new(
LiechtensteinStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::LT => Ok(Secret::new(
LithuaniaStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::MT => Ok(Secret::new(
MaltaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::MD => Ok(Secret::new(
MoldovaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::MC => Ok(Secret::new(
MonacoStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::ME => Ok(Secret::new(
MontenegroStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::NL => Ok(Secret::new(
NetherlandsStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::NZ => Ok(Secret::new(
NewZealandStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::MK => Ok(Secret::new(
NorthMacedoniaStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::NO => Ok(Secret::new(
NorwayStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::PL => Ok(Secret::new(
PolandStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::PT => Ok(Secret::new(
PortugalStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::ES => Ok(Secret::new(
SpainStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::CH => Ok(Secret::new(
SwitzerlandStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::GB => Ok(Secret::new(
UnitedKingdomStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::BR => Ok(Secret::new(
BrazilStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::AU => Ok(Secret::new(
AustraliaStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::SG => Ok(Secret::new(
SingaporeStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::TH => Ok(Secret::new(
ThailandStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
api_models::enums::CountryAlpha2::PH => Ok(Secret::new(
PhilippinesStatesAbbreviation::foreign_try_from(state.peek().to_string())?
.to_string(),
)),
api_models::enums::CountryAlpha2::IN => Ok(Secret::new(
IndiaStatesAbbreviation::foreign_try_from(state.peek().to_string())?.to_string(),
)),
_ => Ok(state.clone()),
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "to_state_code",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-361982956578082053 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn to_state_code_as_optional(&self) -> Result<Option<Secret<String>>, Error> {
self.state
.as_ref()
.map(|state| {
if state.peek().len() == 2 {
Ok(state.to_owned())
} else {
self.to_state_code()
}
})
.transpose()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "to_state_code_as_optional",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2490401668932798197 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_city(&self) -> Option<String> {
self.city.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_city",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4956571872234346841 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_line1(&self) -> Option<Secret<String>> {
self.line1.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_line1",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4871858911157880125 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_line2(&self) -> Option<Secret<String>> {
self.line2.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_line2",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2648392715520926501 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_first_name(&self) -> Option<Secret<String>> {
self.address
.as_ref()
.and_then(|billing_address| billing_address.get_optional_first_name())
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_first_name",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_2430750642954637649 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_last_name(&self) -> Option<Secret<String>> {
self.address
.as_ref()
.and_then(|billing_address| billing_address.get_optional_last_name())
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_last_name",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8899073259389922453 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_country(&self) -> Option<api_models::enums::CountryAlpha2> {
self.country
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_country",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4897449770999534517 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_line3(&self) -> Option<Secret<String>> {
self.line3.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_line3",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3536214447001148581 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_zip(&self) -> Option<Secret<String>> {
self.zip.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_zip",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-7713295866731120197 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_state(&self) -> Option<Secret<String>> {
self.state.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_state",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-7572316552283445834 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_country_code(&self) -> Result<String, Error> {
self.country_code
.clone()
.ok_or_else(missing_field_err("billing.phone.country_code"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_country_code",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-331679269683811511 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn extract_country_code(&self) -> Result<String, Error> {
self.get_country_code()
.map(|cc| cc.trim_start_matches('+').to_string())
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "extract_country_code",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2127150642352277535 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_number(&self) -> Result<Secret<String>, Error> {
self.number
.clone()
.ok_or_else(missing_field_err("billing.phone.number"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_number",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_4268988411843709110 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_number_with_country_code(&self) -> Result<Secret<String>, Error> {
let number = self.get_number()?;
let country_code = self.get_country_code()?;
Ok(Secret::new(format!("{}{}", country_code, number.peek())))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_number_with_country_code",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3965278867206256780 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_number_with_hash_country_code(&self) -> Result<Secret<String>, Error> {
let number = self.get_number()?;
let country_code = self.get_country_code()?;
let number_without_plus = country_code.trim_start_matches('+');
Ok(Secret::new(format!(
"{}#{}",
number_without_plus,
number.peek()
)))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_number_with_hash_country_code",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-861004135823376232 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_payout_id(&self) -> Result<String, Error> {
self.connector_payout_id
.clone()
.ok_or_else(missing_field_err("connector_payout_id"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_payout_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-8140962538170635440 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_transfer_method_id(&self) -> Result<String, Error> {
self.connector_transfer_method_id
.clone()
.ok_or_else(missing_field_err("connector_transfer_method_id"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_transfer_method_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_2348838531215005379 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_email(&self) -> Result<Email, Error> {
self.email.clone().ok_or_else(missing_field_err("email"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_email",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-1490676786794882886 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_mandate_payment(&self) -> bool {
((self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
&& self.setup_future_usage == Some(FutureUsage::OffSession))
|| self
.mandate_id
.as_ref()
.and_then(|mandate_ids| mandate_ids.mandate_reference_id.as_ref())
.is_some()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_mandate_payment",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-6876728146081069349 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_auto_capture(&self) -> Result<bool, Error> {
match self.capture_method {
Some(enums::CaptureMethod::Automatic)
| None
| Some(enums::CaptureMethod::SequentialAutomatic) => Ok(true),
Some(enums::CaptureMethod::Manual) => Ok(false),
Some(enums::CaptureMethod::ManualMultiple) | Some(enums::CaptureMethod::Scheduled) => {
Err(errors::ConnectorError::CaptureMethodNotSupported.into())
}
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_auto_capture",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4539197293512113393 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_browser_info(&self) -> Result<BrowserInformation, Error> {
self.browser_info
.clone()
.ok_or_else(missing_field_err("browser_info"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_browser_info",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-5047712618965371118 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_language_from_browser_info(&self) -> Option<String> {
self.browser_info
.clone()
.and_then(|browser_info| browser_info.language)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_language_from_browser_info",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_7586871460063271842 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error> {
self.order_details
.clone()
.ok_or_else(missing_field_err("order_details"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_order_details",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-5163911130579208739 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_card(&self) -> Result<Card, Error> {
match self.payment_method_data.clone() {
PaymentMethodData::Card(card) => Ok(card),
_ => Err(missing_field_err("card")()),
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3908921597487509907 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_complete_authorize_url(&self) -> Result<String, Error> {
self.complete_authorize_url
.clone()
.ok_or_else(missing_field_err("complete_authorize_url"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_complete_authorize_url",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2530625065771144489 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn connector_mandate_id(&self) -> Option<String> {
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
connector_mandate_ids.get_connector_mandate_id()
}
Some(payments::MandateReferenceId::NetworkMandateId(_))
| None
| Some(payments::MandateReferenceId::NetworkTokenWithNTI(_)) => None,
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "connector_mandate_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1305710932685470810 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_webhook_url(&self) -> Result<String, Error> {
self.webhook_url
.clone()
.ok_or_else(missing_field_err("webhook_url"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_url",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8857002111058180683 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_router_return_url(&self) -> Result<String, Error> {
self.router_return_url
.clone()
.ok_or_else(missing_field_err("return_url"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_router_return_url",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3866202097289426197 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_wallet(&self) -> bool {
matches!(self.payment_method_data, PaymentMethodData::Wallet(_))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_wallet",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-7965978424648328576 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_card(&self) -> bool {
matches!(self.payment_method_data, PaymentMethodData::Card(_))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_card",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_5042173835447482396 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_payment_method_type(&self) -> Result<enums::PaymentMethodType, Error> {
self.payment_method_type
.to_owned()
.ok_or_else(missing_field_err("payment_method_type"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_payment_method_type",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-7032826297150299677 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_mandate_id(&self) -> Option<String> {
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
connector_mandate_ids.get_connector_mandate_id()
}
Some(payments::MandateReferenceId::NetworkMandateId(_))
| None
| Some(payments::MandateReferenceId::NetworkTokenWithNTI(_)) => None,
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_mandate_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-6615961421501230153 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_mandate_data(&self) -> Option<payments::ConnectorMandateReferenceId> {
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
Some(connector_mandate_ids.clone())
}
Some(payments::MandateReferenceId::NetworkMandateId(_))
| None
| Some(payments::MandateReferenceId::NetworkTokenWithNTI(_)) => None,
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_mandate_data",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3920103114890703992 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_ip_address_as_optional(&self) -> Option<Secret<String, IpAddress>> {
self.browser_info.clone().and_then(|browser_info| {
browser_info
.ip_address
.map(|ip| Secret::new(ip.to_string()))
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_ip_address_as_optional",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3525343685771997401 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_ip_address(&self) -> Result<Secret<String, IpAddress>, Error> {
let ip_address = self
.ip_address
.ok_or_else(missing_field_err("browser_info.ip_address"))?;
Ok(Secret::new(ip_address.to_string()))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_ip_address",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2151276166290782348 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_user_agent(&self) -> Option<String> {
self.browser_info
.clone()
.and_then(|browser_info| browser_info.user_agent)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_user_agent",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3008432899972563584 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_original_amount(&self) -> i64 {
self.surcharge_details
.as_ref()
.map(|surcharge_details| surcharge_details.original_amount.get_amount_as_i64())
.unwrap_or(self.amount)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_original_amount",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4464138936913802892 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_surcharge_amount(&self) -> Option<i64> {
self.surcharge_details
.as_ref()
.map(|surcharge_details| surcharge_details.surcharge_amount.get_amount_as_i64())
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_surcharge_amount",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-6042017209711871370 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_tax_on_surcharge_amount(&self) -> Option<i64> {
self.surcharge_details.as_ref().map(|surcharge_details| {
surcharge_details
.tax_on_surcharge_amount
.get_amount_as_i64()
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_tax_on_surcharge_amount",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-173140920417583108 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_total_surcharge_amount(&self) -> Option<i64> {
self.surcharge_details.as_ref().map(|surcharge_details| {
surcharge_details
.get_total_surcharge_amount()
.get_amount_as_i64()
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_total_surcharge_amount",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1139501225134893903 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_customer_initiated_mandate_payment(&self) -> bool {
(self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
&& self.setup_future_usage == Some(FutureUsage::OffSession)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_customer_initiated_mandate_payment",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_6701107937360993258 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_metadata_as_object(&self) -> Option<pii::SecretSerdeValue> {
self.metadata.clone().and_then(|meta_data| match meta_data {
Value::Null
| Value::Bool(_)
| Value::Number(_)
| Value::String(_)
| Value::Array(_) => None,
Value::Object(_) => Some(meta_data.into()),
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_metadata_as_object",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_6772133159836556274 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_authentication_data(&self) -> Result<AuthenticationData, Error> {
self.authentication_data
.clone()
.ok_or_else(missing_field_err("authentication_data"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_authentication_data",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2727666005379978089 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_customer_name(&self) -> Result<Secret<String>, Error> {
self.customer_name
.clone()
.ok_or_else(missing_field_err("customer_name"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_customer_name",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2308599691540583135 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_card_holder_name_from_additional_payment_method_data(
&self,
) -> Result<Secret<String>, Error> {
match &self.additional_payment_method_data {
Some(payments::AdditionalPaymentData::Card(card_data)) => Ok(card_data
.card_holder_name
.clone()
.ok_or_else(|| errors::ConnectorError::MissingRequiredField {
field_name: "card_holder_name",
})?),
_ => Err(errors::ConnectorError::MissingRequiredFields {
field_names: vec!["card_holder_name"],
}
.into()),
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_holder_name_from_additional_payment_method_data",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8991950302650795061 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_mandate_request_reference_id(&self) -> Result<String, Error> {
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
connector_mandate_ids.get_connector_mandate_request_reference_id()
}
Some(payments::MandateReferenceId::NetworkMandateId(_))
| None
| Some(payments::MandateReferenceId::NetworkTokenWithNTI(_)) => None,
})
.ok_or_else(missing_field_err("connector_mandate_request_reference_id"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_mandate_request_reference_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_2478193586264890153 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_cit_mandate_payment(&self) -> bool {
(self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
&& self.setup_future_usage == Some(FutureUsage::OffSession)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_cit_mandate_payment",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4078655125094982120 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_network_transaction_id(&self) -> Option<String> {
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(payments::MandateReferenceId::NetworkMandateId(network_transaction_id)) => {
Some(network_transaction_id.clone())
}
Some(payments::MandateReferenceId::ConnectorMandateId(_))
| Some(payments::MandateReferenceId::NetworkTokenWithNTI(_))
| None => None,
})
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_network_transaction_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3271631844008038400 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_email(&self) -> Option<Email> {
self.email.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_email",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-7492211756726020025 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_card_network_from_additional_payment_method_data(
&self,
) -> Result<enums::CardNetwork, Error> {
match &self.additional_payment_method_data {
Some(payments::AdditionalPaymentData::Card(card_data)) => Ok(card_data
.card_network
.clone()
.ok_or_else(|| errors::ConnectorError::MissingRequiredField {
field_name: "card_network",
})?),
_ => Err(errors::ConnectorError::MissingRequiredFields {
field_names: vec!["card_network"],
}
.into()),
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_network_from_additional_payment_method_data",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-8044211655743680102 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_testing_data(&self) -> Option<pii::SecretSerdeValue> {
self.connector_testing_data.clone()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_testing_data",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-9210156359797414747 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_order_id(&self) -> Result<String, errors::ConnectorError> {
self.order_id
.to_owned()
.ok_or(errors::ConnectorError::RequestEncodingFailed)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_order_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4863719928800235835 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_card_mandate_info(&self) -> Result<CardMandateInfo, Error> {
match &self.additional_payment_method_data {
Some(payments::AdditionalPaymentData::Card(card_data)) => Ok(CardMandateInfo {
card_exp_month: card_data.card_exp_month.clone().ok_or_else(|| {
errors::ConnectorError::MissingRequiredField {
field_name: "card_exp_month",
}
})?,
card_exp_year: card_data.card_exp_year.clone().ok_or_else(|| {
errors::ConnectorError::MissingRequiredField {
field_name: "card_exp_year",
}
})?,
}),
_ => Err(errors::ConnectorError::MissingRequiredFields {
field_names: vec!["card_exp_month", "card_exp_year"],
}
.into()),
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_mandate_info",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3148199007537964885 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn is_multiple_capture(&self) -> bool {
self.multiple_capture_data.is_some()
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_multiple_capture",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_900221130552275517 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_transaction_id(&self) -> CustomResult<String, errors::ConnectorError> {
match self.connector_transaction_id.clone() {
ResponseId::ConnectorTransactionId(txn_id) => Ok(txn_id),
_ => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "connector_transaction_id",
},
)
.attach_printable("Expected connector transaction ID not found")
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?,
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_transaction_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2169957166083091359 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_connector_transaction_id(&self) -> Option<String> {
match self.connector_transaction_id.clone() {
ResponseId::ConnectorTransactionId(txn_id) => Some(txn_id),
_ => None,
}
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_connector_transaction_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8668783501756193510 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_amount(&self) -> Result<i64, Error> {
self.amount.ok_or_else(missing_field_err("amount"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_amount",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-6573061524951071004 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_currency(&self) -> Result<enums::Currency, Error> {
self.currency.ok_or_else(missing_field_err("currency"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_currency",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-1479099114221755299 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_cancellation_reason(&self) -> Result<String, Error> {
self.cancellation_reason
.clone()
.ok_or_else(missing_field_err("cancellation_reason"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_cancellation_reason",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-5174336967564949470 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_refund_id(&self) -> Result<String, Error> {
self.connector_refund_id
.clone()
.get_required_value("connector_refund_id")
.change_context(errors::ConnectorError::MissingConnectorTransactionID)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_refund_id",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_2662813546579014187 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_connector_metadata(&self) -> Result<Value, Error> {
self.connector_metadata
.clone()
.ok_or_else(missing_field_err("connector_metadata"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_metadata",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1770703579469087326 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_return_url(&self) -> Result<String, Error> {
self.router_return_url
.clone()
.ok_or_else(missing_field_err("return_url"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_return_url",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1084583917333707592 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_redirect_response_payload(&self) -> Result<pii::SecretSerdeValue, Error> {
self.redirect_response
.as_ref()
.and_then(|res| res.payload.to_owned())
.ok_or(
errors::ConnectorError::MissingConnectorRedirectionPayload {
field_name: "request.redirect_response.payload",
}
.into(),
)
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_redirect_response_payload",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-1974772995494252992 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_threeds_method_comp_ind(&self) -> Result<payments::ThreeDsCompletionIndicator, Error> {
self.threeds_method_comp_ind
.clone()
.ok_or_else(missing_field_err("threeds_method_comp_ind"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_threeds_method_comp_ind",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4283797138044950526 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_optional_full_name(&self) -> Option<Secret<String>> {
self.address
.as_ref()
.and_then(|billing_address| billing_address.get_optional_full_name())
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_full_name",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8306182664240948207 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_phone_with_country_code(&self) -> Result<Secret<String>, Error> {
self.phone
.clone()
.map(|phone_details| phone_details.get_number_with_country_code())
.transpose()?
.ok_or_else(missing_field_err("phone"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_phone_with_country_code",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3708730162871354956 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_payment_method_data(&self) -> Result<PaymentMethodData, Error> {
self.payment_method_data
.to_owned()
.ok_or_else(missing_field_err("payment_method_data"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_payment_method_data",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3718827423786157285 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_minor_amount(&self) -> Result<MinorUnit, Error> {
self.minor_amount.ok_or_else(missing_field_err("amount"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_minor_amount",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3421834138290796364 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_accept_header(&self) -> Result<String, Error> {
self.accept_header
.clone()
.ok_or_else(missing_field_err("browser_info.accept_header"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_accept_header",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-2390687651877371343 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_language(&self) -> Result<String, Error> {
self.language
.clone()
.ok_or_else(missing_field_err("browser_info.language"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_language",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_248312963197404916 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_screen_height(&self) -> Result<u32, Error> {
self.screen_height
.ok_or_else(missing_field_err("browser_info.screen_height"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_screen_height",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-476535671331546143 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_screen_width(&self) -> Result<u32, Error> {
self.screen_width
.ok_or_else(missing_field_err("browser_info.screen_width"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_screen_width",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1472695112144686606 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_color_depth(&self) -> Result<u8, Error> {
self.color_depth
.ok_or_else(missing_field_err("browser_info.color_depth"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_color_depth",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-8767682020261490457 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_user_agent(&self) -> Result<String, Error> {
self.user_agent
.clone()
.ok_or_else(missing_field_err("browser_info.user_agent"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_user_agent",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-3307141211657286233 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_time_zone(&self) -> Result<i32, Error> {
self.time_zone
.ok_or_else(missing_field_err("browser_info.time_zone"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_time_zone",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1058580217308026209 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_java_enabled(&self) -> Result<bool, Error> {
self.java_enabled
.ok_or_else(missing_field_err("browser_info.java_enabled"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_java_enabled",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-8515885861286318697 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_java_script_enabled(&self) -> Result<bool, Error> {
self.java_script_enabled
.ok_or_else(missing_field_err("browser_info.java_script_enabled"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_java_script_enabled",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_5413441910319733635 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_os_type(&self) -> Result<String, Error> {
self.os_type
.clone()
.ok_or_else(missing_field_err("browser_info.os_type"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_os_type",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8322878640933969720 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_os_version(&self) -> Result<String, Error> {
self.os_version
.clone()
.ok_or_else(missing_field_err("browser_info.os_version"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_os_version",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_4420751497626086985 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_device_model(&self) -> Result<String, Error> {
self.device_model
.clone()
.ok_or_else(missing_field_err("browser_info.device_model"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_device_model",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-5598204991435466957 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
pub fn get_header_key_value<'a>(
key: &str,
headers: &'a actix_web::http::header::HeaderMap,
) -> CustomResult<&'a str, errors::ConnectorError> {
get_header_field(headers.get(key))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_header_key_value",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_2948769647615950859 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
pub fn get_http_header<'a>(
key: &str,
headers: &'a http::HeaderMap,
) -> CustomResult<&'a str, errors::ConnectorError> {
get_header_field(headers.get(key))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_http_header",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-4375757399589237322 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_header_field(
field: Option<&http::HeaderValue>,
) -> CustomResult<&str, errors::ConnectorError> {
field
.map(|header_value| {
header_value
.to_str()
.change_context(errors::ConnectorError::WebhookSignatureNotFound)
})
.ok_or(report!(
errors::ConnectorError::WebhookSourceVerificationFailed
))?
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_header_field",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_6566318145116093155 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn get_pay_currency(&self) -> Result<String, Error> {
self.pay_currency
.clone()
.ok_or_else(missing_field_err("crypto_data.pay_currency"))
}
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_pay_currency",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-8053933744915002025 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
fn foreign_try_from(value: String) -> Result<Self, Self::Error> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "PolandStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Greater Poland" => Ok(Self::GreaterPoland),
"Holy Cross" => Ok(Self::HolyCross),
"Kuyavia-Pomerania" => Ok(Self::KuyaviaPomerania),
"Lesser Poland" => Ok(Self::LesserPoland),
"Lower Silesia" => Ok(Self::LowerSilesia),
"Lublin" => Ok(Self::Lublin),
"Lubusz" => Ok(Self::Lubusz),
"Łódź" => Ok(Self::Łódź),
"Mazovia" => Ok(Self::Mazovia),
"Podlaskie" => Ok(Self::Podlaskie),
"Pomerania" => Ok(Self::Pomerania),
"Silesia" => Ok(Self::Silesia),
"Subcarpathia" => Ok(Self::Subcarpathia),
"Upper Silesia" => Ok(Self::UpperSilesia),
"Warmia-Masuria" => Ok(Self::WarmiaMasuria),
"West Pomerania" => Ok(Self::WestPomerania),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
im
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "foreign_try_from",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_741232770049476458 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
eign_try_from(value: String) -> Result<Self, Self::Error> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "FranceStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Ain" => Ok(Self::Ain),
"Aisne" => Ok(Self::Aisne),
"Allier" => Ok(Self::Allier),
"Alpes-de-Haute-Provence" => Ok(Self::AlpesDeHauteProvence),
"Alpes-Maritimes" => Ok(Self::AlpesMaritimes),
"Alsace" => Ok(Self::Alsace),
"Ardèche" => Ok(Self::Ardeche),
"Ardennes" => Ok(Self::Ardennes),
"Ariège" => Ok(Self::Ariege),
"Aube" => Ok(Self::Aube),
"Aude" => Ok(Self::Aude),
"Auvergne-Rhône-Alpes" => Ok(Self::AuvergneRhoneAlpes),
"Aveyron" => Ok(Self::Aveyron),
"Bas-Rhin" => Ok(Self::BasRhin),
"Bouches-du-Rhône" => Ok(Self::BouchesDuRhone),
"Bourgogne-Franche-Comté" => Ok(Self::BourgogneFrancheComte),
"Bretagne" => Ok(Self::Bretagne),
"Calvados" => Ok(Self::Calvados),
"Cantal" => Ok(Self::Cantal),
"Centre-Val de Loire" => Ok(Self::CentreValDeLoire),
"Charente" => Ok(Self::Charente),
"Charente-Maritime" => Ok(Self::CharenteMaritime),
"Cher" => Ok(Self::Cher),
"Clipperton" => Ok(Self::Clipperton),
"Corrèze" => Ok(Self::Correze),
"Corse" => Ok(Self::Corse),
"Corse-du-Sud" => Ok(Self::CorseDuSud),
"Côte-d'Or" => Ok(Self::CoteDor),
"Côtes-d'Armor" => Ok(Self::CotesDarmor),
"Creuse" => Ok(Self::Creuse),
"Deux-Sèvres" => Ok(Self::DeuxSevres),
"Dordogne" => Ok(Self::Dordogne),
"Doubs" => Ok(Self::Doubs),
"Drôme" => Ok(Self::Drome),
"Essonne" => Ok(Self::Essonne),
"Eure" => Ok(Self::Eure),
"Eure-et-Loir" => Ok(Self::EureEtLoir),
"Finistère" => Ok(Self::Finistere),
"French Guiana" => Ok(Self::FrenchGuiana),
"French Polynesia" => Ok(Self::FrenchPolynesia),
"French Southern and Antarctic Lands" => Ok(Self::FrenchSouthernAndAntarcticLands),
"Gard" => Ok(Self::Gard),
"Gers" => Ok(Self::Gers),
"Gironde" => Ok(Self::Gironde),
"Grand-Est" => Ok(Self::GrandEst),
"Guadeloupe" => Ok(Self::Guadeloupe),
"Haut-Rhin" => Ok(Self::HautRhin),
"Haute-Corse" => Ok(Self::HauteCorse),
"Haute-Garonne" => Ok(Self::HauteGaronne),
"Haute-Loire" => Ok(Self::HauteLoire),
"Haute-Marne" => Ok(Self::HauteMarne),
"Haute-Saône" => Ok(Self::HauteSaone),
"Haute-Savoie" => Ok(Self::HauteSavoie),
"Haute-Vienne" => Ok(Self::HauteVienne),
"Hautes-Alpes" => Ok(Self::HautesAlpes),
"Hautes-Pyrénées" => Ok(Self::HautesPyrenees),
"Hauts-de-France" => Ok(Self::HautsDeFrance),
"Hauts-de-Seine" => Ok(Self::HautsDeSeine),
"Hérault" => Ok(Self::Herault),
"Île-de-France" => Ok(Self::IleDeFrance),
"Ille-et-Vilaine" => Ok(Self::IlleEtVilaine),
"Indre" => Ok(Self::Indre),
"Indre-et-Loire" => Ok(Self::IndreEtLoire),
"Isère" => Ok(Self::Isere),
"Jura" => Ok(Self::Jura),
"La Réunion" => Ok(Self::LaReunion),
"Landes" => Ok(Self::Landes),
"Loir-et-Cher" => Ok(Self::LoirEtCher),
"Loire" => Ok(Self::Loire),
"Loire-Atlantique" => Ok(Self::LoireAtlantique),
"Loiret" => Ok(Self::Loiret),
"Lot" => Ok(Self::Lot),
"Lot-et-Garonne" => Ok(Self::LotEtGaronne),
"Lozère" => Ok(Self::Lozere),
"Maine-et-Loire" => Ok(Self::MaineEtLoire),
"Manche" => Ok(Self::Manche),
"Marne" => Ok(Self::Marne),
"Martinique" => Ok(Self::Martinique),
"Mayenne" => Ok(Self::Mayenne),
"Mayotte" => Ok(Self::Mayotte),
"Métropole de Lyon" => Ok(Self::MetropoleDeLyon),
"Meurthe-et-Moselle" => Ok(Self::MeurtheEtMoselle),
"Meuse" => Ok(Self::Meuse),
"Morbihan" => Ok(Self::Morbihan),
"Moselle" => Ok(Self::Moselle),
"Nièvre" => Ok(Self::Nievre),
"Nord" => Ok(Self::Nord),
"Normandie" => Ok(Self::Normandie),
"Nouvelle-Aquitaine" => Ok(Self::NouvelleAquitaine),
"Occitanie" => Ok(Self::Occitanie),
"Oise" => Ok(Self::Oise),
"Orne" => Ok(Self::Orne),
"Paris" => Ok(Self::Paris),
"Pas-de-Calais" => Ok(Self::PasDeCalais),
"Pays-de-la-Loire" => Ok(Self::PaysDeLaLoire),
"Provence-Alpes-Côte-d'Azur" => Ok(Self::ProvenceAlpesCoteDazur),
"Puy-de-Dôme" => Ok(Self::PuyDeDome),
"Pyrénées-Atlantiques" => Ok(Self::PyreneesAtlantiques),
"Pyrénées-Orientales" => Ok(Self::PyreneesOrientales),
"Rhône" => Ok(Self::Rhone),
"Saint Pierre and Miquelon" => Ok(Self::SaintPierreAndMiquelon),
"Saint-Barthélemy" => Ok(Self::SaintBarthelemy),
"Saint-Martin" => Ok(Self::SaintMartin),
"Saône-et-Loire" => Ok(Self::SaoneEtLoire),
"Sarthe" => Ok(Self::Sarthe),
"Savoie" => Ok(Self::Savoie),
"Seine-et-Marne" => Ok(Self::SeineEtMarne),
"Seine-Maritime" => Ok(Self::SeineMaritime),
"Seine-Saint-Denis" => Ok(Self::SeineSaintDenis),
"Somme" => Ok(Self::Somme),
"Tarn" => Ok(Self::Tarn),
"Tarn-et-Garonne" => Ok(Self::TarnEtGaronne),
"Territoire de Belfort" => Ok(Self::TerritoireDeBelfort),
"Val-d'Oise" => Ok(Self::ValDoise),
"Val-de-Marne" => Ok(Self::ValDeMarne),
"Var" => Ok(Self::Var),
"Vaucluse" => Ok(Self::Vaucluse),
"Vendée" => Ok(Self::Vendee),
"Vienne" => Ok(Self::Vienne),
"Vosges" => Ok(Self::Vosges),
"Wallis and Futuna" => Ok(Self::WallisAndFutuna),
"Yonne" => Ok(Self::Yonne),
"Yvelines" => Ok(Self::Yvelines),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for G
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "n_try_from(value",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-5196230260974651231 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
Result<Self, Self::Error> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "GermanyStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Baden-Württemberg" => Ok(Self::BW),
"Bavaria" => Ok(Self::BY),
"Berlin" => Ok(Self::BE),
"Brandenburg" => Ok(Self::BB),
"Bremen" => Ok(Self::HB),
"Hamburg" => Ok(Self::HH),
"Hessen" => Ok(Self::HE),
"Lower Saxony" => Ok(Self::NI),
"Mecklenburg-Vorpommern" => Ok(Self::MV),
"North Rhine-Westphalia" => Ok(Self::NW),
"Rhineland-Palatinate" => Ok(Self::RP),
"Saarland" => Ok(Self::SL),
"Saxony" => Ok(Self::SN),
"Saxony-Anhalt" => Ok(Self::ST),
"Schleswig-Holstein" => Ok(Self::SH),
"Thuringia" => Ok(Self::TH),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for Sp
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "sult<Self, Self:",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-6967656142160572776 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
Result<Self, Self::Error> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "SpainStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"A Coruña Province" => Ok(Self::ACorunaProvince),
"Albacete Province" => Ok(Self::AlbaceteProvince),
"Alicante Province" => Ok(Self::AlicanteProvince),
"Almería Province" => Ok(Self::AlmeriaProvince),
"Andalusia" => Ok(Self::Andalusia),
"Araba / Álava" => Ok(Self::ArabaAlava),
"Aragon" => Ok(Self::Aragon),
"Badajoz Province" => Ok(Self::BadajozProvince),
"Balearic Islands" => Ok(Self::BalearicIslands),
"Barcelona Province" => Ok(Self::BarcelonaProvince),
"Basque Country" => Ok(Self::BasqueCountry),
"Biscay" => Ok(Self::Biscay),
"Burgos Province" => Ok(Self::BurgosProvince),
"Canary Islands" => Ok(Self::CanaryIslands),
"Cantabria" => Ok(Self::Cantabria),
"Castellón Province" => Ok(Self::CastellonProvince),
"Castile and León" => Ok(Self::CastileAndLeon),
"Castilla-La Mancha" => Ok(Self::CastileLaMancha),
"Catalonia" => Ok(Self::Catalonia),
"Ceuta" => Ok(Self::Ceuta),
"Ciudad Real Province" => Ok(Self::CiudadRealProvince),
"Community of Madrid" => Ok(Self::CommunityOfMadrid),
"Cuenca Province" => Ok(Self::CuencaProvince),
"Cáceres Province" => Ok(Self::CaceresProvince),
"Cádiz Province" => Ok(Self::CadizProvince),
"Córdoba Province" => Ok(Self::CordobaProvince),
"Extremadura" => Ok(Self::Extremadura),
"Galicia" => Ok(Self::Galicia),
"Gipuzkoa" => Ok(Self::Gipuzkoa),
"Girona Province" => Ok(Self::GironaProvince),
"Granada Province" => Ok(Self::GranadaProvince),
"Guadalajara Province" => Ok(Self::GuadalajaraProvince),
"Huelva Province" => Ok(Self::HuelvaProvince),
"Huesca Province" => Ok(Self::HuescaProvince),
"Jaén Province" => Ok(Self::JaenProvince),
"La Rioja" => Ok(Self::LaRioja),
"Las Palmas Province" => Ok(Self::LasPalmasProvince),
"León Province" => Ok(Self::LeonProvince),
"Lleida Province" => Ok(Self::LleidaProvince),
"Lugo Province" => Ok(Self::LugoProvince),
"Madrid Province" => Ok(Self::MadridProvince),
"Melilla" => Ok(Self::Melilla),
"Murcia Province" => Ok(Self::MurciaProvince),
"Málaga Province" => Ok(Self::MalagaProvince),
"Navarre" => Ok(Self::Navarre),
"Ourense Province" => Ok(Self::OurenseProvince),
"Palencia Province" => Ok(Self::PalenciaProvince),
"Pontevedra Province" => Ok(Self::PontevedraProvince),
"Province of Asturias" => Ok(Self::ProvinceOfAsturias),
"Province of Ávila" => Ok(Self::ProvinceOfAvila),
"Region of Murcia" => Ok(Self::RegionOfMurcia),
"Salamanca Province" => Ok(Self::SalamancaProvince),
"Santa Cruz de Tenerife Province" => Ok(Self::SantaCruzDeTenerifeProvince),
"Segovia Province" => Ok(Self::SegoviaProvince),
"Seville Province" => Ok(Self::SevilleProvince),
"Soria Province" => Ok(Self::SoriaProvince),
"Tarragona Province" => Ok(Self::TarragonaProvince),
"Teruel Province" => Ok(Self::TeruelProvince),
"Toledo Province" => Ok(Self::ToledoProvince),
"Valencia Province" => Ok(Self::ValenciaProvince),
"Valencian Community" => Ok(Self::ValencianCommunity),
"Valladolid Province" => Ok(Self::ValladolidProvince),
"Zamora Province" => Ok(Self::ZamoraProvince),
"Zaragoza Province" => Ok(Self::ZaragozaProvince),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for ItalyStatesAbb
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "ult<Self, Self::",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1299984309693140749 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
Self::Error> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "ItalyStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Abruzzo" => Ok(Self::Abruzzo),
"Aosta Valley" => Ok(Self::AostaValley),
"Apulia" => Ok(Self::Apulia),
"Basilicata" => Ok(Self::Basilicata),
"Benevento Province" => Ok(Self::BeneventoProvince),
"Calabria" => Ok(Self::Calabria),
"Campania" => Ok(Self::Campania),
"Emilia-Romagna" => Ok(Self::EmiliaRomagna),
"Friuli–Venezia Giulia" => Ok(Self::FriuliVeneziaGiulia),
"Lazio" => Ok(Self::Lazio),
"Liguria" => Ok(Self::Liguria),
"Lombardy" => Ok(Self::Lombardy),
"Marche" => Ok(Self::Marche),
"Molise" => Ok(Self::Molise),
"Piedmont" => Ok(Self::Piedmont),
"Sardinia" => Ok(Self::Sardinia),
"Sicily" => Ok(Self::Sicily),
"Trentino-South Tyrol" => Ok(Self::TrentinoSouthTyrol),
"Tuscany" => Ok(Self::Tuscany),
"Umbria" => Ok(Self::Umbria),
"Veneto" => Ok(Self::Veneto),
"Libero consorzio comunale di Agrigento" => Ok(Self::Agrigento),
"Libero consorzio comunale di Caltanissetta" => Ok(Self::Caltanissetta),
"Libero consorzio comunale di Enna" => Ok(Self::Enna),
"Libero consorzio comunale di Ragusa" => Ok(Self::Ragusa),
"Libero consorzio comunale di Siracusa" => Ok(Self::Siracusa),
"Libero consorzio comunale di Trapani" => Ok(Self::Trapani),
"Metropolitan City of Bari" => Ok(Self::Bari),
"Metropolitan City of Bologna" => Ok(Self::Bologna),
"Metropolitan City of Cagliari" => Ok(Self::Cagliari),
"Metropolitan City of Catania" => Ok(Self::Catania),
"Metropolitan City of Florence" => Ok(Self::Florence),
"Metropolitan City of Genoa" => Ok(Self::Genoa),
"Metropolitan City of Messina" => Ok(Self::Messina),
"Metropolitan City of Milan" => Ok(Self::Milan),
"Metropolitan City of Naples" => Ok(Self::Naples),
"Metropolitan City of Palermo" => Ok(Self::Palermo),
"Metropolitan City of Reggio Calabria" => Ok(Self::ReggioCalabria),
"Metropolitan City of Rome" => Ok(Self::Rome),
"Metropolitan City of Turin" => Ok(Self::Turin),
"Metropolitan City of Venice" => Ok(Self::Venice),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for JapanStatesAbbre
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "lf::Error> {\n ",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-5192920050605549706 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
elf::Error> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "NorwayStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Akershus" => Ok(Self::Akershus),
"Buskerud" => Ok(Self::Buskerud),
"Finnmark" => Ok(Self::Finnmark),
"Hedmark" => Ok(Self::Hedmark),
"Hordaland" => Ok(Self::Hordaland),
"Jan Mayen" => Ok(Self::JanMayen),
"Møre og Romsdal" => Ok(Self::MoreOgRomsdal),
"Nord-Trøndelag" => Ok(Self::NordTrondelag),
"Nordland" => Ok(Self::Nordland),
"Oppland" => Ok(Self::Oppland),
"Oslo" => Ok(Self::Oslo),
"Rogaland" => Ok(Self::Rogaland),
"Sogn og Fjordane" => Ok(Self::SognOgFjordane),
"Svalbard" => Ok(Self::Svalbard),
"Sør-Trøndelag" => Ok(Self::SorTrondelag),
"Telemark" => Ok(Self::Telemark),
"Troms" => Ok(Self::Troms),
"Trøndelag" => Ok(Self::Trondelag),
"Vest-Agder" => Ok(Self::VestAgder),
"Vestfold" => Ok(Self::Vestfold),
"Østfold" => Ok(Self::Ostfold),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for AlbaniaStatesAbbreviat
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "::Error> {\n ",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_1198144610990075407 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
rror> {
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "AlbaniaStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Berat" => Ok(Self::Berat),
"Dibër" => Ok(Self::Diber),
"Durrës" => Ok(Self::Durres),
"Elbasan" => Ok(Self::Elbasan),
"Fier" => Ok(Self::Fier),
"Gjirokastër" => Ok(Self::Gjirokaster),
"Korçë" => Ok(Self::Korce),
"Kukës" => Ok(Self::Kukes),
"Lezhë" => Ok(Self::Lezhe),
"Shkodër" => Ok(Self::Shkoder),
"Tiranë" => Ok(Self::Tirane),
"Vlorë" => Ok(Self::Vlore),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for AndorraStatesAbbreviation {
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "r> {\n let",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3635781280574579040 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "AndorraStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Andorra la Vella" => Ok(Self::AndorraLaVella),
"Canillo" => Ok(Self::Canillo),
"Encamp" => Ok(Self::Encamp),
"Escaldes-Engordany" => Ok(Self::EscaldesEngordany),
"La Massana" => Ok(Self::LaMassana),
"Ordino" => Ok(Self::Ordino),
"Sant Julià de Lòria" => Ok(Self::SantJuliaDeLoria),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for AustriaStatesAbbreviation {
ty
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": " let state_abb",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3275455253501732017 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
let state_abbreviation_check =
StringExt::<Self>::parse_enum(value.clone(), "RomaniaStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Alba" => Ok(Self::Alba),
"Arad County" => Ok(Self::AradCounty),
"Argeș" => Ok(Self::Arges),
"Bacău County" => Ok(Self::BacauCounty),
"Bihor County" => Ok(Self::BihorCounty),
"Bistrița-Năsăud County" => Ok(Self::BistritaNasaudCounty),
"Botoșani County" => Ok(Self::BotosaniCounty),
"Brăila" => Ok(Self::Braila),
"Brașov County" => Ok(Self::BrasovCounty),
"Bucharest" => Ok(Self::Bucharest),
"Buzău County" => Ok(Self::BuzauCounty),
"Caraș-Severin County" => Ok(Self::CarasSeverinCounty),
"Cluj County" => Ok(Self::ClujCounty),
"Constanța County" => Ok(Self::ConstantaCounty),
"Covasna County" => Ok(Self::CovasnaCounty),
"Călărași County" => Ok(Self::CalarasiCounty),
"Dolj County" => Ok(Self::DoljCounty),
"Dâmbovița County" => Ok(Self::DambovitaCounty),
"Galați County" => Ok(Self::GalatiCounty),
"Giurgiu County" => Ok(Self::GiurgiuCounty),
"Gorj County" => Ok(Self::GorjCounty),
"Harghita County" => Ok(Self::HarghitaCounty),
"Hunedoara County" => Ok(Self::HunedoaraCounty),
"Ialomița County" => Ok(Self::IalomitaCounty),
"Iași County" => Ok(Self::IasiCounty),
"Ilfov County" => Ok(Self::IlfovCounty),
"Mehedinți County" => Ok(Self::MehedintiCounty),
"Mureș County" => Ok(Self::MuresCounty),
"Neamț County" => Ok(Self::NeamtCounty),
"Olt County" => Ok(Self::OltCounty),
"Prahova County" => Ok(Self::PrahovaCounty),
"Satu Mare County" => Ok(Self::SatuMareCounty),
"Sibiu County" => Ok(Self::SibiuCounty),
"Suceava County" => Ok(Self::SuceavaCounty),
"Sălaj County" => Ok(Self::SalajCounty),
"Teleorman County" => Ok(Self::TeleormanCounty),
"Timiș County" => Ok(Self::TimisCounty),
"Tulcea County" => Ok(Self::TulceaCounty),
"Vaslui County" => Ok(Self::VasluiCounty),
"Vrancea County" => Ok(Self::VranceaCounty),
"Vâlcea County" => Ok(Self::ValceaCounty),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for PortugalStatesAbbreviation {
type Error = error_stack::
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": " let state_abbre",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8268485210026325904 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
n_check =
StringExt::<Self>::parse_enum(value.clone(), "PortugalStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Aveiro District" => Ok(Self::AveiroDistrict),
"Azores" => Ok(Self::Azores),
"Beja District" => Ok(Self::BejaDistrict),
"Braga District" => Ok(Self::BragaDistrict),
"Bragança District" => Ok(Self::BragancaDistrict),
"Castelo Branco District" => Ok(Self::CasteloBrancoDistrict),
"Coimbra District" => Ok(Self::CoimbraDistrict),
"Faro District" => Ok(Self::FaroDistrict),
"Guarda District" => Ok(Self::GuardaDistrict),
"Leiria District" => Ok(Self::LeiriaDistrict),
"Lisbon District" => Ok(Self::LisbonDistrict),
"Madeira" => Ok(Self::Madeira),
"Portalegre District" => Ok(Self::PortalegreDistrict),
"Porto District" => Ok(Self::PortoDistrict),
"Santarém District" => Ok(Self::SantaremDistrict),
"Setúbal District" => Ok(Self::SetubalDistrict),
"Viana do Castelo District" => Ok(Self::VianaDoCasteloDistrict),
"Vila Real District" => Ok(Self::VilaRealDistrict),
"Viseu District" => Ok(Self::ViseuDistrict),
"Évora District" => Ok(Self::EvoraDistrict),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for SwitzerlandStatesAbbreviation {
type Error = error_stack::R
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "heck =\n ",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_3883264700482695759 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
eck =
StringExt::<Self>::parse_enum(value.clone(), "SwitzerlandStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Aargau" => Ok(Self::Aargau),
"Appenzell Ausserrhoden" => Ok(Self::AppenzellAusserrhoden),
"Appenzell Innerrhoden" => Ok(Self::AppenzellInnerrhoden),
"Basel-Landschaft" => Ok(Self::BaselLandschaft),
"Canton of Fribourg" => Ok(Self::CantonOfFribourg),
"Canton of Geneva" => Ok(Self::CantonOfGeneva),
"Canton of Jura" => Ok(Self::CantonOfJura),
"Canton of Lucerne" => Ok(Self::CantonOfLucerne),
"Canton of Neuchâtel" => Ok(Self::CantonOfNeuchatel),
"Canton of Schaffhausen" => Ok(Self::CantonOfSchaffhausen),
"Canton of Solothurn" => Ok(Self::CantonOfSolothurn),
"Canton of St. Gallen" => Ok(Self::CantonOfStGallen),
"Canton of Valais" => Ok(Self::CantonOfValais),
"Canton of Vaud" => Ok(Self::CantonOfVaud),
"Canton of Zug" => Ok(Self::CantonOfZug),
"Glarus" => Ok(Self::Glarus),
"Graubünden" => Ok(Self::Graubunden),
"Nidwalden" => Ok(Self::Nidwalden),
"Obwalden" => Ok(Self::Obwalden),
"Schwyz" => Ok(Self::Schwyz),
"Thurgau" => Ok(Self::Thurgau),
"Ticino" => Ok(Self::Ticino),
"Uri" => Ok(Self::Uri),
"canton of Bern" => Ok(Self::CantonOfBern),
"canton of Zürich" => Ok(Self::CantonOfZurich),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for NorthMacedoniaStatesAbbreviation {
type Error = error_stack::R
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": " =\n S",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_-7606676785945250774 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
=
StringExt::<Self>::parse_enum(value.clone(), "NorthMacedoniaStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Aerodrom Municipality" => Ok(Self::AerodromMunicipality),
"Aračinovo Municipality" => Ok(Self::AracinovoMunicipality),
"Berovo Municipality" => Ok(Self::BerovoMunicipality),
"Bitola Municipality" => Ok(Self::BitolaMunicipality),
"Bogdanci Municipality" => Ok(Self::BogdanciMunicipality),
"Bogovinje Municipality" => Ok(Self::BogovinjeMunicipality),
"Bosilovo Municipality" => Ok(Self::BosilovoMunicipality),
"Brvenica Municipality" => Ok(Self::BrvenicaMunicipality),
"Butel Municipality" => Ok(Self::ButelMunicipality),
"Centar Municipality" => Ok(Self::CentarMunicipality),
"Centar Župa Municipality" => Ok(Self::CentarZupaMunicipality),
"Debarca Municipality" => Ok(Self::DebarcaMunicipality),
"Delčevo Municipality" => Ok(Self::DelcevoMunicipality),
"Demir Hisar Municipality" => Ok(Self::DemirHisarMunicipality),
"Demir Kapija Municipality" => Ok(Self::DemirKapijaMunicipality),
"Dojran Municipality" => Ok(Self::DojranMunicipality),
"Dolneni Municipality" => Ok(Self::DolneniMunicipality),
"Drugovo Municipality" => Ok(Self::DrugovoMunicipality),
"Gazi Baba Municipality" => Ok(Self::GaziBabaMunicipality),
"Gevgelija Municipality" => Ok(Self::GevgelijaMunicipality),
"Gjorče Petrov Municipality" => Ok(Self::GjorcePetrovMunicipality),
"Gostivar Municipality" => Ok(Self::GostivarMunicipality),
"Gradsko Municipality" => Ok(Self::GradskoMunicipality),
"Greater Skopje" => Ok(Self::GreaterSkopje),
"Ilinden Municipality" => Ok(Self::IlindenMunicipality),
"Jegunovce Municipality" => Ok(Self::JegunovceMunicipality),
"Karbinci" => Ok(Self::Karbinci),
"Karpoš Municipality" => Ok(Self::KarposMunicipality),
"Kavadarci Municipality" => Ok(Self::KavadarciMunicipality),
"Kisela Voda Municipality" => Ok(Self::KiselaVodaMunicipality),
"Kičevo Municipality" => Ok(Self::KicevoMunicipality),
"Konče Municipality" => Ok(Self::KonceMunicipality),
"Kočani Municipality" => Ok(Self::KocaniMunicipality),
"Kratovo Municipality" => Ok(Self::KratovoMunicipality),
"Kriva Palanka Municipality" => Ok(Self::KrivaPalankaMunicipality),
"Krivogaštani Municipality" => Ok(Self::KrivogastaniMunicipality),
"Kruševo Municipality" => Ok(Self::KrusevoMunicipality),
"Kumanovo Municipality" => Ok(Self::KumanovoMunicipality),
"Lipkovo Municipality" => Ok(Self::LipkovoMunicipality),
"Lozovo Municipality" => Ok(Self::LozovoMunicipality),
"Makedonska Kamenica Municipality" => Ok(Self::MakedonskaKamenicaMunicipality),
"Makedonski Brod Municipality" => Ok(Self::MakedonskiBrodMunicipality),
"Mavrovo and Rostuša Municipality" => Ok(Self::MavrovoAndRostusaMunicipality),
"Mogila Municipality" => Ok(Self::MogilaMunicipality),
"Negotino Municipality" => Ok(Self::NegotinoMunicipality),
"Novaci Municipality" => Ok(Self::NovaciMunicipality),
"Novo Selo Municipality" => Ok(Self::NovoSeloMunicipality),
"Ohrid Municipality" => Ok(Self::OhridMunicipality),
"Oslomej Municipality" => Ok(Self::OslomejMunicipality),
"Pehčevo Municipality" => Ok(Self::PehcevoMunicipality),
"Petrovec Municipality" => Ok(Self::PetrovecMunicipality),
"Plasnica Municipality" => Ok(Self::PlasnicaMunicipality),
"Prilep Municipality" => Ok(Self::PrilepMunicipality),
"Probištip Municipality" => Ok(Self::ProbishtipMunicipality),
"Radoviš Municipality" => Ok(Self::RadovisMunicipality),
"Rankovce Municipality" => Ok(Self::RankovceMunicipality),
"Resen Municipality" => Ok(Self::ResenMunicipality),
"Rosoman Municipality" => Ok(Self::RosomanMunicipality),
"Saraj Municipality" => Ok(Self::SarajMunicipality),
"Sopište Municipality" => Ok(Self::SopisteMunicipality),
"Staro Nagoričane Municipality" => Ok(Self::StaroNagoricaneMunicipality),
"Struga Municipality" => Ok(Self::StrugaMunicipality),
"Strumica Municipality" => Ok(Self::StrumicaMunicipality),
"Studeničani Municipality" => Ok(Self::StudenicaniMunicipality),
"Sveti Nikole Municipality" => Ok(Self::SvetiNikoleMunicipality),
"Tearce Municipality" => Ok(Self::TearceMunicipality),
"Tetovo Municipality" => Ok(Self::TetovoMunicipality),
"Valandovo Municipality" => Ok(Self::ValandovoMunicipality),
"Vasilevo Municipality" => Ok(Self::VasilevoMunicipality),
"Veles Municipality" => Ok(Self::VelesMunicipality),
"Vevčani Municipality" => Ok(Self::VevcaniMunicipality),
"Vinica Municipality" => Ok(Self::VinicaMunicipality),
"Vraneštica Municipality" => Ok(Self::VranesticaMunicipality),
"Vrapčište Municipality" => Ok(Self::VrapcisteMunicipality),
"Zajas Municipality" => Ok(Self::ZajasMunicipality),
"Zelenikovo Municipality" => Ok(Self::ZelenikovoMunicipality),
"Zrnovci Municipality" => Ok(Self::ZrnovciMunicipality),
"Čair Municipality" => Ok(Self::CairMunicipality),
"Čaška Municipality" => Ok(Self::CaskaMunicipality),
"Češinovo-Obleševo Municipality" => Ok(Self::CesinovoOblesevoMunicipality),
"Čučer-Sandevo Municipality" => Ok(Self::CucerSandevoMunicipality),
"Štip Municipality" => Ok(Self::StipMunicipality),
"Šuto Orizari Municipality" => Ok(Self::ShutoOrizariMunicipality),
"Želino Municipality" => Ok(Self::ZelinoMunicipality),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for MontenegroStatesAbbreviation {
type Error = error_stack::Report<errors::ConnectorError>;
f
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": " Stri",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_fn_hyperswitch_connectors_8912113435431050621 | clm | function | // hyperswitch/crates/hyperswitch_connectors/src/utils.rs
::parse_enum(value.clone(), "MontenegroStatesAbbreviation");
match state_abbreviation_check {
Ok(state_abbreviation) => Ok(state_abbreviation),
Err(_) => match value.as_str() {
"Andrijevica Municipality" => Ok(Self::AndrijevicaMunicipality),
"Bar Municipality" => Ok(Self::BarMunicipality),
"Berane Municipality" => Ok(Self::BeraneMunicipality),
"Bijelo Polje Municipality" => Ok(Self::BijeloPoljeMunicipality),
"Budva Municipality" => Ok(Self::BudvaMunicipality),
"Danilovgrad Municipality" => Ok(Self::DanilovgradMunicipality),
"Gusinje Municipality" => Ok(Self::GusinjeMunicipality),
"Kolašin Municipality" => Ok(Self::KolasinMunicipality),
"Kotor Municipality" => Ok(Self::KotorMunicipality),
"Mojkovac Municipality" => Ok(Self::MojkovacMunicipality),
"Nikšić Municipality" => Ok(Self::NiksicMunicipality),
"Petnjica Municipality" => Ok(Self::PetnjicaMunicipality),
"Plav Municipality" => Ok(Self::PlavMunicipality),
"Pljevlja Municipality" => Ok(Self::PljevljaMunicipality),
"Plužine Municipality" => Ok(Self::PlužineMunicipality),
"Podgorica Municipality" => Ok(Self::PodgoricaMunicipality),
"Rožaje Municipality" => Ok(Self::RožajeMunicipality),
"Tivat Municipality" => Ok(Self::TivatMunicipality),
"Ulcinj Municipality" => Ok(Self::UlcinjMunicipality),
"Žabljak Municipality" => Ok(Self::ŽabljakMunicipality),
_ => Err(errors::ConnectorError::InvalidDataFormat {
field_name: "address.state",
}
.into()),
},
}
}
}
impl ForeignTryFrom<String> for MonacoStatesAbbreviation {
type Error = error_stack::Report<errors::ConnectorError>;
fn foreign_try
| {
"chunk": null,
"crate": "hyperswitch_connectors",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "arse_enum(value.",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.