id
stringlengths
20
153
type
stringclasses
1 value
granularity
stringclasses
14 values
content
stringlengths
16
84.3k
metadata
dict
connector-service_method_ucs_common_utils_LengthId<MAX_LENGTH, MIN_LENGTH>_from_alphanumeric_id
clm
method
// connector-service/backend/common_utils/src/id_type.rs // impl for LengthId<MAX_LENGTH, MIN_LENGTH> pub(crate) fn from_alphanumeric_id( alphanumeric_id: AlphaNumericId, ) -> Result<Self, LengthIdError> { let length_of_input_string = alphanumeric_id.0.len(); let length_of_input_string = u8::try_from(length_of_input_string) .map_err(|_| LengthIdError::MaxLengthViolated(MAX_LENGTH))?; when(length_of_input_string > MAX_LENGTH, || { Err(LengthIdError::MaxLengthViolated(MAX_LENGTH)) })?; when(length_of_input_string < MIN_LENGTH, || { Err(LengthIdError::MinLengthViolated(MIN_LENGTH)) })?; Ok(Self(alphanumeric_id)) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "LengthId<MAX_LENGTH, MIN_LENGTH>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "from_alphanumeric_id", "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_method_ucs_common_utils_ApiKeyId_generate_key_id
clm
method
// connector-service/backend/common_utils/src/id_type.rs // impl for ApiKeyId pub fn generate_key_id(prefix: &'static str) -> Self { Self(crate::generate_ref_id_with_default_length(prefix)) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "ApiKeyId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate_key_id", "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_method_ucs_common_utils_MerchantConnectorAccountId_wrap
clm
method
// connector-service/backend/common_utils/src/id_type.rs // impl for MerchantConnectorAccountId pub fn wrap(merchant_connector_account_id: String) -> CustomResult<Self, ValidationError> { Self::try_from(Cow::from(merchant_connector_account_id)) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccountId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "wrap", "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_method_ucs_common_utils_NonceSequence_current
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for NonceSequence fn current(&self) -> [u8; aead::NONCE_LEN] { let mut nonce = [0_u8; aead::NONCE_LEN]; nonce.copy_from_slice(&self.0.to_be_bytes()[Self::SEQUENCE_NUMBER_START_INDEX..]); nonce }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "NonceSequence", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "current", "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_method_ucs_common_utils_NonceSequence_from_bytes
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for NonceSequence fn from_bytes(bytes: [u8; aead::NONCE_LEN]) -> Self { let mut sequence_number = [0_u8; 128 / 8]; sequence_number[Self::SEQUENCE_NUMBER_START_INDEX..].copy_from_slice(&bytes); let sequence_number = u128::from_be_bytes(sequence_number); Self(sequence_number) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "NonceSequence", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "from_bytes", "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_method_ucs_common_utils_Ed25519_validate_inputs
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Ed25519 fn validate_inputs( public_key: &[u8], signature: &[u8], ) -> CustomResult<(), errors::CryptoError> { // Validate public key length if public_key.len() != Self::ED25519_PUBLIC_KEY_LEN { return Err(errors::CryptoError::InvalidKeyLength).attach_printable(format!( "Invalid ED25519 public key length: expected {} bytes, got {}", Self::ED25519_PUBLIC_KEY_LEN, public_key.len() )); } // Validate signature length if signature.len() != Self::ED25519_SIGNATURE_LEN { return Err(errors::CryptoError::InvalidKeyLength).attach_printable(format!( "Invalid ED25519 signature length: expected {} bytes, got {}", Self::ED25519_SIGNATURE_LEN, signature.len() )); } Ok(()) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Ed25519", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "validate_inputs", "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_method_ucs_common_utils_Encryptable<Secret<T, S>>_new
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Encryptable<Secret<T, S>> pub fn new( masked_data: Secret<T, S>, encrypted_data: Secret<Vec<u8>, EncryptionStrategy>, ) -> Self { Self { inner: masked_data, encrypted: encrypted_data, } }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Encryptable<Secret<T, S>>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_ucs_common_utils_Encryptable<T>_into_inner
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Encryptable<T> pub fn into_inner(self) -> T { self.inner }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Encryptable<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "into_inner", "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_method_ucs_common_utils_Encryptable<T>_get_inner
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Encryptable<T> pub fn get_inner(&self) -> &T { &self.inner }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Encryptable<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_inner", "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_method_ucs_common_utils_Encryptable<T>_into_encrypted
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Encryptable<T> pub fn into_encrypted(self) -> Secret<Vec<u8>, EncryptionStrategy> { self.encrypted }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Encryptable<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "into_encrypted", "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_method_ucs_common_utils_Encryptable<T>_deserialize_inner_value
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Encryptable<T> pub fn deserialize_inner_value<U, F>( self, f: F, ) -> CustomResult<Encryptable<U>, errors::ParsingError> where F: FnOnce(T) -> CustomResult<U, errors::ParsingError>, U: Clone, { let inner = self.inner; let encrypted = self.encrypted; let inner = f(inner)?; Ok(Encryptable { inner, encrypted }) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Encryptable<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "deserialize_inner_value", "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_method_ucs_common_utils_Encryptable<T>_map
clm
method
// connector-service/backend/common_utils/src/crypto.rs // impl for Encryptable<T> pub fn map<U: Clone>(self, f: impl FnOnce(T) -> U) -> Encryptable<U> { let encrypted_data = self.encrypted; let masked_data = f(self.inner); Encryptable { inner: masked_data, encrypted: encrypted_data, } }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "Encryptable<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "map", "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_method_ucs_common_utils_GlobalPaymentMethodSessionId_get_redis_key
clm
method
// connector-service/backend/common_utils/src/global_id/payment_methods.rs // impl for GlobalPaymentMethodSessionId pub fn get_redis_key(&self) -> String { format!("payment_method_session:{}", self.get_string_repr()) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalPaymentMethodSessionId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_redis_key", "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_method_ucs_common_utils_GlobalPaymentMethodId_generate
clm
method
// connector-service/backend/common_utils/src/global_id/payment_methods.rs // impl for GlobalPaymentMethodId pub fn generate(cell_id: &CellId) -> error_stack::Result<Self, GlobalPaymentMethodIdError> { let global_id = GlobalId::generate(cell_id, GlobalEntity::PaymentMethod); Ok(Self(global_id)) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalPaymentMethodId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate", "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_method_ucs_common_utils_GlobalPaymentMethodId_get_string_repr
clm
method
// connector-service/backend/common_utils/src/global_id/payment_methods.rs // impl for GlobalPaymentMethodId pub fn get_string_repr(&self) -> &str { self.0.get_string_repr() }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalPaymentMethodId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_string_repr", "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_method_ucs_common_utils_GlobalPaymentMethodId_generate_from_string
clm
method
// connector-service/backend/common_utils/src/global_id/payment_methods.rs // impl for GlobalPaymentMethodId pub fn generate_from_string(value: String) -> CustomResult<Self, GlobalPaymentMethodIdError> { let id = GlobalId::from_string(value.into()) .change_context(GlobalPaymentMethodIdError::ConstructionError)?; Ok(Self(id)) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalPaymentMethodId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate_from_string", "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_method_ucs_common_utils_GlobalRefundId_get_string_repr
clm
method
// connector-service/backend/common_utils/src/global_id/refunds.rs // impl for GlobalRefundId pub fn get_string_repr(&self) -> &str { self.0.get_string_repr() }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalRefundId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_string_repr", "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_method_ucs_common_utils_GlobalRefundId_generate
clm
method
// connector-service/backend/common_utils/src/global_id/refunds.rs // impl for GlobalRefundId pub fn generate(cell_id: &CellId) -> Self { let global_id = super::GlobalId::generate(cell_id, super::GlobalEntity::Refund); Self(global_id) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalRefundId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate", "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_method_ucs_common_utils_GlobalTokenId_get_string_repr
clm
method
// connector-service/backend/common_utils/src/global_id/token.rs // impl for GlobalTokenId pub fn get_string_repr(&self) -> &str { self.0.get_string_repr() }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalTokenId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_string_repr", "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_method_ucs_common_utils_GlobalTokenId_generate
clm
method
// connector-service/backend/common_utils/src/global_id/token.rs // impl for GlobalTokenId pub fn generate(cell_id: &CellId) -> Self { let global_id = super::GlobalId::generate(cell_id, super::GlobalEntity::Token); Self(global_id) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalTokenId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate", "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_method_ucs_common_utils_GlobalCustomerId_get_string_repr
clm
method
// connector-service/backend/common_utils/src/global_id/customer.rs // impl for GlobalCustomerId pub fn get_string_repr(&self) -> &str { self.0.get_string_repr() }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalCustomerId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_string_repr", "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_method_ucs_common_utils_GlobalCustomerId_generate
clm
method
// connector-service/backend/common_utils/src/global_id/customer.rs // impl for GlobalCustomerId pub fn generate(cell_id: &CellId) -> Self { let global_id = super::GlobalId::generate(cell_id, super::GlobalEntity::Customer); Self(global_id) }
{ "chunk": null, "crate": "ucs_common_utils", "enum_name": null, "file_size": null, "for_type": "GlobalCustomerId", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate", "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_method_connector-integration_ConnectorData<T>_get_connector_by_name
clm
method
// connector-service/backend/connector-integration/src/types.rs // impl for ConnectorData<T> pub fn get_connector_by_name(connector_name: &ConnectorEnum) -> Self { let connector = Self::convert_connector(*connector_name); Self { connector, connector_name: *connector_name, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "ConnectorData<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_connector_by_name", "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_method_connector-integration_ConnectorData<T>_convert_connector
clm
method
// connector-service/backend/connector-integration/src/types.rs // impl for ConnectorData<T> fn convert_connector(connector_name: ConnectorEnum) -> BoxedConnector<T> { match connector_name { ConnectorEnum::Adyen => Box::new(Adyen::new()), ConnectorEnum::Razorpay => Box::new(Razorpay::new()), ConnectorEnum::RazorpayV2 => Box::new(RazorpayV2::new()), ConnectorEnum::Fiserv => Box::new(Fiserv::new()), ConnectorEnum::Elavon => Box::new(Elavon::new()), ConnectorEnum::Xendit => Box::new(Xendit::new()), ConnectorEnum::Checkout => Box::new(Checkout::new()), ConnectorEnum::Authorizedotnet => Box::new(Authorizedotnet::new()), ConnectorEnum::Mifinity => Box::new(Mifinity::new()), ConnectorEnum::Phonepe => Box::new(Phonepe::new()), ConnectorEnum::Cashfree => Box::new(Cashfree::new()), ConnectorEnum::Fiuu => Box::new(Fiuu::new()), ConnectorEnum::Payu => Box::new(Payu::new()), ConnectorEnum::Paytm => Box::new(Paytm::new()), ConnectorEnum::Cashtocode => Box::new(Cashtocode::new()), ConnectorEnum::Novalnet => Box::new(Novalnet::new()), ConnectorEnum::Nexinets => Box::new(Nexinets::new()), ConnectorEnum::Noon => Box::new(Noon::new()), ConnectorEnum::Volt => Box::new(Volt::new()), ConnectorEnum::Braintree => Box::new(Braintree::new()), ConnectorEnum::Bluecode => Box::new(Bluecode::new()), ConnectorEnum::Cryptopay => Box::new(Cryptopay::new()), ConnectorEnum::Helcim => Box::new(Helcim::new()), ConnectorEnum::Dlocal => Box::new(Dlocal::new()), ConnectorEnum::Placetopay => Box::new(Placetopay::new()), ConnectorEnum::Rapyd => Box::new(Rapyd::new()), ConnectorEnum::Aci => Box::new(Aci::new()), ConnectorEnum::Trustpay => Box::new(Trustpay::new()), ConnectorEnum::Stripe => Box::new(Stripe::new()), ConnectorEnum::Cybersource => Box::new(Cybersource::new()), ConnectorEnum::Worldpay => Box::new(Worldpay::new()), ConnectorEnum::Worldpayvantiv => Box::new(Worldpayvantiv::new()), ConnectorEnum::Payload => Box::new(Payload::new()), } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "ConnectorData<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "convert_connector", "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_method_connector-integration_Razorpay<T>_new
clm
method
// connector-service/backend/connector-integration/src/connectors/razorpay.rs // impl for Razorpay<T> pub const fn new() -> &'static Self { &Self { amount_converter: &common_utils::types::MinorUnitForConnector, _phantom: std::marker::PhantomData, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "Razorpay<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_connector-integration_RazorpayV2<T>_new
clm
method
// connector-service/backend/connector-integration/src/connectors/razorpayv2.rs // impl for RazorpayV2<T> pub const fn new() -> &'static Self { &Self { amount_converter: &common_utils::types::MinorUnitForConnector, _phantom: std::marker::PhantomData, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "RazorpayV2<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_connector-integration_PaymentsResponseScheme_new
clm
method
// connector-service/backend/connector-integration/src/connectors/worldpay/response.rs // impl for PaymentsResponseScheme pub fn new(reference: String) -> Self { Self { reference } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "PaymentsResponseScheme", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_connector-integration_WorldpayErrorResponse_default
clm
method
// connector-service/backend/connector-integration/src/connectors/worldpay/response.rs // impl for WorldpayErrorResponse pub fn default(status_code: u16) -> Self { match status_code { code @ 404 => Self { error_name: format!("{code} Not found"), message: "Resource not found".to_string(), validation_errors: None, }, code => Self { error_name: code.to_string(), message: "Unknown error".to_string(), validation_errors: None, }, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "WorldpayErrorResponse", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "default", "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_method_connector-integration_NovalnetSyncResponseTransactionData_get_token
clm
method
// connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs // impl for NovalnetSyncResponseTransactionData pub fn get_token(transaction_data: Option<&Self>) -> Option<String> { if let Some(data) = transaction_data { match &data.payment_data { Some(NovalnetResponsePaymentData::Card(card_data)) => { card_data.token.clone().map(|token| token.expose()) } Some(NovalnetResponsePaymentData::Paypal(paypal_data)) => { paypal_data.token.clone().map(|token| token.expose()) } None => None, } } else { None } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "NovalnetSyncResponseTransactionData", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_token", "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_method_connector-integration_AuthorizedotnetRawCardNumber<DefaultPCIHolder>_from_card_number_string
clm
method
// connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs // impl for AuthorizedotnetRawCardNumber<DefaultPCIHolder> pub fn from_card_number_string(card_number: String) -> Result<Self, Error> { let card_number = cards::CardNumber::from_str(&card_number) .change_context(ConnectorError::RequestEncodingFailed)?; Ok(AuthorizedotnetRawCardNumber(RawCardNumber(card_number))) }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "AuthorizedotnetRawCardNumber<DefaultPCIHolder>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "from_card_number_string", "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_method_connector-integration_AuthorizedotnetRawCardNumber<VaultTokenHolder>_from_token_string
clm
method
// connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs // impl for AuthorizedotnetRawCardNumber<VaultTokenHolder> pub fn from_token_string(token: String) -> Self { AuthorizedotnetRawCardNumber(RawCardNumber(token)) }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "AuthorizedotnetRawCardNumber<VaultTokenHolder>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "from_token_string", "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_method_connector-integration_RazorpayV2AuthType_generate_authorization_header
clm
method
// connector-service/backend/connector-integration/src/connectors/razorpayv2/transformers.rs // impl for RazorpayV2AuthType pub fn generate_authorization_header(&self) -> String { match self { RazorpayV2AuthType::AuthToken(token) => format!("Bearer {}", token.peek()), RazorpayV2AuthType::ApiKeySecret { api_key, api_secret, } => { let credentials = format!("{}:{}", api_key.peek(), api_secret.peek()); let encoded = STANDARD.encode(credentials); format!("Basic {encoded}") } } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "RazorpayV2AuthType", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate_authorization_header", "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_method_connector-integration_NoonOrderNvp_new
clm
method
// connector-service/backend/connector-integration/src/connectors/noon/transformers.rs // impl for NoonOrderNvp pub fn new(metadata: &serde_json::Value) -> Self { let metadata_as_string = metadata.to_string(); let hash_map: std::collections::BTreeMap<String, serde_json::Value> = serde_json::from_str(&metadata_as_string).unwrap_or(std::collections::BTreeMap::new()); let inner = hash_map .into_iter() .enumerate() .map(|(index, (hs_key, hs_value))| { let noon_key = format!("{}", index + 1); // to_string() function on serde_json::Value returns a string with "" quotes. Noon doesn't allow this. Hence get_value_as_string function let noon_value = format!("{hs_key}={}", get_value_as_string(&hs_value)); (noon_key, Secret::new(noon_value)) }) .collect(); Self { inner } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "NoonOrderNvp", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_connector-integration_RazorpayAuthType_generate_authorization_header
clm
method
// connector-service/backend/connector-integration/src/connectors/razorpay/transformers.rs // impl for RazorpayAuthType pub fn generate_authorization_header(&self) -> String { let auth_type_name = match self { RazorpayAuthType::AuthToken(_) => "AuthToken", RazorpayAuthType::ApiKeySecret { .. } => "ApiKeySecret", }; info!("Type of auth Token is {}", auth_type_name); match self { RazorpayAuthType::AuthToken(token) => format!("Bearer {}", token.peek()), RazorpayAuthType::ApiKeySecret { api_key, api_secret, } => { let credentials = format!("{}:{}", api_key.peek(), api_secret.peek()); let encoded = STANDARD.encode(credentials); format!("Basic {encoded}") } } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "RazorpayAuthType", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "generate_authorization_header", "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_method_connector-integration_uthorizeRouterData<T> { _om_with_converter(
clm
method
// connector-service/backend/connector-integration/src/connectors/paytm/transformers.rs // impl for uthorizeRouterData<T> { try_from_with_converter( item: &RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, amount_converter: &dyn AmountConvertor<Output = StringMajorUnit>, ) -> Result<Self, error_stack::Report<errors::ConnectorError>> { let amount = amount_converter .convert(item.request.minor_amount, item.request.currency) .change_context(errors::ConnectorError::AmountConversionFailed)?; let customer_id = item .resource_common_data .get_customer_id() .ok() .map(|id| id.get_string_repr().to_string()); let email = item.resource_common_data.get_optional_billing_email(); let phone = item .resource_common_data .get_optional_billing_phone_number(); let first_name = item.resource_common_data.get_optional_billing_first_name(); let last_name = item.resource_common_data.get_optional_billing_last_name(); // Extract session token from previous session token response let session_token = item.resource_common_data.get_session_token()?; Ok(Self { amount, currency: item.request.currency, payment_id: item .resource_common_data .connector_request_reference_id .clone(), session_token: Secret::new(session_token), payment_method_data: item.request.payment_method_data.clone(), customer_id, email, phone, first_name, last_name, return_url: item.resource_common_data.get_return_url(), }) } } //
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "uthorizeRouterData<T> {\n ", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "om_with_converter(\n ", "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_method_connector-integration_ransactionStatusRequest { _om_with_auth(
clm
method
// connector-service/backend/connector-integration/src/connectors/paytm/transformers.rs // impl for ransactionStatusRequest { try_from_with_auth( item: &PaytmSyncRouterData, auth: &PaytmAuthType, ) -> CustomResult<Self, errors::ConnectorError> { let body = PaytmTransactionStatusReqBody { mid: Secret::new(auth.merchant_id.peek().to_string()), order_id: item.payment_id.clone(), txn_type: item.txn_type.clone(), }; // Create header with actual signature let head = create_paytm_header(&body, auth)?; Ok(Self { head, body }) } } //
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "ransactionStatusRequest {\n ", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "om_with_auth(\n ", "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_method_connector-integration_StripeChargeEnum_get_overcapture_status
clm
method
// connector-service/backend/connector-integration/src/connectors/stripe/transformers.rs // impl for StripeChargeEnum pub fn get_overcapture_status(&self) -> Option<bool> { match self { Self::ChargeObject(charge_object) => charge_object .payment_method_details .as_ref() .and_then(|payment_method_details| match payment_method_details { StripePaymentMethodDetailsResponse::Card { card } => card .overcapture .as_ref() .and_then(|overcapture| match overcapture.status { Some(StripeOvercaptureStatus::Available) => Some(true), Some(StripeOvercaptureStatus::Unavailable) => Some(false), None => None, }), _ => None, }), _ => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "StripeChargeEnum", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_overcapture_status", "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_method_connector-integration_StripeChargeEnum_get_maximum_capturable_amount
clm
method
// connector-service/backend/connector-integration/src/connectors/stripe/transformers.rs // impl for StripeChargeEnum pub fn get_maximum_capturable_amount(&self) -> Option<MinorUnit> { match self { Self::ChargeObject(charge_object) => { if let Some(payment_method_details) = charge_object.payment_method_details.as_ref() { match payment_method_details { StripePaymentMethodDetailsResponse::Card { card } => card .overcapture .as_ref() .and_then(|overcapture| overcapture.maximum_amount_capturable), _ => None, } } else { None } } _ => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "StripeChargeEnum", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_maximum_capturable_amount", "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_method_connector-integration_StripePaymentMethodDetailsResponse_get_additional_payment_method_data
clm
method
// connector-service/backend/connector-integration/src/connectors/stripe/transformers.rs // impl for StripePaymentMethodDetailsResponse pub fn get_additional_payment_method_data(&self) -> Option<AdditionalPaymentMethodDetails> { match self { Self::Card { card } => Some(AdditionalPaymentMethodDetails { payment_checks: card.checks.clone(), authentication_details: card.three_d_secure.clone(), extended_authorization: card.extended_authorization.clone(), capture_before: card.capture_before, }), Self::Ideal { .. } | Self::Bancontact { .. } | Self::Blik | Self::Eps | Self::Fpx | Self::Giropay | Self::Przelewy24 | Self::Klarna | Self::Affirm | Self::AfterpayClearpay | Self::AmazonPay | Self::ApplePay | Self::Ach | Self::Sepa | Self::Becs | Self::Bacs | Self::Wechatpay | Self::Alipay | Self::CustomerBalance | Self::RevolutPay | Self::Cashapp { .. } => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "StripePaymentMethodDetailsResponse", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_additional_payment_method_data", "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_method_connector-integration_StripeNextActionResponse_get_url
clm
method
// connector-service/backend/connector-integration/src/connectors/stripe/transformers.rs // impl for StripeNextActionResponse fn get_url(&self) -> Option<url::Url> { match self { Self::RedirectToUrl(redirect_to_url) | Self::AlipayHandleRedirect(redirect_to_url) => { Some(redirect_to_url.url.to_owned()) } Self::WechatPayDisplayQrCode(_) => None, Self::VerifyWithMicrodeposits(verify_with_microdeposits) => { Some(verify_with_microdeposits.hosted_verification_url.to_owned()) } Self::CashappHandleRedirectOrDisplayQrCode(_) => None, Self::DisplayBankTransferInstructions(_) => None, Self::MultibancoDisplayDetails(_) => None, Self::NoNextActionBody => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": "StripeNextActionResponse", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_url", "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_method_tracing-kafka_KafkaLayer_boxed
clm
method
// connector-service/backend/tracing-kafka/src/layer.rs // impl for KafkaLayer pub fn boxed<S>(self) -> Box<dyn Layer<S> + Send + Sync + 'static> where Self: Layer<S> + Sized + Send + Sync + 'static, S: Subscriber + for<'span> tracing_subscriber::registry::LookupSpan<'span>, { Box::new(self) }
{ "chunk": null, "crate": "tracing-kafka", "enum_name": null, "file_size": null, "for_type": "KafkaLayer", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "boxed", "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_method_ucs_common_enums_PaymentMethodType_should_check_for_customer_saved_payment_method_type
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for PaymentMethodType pub fn should_check_for_customer_saved_payment_method_type(self) -> bool { matches!(self, Self::Credit | Self::Debit) }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "PaymentMethodType", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "should_check_for_customer_saved_payment_method_type", "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_method_ucs_common_enums_PaymentMethodType_to_display_name
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for PaymentMethodType pub fn to_display_name(&self) -> String { match self { Self::ApplePay => "Apple Pay".to_string(), Self::GooglePay => "Google Pay".to_string(), Self::SamsungPay => "Samsung Pay".to_string(), Self::AliPay => "AliPay".to_string(), Self::WeChatPay => "WeChat Pay".to_string(), Self::KakaoPay => "Kakao Pay".to_string(), Self::GoPay => "GoPay".to_string(), Self::Gcash => "GCash".to_string(), _ => format!("{self:?}"), } }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "PaymentMethodType", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "to_display_name", "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_method_ucs_common_enums_AttemptStatus_is_terminal_status
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for AttemptStatus pub fn is_terminal_status(self) -> bool { matches!( self, Self::Charged | Self::AutoRefunded | Self::Voided | Self::VoidedPostCapture | Self::PartialCharged | Self::AuthenticationFailed | Self::AuthorizationFailed | Self::VoidFailed | Self::CaptureFailed | Self::Failure | Self::IntegrityFailure ) }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "AttemptStatus", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "is_terminal_status", "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_method_ucs_common_enums_CardNetwork_is_global_network
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for CardNetwork pub fn is_global_network(&self) -> bool { matches!( self, Self::Visa | Self::Mastercard | Self::AmericanExpress | Self::JCB | Self::DinersClub | Self::Discover | Self::CartesBancaires | Self::UnionPay ) }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "CardNetwork", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "is_global_network", "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_method_ucs_common_enums_CardNetwork_is_us_local_network
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for CardNetwork pub fn is_us_local_network(&self) -> bool { matches!(self, Self::Star | Self::Pulse | Self::Accel | Self::Nyce) }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "CardNetwork", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "is_us_local_network", "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_method_ucs_common_enums_ApiClientError_is_upstream_timeout
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for ApiClientError pub fn is_upstream_timeout(&self) -> bool { self == &Self::RequestTimeoutReceived }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "ApiClientError", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "is_upstream_timeout", "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_method_ucs_common_enums_ApiClientError_is_connection_closed_before_message_could_complete
clm
method
// connector-service/backend/common_enums/src/enums.rs // impl for ApiClientError pub fn is_connection_closed_before_message_could_complete(&self) -> bool { self == &Self::ConnectionClosedIncompleteMessage }
{ "chunk": null, "crate": "ucs_common_enums", "enum_name": null, "file_size": null, "for_type": "ApiClientError", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "is_connection_closed_before_message_could_complete", "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_method_ucs_cards_NetworkToken_get_card_isin
clm
method
// connector-service/backend/cards/src/validate.rs // impl for NetworkToken pub fn get_card_isin(&self) -> String { self.0.peek().chars().take(6).collect::<String>() }
{ "chunk": null, "crate": "ucs_cards", "enum_name": null, "file_size": null, "for_type": "NetworkToken", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_card_isin", "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_method_ucs_cards_NetworkToken_get_extended_card_bin
clm
method
// connector-service/backend/cards/src/validate.rs // impl for NetworkToken pub fn get_extended_card_bin(&self) -> String { self.0.peek().chars().take(8).collect::<String>() }
{ "chunk": null, "crate": "ucs_cards", "enum_name": null, "file_size": null, "for_type": "NetworkToken", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_extended_card_bin", "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_method_ucs_cards_NetworkToken_get_card_no
clm
method
// connector-service/backend/cards/src/validate.rs // impl for NetworkToken pub fn get_card_no(&self) -> String { self.0.peek().chars().collect::<String>() }
{ "chunk": null, "crate": "ucs_cards", "enum_name": null, "file_size": null, "for_type": "NetworkToken", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_card_no", "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_method_ucs_cards_NetworkToken_get_last4
clm
method
// connector-service/backend/cards/src/validate.rs // impl for NetworkToken pub fn get_last4(&self) -> String { self.0 .peek() .chars() .rev() .take(4) .collect::<String>() .chars() .rev() .collect::<String>() }
{ "chunk": null, "crate": "ucs_cards", "enum_name": null, "file_size": null, "for_type": "NetworkToken", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_last4", "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_method_ucs_cards_CardExpirationMonth_two_digits
clm
method
// connector-service/backend/cards/src/validate.rs // impl for CardExpirationMonth pub fn two_digits(&self) -> String { format!("{:02}", self.0.peek()) }
{ "chunk": null, "crate": "ucs_cards", "enum_name": null, "file_size": null, "for_type": "CardExpirationMonth", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "two_digits", "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_method_ucs_cards_CardExpirationYear_get_year
clm
method
// connector-service/backend/cards/src/validate.rs // impl for CardExpirationYear pub fn get_year(&self) -> u16 { *self.0.peek() }
{ "chunk": null, "crate": "ucs_cards", "enum_name": null, "file_size": null, "for_type": "CardExpirationYear", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_year", "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_method_external-services_GrpcMetricsService<S>_new
clm
method
// connector-service/backend/external-services/src/shared_metrics.rs // impl for GrpcMetricsService<S> pub fn new(inner: S) -> Self { Self { inner } }
{ "chunk": null, "crate": "external-services", "enum_name": null, "file_size": null, "for_type": "GrpcMetricsService<S>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_domain_types_BrowserInformation_get_ip_address
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_ip_address(&self) -> Result<Secret<String, IpAddress>, Error> { let ip_address = self .ip_address .ok_or_else(utils::missing_field_err("browser_info.ip_address"))?; Ok(Secret::new(ip_address.to_string())) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_ip_address", "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_method_domain_types_BrowserInformation_get_accept_header
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_accept_header(&self) -> Result<String, Error> { self.accept_header .clone() .ok_or_else(utils::missing_field_err("browser_info.accept_header")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_accept_header", "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_method_domain_types_BrowserInformation_get_language
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_language(&self) -> Result<String, Error> { self.language .clone() .ok_or_else(utils::missing_field_err("browser_info.language")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_language", "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_method_domain_types_BrowserInformation_get_screen_height
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_screen_height(&self) -> Result<u32, Error> { self.screen_height .ok_or_else(utils::missing_field_err("browser_info.screen_height")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_screen_height", "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_method_domain_types_BrowserInformation_get_screen_width
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_screen_width(&self) -> Result<u32, Error> { self.screen_width .ok_or_else(utils::missing_field_err("browser_info.screen_width")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_screen_width", "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_method_domain_types_BrowserInformation_get_color_depth
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_color_depth(&self) -> Result<u8, Error> { self.color_depth .ok_or_else(utils::missing_field_err("browser_info.color_depth")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_color_depth", "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_method_domain_types_BrowserInformation_get_user_agent
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_user_agent(&self) -> Result<String, Error> { self.user_agent .clone() .ok_or_else(utils::missing_field_err("browser_info.user_agent")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_user_agent", "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_method_domain_types_BrowserInformation_get_time_zone
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_time_zone(&self) -> Result<i32, Error> { self.time_zone .ok_or_else(utils::missing_field_err("browser_info.time_zone")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_time_zone", "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_method_domain_types_BrowserInformation_get_java_enabled
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_java_enabled(&self) -> Result<bool, Error> { self.java_enabled .ok_or_else(utils::missing_field_err("browser_info.java_enabled")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_java_enabled", "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_method_domain_types_BrowserInformation_get_java_script_enabled
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_java_script_enabled(&self) -> Result<bool, Error> { self.java_script_enabled .ok_or_else(utils::missing_field_err("browser_info.java_script_enabled")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_java_script_enabled", "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_method_domain_types_BrowserInformation_get_referer
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for BrowserInformation pub fn get_referer(&self) -> Result<String, Error> { self.referer .clone() .ok_or_else(utils::missing_field_err("browser_info.referer")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "BrowserInformation", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_referer", "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_method_domain_types_ConnectorCustomerData<T>_get_email
clm
method
// connector-service/backend/domain_types/src/router_request_types.rs // impl for ConnectorCustomerData<T> pub fn get_email(&self) -> Result<Email, Error> { self.email .clone() .ok_or_else(utils::missing_field_err("email")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "ConnectorCustomerData<T>", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_email", "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_method_domain_types_ConnectorParams_new
clm
method
// connector-service/backend/domain_types/src/types.rs // impl for ConnectorParams pub fn new(base_url: String, dispute_base_url: Option<String>) -> Self { Self { base_url, dispute_base_url, secondary_base_url: None, } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "ConnectorParams", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_domain_types_PaymentAddress_new
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PaymentAddress pub fn new( shipping: Option<Address>, billing: Option<Address>, payment_method_billing: Option<Address>, should_unify_address: Option<bool>, ) -> Self { // billing -> .billing, this is the billing details passed in the root of payments request // payment_method_billing -> .payment_method_data.billing let unified_payment_method_billing = if should_unify_address.unwrap_or(true) { // Merge the billing details field from both `payment.billing` and `payment.payment_method_data.billing` // The unified payment_method_billing will be used as billing address and passed to the connector module // This unification is required in order to provide backwards compatibility // so that if `payment.billing` is passed it should be sent to the connector module // Unify the billing details with `payment_method_data.billing` payment_method_billing .as_ref() .map(|payment_method_billing| { payment_method_billing .clone() .unify_address(billing.as_ref()) }) .or(billing.clone()) } else { payment_method_billing.clone() }; Self { shipping, billing, unified_payment_method_billing, payment_method_billing, } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PaymentAddress", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "new", "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_method_domain_types_PaymentAddress_get_shipping
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PaymentAddress pub fn get_shipping(&self) -> Option<&Address> { self.shipping.as_ref() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PaymentAddress", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_shipping", "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_method_domain_types_PaymentAddress_get_payment_method_billing
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PaymentAddress pub fn get_payment_method_billing(&self) -> Option<&Address> { self.unified_payment_method_billing.as_ref() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PaymentAddress", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_payment_method_billing", "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_method_domain_types_PaymentAddress_unify_with_payment_method_data_billing
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PaymentAddress pub fn unify_with_payment_method_data_billing( self, payment_method_data_billing: Option<Address>, ) -> Self { // Unify the billing details with `payment_method_data.billing_details` let unified_payment_method_billing = payment_method_data_billing .map(|payment_method_data_billing| { payment_method_data_billing.unify_address(self.get_payment_method_billing()) }) .or(self.get_payment_method_billing().cloned()); Self { shipping: self.shipping, billing: self.billing, unified_payment_method_billing, payment_method_billing: self.payment_method_billing, } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PaymentAddress", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "unify_with_payment_method_data_billing", "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_method_domain_types_PaymentAddress_get_request_payment_method_billing
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PaymentAddress pub fn get_request_payment_method_billing(&self) -> Option<&Address> { self.payment_method_billing.as_ref() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PaymentAddress", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_request_payment_method_billing", "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_method_domain_types_PaymentAddress_get_payment_billing
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PaymentAddress pub fn get_payment_billing(&self) -> Option<&Address> { self.billing.as_ref() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PaymentAddress", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_payment_billing", "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_method_domain_types_Address_unify_address
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for Address pub fn unify_address(self, other: Option<&Self>) -> Self { let other_address_details = other.and_then(|address| address.address.as_ref()); Self { address: self .address .map(|address| address.unify_address_details(other_address_details)) .or(other_address_details.cloned()), email: self.email.or(other.and_then(|other| other.email.clone())), phone: self.phone.or(other.and_then(|other| other.phone.clone())), } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "unify_address", "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_method_domain_types_Address_get_email
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for Address 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": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_email", "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_method_domain_types_Address_get_phone_with_country_code
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for Address pub fn get_phone_with_country_code( &self, ) -> Result<Secret<String>, error_stack::Report<crate::errors::ConnectorError>> { self.phone .clone() .map(|phone_details| phone_details.get_number_with_country_code()) .transpose()? .ok_or_else(missing_field_err("phone")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_phone_with_country_code", "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_method_domain_types_AddressDetails_get_optional_full_name
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_optional_full_name(&self) -> Option<Secret<String>> { match (self.first_name.as_ref(), self.last_name.as_ref()) { (Some(first_name), Some(last_name)) => Some(Secret::new(format!( "{} {}", first_name.peek(), last_name.peek() ))), (Some(name), None) | (None, Some(name)) => Some(name.to_owned()), _ => None, } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_optional_full_name", "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_method_domain_types_AddressDetails_get_optional_first_name
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_optional_first_name(&self) -> Option<Secret<String>> { self.first_name.clone() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_optional_first_name", "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_method_domain_types_AddressDetails_get_optional_last_name
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_optional_last_name(&self) -> Option<Secret<String>> { self.last_name.clone() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_optional_last_name", "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_method_domain_types_AddressDetails_unify_address_details
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn unify_address_details(self, other: Option<&Self>) -> Self { if let Some(other) = other { let (first_name, last_name) = if self .first_name .as_ref() .is_some_and(|first_name| !first_name.is_empty_after_trim()) { (self.first_name, self.last_name) } else { (other.first_name.clone(), other.last_name.clone()) }; Self { first_name, last_name, city: self.city.or(other.city.clone()), country: self.country.or(other.country), line1: self.line1.or(other.line1.clone()), line2: self.line2.or(other.line2.clone()), line3: self.line3.or(other.line3.clone()), zip: self.zip.or(other.zip.clone()), state: self.state.or(other.state.clone()), } } else { self } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "unify_address_details", "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_method_domain_types_AddressDetails_get_optional_country
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_optional_country(&self) -> Option<common_enums::CountryAlpha2> { self.country }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_optional_country", "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_method_domain_types_AddressDetails_get_first_name
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_first_name(&self) -> Result<&Secret<String>, Error> { self.first_name .as_ref() .ok_or_else(missing_field_err("address.first_name")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_first_name", "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_method_domain_types_AddressDetails_get_last_name
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_last_name(&self) -> Result<&Secret<String>, Error> { self.last_name .as_ref() .ok_or_else(missing_field_err("address.last_name")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_last_name", "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_method_domain_types_AddressDetails_get_full_name
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_full_name(&self) -> Result<Secret<String>, Error> { let first_name = self.get_first_name()?.peek().to_owned(); let last_name = self .get_last_name() .ok() .cloned() .unwrap_or(Secret::new("".to_string())); let last_name = last_name.peek(); let full_name = format!("{first_name} {last_name}").trim().to_string(); Ok(Secret::new(full_name)) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_full_name", "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_method_domain_types_AddressDetails_get_line1
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_line1(&self) -> Result<&Secret<String>, Error> { self.line1 .as_ref() .ok_or_else(missing_field_err("address.line1")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_line1", "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_method_domain_types_AddressDetails_get_city
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_city(&self) -> Result<&String, Error> { self.city .as_ref() .ok_or_else(missing_field_err("address.city")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_city", "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_method_domain_types_AddressDetails_get_state
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_state(&self) -> Result<&Secret<String>, Error> { self.state .as_ref() .ok_or_else(missing_field_err("address.state")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_state", "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_method_domain_types_AddressDetails_get_line2
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_line2(&self) -> Result<&Secret<String>, Error> { self.line2 .as_ref() .ok_or_else(missing_field_err("address.line2")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_line2", "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_method_domain_types_AddressDetails_get_zip
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_zip(&self) -> Result<&Secret<String>, Error> { self.zip .as_ref() .ok_or_else(missing_field_err("address.zip")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_zip", "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_method_domain_types_AddressDetails_get_country
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_country(&self) -> Result<&common_enums::CountryAlpha2, Error> { self.country .as_ref() .ok_or_else(missing_field_err("address.country")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_country", "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_method_domain_types_AddressDetails_get_combined_address_line
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub 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": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_combined_address_line", "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_method_domain_types_AddressDetails_get_optional_line2
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn get_optional_line2(&self) -> Option<Secret<String>> { self.line2.clone() }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_optional_line2", "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_method_domain_types_AddressDetails_to_state_code
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub fn to_state_code(&self) -> Result<Secret<String>, Error> { let country = self.get_country()?; let state = self.get_state()?; match country { common_enums::CountryAlpha2::US => Ok(Secret::new( convert_us_state_to_code(&state.peek().to_string()).to_string(), )), _ => Ok(state.clone()), } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "to_state_code", "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_method_domain_types_AddressDetails_to_state_code_as_optional
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for AddressDetails pub 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": "domain_types", "enum_name": null, "file_size": null, "for_type": "AddressDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "to_state_code_as_optional", "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_method_domain_types_PhoneDetails_get_country_code
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PhoneDetails pub 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": "domain_types", "enum_name": null, "file_size": null, "for_type": "PhoneDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_country_code", "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_method_domain_types_PhoneDetails_extract_country_code
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PhoneDetails pub fn extract_country_code(&self) -> Result<String, Error> { self.get_country_code() .map(|cc| cc.trim_start_matches('+').to_string()) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PhoneDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "extract_country_code", "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_method_domain_types_PhoneDetails_get_number
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PhoneDetails pub fn get_number(&self) -> Result<Secret<String>, Error> { self.number .clone() .ok_or_else(missing_field_err("billing.phone.number")) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": "PhoneDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_number", "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_method_domain_types_PhoneDetails_get_number_with_country_code
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PhoneDetails pub 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": "domain_types", "enum_name": null, "file_size": null, "for_type": "PhoneDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_number_with_country_code", "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_method_domain_types_PhoneDetails_get_number_with_hash_country_code
clm
method
// connector-service/backend/domain_types/src/payment_address.rs // impl for PhoneDetails pub 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": "domain_types", "enum_name": null, "file_size": null, "for_type": "PhoneDetails", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_number_with_hash_country_code", "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }