id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_fn_domain_types_1887769377924026966 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_billing_state(&self) -> Option<Secret<String>> {
self.address
.get_payment_method_billing()
.and_then(|billing_address| {
billing_address
.clone()
.address
.and_then(|billing_details| billing_details.state)
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_billing_state",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_7110372525672015525 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_billing_first_name(&self) -> Option<Secret<String>> {
self.address
.get_payment_method_billing()
.and_then(|billing_address| {
billing_address
.clone()
.address
.and_then(|billing_details| billing_details.first_name)
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_billing_first_name",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3226738253061083318 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_billing_last_name(&self) -> Option<Secret<String>> {
self.address
.get_payment_method_billing()
.and_then(|billing_address| {
billing_address
.clone()
.address
.and_then(|billing_details| billing_details.last_name)
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_billing_last_name",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-8914133783760551000 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_billing_phone_number(&self) -> Option<Secret<String>> {
self.address
.get_payment_method_billing()
.and_then(|billing_address| {
billing_address
.clone()
.phone
.and_then(|phone_data| phone_data.number)
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_billing_phone_number",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-2032502805078671068 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_billing_email(&self) -> Option<Email> {
self.address
.get_payment_method_billing()
.and_then(|billing_address| billing_address.clone().email)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_billing_email",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3894404177216389950 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn to_connector_meta<T>(&self) -> Result<T, Error>
where
T: serde::de::DeserializeOwned,
{
self.get_connector_meta()?
.parse_value(std::any::type_name::<T>())
.change_context(ConnectorError::NoConnectorMetaData)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "to_connector_meta",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7551276190936189421 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_three_ds(&self) -> bool {
matches!(self.auth_type, common_enums::AuthenticationType::ThreeDs)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_three_ds",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_5206843653338064543 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_shipping_address(&self) -> Result<&AddressDetails, Error> {
self.address
.get_shipping()
.and_then(|a| a.address.as_ref())
.ok_or_else(missing_field_err("shipping.address"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_shipping_address",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8253006145707999917 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_shipping_address_with_phone_number(&self) -> Result<&Address, Error> {
self.address
.get_shipping()
.ok_or_else(missing_field_err("shipping"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_shipping_address_with_phone_number",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7290794140651817750 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_payment_method_token(&self) -> Result<PaymentMethodToken, Error> {
self.payment_method_token
.clone()
.ok_or_else(missing_field_err("payment_method_token"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_payment_method_token",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_530393839658905616 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_customer_id(&self) -> Result<CustomerId, Error> {
self.customer_id
.to_owned()
.ok_or_else(missing_field_err("customer_id"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_customer_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7705447704012083046 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_connector_customer_id(&self) -> Result<String, Error> {
self.connector_customer
.to_owned()
.ok_or_else(missing_field_err("connector_customer_id"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_customer_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6824866795943864082 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_preprocessing_id(&self) -> Result<String, Error> {
self.preprocessing_id
.to_owned()
.ok_or_else(missing_field_err("preprocessing_id"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_preprocessing_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3776188887106189958 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_billing_full_name(&self) -> Option<Secret<String>> {
self.get_optional_billing()
.and_then(|billing_details| billing_details.address.as_ref())
.and_then(|billing_address| billing_address.get_optional_full_name())
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_billing_full_name",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_2287561042625266356 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn set_order_reference_id(mut self, reference_id: Option<String>) -> Self {
if reference_id.is_some() && self.reference_id.is_none() {
self.reference_id = reference_id;
}
self
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_order_reference_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3670795507511555919 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn set_session_token_id(mut self, session_token_id: Option<String>) -> Self {
if session_token_id.is_some() && self.session_token.is_none() {
self.session_token = session_token_id;
}
self
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_session_token_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_199719370441217451 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn set_payment_method_token(mut self, payment_method_token: Option<String>) -> Self {
if payment_method_token.is_some() && self.payment_method_token.is_none() {
self.payment_method_token =
payment_method_token.map(|token| PaymentMethodToken::Token(Secret::new(token)));
}
self
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_payment_method_token",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1764448970756785806 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn set_connector_customer_id(mut self, connector_customer_id: Option<String>) -> Self {
if connector_customer_id.is_some() && self.connector_customer.is_none() {
self.connector_customer = connector_customer_id;
}
self
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_connector_customer_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8611024404325492932 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn set_access_token_id(mut self, access_token_id: Option<String>) -> Self {
if let (Some(token_id), None) = (access_token_id, &self.access_token) {
self.access_token = Some(AccessTokenResponseData {
access_token: token_id,
token_type: None,
expires_in: None,
});
}
self
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_access_token_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4880102153455481818 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_return_url(&self) -> Option<String> {
self.return_url.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_return_url",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8119830442988149064 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_header(&self, key: &str) -> Option<&Secret<String>> {
self.vault_headers.as_ref().and_then(|h| h.get(key))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_header",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-209819264168385802 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn set_raw_connector_response(&mut self, response: Option<Secret<String>>) {
self.raw_connector_response = response;
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_raw_connector_response",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3405595518685664482 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn get_raw_connector_response(&self) -> Option<Secret<String>> {
self.raw_connector_response.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_raw_connector_response",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4188961479492759196 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn get_raw_connector_request(&self) -> Option<Secret<String>> {
self.raw_connector_request.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_raw_connector_request",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-2904318725208963500 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn set_raw_connector_request(&mut self, request: Option<Secret<String>>) {
self.raw_connector_request = request;
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_raw_connector_request",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7812146410365050240 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn set_connector_response_headers(&mut self, headers: Option<http::HeaderMap>) {
self.connector_response_headers = headers;
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_connector_response_headers",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1334332072567101868 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn get_connector_response_headers(&self) -> Option<&http::HeaderMap> {
self.connector_response_headers.as_ref()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_response_headers",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1969156634095008802 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_cancellation_reason(&self) -> Result<String, Error> {
self.cancellation_reason
.clone()
.ok_or_else(missing_field_err("cancellation_reason"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_cancellation_reason",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_5432503459452005085 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_language_from_browser_info(&self) -> Option<String> {
self.browser_info
.clone()
.and_then(|browser_info| browser_info.language)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_language_from_browser_info",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3835970186739015353 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub 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": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_ip_address_as_optional",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7469988041356526746 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_ip_address(&self) -> Result<Secret<String, IpAddress>, Error> {
self.get_ip_address_as_optional()
.ok_or_else(missing_field_err("browser_info.ip_address"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_ip_address",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4392312901612252383 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_email(&self) -> Result<Email, Error> {
self.email.clone().ok_or_else(missing_field_err("email"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_email",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1966092760597451056 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_optional_email(&self) -> Option<Email> {
self.email.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_email",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3788271521872851575 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_browser_info(&self) -> Result<BrowserInformation, Error> {
self.browser_info
.clone()
.ok_or_else(missing_field_err("browser_info"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_browser_info",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6224107577529170207 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_card(&self) -> Result<Card<T>, Error> {
match &self.payment_method_data {
PaymentMethodData::Card(card) => Ok(card.clone()),
_ => Err(missing_field_err("card")()),
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_5569291818225282200 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub 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": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_complete_authorize_url",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_437990595964668987 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn connector_mandate_id(&self) -> Option<String> {
self.mandate_id
.as_ref()
.and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
Some(MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
connector_mandate_ids.get_connector_mandate_id()
}
Some(MandateReferenceId::NetworkMandateId(_))
| None
| Some(MandateReferenceId::NetworkTokenWithNTI(_)) => None,
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "connector_mandate_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7171072387819300593 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub 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(MandateReferenceId::NetworkMandateId(network_transaction_id)) => {
Some(network_transaction_id.clone())
}
Some(MandateReferenceId::ConnectorMandateId(_))
| Some(MandateReferenceId::NetworkTokenWithNTI(_))
| None => None,
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_optional_network_transaction_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4217248027814173055 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_mandate_payment(&self) -> bool {
((self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
&& self.setup_future_usage == Some(common_enums::FutureUsage::OffSession))
|| self
.mandate_id
.as_ref()
.and_then(|mandate_ids| mandate_ids.mandate_reference_id.as_ref())
.is_some()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_mandate_payment",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8679306160959184725 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_webhook_url(&self) -> Result<String, Error> {
self.webhook_url
.clone()
.ok_or_else(missing_field_err("webhook_url"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_url",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4240274247915787980 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub 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": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_router_return_url",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-8000509227193008168 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_wallet(&self) -> bool {
matches!(self.payment_method_data, PaymentMethodData::Wallet(_))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_wallet",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-6408233480079966877 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_card(&self) -> bool {
matches!(self.payment_method_data, PaymentMethodData::Card(_))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_card",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_9067640709681952832 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_payment_method_type(&self) -> Result<common_enums::PaymentMethodType, Error> {
self.payment_method_type
.to_owned()
.ok_or_else(missing_field_err("payment_method_type"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_payment_method_type",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4780490753705656806 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_customer_initiated_mandate_payment(&self) -> bool {
(self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
&& self.setup_future_usage == Some(common_enums::FutureUsage::OffSession)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_customer_initiated_mandate_payment",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-807367999192650514 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_metadata_as_object(&self) -> Option<SecretSerdeValue> {
self.metadata.clone().and_then(|meta_data| match meta_data {
serde_json::Value::Null
| serde_json::Value::Bool(_)
| serde_json::Value::Number(_)
| serde_json::Value::String(_)
| serde_json::Value::Array(_) => None,
serde_json::Value::Object(_) => Some(meta_data.into()),
})
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_metadata_as_object",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6671620347075298619 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn set_session_token(mut self, session_token: Option<String>) -> Self {
self.session_token = session_token;
self
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "set_session_token",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-5281523034721340942 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_access_token_optional(&self) -> Option<&String> {
self.access_token
.as_ref()
.map(|token_data| &token_data.access_token)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_access_token_optional",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4093739009422542076 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_payment_event(&self) -> bool {
matches!(
self,
Self::PaymentIntentFailure
| Self::PaymentIntentSuccess
| Self::PaymentIntentProcessing
| Self::PaymentIntentPartiallyFunded
| Self::PaymentIntentCancelled
| Self::PaymentIntentCancelFailure
| Self::PaymentIntentAuthorizationSuccess
| Self::PaymentIntentAuthorizationFailure
| Self::PaymentIntentCaptureSuccess
| Self::PaymentIntentCaptureFailure
| Self::PaymentIntentExpired
| Self::PaymentActionRequired
| Self::SourceChargeable
| Self::SourceTransactionCreated
| Self::Payment
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_payment_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3716595596404525103 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_refund_event(&self) -> bool {
matches!(
self,
Self::RefundFailure | Self::RefundSuccess | Self::Refund
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_refund_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6854798525050705899 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_dispute_event(&self) -> bool {
matches!(
self,
Self::DisputeOpened
| Self::DisputeExpired
| Self::DisputeAccepted
| Self::DisputeCancelled
| Self::DisputeChallenged
| Self::DisputeWon
| Self::DisputeLost
| Self::Dispute
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_dispute_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4806549461831240569 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_mandate_event(&self) -> bool {
matches!(self, Self::MandateActive | Self::MandateRevoked)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_mandate_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4079199879351728334 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_payout_event(&self) -> bool {
matches!(
self,
Self::PayoutSuccess
| Self::PayoutFailure
| Self::PayoutProcessing
| Self::PayoutCancelled
| Self::PayoutCreated
| Self::PayoutExpired
| Self::PayoutReversed
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_payout_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4617482442947261691 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_recovery_event(&self) -> bool {
matches!(
self,
Self::RecoveryPaymentFailure
| Self::RecoveryPaymentSuccess
| Self::RecoveryPaymentPending
| Self::RecoveryInvoiceCancel
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_recovery_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-659849784235148324 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_misc_event(&self) -> bool {
matches!(
self,
Self::EndpointVerification
| Self::ExternalAuthenticationAres
| Self::FrmApproved
| Self::FrmRejected
| Self::IncomingWebhookEventUnspecified
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_misc_event",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-2660111323296320428 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_connector_refund_id(&self) -> Result<String, Error> {
self.connector_refund_id
.clone()
.get_required_value("connector_refund_id")
.change_context(ConnectorError::MissingConnectorTransactionID)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_refund_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8179989532207957452 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_connector_metadata(&self) -> Result<serde_json::Value, Error> {
self.connector_metadata
.clone()
.ok_or_else(missing_field_err("connector_metadata"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_metadata",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-9200022115021252845 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn is_multiple_capture(&self) -> bool {
self.multiple_capture_data.is_some()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_multiple_capture",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3514463913905959573 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_mandate_reference(&self) -> &MandateReferenceId {
&self.mandate_reference
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_mandate_reference",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-7451137397320676301 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
pub fn get_recurring_mandate_payment_data(
&self,
) -> Result<router_data::RecurringMandatePaymentData, Error> {
self.recurring_mandate_payment_data
.to_owned()
.ok_or_else(missing_field_err("recurring_mandate_payment_data"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_recurring_mandate_payment_data",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8870136885034809265 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
None
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_supported_payment_methods",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_2840370811538080488 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn get_supported_webhook_flows(&self) -> Option<&'static [EventClass]> {
None
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_supported_webhook_flows",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4243617770409667152 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
None
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_connector_about",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_5649676720244628145 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn from(pm_data: PaymentMethodData<T>) -> Self {
match pm_data {
PaymentMethodData::Card(_) => Self::Card,
PaymentMethodData::CardRedirect(card_redirect_data) => match card_redirect_data {
payment_method_data::CardRedirectData::Knet {} => Self::Knet,
payment_method_data::CardRedirectData::Benefit {} => Self::Benefit,
payment_method_data::CardRedirectData::MomoAtm {} => Self::MomoAtm,
payment_method_data::CardRedirectData::CardRedirect {} => Self::CardRedirect,
},
PaymentMethodData::Wallet(wallet_data) => match wallet_data {
payment_method_data::WalletData::BluecodeRedirect { .. } => Self::Bluecode,
payment_method_data::WalletData::AliPayQr(_) => Self::AliPayQr,
payment_method_data::WalletData::AliPayRedirect(_) => Self::AliPayRedirect,
payment_method_data::WalletData::AliPayHkRedirect(_) => Self::AliPayHkRedirect,
payment_method_data::WalletData::MomoRedirect(_) => Self::MomoRedirect,
payment_method_data::WalletData::KakaoPayRedirect(_) => Self::KakaoPayRedirect,
payment_method_data::WalletData::GoPayRedirect(_) => Self::GoPayRedirect,
payment_method_data::WalletData::GcashRedirect(_) => Self::GcashRedirect,
payment_method_data::WalletData::ApplePay(_) => Self::ApplePay,
payment_method_data::WalletData::ApplePayRedirect(_) => Self::ApplePayRedirect,
payment_method_data::WalletData::ApplePayThirdPartySdk(_) => {
Self::ApplePayThirdPartySdk
}
payment_method_data::WalletData::DanaRedirect {} => Self::DanaRedirect,
payment_method_data::WalletData::GooglePay(_) => Self::GooglePay,
payment_method_data::WalletData::GooglePayRedirect(_) => Self::GooglePayRedirect,
payment_method_data::WalletData::GooglePayThirdPartySdk(_) => {
Self::GooglePayThirdPartySdk
}
payment_method_data::WalletData::MbWayRedirect(_) => Self::MbWayRedirect,
payment_method_data::WalletData::MobilePayRedirect(_) => Self::MobilePayRedirect,
payment_method_data::WalletData::PaypalRedirect(_) => Self::PaypalRedirect,
payment_method_data::WalletData::PaypalSdk(_) => Self::PaypalSdk,
payment_method_data::WalletData::SamsungPay(_) => Self::SamsungPay,
payment_method_data::WalletData::TwintRedirect {} => Self::TwintRedirect,
payment_method_data::WalletData::VippsRedirect {} => Self::VippsRedirect,
payment_method_data::WalletData::TouchNGoRedirect(_) => Self::TouchNGoRedirect,
payment_method_data::WalletData::WeChatPayRedirect(_) => Self::WeChatPayRedirect,
payment_method_data::WalletData::WeChatPayQr(_) => Self::WeChatPayQr,
payment_method_data::WalletData::CashappQr(_) => Self::CashappQr,
payment_method_data::WalletData::SwishQr(_) => Self::SwishQr,
payment_method_data::WalletData::Mifinity(_) => Self::Mifinity,
payment_method_data::WalletData::AmazonPayRedirect(_) => Self::AmazonPayRedirect,
payment_method_data::WalletData::Paze(_) => Self::Paze,
payment_method_data::WalletData::RevolutPay(_) => Self::RevolutPay,
},
PaymentMethodData::PayLater(pay_later_data) => match pay_later_data {
payment_method_data::PayLaterData::KlarnaRedirect { .. } => Self::KlarnaRedirect,
payment_method_data::PayLaterData::KlarnaSdk { .. } => Self::KlarnaSdk,
payment_method_data::PayLaterData::AffirmRedirect {} => Self::AffirmRedirect,
payment_method_data::PayLaterData::AfterpayClearpayRedirect { .. } => {
Self::AfterpayClearpayRedirect
}
payment_method_data::PayLaterData::PayBrightRedirect {} => Self::PayBrightRedirect,
payment_method_data::PayLaterData::WalleyRedirect {} => Self::WalleyRedirect,
payment_method_data::PayLaterData::AlmaRedirect {} => Self::AlmaRedirect,
payment_method_data::PayLaterData::AtomeRedirect {} => Self::AtomeRedirect,
},
PaymentMethodData::BankRedirect(bank_redirect_data) => match bank_redirect_data {
payment_method_data::BankRedirectData::BancontactCard { .. } => {
Self::BancontactCard
}
payment_method_data::BankRedirectData::Bizum {} => Self::Bizum,
payment_method_data::BankRedirectData::Blik { .. } => Self::Blik,
payment_method_data::BankRedirectData::Eps { .. } => Self::Eps,
payment_method_data::BankRedirectData::Giropay { .. } => Self::Giropay,
payment_method_data::BankRedirectData::Ideal { .. } => Self::Ideal,
payment_method_data::BankRedirectData::Interac { .. } => Self::Interac,
payment_method_data::BankRedirectData::OnlineBankingCzechRepublic { .. } => {
Self::OnlineBankingCzechRepublic
}
payment_method_data::BankRedirectData::OnlineBankingFinland { .. } => {
Self::OnlineBankingFinland
}
payment_method_data::BankRedirectData::OnlineBankingPoland { .. } => {
Self::OnlineBankingPoland
}
payment_method_data::BankRedirectData::OnlineBankingSlovakia { .. } => {
Self::OnlineBankingSlovakia
}
payment_method_data::BankRedirectData::OpenBankingUk { .. } => Self::OpenBankingUk,
payment_method_data::BankRedirectData::Przelewy24 { .. } => Self::Przelewy24,
payment_method_data::BankRedirectData::Sofort { .. } => Self::Sofort,
payment_method_data::BankRedirectData::Trustly { .. } => Self::Trustly,
payment_method_data::BankRedirectData::OnlineBankingFpx { .. } => {
Self::OnlineBankingFpx
}
payment_method_data::BankRedirectData::OnlineBankingThailand { .. } => {
Self::OnlineBankingThailand
}
payment_method_data::BankRedirectData::LocalBankRedirect {} => {
Self::LocalBankRedirect
}
payment_method_data::BankRedirectData::Eft { .. } => Self::Eft,
},
PaymentMethodData::BankDebit(bank_debit_data) => match bank_debit_data {
payment_method_data::BankDebitData::AchBankDebit { .. } => Self::AchBankDebit,
payment_method_data::BankDebitData::SepaBankDebit { .. } => Self::SepaBankDebit,
payment_method_data::BankDebitData::BecsBankDebit { .. } => Self::BecsBankDebit,
payment_method_data::BankDebitData::BacsBankDebit { .. } => Self::BacsBankDebit,
},
PaymentMethodData::BankTransfer(bank_transfer_data) => match *bank_transfer_data {
payment_method_data::BankTransferData::AchBankTransfer { .. } => {
Self::AchBankTransfer
}
payment_method_data::BankTransferData::SepaBankTransfer { .. } => {
Self::SepaBankTransfer
}
payment_method_data::BankTransferData::BacsBankTransfer { .. } => {
Self::BacsBankTransfer
}
payment_method_data::BankTransferData::MultibancoBankTransfer { .. } => {
Self::MultibancoBankTransfer
}
payment_method_data::BankTransferData::PermataBankTransfer { .. } => {
Self::PermataBankTransfer
}
payment_method_data::BankTransferData::BcaBankTransfer { .. } => {
Self::BcaBankTransfer
}
payment_method_data::BankTransferData::BniVaBankTransfer { .. } => {
Self::BniVaBankTransfer
}
payment_method_data::BankTransferData::BriVaBankTransfer { .. } => {
Self::BriVaBankTransfer
}
payment_method_data::BankTransferData::CimbVaBankTransfer { .. } => {
Self::CimbVaBankTransfer
}
payment_method_data::BankTransferData::DanamonVaBankTransfer { .. } => {
Self::DanamonVaBankTransfer
}
payment_method_data::BankTransferData::MandiriVaBankTransfer { .. } => {
Self::MandiriVaBankTransfer
}
payment_method_data::BankTransferData::Pix { .. } => Self::Pix,
payment_method_data::BankTransferData::Pse {} => Self::Pse,
payment_method_data::BankTransferData::LocalBankTransfer { .. } => {
Self::LocalBankTransfer
}
payment_method_data::BankTransferData::InstantBankTransfer { .. } => {
Self::InstantBankTransfer
}
payment_method_data::BankTransferData::InstantBankTransferFinland { .. } => {
Self::InstantBankTransferFinland
}
payment_method_data::BankTransferData::InstantBankTransferPoland { .. } => {
Self::InstantBankTransferPoland
}
},
PaymentMethodData::Crypto(_) => Self::Crypto,
PaymentMethodData::MandatePayment => Self::MandatePayment,
PaymentMethodData::Reward => Self::Reward,
PaymentMethodData::Upi(_) => Self::Upi,
PaymentMethodData::Voucher(voucher_data) => match voucher_data {
payment_method_data::VoucherData::Boleto(_) => Self::Boleto,
payment_method_data::VoucherData::Efecty => Self::Efecty,
payment_method_data::VoucherData::PagoEfectivo => Self::PagoEfectivo,
payment_method_data::VoucherData::RedCompra => Self::RedCompra,
payment_method_data::VoucherData::RedPagos => Self::RedPagos,
payment_method_data::VoucherData::Alfamart(_) => Self::Alfamart,
payment_method_data::VoucherData::Indomaret(_) => Self::Indomaret,
payment_method_data::VoucherData::Oxxo => Self::Oxxo,
payment_method_data::VoucherData::SevenEleven(_) => Self::SevenEleven,
payment_method_data::VoucherData::Lawson(_) => Self::Lawson,
payment_method_data::VoucherData::MiniStop(_) => Self::MiniStop,
payment_method_data::VoucherData::FamilyMart(_) => Self::FamilyMart,
payment_method_data::VoucherData::Seicomart(_) => Self::Seicomart,
payment_method_data::VoucherData::PayEasy(_) => Self::PayEasy,
},
PaymentMethodData::RealTimePayment(real_time_payment_data) => {
match *real_time_payment_data {
payment_method_data::RealTimePaymentData::DuitNow {} => Self::DuitNow,
payment_method_data::RealTimePaymentData::Fps {} => Self::Fps,
payment_method_data::RealTimePaymentData::PromptPay {} => Self::PromptPay,
payment_method_data::RealTimePaymentData::VietQr {} => Self::VietQr,
}
}
PaymentMethodData::GiftCard(gift_card_data) => match *gift_card_data {
payment_method_data::GiftCardData::Givex(_) => Self::Givex,
payment_method_data::GiftCardData::PaySafeCard {} => Self::PaySafeCar,
},
PaymentMethodData::CardToken(_) => Self::CardToken,
PaymentMethodData::OpenBanking(data) => match data {
payment_method_data::OpenBankingData::OpenBankingPIS {} => Self::OpenBanking,
},
PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
Self::CardDetailsForNetworkTransactionId
}
PaymentMethodData::NetworkToken(_) => Self::NetworkToken,
PaymentMethodData::MobilePayment(mobile_payment_data) => match mobile_payment_data {
payment_method_data::MobilePaymentData::DirectCarrierBilling { .. } => {
Self::DirectCarrierBilling
}
},
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-6074569870535320983 | clm | function | // connector-service/backend/domain_types/src/connector_types.rs
fn add(
&mut self,
payment_method: PaymentMethod,
payment_method_type: PaymentMethodType,
payment_method_details: PaymentMethodDetails,
) {
if let Some(payment_method_data) = self.get_mut(&payment_method) {
payment_method_data.insert(payment_method_type, payment_method_details);
} else {
let mut payment_method_type_metadata = PaymentMethodTypeMetadata::new();
payment_method_type_metadata.insert(payment_method_type, payment_method_details);
self.insert(payment_method, payment_method_type_metadata);
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "add",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4061385351469830795 | clm | function | // connector-service/backend/domain_types/src/router_flow_types.rs
pub fn new(txn_id: hyperswitch_masking::Secret<String>) -> Self {
Self(txn_id)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "new",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-1518610607907628490 | clm | function | // connector-service/backend/domain_types/src/router_flow_types.rs
pub fn get_id(&self) -> &hyperswitch_masking::Secret<String> {
&self.0
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_id",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6675588530596316259 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn from_option_secret_value(
value: Option<common_utils::pii::SecretSerdeValue>,
) -> common_utils::errors::CustomResult<Self, common_utils::errors::ParsingError> {
value
.parse_value::<Self>("ConnectorAuthType")
.change_context(common_utils::errors::ParsingError::StructParseFailure(
"ConnectorAuthType",
))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from_option_secret_value",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6364988419284939797 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn from_secret_value(
value: common_utils::pii::SecretSerdeValue,
) -> common_utils::errors::CustomResult<Self, common_utils::errors::ParsingError> {
value
.parse_value::<Self>("ConnectorAuthType")
.change_context(common_utils::errors::ParsingError::StructParseFailure(
"ConnectorAuthType",
))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from_secret_value",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_7149826306181602307 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
fn mask_key(&self, key: String) -> Secret<String> {
let key_len = key.len();
let masked_key = if key_len <= 4 {
"*".repeat(key_len)
} else {
// Show the first two and last two characters, mask the rest with '*'
let mut masked_key = String::new();
let key_len = key.len();
// Iterate through characters by their index
for (index, character) in key.chars().enumerate() {
if index < 2 || index >= key_len - 2 {
masked_key.push(character); // Keep the first two and last two characters
} else {
masked_key.push('*'); // Mask the middle characters
}
}
masked_key
};
Secret::new(masked_key)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "mask_key",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-5127712869946545110 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_masked_keys(&self) -> Self {
match self {
Self::TemporaryAuth => Self::TemporaryAuth,
Self::NoKey => Self::NoKey,
Self::HeaderKey { api_key } => Self::HeaderKey {
api_key: self.mask_key(api_key.clone().expose()),
},
Self::BodyKey { api_key, key1 } => Self::BodyKey {
api_key: self.mask_key(api_key.clone().expose()),
key1: self.mask_key(key1.clone().expose()),
},
Self::SignatureKey {
api_key,
key1,
api_secret,
} => Self::SignatureKey {
api_key: self.mask_key(api_key.clone().expose()),
key1: self.mask_key(key1.clone().expose()),
api_secret: self.mask_key(api_secret.clone().expose()),
},
Self::MultiAuthKey {
api_key,
key1,
api_secret,
key2,
} => Self::MultiAuthKey {
api_key: self.mask_key(api_key.clone().expose()),
key1: self.mask_key(key1.clone().expose()),
api_secret: self.mask_key(api_secret.clone().expose()),
key2: self.mask_key(key2.clone().expose()),
},
Self::CurrencyAuthKey { auth_key_map } => Self::CurrencyAuthKey {
auth_key_map: auth_key_map.clone(),
},
Self::CertificateAuth {
certificate,
private_key,
} => Self::CertificateAuth {
certificate: self.mask_key(certificate.clone().expose()),
private_key: self.mask_key(private_key.clone().expose()),
},
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_masked_keys",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_851804993770398608 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
fn default() -> Self {
Self {
code: "HE_00".to_string(),
message: "Something went wrong".to_string(),
reason: None,
status_code: http::StatusCode::INTERNAL_SERVER_ERROR.as_u16(),
attempt_status: None,
connector_transaction_id: None,
network_decline_code: None,
network_advice_code: None,
network_error_message: None,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "default",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1377869808357731319 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_not_implemented() -> Self {
Self {
code: "IR_00".to_string(),
message: "This API is under development and will be made available soon.".to_string(),
reason: None,
status_code: http::StatusCode::INTERNAL_SERVER_ERROR.as_u16(),
attempt_status: None,
connector_transaction_id: None,
network_decline_code: None,
network_advice_code: None,
network_error_message: None,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_not_implemented",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_7498026867895303479 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_four_digit_expiry_year(&self) -> Result<Secret<String>, Error> {
Ok(Secret::new(format!(
"20{}",
self.application_expiration_date
.get(0..2)
.ok_or(crate::errors::ConnectorError::RequestEncodingFailed)?
)))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_four_digit_expiry_year",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_8906170893021635048 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_expiry_month(&self) -> Result<Secret<String>, Error> {
Ok(Secret::new(
self.application_expiration_date
.get(2..4)
.ok_or(crate::errors::ConnectorError::RequestEncodingFailed)?
.to_owned(),
))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_month",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3351474631897455862 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_original_payment_amount(&self) -> Result<i64, Error> {
self.original_payment_authorized_amount
.ok_or_else(missing_field_err("original_payment_authorized_amount"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_original_payment_amount",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_2665908970866824162 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_original_payment_currency(&self) -> Result<common_enums::Currency, Error> {
self.original_payment_authorized_currency
.ok_or_else(missing_field_err("original_payment_authorized_currency"))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_original_payment_currency",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_2818488941361159515 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn with_additional_payment_method_data(
additional_payment_method_data: AdditionalPaymentMethodConnectorResponse,
) -> Self {
Self {
additional_payment_method_data: Some(additional_payment_method_data),
extended_authorization_response_data: None,
is_overcapture_enabled: None,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "with_additional_payment_method_data",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1632517588975245231 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn new(
additional_payment_method_data: Option<AdditionalPaymentMethodConnectorResponse>,
is_overcapture_enabled: Option<bool>,
extended_authorization_response_data: Option<ExtendedAuthorizationResponseData>,
) -> Self {
Self {
additional_payment_method_data,
extended_authorization_response_data,
is_overcapture_enabled,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "new",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4748178067406880156 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn get_extended_authorization_response_data(
&self,
) -> Option<&ExtendedAuthorizationResponseData> {
self.extended_authorization_response_data.as_ref()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_extended_authorization_response_data",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-3639317428847989422 | clm | function | // connector-service/backend/domain_types/src/router_data.rs
pub fn is_overcapture_enabled(&self) -> Option<bool> {
self.is_overcapture_enabled
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_overcapture_enabled",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_7169964749733789679 | clm | function | // connector-service/backend/domain_types/src/errors.rs
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
r#"{{"error":{}}}"#,
serde_json::to_string(self).unwrap_or_else(|_| "API error response".to_string())
)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "fmt",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-4857641930021289919 | clm | function | // connector-service/backend/domain_types/src/errors.rs
fn from(error: ApiErrorResponse) -> Self {
Self {
code: error.error_code(),
message: error.error_message(),
reason: None,
status_code: match error {
ApiErrorResponse::ExternalConnectorError { status_code, .. } => status_code,
_ => 500,
},
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_1993041999789076443 | clm | function | // connector-service/backend/domain_types/src/errors.rs
pub fn is_connector_timeout(&self) -> bool {
self == &Self::RequestTimeoutReceived
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_connector_timeout",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_6911500605997507513 | clm | function | // connector-service/backend/domain_types/src/errors.rs
fn switch(&self) -> ApiClientError {
match self {
Self::HeaderMapConstructionFailed => ApiClientError::HeaderMapConstructionFailed,
Self::InvalidProxyConfiguration => ApiClientError::InvalidProxyConfiguration,
Self::ClientConstructionFailed => ApiClientError::ClientConstructionFailed,
Self::CertificateDecodeFailed => ApiClientError::CertificateDecodeFailed,
Self::BodySerializationFailed => ApiClientError::BodySerializationFailed,
Self::UnexpectedState => ApiClientError::UnexpectedState,
Self::UrlParsingFailed => ApiClientError::UrlParsingFailed,
Self::UrlEncodingFailed => ApiClientError::UrlEncodingFailed,
Self::RequestNotSent(reason) => ApiClientError::RequestNotSent(reason.clone()),
Self::ResponseDecodingFailed => ApiClientError::ResponseDecodingFailed,
Self::RequestTimeoutReceived => ApiClientError::RequestTimeoutReceived,
Self::ConnectionClosedIncompleteMessage => {
ApiClientError::ConnectionClosedIncompleteMessage
}
Self::InternalServerErrorReceived => ApiClientError::InternalServerErrorReceived,
Self::BadGatewayReceived => ApiClientError::BadGatewayReceived,
Self::ServiceUnavailableReceived => ApiClientError::ServiceUnavailableReceived,
Self::GatewayTimeoutReceived => ApiClientError::GatewayTimeoutReceived,
Self::UnexpectedServerResponse => ApiClientError::UnexpectedServerResponse,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "switch",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3893349532887132480 | clm | function | // connector-service/backend/domain_types/src/router_response_types.rs
fn from((mut redirect_url, method): (url::Url, Method)) -> Self {
let form_fields = HashMap::from_iter(
redirect_url
.query_pairs()
.map(|(key, value)| (key.to_string(), value.to_string())),
);
// Do not include query params in the endpoint
redirect_url.set_query(None);
Self::Form {
endpoint: redirect_url.to_string(),
method,
form_fields,
}
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from",
"is_async": false,
"is_pub": false,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3479052244014224288 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn peek(&self) -> &str {
&self.0
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "peek",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_524615598679022758 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_card_expiry_year_2_digit(
&self,
) -> Result<Secret<String>, crate::errors::ConnectorError> {
let binding = self.card_exp_year.clone();
let year = binding.peek();
Ok(Secret::new(
year.get(year.len() - 2..)
.ok_or(crate::errors::ConnectorError::RequestEncodingFailed)?
.to_string(),
))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_expiry_year_2_digit",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-179266435894324841 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_card_expiry_month_year_2_digit_with_delimiter(
&self,
delimiter: String,
) -> Result<Secret<String>, crate::errors::ConnectorError> {
let year = self.get_card_expiry_year_2_digit()?;
Ok(Secret::new(format!(
"{}{}{}",
self.card_exp_month.peek(),
delimiter,
year.peek()
)))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_expiry_month_year_2_digit_with_delimiter",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_3464255210165716443 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_expiry_year_4_digit(&self) -> Secret<String> {
let mut year = self.card_exp_year.peek().clone();
if year.len() == 2 {
year = format!("20{year}");
}
Secret::new(year)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_year_4_digit",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-1711965748674509387 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_expiry_month_as_i8(&self) -> Result<Secret<i8>, Error> {
self.card_exp_month
.peek()
.clone()
.parse::<i8>()
.change_context(crate::errors::ConnectorError::ResponseDeserializationFailed)
.map(Secret::new)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_month_as_i8",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_4499537262388672194 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_card_issuer(&self) -> Result<CardIssuer, Error> {
get_card_issuer(self.card_number.peek())
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_issuer",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_5100243936646312517 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_expiry_date_as_yyyymm(&self, delimiter: &str) -> Secret<String> {
let year = self.get_expiry_year_4_digit();
Secret::new(format!(
"{}{}{}",
year.peek(),
delimiter,
self.card_exp_month.peek()
))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_date_as_yyyymm",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_7839106482193817707 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_expiry_date_as_mmyyyy(&self, delimiter: &str) -> Secret<String> {
let year = self.get_expiry_year_4_digit();
Secret::new(format!(
"{}{}{}",
self.card_exp_month.peek(),
delimiter,
year.peek()
))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_date_as_mmyyyy",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-195539339624904094 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_expiry_date_as_yymm(&self) -> Result<Secret<String>, crate::errors::ConnectorError> {
let year = self.get_card_expiry_year_2_digit()?.expose();
let month = self.card_exp_month.clone().expose();
Ok(Secret::new(format!("{year}{month}")))
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_date_as_yymm",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-1577304197544276367 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_expiry_year_as_i32(&self) -> Result<Secret<i32>, Error> {
self.card_exp_year
.peek()
.clone()
.parse::<i32>()
.change_context(crate::errors::ConnectorError::ResponseDeserializationFailed)
.map(Secret::new)
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_expiry_year_as_i32",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_2077542795246807308 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_network_token(&self) -> NetworkTokenNumber {
self.network_token.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_network_token",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_5080586816233025018 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_network_token_expiry_month(&self) -> Secret<String> {
self.network_token_exp_month.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_network_token_expiry_month",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-1974986462940096905 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_network_token_expiry_year(&self) -> Secret<String> {
self.network_token_exp_year.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_network_token_expiry_year",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_fn_domain_types_-5659426133996024806 | clm | function | // connector-service/backend/domain_types/src/payment_method_data.rs
pub fn get_cryptogram(&self) -> Option<Secret<String>> {
self.cryptogram.clone()
}
| {
"chunk": null,
"crate": "domain_types",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_cryptogram",
"is_async": false,
"is_pub": true,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"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.