id
stringlengths
20
153
type
stringclasses
1 value
granularity
stringclasses
14 values
content
stringlengths
16
84.3k
metadata
dict
connector-service_snippet_-7881285798716424113_225_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } } } impl< T: PaymentMethodDataTypes + Default + Debug + Send + Eq + PartialEq + serde::Serialize + serde::de::DeserializeOwned + Clone + CardConversionHelper<T>, > ForeignTryFrom<grpc_api_types::payments::PaymentMethod> for PaymentMethodData<T> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethod, ) -> Result<Self, error_stack::Report<Self::Error>> { tracing::info!("PaymentMethod data received: {:?}", value); match value.payment_method { Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?;
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_225_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } } } impl< T: PaymentMethodDataTypes + Default + Debug + Send + Eq + PartialEq + serde::Serialize + serde::de::DeserializeOwned + Clone + CardConversionHelper<T>, > ForeignTryFrom<grpc_api_types::payments::PaymentMethod> for PaymentMethodData<T> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethod, ) -> Result<Self, error_stack::Report<Self::Error>> { tracing::info!("PaymentMethod data received: {:?}", value); match value.payment_method { Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card))}, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_card_redirect)) => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(card)) => { let x = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(x)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(card)) => { let x = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(x))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_250_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card))}, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_card_redirect)) => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_250_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card))}, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_card_redirect)) => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(card)) => { let x = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(x)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(card)) => { let x = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(x)) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_250_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(card)) => { let card = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(card))}, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_card_redirect)) => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(card)) => { let x = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(x)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(card)) => { let x = payment_method_data::Card::<T>::foreign_try_from(card)?; Ok(PaymentMethodData::Card(x)) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_token) => Ok( PaymentMethodData::CardToken(payment_method_data::CardToken { card_holder_name: None, card_cvc: None, }), ), grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect( upi_collect, ) => Ok(PaymentMethodData::Upi( payment_method_data::UpiData::UpiCollect(payment_method_data::UpiCollectData { vpa_id: upi_collect.vpa_id.map(|vpa| vpa.expose().into()), }), )), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_upi_intent) => { Ok(PaymentMethodData::Upi( payment_method_data::UpiData::UpiIntent(
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_275_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_token) => Ok( PaymentMethodData::CardToken(payment_method_data::CardToken { card_holder_name: None, card_cvc: None, }), ),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_275_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_token) => Ok( PaymentMethodData::CardToken(payment_method_data::CardToken { card_holder_name: None, card_cvc: None, }), ), grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect( upi_collect, ) => Ok(PaymentMethodData::Upi( payment_method_data::UpiData::UpiCollect(payment_method_data::UpiCollectData { vpa_id: upi_collect.vpa_id.map(|vpa| vpa.expose().into()), }), )), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_upi_intent) => { Ok(PaymentMethodData::Upi( payment_method_data::UpiData::UpiIntent( payment_method_data::UpiIntentData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_upi_qr) => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_275_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_token) => Ok( PaymentMethodData::CardToken(payment_method_data::CardToken { card_holder_name: None, card_cvc: None, }), ), grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect( upi_collect, ) => Ok(PaymentMethodData::Upi( payment_method_data::UpiData::UpiCollect(payment_method_data::UpiCollectData { vpa_id: upi_collect.vpa_id.map(|vpa| vpa.expose().into()), }), )), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_upi_intent) => { Ok(PaymentMethodData::Upi( payment_method_data::UpiData::UpiIntent( payment_method_data::UpiIntentData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_upi_qr) => { Ok(PaymentMethodData::Upi( crate::payment_method_data::UpiData::UpiQr( crate::payment_method_data::UpiQrData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::Reward(_) => { Ok(PaymentMethodData::Reward) }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => { match wallet_type.wallet_type { Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Bluecode(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::BluecodeRedirect{} ))}, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(mifinity_data)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::Mifinity( payment_method_data::MifinityData { date_of_birth: hyperswitch_masking::Secret::<time::Date>::foreign_try_from(mifinity_data.date_of_birth.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_DATE_OF_BIRTH".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_300_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs payment_method_data::UpiIntentData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_upi_qr) => { Ok(PaymentMethodData::Upi( crate::payment_method_data::UpiData::UpiQr( crate::payment_method_data::UpiQrData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::Reward(_) => { Ok(PaymentMethodData::Reward) }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_300_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs payment_method_data::UpiIntentData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_upi_qr) => { Ok(PaymentMethodData::Upi( crate::payment_method_data::UpiData::UpiQr( crate::payment_method_data::UpiQrData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::Reward(_) => { Ok(PaymentMethodData::Reward) }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => { match wallet_type.wallet_type { Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Bluecode(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::BluecodeRedirect{} ))}, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(mifinity_data)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::Mifinity( payment_method_data::MifinityData { date_of_birth: hyperswitch_masking::Secret::<time::Date>::foreign_try_from(mifinity_data.date_of_birth.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_DATE_OF_BIRTH".to_owned(), error_identifier: 400, error_message: "Missing Date of Birth".to_owned(), error_object: None, }) )?.expose())?,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_300_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs payment_method_data::UpiIntentData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_upi_qr) => { Ok(PaymentMethodData::Upi( crate::payment_method_data::UpiData::UpiQr( crate::payment_method_data::UpiQrData {}, ), )) } grpc_api_types::payments::payment_method::PaymentMethod::Reward(_) => { Ok(PaymentMethodData::Reward) }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => { match wallet_type.wallet_type { Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Bluecode(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::BluecodeRedirect{} ))}, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(mifinity_data)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::Mifinity( payment_method_data::MifinityData { date_of_birth: hyperswitch_masking::Secret::<time::Date>::foreign_try_from(mifinity_data.date_of_birth.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_DATE_OF_BIRTH".to_owned(), error_identifier: 400, error_message: "Missing Date of Birth".to_owned(), error_object: None, }) )?.expose())?, language_preference: mifinity_data.language_preference, } ))) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(apple_wallet)) => { let payment_data = apple_wallet.payment_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(), error_object: None, }) })?; let applepay_payment_data = match payment_data.payment_data { Some(grpc_api_types::payments::apple_wallet::payment_data::PaymentData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::ApplePayPaymentData::Encrypted(encrypted_data)) }, Some(grpc_api_types::payments::apple_wallet::payment_data::PaymentData::DecryptedData(decrypted_data)) => { Ok(payment_method_data::ApplePayPaymentData::Decrypted(
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_325_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Missing Date of Birth".to_owned(), error_object: None, }) )?.expose())?, language_preference: mifinity_data.language_preference, } ))) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(apple_wallet)) => { let payment_data = apple_wallet.payment_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_325_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Missing Date of Birth".to_owned(), error_object: None, }) )?.expose())?, language_preference: mifinity_data.language_preference, } ))) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(apple_wallet)) => { let payment_data = apple_wallet.payment_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(), error_object: None, }) })?; let applepay_payment_data = match payment_data.payment_data { Some(grpc_api_types::payments::apple_wallet::payment_data::PaymentData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::ApplePayPaymentData::Encrypted(encrypted_data)) }, Some(grpc_api_types::payments::apple_wallet::payment_data::PaymentData::DecryptedData(decrypted_data)) => { Ok(payment_method_data::ApplePayPaymentData::Decrypted( payment_method_data::ApplePayPredecryptData { application_primary_account_number: cards::CardNumber::from_str(&decrypted_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_325_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Missing Date of Birth".to_owned(), error_object: None, }) )?.expose())?, language_preference: mifinity_data.language_preference, } ))) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(apple_wallet)) => { let payment_data = apple_wallet.payment_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(), error_object: None, }) })?; let applepay_payment_data = match payment_data.payment_data { Some(grpc_api_types::payments::apple_wallet::payment_data::PaymentData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::ApplePayPaymentData::Encrypted(encrypted_data)) }, Some(grpc_api_types::payments::apple_wallet::payment_data::PaymentData::DecryptedData(decrypted_data)) => { Ok(payment_method_data::ApplePayPaymentData::Decrypted( payment_method_data::ApplePayPredecryptData { application_primary_account_number: cards::CardNumber::from_str(&decrypted_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Invalid card number in Apple Pay data".to_owned(), error_object: None, }) )?, application_expiration_month: Secret::new(decrypted_data.application_expiration_month), application_expiration_year: Secret::new(decrypted_data.application_expiration_year), payment_data: payment_method_data::ApplePayCryptogramData { online_payment_cryptogram: Secret::new(decrypted_data.payment_data.clone().map(|pd| pd.online_payment_cryptogram).unwrap_or_default()), eci_indicator: decrypted_data.payment_data.map(|pd| pd.eci_indicator), }, } )) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(), error_object: None, }))) }?;
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_350_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs payment_method_data::ApplePayPredecryptData { application_primary_account_number: cards::CardNumber::from_str(&decrypted_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Invalid card number in Apple Pay data".to_owned(), error_object: None, }) )?, application_expiration_month: Secret::new(decrypted_data.application_expiration_month), application_expiration_year: Secret::new(decrypted_data.application_expiration_year), payment_data: payment_method_data::ApplePayCryptogramData { online_payment_cryptogram: Secret::new(decrypted_data.payment_data.clone().map(|pd| pd.online_payment_cryptogram).unwrap_or_default()), eci_indicator: decrypted_data.payment_data.map(|pd| pd.eci_indicator), },
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_350_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs payment_method_data::ApplePayPredecryptData { application_primary_account_number: cards::CardNumber::from_str(&decrypted_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Invalid card number in Apple Pay data".to_owned(), error_object: None, }) )?, application_expiration_month: Secret::new(decrypted_data.application_expiration_month), application_expiration_year: Secret::new(decrypted_data.application_expiration_year), payment_data: payment_method_data::ApplePayCryptogramData { online_payment_cryptogram: Secret::new(decrypted_data.payment_data.clone().map(|pd| pd.online_payment_cryptogram).unwrap_or_default()), eci_indicator: decrypted_data.payment_data.map(|pd| pd.eci_indicator), }, } )) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(), error_object: None, }))) }?; let payment_method = apple_wallet.payment_method.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_METHOD".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_350_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs payment_method_data::ApplePayPredecryptData { application_primary_account_number: cards::CardNumber::from_str(&decrypted_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Invalid card number in Apple Pay data".to_owned(), error_object: None, }) )?, application_expiration_month: Secret::new(decrypted_data.application_expiration_month), application_expiration_year: Secret::new(decrypted_data.application_expiration_year), payment_data: payment_method_data::ApplePayCryptogramData { online_payment_cryptogram: Secret::new(decrypted_data.payment_data.clone().map(|pd| pd.online_payment_cryptogram).unwrap_or_default()), eci_indicator: decrypted_data.payment_data.map(|pd| pd.eci_indicator), }, } )) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_DATA".to_owned(), error_identifier: 400, error_message: "Apple Pay payment data is required".to_owned(), error_object: None, }))) }?; let payment_method = apple_wallet.payment_method.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Apple Pay payment method is required".to_owned(), error_object: None, }) })?; let wallet_data = payment_method_data::ApplePayWalletData { payment_data: applepay_payment_data, payment_method: payment_method_data::ApplepayPaymentMethod { display_name: payment_method.display_name, network: payment_method.network, pm_type: payment_method.r#type, }, transaction_identifier: apple_wallet.transaction_identifier, }; Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::ApplePay(wallet_data))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(google_wallet)) => { let info = google_wallet.info.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_INFO".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_375_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs let payment_method = apple_wallet.payment_method.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Apple Pay payment method is required".to_owned(), error_object: None, }) })?; let wallet_data = payment_method_data::ApplePayWalletData { payment_data: applepay_payment_data, payment_method: payment_method_data::ApplepayPaymentMethod { display_name: payment_method.display_name, network: payment_method.network,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_375_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs let payment_method = apple_wallet.payment_method.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Apple Pay payment method is required".to_owned(), error_object: None, }) })?; let wallet_data = payment_method_data::ApplePayWalletData { payment_data: applepay_payment_data, payment_method: payment_method_data::ApplepayPaymentMethod { display_name: payment_method.display_name, network: payment_method.network, pm_type: payment_method.r#type, }, transaction_identifier: apple_wallet.transaction_identifier, }; Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::ApplePay(wallet_data))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(google_wallet)) => { let info = google_wallet.info.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_INFO".to_owned(), error_identifier: 400, error_message: "Google Pay payment method info is required".to_owned(), error_object: None, }) })?;
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_375_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs let payment_method = apple_wallet.payment_method.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_APPLE_PAY_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Apple Pay payment method is required".to_owned(), error_object: None, }) })?; let wallet_data = payment_method_data::ApplePayWalletData { payment_data: applepay_payment_data, payment_method: payment_method_data::ApplepayPaymentMethod { display_name: payment_method.display_name, network: payment_method.network, pm_type: payment_method.r#type, }, transaction_identifier: apple_wallet.transaction_identifier, }; Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::ApplePay(wallet_data))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(google_wallet)) => { let info = google_wallet.info.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_INFO".to_owned(), error_identifier: 400, error_message: "Google Pay payment method info is required".to_owned(), error_object: None, }) })?; let tokenization_data = google_wallet.tokenization_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data is required".to_owned(), error_object: None, }) })?; // Handle the new oneof tokenization_data structure let gpay_tokenization_data = match tokenization_data.tokenization_data { Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::DecryptedData(predecrypt_data)) => { Ok(payment_method_data::GpayTokenizationData::Decrypted( payment_method_data::GPayPredecryptData { card_exp_month: Secret::new(predecrypt_data.card_exp_month), card_exp_year: Secret::new(predecrypt_data.card_exp_year), application_primary_account_number: cards::CardNumber::from_str(&predecrypt_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_400_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Google Pay payment method info is required".to_owned(), error_object: None, }) })?; let tokenization_data = google_wallet.tokenization_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data is required".to_owned(), error_object: None, }) })?;
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 400, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_400_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Google Pay payment method info is required".to_owned(), error_object: None, }) })?; let tokenization_data = google_wallet.tokenization_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data is required".to_owned(), error_object: None, }) })?; // Handle the new oneof tokenization_data structure let gpay_tokenization_data = match tokenization_data.tokenization_data { Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::DecryptedData(predecrypt_data)) => { Ok(payment_method_data::GpayTokenizationData::Decrypted( payment_method_data::GPayPredecryptData { card_exp_month: Secret::new(predecrypt_data.card_exp_month), card_exp_year: Secret::new(predecrypt_data.card_exp_year), application_primary_account_number: cards::CardNumber::from_str(&predecrypt_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Invalid card number in Google Pay predecrypted data".to_owned(), error_object: None, }) )?,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 400, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_400_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Google Pay payment method info is required".to_owned(), error_object: None, }) })?; let tokenization_data = google_wallet.tokenization_data.ok_or_else(|| { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data is required".to_owned(), error_object: None, }) })?; // Handle the new oneof tokenization_data structure let gpay_tokenization_data = match tokenization_data.tokenization_data { Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::DecryptedData(predecrypt_data)) => { Ok(payment_method_data::GpayTokenizationData::Decrypted( payment_method_data::GPayPredecryptData { card_exp_month: Secret::new(predecrypt_data.card_exp_month), card_exp_year: Secret::new(predecrypt_data.card_exp_year), application_primary_account_number: cards::CardNumber::from_str(&predecrypt_data.application_primary_account_number).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Invalid card number in Google Pay predecrypted data".to_owned(), error_object: None, }) )?, cryptogram: Some(Secret::new(predecrypt_data.cryptogram)), eci_indicator: predecrypt_data.eci_indicator, } )) }, Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::GpayTokenizationData::Encrypted( payment_method_data::GpayEcryptedTokenizationData { token_type: encrypted_data.token_type, token: encrypted_data.token, } )) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data variant is required".to_owned(), error_object: None, }))) }?;
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 400, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_425_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Invalid card number in Google Pay predecrypted data".to_owned(), error_object: None, }) )?, cryptogram: Some(Secret::new(predecrypt_data.cryptogram)), eci_indicator: predecrypt_data.eci_indicator, } )) }, Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::GpayTokenizationData::Encrypted( payment_method_data::GpayEcryptedTokenizationData { token_type: encrypted_data.token_type, token: encrypted_data.token,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 425, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_425_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Invalid card number in Google Pay predecrypted data".to_owned(), error_object: None, }) )?, cryptogram: Some(Secret::new(predecrypt_data.cryptogram)), eci_indicator: predecrypt_data.eci_indicator, } )) }, Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::GpayTokenizationData::Encrypted( payment_method_data::GpayEcryptedTokenizationData { token_type: encrypted_data.token_type, token: encrypted_data.token, } )) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data variant is required".to_owned(), error_object: None, }))) }?; let wallet_data = payment_method_data::GooglePayWalletData { pm_type: google_wallet.r#type, description: google_wallet.description, info: payment_method_data::GooglePayPaymentMethodInfo {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 425, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_425_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "Invalid card number in Google Pay predecrypted data".to_owned(), error_object: None, }) )?, cryptogram: Some(Secret::new(predecrypt_data.cryptogram)), eci_indicator: predecrypt_data.eci_indicator, } )) }, Some(grpc_api_types::payments::google_wallet::tokenization_data::TokenizationData::EncryptedData(encrypted_data)) => { Ok(payment_method_data::GpayTokenizationData::Encrypted( payment_method_data::GpayEcryptedTokenizationData { token_type: encrypted_data.token_type, token: encrypted_data.token, } )) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_GOOGLE_PAY_TOKENIZATION_DATA".to_owned(), error_identifier: 400, error_message: "Google Pay tokenization data variant is required".to_owned(), error_object: None, }))) }?; let wallet_data = payment_method_data::GooglePayWalletData { pm_type: google_wallet.r#type, description: google_wallet.description, info: payment_method_data::GooglePayPaymentMethodInfo { card_network: info.card_network, card_details: info.card_details, assurance_details: info.assurance_details.map(|details| { payment_method_data::GooglePayAssuranceDetails { card_holder_authenticated: details.card_holder_authenticated, account_verified: details.account_verified, } }), }, tokenization_data: gpay_tokenization_data, }; Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::GooglePay(wallet_data))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AmazonPayRedirect(Box::new(payment_method_data::AmazonPayRedirectData {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::CashappQr(Box::new(payment_method_data::CashappQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 425, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_450_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs let wallet_data = payment_method_data::GooglePayWalletData { pm_type: google_wallet.r#type, description: google_wallet.description, info: payment_method_data::GooglePayPaymentMethodInfo { card_network: info.card_network, card_details: info.card_details, assurance_details: info.assurance_details.map(|details| { payment_method_data::GooglePayAssuranceDetails { card_holder_authenticated: details.card_holder_authenticated, account_verified: details.account_verified, } }), }, tokenization_data: gpay_tokenization_data,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 450, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_450_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs let wallet_data = payment_method_data::GooglePayWalletData { pm_type: google_wallet.r#type, description: google_wallet.description, info: payment_method_data::GooglePayPaymentMethodInfo { card_network: info.card_network, card_details: info.card_details, assurance_details: info.assurance_details.map(|details| { payment_method_data::GooglePayAssuranceDetails { card_holder_authenticated: details.card_holder_authenticated, account_verified: details.account_verified, } }), }, tokenization_data: gpay_tokenization_data, }; Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::GooglePay(wallet_data))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AmazonPayRedirect(Box::new(payment_method_data::AmazonPayRedirectData {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::CashappQr(Box::new(payment_method_data::CashappQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::RevolutPay(payment_method_data::RevolutPayData {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AliPayRedirect(payment_method_data::AliPayRedirection {}))) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 450, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_450_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs let wallet_data = payment_method_data::GooglePayWalletData { pm_type: google_wallet.r#type, description: google_wallet.description, info: payment_method_data::GooglePayPaymentMethodInfo { card_network: info.card_network, card_details: info.card_details, assurance_details: info.assurance_details.map(|details| { payment_method_data::GooglePayAssuranceDetails { card_holder_authenticated: details.card_holder_authenticated, account_verified: details.account_verified, } }), }, tokenization_data: gpay_tokenization_data, }; Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::GooglePay(wallet_data))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AmazonPayRedirect(Box::new(payment_method_data::AmazonPayRedirectData {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::CashappQr(Box::new(payment_method_data::CashappQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::RevolutPay(payment_method_data::RevolutPayData {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AliPayRedirect(payment_method_data::AliPayRedirection {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::WeChatPayQr(Box::new(payment_method_data::WeChatPayQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(paypal_redirect)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::PaypalRedirect(payment_method_data::PaypalRedirection { email: match paypal_redirect.email { Some(ref email_str) => Some(Email::try_from(email_str.clone()).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_EMAIL_FORMAT".to_owned(), error_identifier: 400, error_message: "Invalid email".to_owned(), error_object: None, }) )?), None => None, }, }))) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 450, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_475_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::RevolutPay(payment_method_data::RevolutPayData {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AliPayRedirect(payment_method_data::AliPayRedirection {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::WeChatPayQr(Box::new(payment_method_data::WeChatPayQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(paypal_redirect)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::PaypalRedirect(payment_method_data::PaypalRedirection { email: match paypal_redirect.email { Some(ref email_str) => Some(Email::try_from(email_str.clone()).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_EMAIL_FORMAT".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 475, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_475_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::RevolutPay(payment_method_data::RevolutPayData {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AliPayRedirect(payment_method_data::AliPayRedirection {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::WeChatPayQr(Box::new(payment_method_data::WeChatPayQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(paypal_redirect)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::PaypalRedirect(payment_method_data::PaypalRedirection { email: match paypal_redirect.email { Some(ref email_str) => Some(Email::try_from(email_str.clone()).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_EMAIL_FORMAT".to_owned(), error_identifier: 400, error_message: "Invalid email".to_owned(), error_object: None, }) )?), None => None, }, }))) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, })))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 475, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_475_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::RevolutPay(payment_method_data::RevolutPayData {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::AliPayRedirect(payment_method_data::AliPayRedirection {}))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::WeChatPayQr(Box::new(payment_method_data::WeChatPayQr {})))) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(paypal_redirect)) => { Ok(PaymentMethodData::Wallet(payment_method_data::WalletData::PaypalRedirect(payment_method_data::PaypalRedirection { email: match paypal_redirect.email { Some(ref email_str) => Some(Email::try_from(email_str.clone()).change_context( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_EMAIL_FORMAT".to_owned(), error_identifier: 400, error_message: "Invalid email".to_owned(), error_object: None, }) )?), None => None, }, }))) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking_type) => { match online_banking_type.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(open_banking_uk)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OpenBankingUk { issuer: open_banking_uk.issuer.and_then(|i| common_enums::BankNames::from_str(&i).ok()), country: open_banking_uk.country.and_then(|c| CountryAlpha2::from_str(&c).ok()), })) } Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OnlineBankingFpx(fpx)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OnlineBankingFpx{ issuer: common_enums::BankNames::foreign_try_from( fpx.issuer(), )?, })) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 475, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_500_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking_type) => { match online_banking_type.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(open_banking_uk)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OpenBankingUk { issuer: open_banking_uk.issuer.and_then(|i| common_enums::BankNames::from_str(&i).ok()), country: open_banking_uk.country.and_then(|c| CountryAlpha2::from_str(&c).ok()), }))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 500, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_500_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking_type) => { match online_banking_type.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(open_banking_uk)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OpenBankingUk { issuer: open_banking_uk.issuer.and_then(|i| common_enums::BankNames::from_str(&i).ok()), country: open_banking_uk.country.and_then(|c| CountryAlpha2::from_str(&c).ok()), })) } Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OnlineBankingFpx(fpx)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OnlineBankingFpx{ issuer: common_enums::BankNames::foreign_try_from( fpx.issuer(), )?, })) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, })))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 500, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_500_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking_type) => { match online_banking_type.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(open_banking_uk)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OpenBankingUk { issuer: open_banking_uk.issuer.and_then(|i| common_enums::BankNames::from_str(&i).ok()), country: open_banking_uk.country.and_then(|c| CountryAlpha2::from_str(&c).ok()), })) } Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OnlineBankingFpx(fpx)) => { Ok(PaymentMethodData::BankRedirect(payment_method_data::BankRedirectData::OnlineBankingFpx{ issuer: common_enums::BankNames::foreign_try_from( fpx.issuer(), )?, })) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) => { Ok(PaymentMethodData::RealTimePayment(Box::new(payment_method_data::RealTimePaymentData::DuitNow { }))) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Crypto(crypto) => { let crypto_currency = crypto.crypto_currency.ok_or_else( || { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 500, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_525_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) => { Ok(PaymentMethodData::RealTimePayment(Box::new(payment_method_data::RealTimePaymentData::DuitNow { }))) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 525, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_525_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) => { Ok(PaymentMethodData::RealTimePayment(Box::new(payment_method_data::RealTimePaymentData::DuitNow { }))) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Crypto(crypto) => { let crypto_currency = crypto.crypto_currency.ok_or_else( || { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "crypto_currency is required".to_owned(), error_object: None, }) })?;
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 525, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_525_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) => { Ok(PaymentMethodData::RealTimePayment(Box::new(payment_method_data::RealTimePaymentData::DuitNow { }))) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Crypto(crypto) => { let crypto_currency = crypto.crypto_currency.ok_or_else( || { ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "crypto_currency is required".to_owned(), error_object: None, }) })?; Ok(PaymentMethodData::Crypto( payment_method_data::CryptoData { pay_currency: crypto_currency.pay_currency, network: crypto_currency.network, }, )) } }, None => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(), error_identifier: 400, error_message: "Payment method data is required".to_owned(), error_object: None, }) .into()), } } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 525, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_550_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "crypto_currency is required".to_owned(), error_object: None, }) })?; Ok(PaymentMethodData::Crypto( payment_method_data::CryptoData { pay_currency: crypto_currency.pay_currency, network: crypto_currency.network, }, )) } }, None => Err(ApplicationErrorResponse::BadRequest(ApiError {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 550, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_550_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "crypto_currency is required".to_owned(), error_object: None, }) })?; Ok(PaymentMethodData::Crypto( payment_method_data::CryptoData { pay_currency: crypto_currency.pay_currency, network: crypto_currency.network, }, )) } }, None => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(), error_identifier: 400, error_message: "Payment method data is required".to_owned(), error_object: None, }) .into()), } } } impl ForeignTryFrom<grpc_api_types::payments::PaymentMethodType> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethodType,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 550, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_550_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_identifier: 400, error_message: "crypto_currency is required".to_owned(), error_object: None, }) })?; Ok(PaymentMethodData::Crypto( payment_method_data::CryptoData { pay_currency: crypto_currency.pay_currency, network: crypto_currency.network, }, )) } }, None => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(), error_identifier: 400, error_message: "Payment method data is required".to_owned(), error_object: None, }) .into()), } } } impl ForeignTryFrom<grpc_api_types::payments::PaymentMethodType> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethodType, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::PaymentMethodType::Unspecified => Ok(None), grpc_api_types::payments::PaymentMethodType::Credit => { Ok(Some(PaymentMethodType::Credit)) } grpc_api_types::payments::PaymentMethodType::Debit => { Ok(Some(PaymentMethodType::Debit)) } grpc_api_types::payments::PaymentMethodType::UpiCollect => { Ok(Some(PaymentMethodType::UpiCollect)) } grpc_api_types::payments::PaymentMethodType::UpiIntent => { Ok(Some(PaymentMethodType::UpiIntent)) } grpc_api_types::payments::PaymentMethodType::UpiQr => { Ok(Some(PaymentMethodType::UpiIntent)) } // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::PaymentMethodType::ClassicReward => { Ok(Some(PaymentMethodType::ClassicReward))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 550, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_575_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs impl ForeignTryFrom<grpc_api_types::payments::PaymentMethodType> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethodType, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::PaymentMethodType::Unspecified => Ok(None), grpc_api_types::payments::PaymentMethodType::Credit => { Ok(Some(PaymentMethodType::Credit)) } grpc_api_types::payments::PaymentMethodType::Debit => { Ok(Some(PaymentMethodType::Debit)) } grpc_api_types::payments::PaymentMethodType::UpiCollect => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 575, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_575_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs impl ForeignTryFrom<grpc_api_types::payments::PaymentMethodType> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethodType, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::PaymentMethodType::Unspecified => Ok(None), grpc_api_types::payments::PaymentMethodType::Credit => { Ok(Some(PaymentMethodType::Credit)) } grpc_api_types::payments::PaymentMethodType::Debit => { Ok(Some(PaymentMethodType::Debit)) } grpc_api_types::payments::PaymentMethodType::UpiCollect => { Ok(Some(PaymentMethodType::UpiCollect)) } grpc_api_types::payments::PaymentMethodType::UpiIntent => { Ok(Some(PaymentMethodType::UpiIntent)) } grpc_api_types::payments::PaymentMethodType::UpiQr => { Ok(Some(PaymentMethodType::UpiIntent)) } // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::PaymentMethodType::ClassicReward => { Ok(Some(PaymentMethodType::ClassicReward)) } grpc_api_types::payments::PaymentMethodType::Evoucher => { Ok(Some(PaymentMethodType::Evoucher)) } grpc_api_types::payments::PaymentMethodType::ApplePay => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 575, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_575_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs impl ForeignTryFrom<grpc_api_types::payments::PaymentMethodType> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethodType, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::PaymentMethodType::Unspecified => Ok(None), grpc_api_types::payments::PaymentMethodType::Credit => { Ok(Some(PaymentMethodType::Credit)) } grpc_api_types::payments::PaymentMethodType::Debit => { Ok(Some(PaymentMethodType::Debit)) } grpc_api_types::payments::PaymentMethodType::UpiCollect => { Ok(Some(PaymentMethodType::UpiCollect)) } grpc_api_types::payments::PaymentMethodType::UpiIntent => { Ok(Some(PaymentMethodType::UpiIntent)) } grpc_api_types::payments::PaymentMethodType::UpiQr => { Ok(Some(PaymentMethodType::UpiIntent)) } // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::PaymentMethodType::ClassicReward => { Ok(Some(PaymentMethodType::ClassicReward)) } grpc_api_types::payments::PaymentMethodType::Evoucher => { Ok(Some(PaymentMethodType::Evoucher)) } grpc_api_types::payments::PaymentMethodType::ApplePay => { Ok(Some(PaymentMethodType::ApplePay)) } grpc_api_types::payments::PaymentMethodType::GooglePay => { Ok(Some(PaymentMethodType::GooglePay)) } grpc_api_types::payments::PaymentMethodType::AmazonPay => { Ok(Some(PaymentMethodType::AmazonPay)) } grpc_api_types::payments::PaymentMethodType::RevolutPay => { Ok(Some(PaymentMethodType::RevolutPay)) } grpc_api_types::payments::PaymentMethodType::PayPal => { Ok(Some(PaymentMethodType::Paypal)) } grpc_api_types::payments::PaymentMethodType::WeChatPay => { Ok(Some(PaymentMethodType::WeChatPay)) } grpc_api_types::payments::PaymentMethodType::AliPay => { Ok(Some(PaymentMethodType::AliPay)) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 575, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_600_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs } grpc_api_types::payments::PaymentMethodType::Evoucher => { Ok(Some(PaymentMethodType::Evoucher)) } grpc_api_types::payments::PaymentMethodType::ApplePay => { Ok(Some(PaymentMethodType::ApplePay)) } grpc_api_types::payments::PaymentMethodType::GooglePay => { Ok(Some(PaymentMethodType::GooglePay)) } grpc_api_types::payments::PaymentMethodType::AmazonPay => { Ok(Some(PaymentMethodType::AmazonPay)) } grpc_api_types::payments::PaymentMethodType::RevolutPay => { Ok(Some(PaymentMethodType::RevolutPay))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 600, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_600_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs } grpc_api_types::payments::PaymentMethodType::Evoucher => { Ok(Some(PaymentMethodType::Evoucher)) } grpc_api_types::payments::PaymentMethodType::ApplePay => { Ok(Some(PaymentMethodType::ApplePay)) } grpc_api_types::payments::PaymentMethodType::GooglePay => { Ok(Some(PaymentMethodType::GooglePay)) } grpc_api_types::payments::PaymentMethodType::AmazonPay => { Ok(Some(PaymentMethodType::AmazonPay)) } grpc_api_types::payments::PaymentMethodType::RevolutPay => { Ok(Some(PaymentMethodType::RevolutPay)) } grpc_api_types::payments::PaymentMethodType::PayPal => { Ok(Some(PaymentMethodType::Paypal)) } grpc_api_types::payments::PaymentMethodType::WeChatPay => { Ok(Some(PaymentMethodType::WeChatPay)) } grpc_api_types::payments::PaymentMethodType::AliPay => { Ok(Some(PaymentMethodType::AliPay)) } grpc_api_types::payments::PaymentMethodType::Cashapp => { Ok(Some(PaymentMethodType::Cashapp)) } _ => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_TYPE".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 600, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_600_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs } grpc_api_types::payments::PaymentMethodType::Evoucher => { Ok(Some(PaymentMethodType::Evoucher)) } grpc_api_types::payments::PaymentMethodType::ApplePay => { Ok(Some(PaymentMethodType::ApplePay)) } grpc_api_types::payments::PaymentMethodType::GooglePay => { Ok(Some(PaymentMethodType::GooglePay)) } grpc_api_types::payments::PaymentMethodType::AmazonPay => { Ok(Some(PaymentMethodType::AmazonPay)) } grpc_api_types::payments::PaymentMethodType::RevolutPay => { Ok(Some(PaymentMethodType::RevolutPay)) } grpc_api_types::payments::PaymentMethodType::PayPal => { Ok(Some(PaymentMethodType::Paypal)) } grpc_api_types::payments::PaymentMethodType::WeChatPay => { Ok(Some(PaymentMethodType::WeChatPay)) } grpc_api_types::payments::PaymentMethodType::AliPay => { Ok(Some(PaymentMethodType::AliPay)) } grpc_api_types::payments::PaymentMethodType::Cashapp => { Ok(Some(PaymentMethodType::Cashapp)) } _ => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_TYPE".to_owned(), error_identifier: 400, error_message: "This payment method type is not yet supported".to_owned(), error_object: None, }) .into()), } } } impl ForeignTryFrom<grpc_api_types::payments::PaymentMethod> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethod, ) -> Result<Self, error_stack::Report<Self::Error>> { match value.payment_method { Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(_)) => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 600, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_625_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::PaymentMethodType::Cashapp => { Ok(Some(PaymentMethodType::Cashapp)) } _ => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_TYPE".to_owned(), error_identifier: 400, error_message: "This payment method type is not yet supported".to_owned(), error_object: None, }) .into()), } } } impl ForeignTryFrom<grpc_api_types::payments::PaymentMethod> for Option<PaymentMethodType> {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 625, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_625_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::PaymentMethodType::Cashapp => { Ok(Some(PaymentMethodType::Cashapp)) } _ => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_TYPE".to_owned(), error_identifier: 400, error_message: "This payment method type is not yet supported".to_owned(), error_object: None, }) .into()), } } } impl ForeignTryFrom<grpc_api_types::payments::PaymentMethod> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethod, ) -> Result<Self, error_stack::Report<Self::Error>> { match value.payment_method { Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(_)) => { Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(_)) => { Ok(Some(PaymentMethodType::Debit)) },
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 625, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_625_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::PaymentMethodType::Cashapp => { Ok(Some(PaymentMethodType::Cashapp)) } _ => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_TYPE".to_owned(), error_identifier: 400, error_message: "This payment method type is not yet supported".to_owned(), error_object: None, }) .into()), } } } impl ForeignTryFrom<grpc_api_types::payments::PaymentMethod> for Option<PaymentMethodType> { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::PaymentMethod, ) -> Result<Self, error_stack::Report<Self::Error>> { match value.payment_method { Some(data) => match data { grpc_api_types::payments::payment_method::PaymentMethod::Card(card_type) => { match card_type.card_type { Some(grpc_api_types::payments::card_payment_method_type::CardType::Credit(_)) => { Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(_)) => { Ok(Some(PaymentMethodType::Debit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_)) => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))), Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(_)) => { Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(_)) => { Ok(Some(PaymentMethodType::Debit)) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, })))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 625, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_650_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(_)) => { Ok(Some(PaymentMethodType::Debit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_)) => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))), Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(_)) => { Ok(Some(PaymentMethodType::Credit)) },
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 650, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_650_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(_)) => { Ok(Some(PaymentMethodType::Debit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_)) => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))), Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(_)) => { Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(_)) => { Ok(Some(PaymentMethodType::Debit)) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_) => { Ok(None) },
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 650, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_650_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::Debit(_)) => { Ok(Some(PaymentMethodType::Debit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::CardRedirect(_)) => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card redirect payments are not yet supported".to_owned(), error_object: None, }))), Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(_)) => { Ok(Some(PaymentMethodType::Credit)) }, Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(_)) => { Ok(Some(PaymentMethodType::Debit)) }, None => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "Card type is required".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_) => { Ok(None) }, grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect(_) => Ok(Some(PaymentMethodType::UpiCollect)), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_) => Ok(Some(PaymentMethodType::UpiIntent)), grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_) => Ok(Some(PaymentMethodType::UpiIntent)), // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::payment_method::PaymentMethod::Reward(reward) => { match reward.reward_type() { grpc_api_types::payments::RewardType::Classicreward => Ok(Some(PaymentMethodType::ClassicReward)), grpc_api_types::payments::RewardType::EVoucher => Ok(Some(PaymentMethodType::Evoucher)), _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_REWARD_TYPE".to_owned(), error_identifier: 400, error_message: "Unsupported reward type".to_owned(), error_object: None, }))) } }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => { match wallet_type.wallet_type { Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Bluecode(_)) => { Ok(Some(PaymentMethodType::Bluecode)) },
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 650, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_675_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_) => { Ok(None) }, grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect(_) => Ok(Some(PaymentMethodType::UpiCollect)), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_) => Ok(Some(PaymentMethodType::UpiIntent)), grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_) => Ok(Some(PaymentMethodType::UpiIntent)), // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::payment_method::PaymentMethod::Reward(reward) => { match reward.reward_type() { grpc_api_types::payments::RewardType::Classicreward => Ok(Some(PaymentMethodType::ClassicReward)), grpc_api_types::payments::RewardType::EVoucher => Ok(Some(PaymentMethodType::Evoucher)), _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_REWARD_TYPE".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 675, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_675_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_) => { Ok(None) }, grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect(_) => Ok(Some(PaymentMethodType::UpiCollect)), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_) => Ok(Some(PaymentMethodType::UpiIntent)), grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_) => Ok(Some(PaymentMethodType::UpiIntent)), // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::payment_method::PaymentMethod::Reward(reward) => { match reward.reward_type() { grpc_api_types::payments::RewardType::Classicreward => Ok(Some(PaymentMethodType::ClassicReward)), grpc_api_types::payments::RewardType::EVoucher => Ok(Some(PaymentMethodType::Evoucher)), _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_REWARD_TYPE".to_owned(), error_identifier: 400, error_message: "Unsupported reward type".to_owned(), error_object: None, }))) } }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => { match wallet_type.wallet_type { Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Bluecode(_)) => { Ok(Some(PaymentMethodType::Bluecode)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(_mifinity_data)) => { // For PaymentMethodType conversion, we just need to return the type, not the full data Ok(Some(PaymentMethodType::Mifinity)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(_)) => {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 675, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_675_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } grpc_api_types::payments::payment_method::PaymentMethod::Token(_) => { Ok(None) }, grpc_api_types::payments::payment_method::PaymentMethod::UpiCollect(_) => Ok(Some(PaymentMethodType::UpiCollect)), grpc_api_types::payments::payment_method::PaymentMethod::UpiIntent(_) => Ok(Some(PaymentMethodType::UpiIntent)), grpc_api_types::payments::payment_method::PaymentMethod::UpiQr(_) => Ok(Some(PaymentMethodType::UpiIntent)), // UpiQr not yet implemented, fallback to UpiIntent grpc_api_types::payments::payment_method::PaymentMethod::Reward(reward) => { match reward.reward_type() { grpc_api_types::payments::RewardType::Classicreward => Ok(Some(PaymentMethodType::ClassicReward)), grpc_api_types::payments::RewardType::EVoucher => Ok(Some(PaymentMethodType::Evoucher)), _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_REWARD_TYPE".to_owned(), error_identifier: 400, error_message: "Unsupported reward type".to_owned(), error_object: None, }))) } }, grpc_api_types::payments::payment_method::PaymentMethod::Wallet(wallet_type) => { match wallet_type.wallet_type { Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Bluecode(_)) => { Ok(Some(PaymentMethodType::Bluecode)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(_mifinity_data)) => { // For PaymentMethodType conversion, we just need to return the type, not the full data Ok(Some(PaymentMethodType::Mifinity)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(_)) => { Ok(Some(PaymentMethodType::ApplePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(_)) => { Ok(Some(PaymentMethodType::GooglePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(Some(PaymentMethodType::AmazonPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => { Ok(Some(PaymentMethodType::RevolutPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(_)) => { Ok(Some(PaymentMethodType::Paypal)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(Some(PaymentMethodType::WeChatPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(Some(PaymentMethodType::AliPay)) }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 675, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_700_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(_mifinity_data)) => { // For PaymentMethodType conversion, we just need to return the type, not the full data Ok(Some(PaymentMethodType::Mifinity)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(_)) => { Ok(Some(PaymentMethodType::ApplePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(_)) => { Ok(Some(PaymentMethodType::GooglePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(Some(PaymentMethodType::AmazonPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => { Ok(Some(PaymentMethodType::RevolutPay))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 700, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_700_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(_mifinity_data)) => { // For PaymentMethodType conversion, we just need to return the type, not the full data Ok(Some(PaymentMethodType::Mifinity)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(_)) => { Ok(Some(PaymentMethodType::ApplePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(_)) => { Ok(Some(PaymentMethodType::GooglePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(Some(PaymentMethodType::AmazonPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => { Ok(Some(PaymentMethodType::RevolutPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(_)) => { Ok(Some(PaymentMethodType::Paypal)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(Some(PaymentMethodType::WeChatPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(Some(PaymentMethodType::AliPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(Some(PaymentMethodType::Cashapp)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 700, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_700_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::Mifinity(_mifinity_data)) => { // For PaymentMethodType conversion, we just need to return the type, not the full data Ok(Some(PaymentMethodType::Mifinity)) }, Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::ApplePay(_)) => { Ok(Some(PaymentMethodType::ApplePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::GooglePay(_)) => { Ok(Some(PaymentMethodType::GooglePay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AmazonPayRedirect(_)) => { Ok(Some(PaymentMethodType::AmazonPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::RevolutPay(_)) => { Ok(Some(PaymentMethodType::RevolutPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::PaypalRedirect(_)) => { Ok(Some(PaymentMethodType::Paypal)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::WeChatPayQr(_)) => { Ok(Some(PaymentMethodType::WeChatPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::AliPayRedirect(_)) => { Ok(Some(PaymentMethodType::AliPay)) } Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(Some(PaymentMethodType::Cashapp)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking) => { match online_banking.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(_)) => { Ok(Some(PaymentMethodType::OpenBankingUk)) }, Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OnlineBankingFpx(_))=>{ Ok(Some(PaymentMethodType::OnlineBankingFpx)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 700, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_725_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(Some(PaymentMethodType::Cashapp)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking) => { match online_banking.online_banking_type {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 725, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_725_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(Some(PaymentMethodType::Cashapp)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking) => { match online_banking.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(_)) => { Ok(Some(PaymentMethodType::OpenBankingUk)) }, Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OnlineBankingFpx(_))=>{ Ok(Some(PaymentMethodType::OnlineBankingFpx)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 725, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_725_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs Some(grpc_api_types::payments::wallet_payment_method_type::WalletType::CashappQr(_)) => { Ok(Some(PaymentMethodType::Cashapp)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This Wallet type is not yet supported".to_owned(), error_object: None, }))) }, } }, grpc_api_types::payments::payment_method::PaymentMethod::OnlineBanking(online_banking) => { match online_banking.online_banking_type { Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OpenBankingUk(_)) => { Ok(Some(PaymentMethodType::OpenBankingUk)) }, Some(grpc_api_types::payments::online_banking_payment_method_type::OnlineBankingType::OnlineBankingFpx(_))=>{ Ok(Some(PaymentMethodType::OnlineBankingFpx)) } _ => { Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) =>{ Ok(Some(PaymentMethodType::DuitNow)) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Crypto(_) => Ok(Some(PaymentMethodType::CryptoCurrency)), }, None => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(), error_identifier: 400, error_message: "Payment method data is required".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 725, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_750_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) =>{ Ok(Some(PaymentMethodType::DuitNow)) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 750, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_750_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) =>{ Ok(Some(PaymentMethodType::DuitNow)) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Crypto(_) => Ok(Some(PaymentMethodType::CryptoCurrency)), }, None => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(), error_identifier: 400, error_message: "Payment method data is required".to_owned(), error_object: None, }) .into()), } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 750, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_750_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_message: "This online banking type is not yet supported".to_owned(), error_object: None, }))) }, } } grpc_api_types::payments::payment_method::PaymentMethod::MobilePayment(mobile_payment_type) => { match mobile_payment_type.mobile_payment_type { Some(grpc_api_types::payments::mobile_payment_method_type::MobilePaymentType::DuitNow(_)) =>{ Ok(Some(PaymentMethodType::DuitNow)) } _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "UNSUPPORTED_PAYMENT_METHOD".to_owned(), error_identifier: 400, error_message: "This mobile payment type is not yet supported".to_owned(), error_object: None, }))) } } grpc_api_types::payments::payment_method::PaymentMethod::Crypto(_) => Ok(Some(PaymentMethodType::CryptoCurrency)), }, None => Err(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(), error_identifier: 400, error_message: "Payment method data is required".to_owned(), error_object: None, }) .into()), } } } // Helper trait for generic card conversion pub trait CardConversionHelper<T: PaymentMethodDataTypes> { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result<payment_method_data::Card<T>, error_stack::Report<ApplicationErrorResponse>>; } // Implementation for DefaultPCIHolder impl CardConversionHelper<DefaultPCIHolder> for DefaultPCIHolder { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<DefaultPCIHolder>, error_stack::Report<ApplicationErrorResponse>, > { let card_network = match card.card_network() { grpc_api_types::payments::CardNetwork::Unspecified => None, _ => Some(common_enums::CardNetwork::foreign_try_from(
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 750, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_775_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_object: None, }) .into()), } } } // Helper trait for generic card conversion pub trait CardConversionHelper<T: PaymentMethodDataTypes> { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result<payment_method_data::Card<T>, error_stack::Report<ApplicationErrorResponse>>; } // Implementation for DefaultPCIHolder
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 775, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_775_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_object: None, }) .into()), } } } // Helper trait for generic card conversion pub trait CardConversionHelper<T: PaymentMethodDataTypes> { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result<payment_method_data::Card<T>, error_stack::Report<ApplicationErrorResponse>>; } // Implementation for DefaultPCIHolder impl CardConversionHelper<DefaultPCIHolder> for DefaultPCIHolder { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<DefaultPCIHolder>, error_stack::Report<ApplicationErrorResponse>, > { let card_network = match card.card_network() { grpc_api_types::payments::CardNetwork::Unspecified => None, _ => Some(common_enums::CardNetwork::foreign_try_from( card.card_network(), )?), }; Ok(payment_method_data::Card { card_number: RawCardNumber::<DefaultPCIHolder>(card.card_number.ok_or(
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 775, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_775_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_object: None, }) .into()), } } } // Helper trait for generic card conversion pub trait CardConversionHelper<T: PaymentMethodDataTypes> { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result<payment_method_data::Card<T>, error_stack::Report<ApplicationErrorResponse>>; } // Implementation for DefaultPCIHolder impl CardConversionHelper<DefaultPCIHolder> for DefaultPCIHolder { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<DefaultPCIHolder>, error_stack::Report<ApplicationErrorResponse>, > { let card_network = match card.card_network() { grpc_api_types::payments::CardNetwork::Unspecified => None, _ => Some(common_enums::CardNetwork::foreign_try_from( card.card_network(), )?), }; Ok(payment_method_data::Card { card_number: RawCardNumber::<DefaultPCIHolder>(card.card_number.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, }), )?), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_MONTH".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Month".to_owned(), error_object: None, }))?, card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 775, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_800_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs card.card_network(), )?), }; Ok(payment_method_data::Card { card_number: RawCardNumber::<DefaultPCIHolder>(card.card_number.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, }), )?), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 800, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_800_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs card.card_network(), )?), }; Ok(payment_method_data::Card { card_number: RawCardNumber::<DefaultPCIHolder>(card.card_number.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, }), )?), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_MONTH".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Month".to_owned(), error_object: None, }))?, card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 800, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_800_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs card.card_network(), )?), }; Ok(payment_method_data::Card { card_number: RawCardNumber::<DefaultPCIHolder>(card.card_number.ok_or( ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, }), )?), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_MONTH".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Month".to_owned(), error_object: None, }))?, card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2, bank_code: card.bank_code, nick_name: card.nick_name.map(|name| name.into()), card_holder_name: card.card_holder_name, co_badged_card_data: None, }) } } // Implementation for VaultTokenHolder impl CardConversionHelper<VaultTokenHolder> for VaultTokenHolder {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 800, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_825_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 825, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_825_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2, bank_code: card.bank_code, nick_name: card.nick_name.map(|name| name.into()), card_holder_name: card.card_holder_name, co_badged_card_data: None, }) } } // Implementation for VaultTokenHolder impl CardConversionHelper<VaultTokenHolder> for VaultTokenHolder { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<VaultTokenHolder>, error_stack::Report<ApplicationErrorResponse>,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 825, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_825_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2, bank_code: card.bank_code, nick_name: card.nick_name.map(|name| name.into()), card_holder_name: card.card_holder_name, co_badged_card_data: None, }) } } // Implementation for VaultTokenHolder impl CardConversionHelper<VaultTokenHolder> for VaultTokenHolder { fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<VaultTokenHolder>, error_stack::Report<ApplicationErrorResponse>, > { Ok(payment_method_data::Card { card_number: RawCardNumber( card.card_number .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, })) .map(|cn| cn.get_card_no())?, ), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_MONTH".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Month".to_owned(), error_object: None, }))?,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 825, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_850_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<VaultTokenHolder>, error_stack::Report<ApplicationErrorResponse>, > { Ok(payment_method_data::Card { card_number: RawCardNumber( card.card_number .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, }))
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 850, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_850_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<VaultTokenHolder>, error_stack::Report<ApplicationErrorResponse>, > { Ok(payment_method_data::Card { card_number: RawCardNumber( card.card_number .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, })) .map(|cn| cn.get_card_no())?, ), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_MONTH".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Month".to_owned(), error_object: None, }))?, card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 850, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_850_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs fn convert_card_details( card: grpc_api_types::payments::CardDetails, ) -> Result< payment_method_data::Card<VaultTokenHolder>, error_stack::Report<ApplicationErrorResponse>, > { Ok(payment_method_data::Card { card_number: RawCardNumber( card.card_number .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CARD_NUMBER".to_owned(), error_identifier: 400, error_message: "Missing card number".to_owned(), error_object: None, })) .map(|cn| cn.get_card_no())?, ), card_exp_month: card .card_exp_month .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_MONTH".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Month".to_owned(), error_object: None, }))?, card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network: None, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2, bank_code: card.bank_code, nick_name: card.nick_name.map(|name| name.into()), card_holder_name: card.card_holder_name, co_badged_card_data: None, })
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 850, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_875_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None,
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 875, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_875_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network: None, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2, bank_code: card.bank_code, nick_name: card.nick_name.map(|name| name.into()), card_holder_name: card.card_holder_name, co_badged_card_data: None, }) } } // Generic ForeignTryFrom implementation using the helper trait impl<T> ForeignTryFrom<grpc_api_types::payments::CardDetails> for payment_method_data::Card<T>
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 875, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_875_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs card_exp_year: card .card_exp_year .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_EXP_YEAR".to_owned(), error_identifier: 400, error_message: "Missing Card Expiry Year".to_owned(), error_object: None, }))?, card_cvc: card .card_cvc .ok_or(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "MISSING_CVC".to_owned(), error_identifier: 400, error_message: "Missing CVC".to_owned(), error_object: None, }))?, card_issuer: card.card_issuer, card_network: None, card_type: card.card_type, card_issuing_country: card.card_issuing_country_alpha2, bank_code: card.bank_code, nick_name: card.nick_name.map(|name| name.into()), card_holder_name: card.card_holder_name, co_badged_card_data: None, }) } } // Generic ForeignTryFrom implementation using the helper trait impl<T> ForeignTryFrom<grpc_api_types::payments::CardDetails> for payment_method_data::Card<T> where T: PaymentMethodDataTypes + Default + Debug + Send + Eq + PartialEq + serde::Serialize + serde::de::DeserializeOwned + Clone + CardConversionHelper<T>, { type Error = ApplicationErrorResponse; fn foreign_try_from( card: grpc_api_types::payments::CardDetails, ) -> Result<Self, error_stack::Report<Self::Error>> { T::convert_card_details(card) } }
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 875, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_900_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } // Generic ForeignTryFrom implementation using the helper trait impl<T> ForeignTryFrom<grpc_api_types::payments::CardDetails> for payment_method_data::Card<T> where T: PaymentMethodDataTypes + Default + Debug + Send + Eq + PartialEq + serde::Serialize + serde::de::DeserializeOwned + Clone
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 900, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_900_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } // Generic ForeignTryFrom implementation using the helper trait impl<T> ForeignTryFrom<grpc_api_types::payments::CardDetails> for payment_method_data::Card<T> where T: PaymentMethodDataTypes + Default + Debug + Send + Eq + PartialEq + serde::Serialize + serde::de::DeserializeOwned + Clone + CardConversionHelper<T>, { type Error = ApplicationErrorResponse; fn foreign_try_from( card: grpc_api_types::payments::CardDetails, ) -> Result<Self, error_stack::Report<Self::Error>> { T::convert_card_details(card) } } impl ForeignTryFrom<grpc_api_types::payments::Currency> for common_enums::Currency { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::Currency, ) -> Result<Self, error_stack::Report<Self::Error>> {
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 900, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_900_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs } } // Generic ForeignTryFrom implementation using the helper trait impl<T> ForeignTryFrom<grpc_api_types::payments::CardDetails> for payment_method_data::Card<T> where T: PaymentMethodDataTypes + Default + Debug + Send + Eq + PartialEq + serde::Serialize + serde::de::DeserializeOwned + Clone + CardConversionHelper<T>, { type Error = ApplicationErrorResponse; fn foreign_try_from( card: grpc_api_types::payments::CardDetails, ) -> Result<Self, error_stack::Report<Self::Error>> { T::convert_card_details(card) } } impl ForeignTryFrom<grpc_api_types::payments::Currency> for common_enums::Currency { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::Currency, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::Currency::Aed => Ok(Self::AED), grpc_api_types::payments::Currency::All => Ok(Self::ALL), grpc_api_types::payments::Currency::Amd => Ok(Self::AMD), grpc_api_types::payments::Currency::Ang => Ok(Self::ANG), grpc_api_types::payments::Currency::Aoa => Ok(Self::AOA), grpc_api_types::payments::Currency::Ars => Ok(Self::ARS), grpc_api_types::payments::Currency::Aud => Ok(Self::AUD), grpc_api_types::payments::Currency::Awg => Ok(Self::AWG), grpc_api_types::payments::Currency::Azn => Ok(Self::AZN), grpc_api_types::payments::Currency::Bam => Ok(Self::BAM), grpc_api_types::payments::Currency::Bbd => Ok(Self::BBD), grpc_api_types::payments::Currency::Bdt => Ok(Self::BDT), grpc_api_types::payments::Currency::Bgn => Ok(Self::BGN), grpc_api_types::payments::Currency::Bhd => Ok(Self::BHD), grpc_api_types::payments::Currency::Bif => Ok(Self::BIF), grpc_api_types::payments::Currency::Bmd => Ok(Self::BMD), grpc_api_types::payments::Currency::Bnd => Ok(Self::BND), grpc_api_types::payments::Currency::Bob => Ok(Self::BOB), grpc_api_types::payments::Currency::Brl => Ok(Self::BRL),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 900, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_925_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs impl ForeignTryFrom<grpc_api_types::payments::Currency> for common_enums::Currency { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::Currency, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::Currency::Aed => Ok(Self::AED), grpc_api_types::payments::Currency::All => Ok(Self::ALL), grpc_api_types::payments::Currency::Amd => Ok(Self::AMD), grpc_api_types::payments::Currency::Ang => Ok(Self::ANG), grpc_api_types::payments::Currency::Aoa => Ok(Self::AOA), grpc_api_types::payments::Currency::Ars => Ok(Self::ARS), grpc_api_types::payments::Currency::Aud => Ok(Self::AUD), grpc_api_types::payments::Currency::Awg => Ok(Self::AWG), grpc_api_types::payments::Currency::Azn => Ok(Self::AZN),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 925, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_925_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs impl ForeignTryFrom<grpc_api_types::payments::Currency> for common_enums::Currency { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::Currency, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::Currency::Aed => Ok(Self::AED), grpc_api_types::payments::Currency::All => Ok(Self::ALL), grpc_api_types::payments::Currency::Amd => Ok(Self::AMD), grpc_api_types::payments::Currency::Ang => Ok(Self::ANG), grpc_api_types::payments::Currency::Aoa => Ok(Self::AOA), grpc_api_types::payments::Currency::Ars => Ok(Self::ARS), grpc_api_types::payments::Currency::Aud => Ok(Self::AUD), grpc_api_types::payments::Currency::Awg => Ok(Self::AWG), grpc_api_types::payments::Currency::Azn => Ok(Self::AZN), grpc_api_types::payments::Currency::Bam => Ok(Self::BAM), grpc_api_types::payments::Currency::Bbd => Ok(Self::BBD), grpc_api_types::payments::Currency::Bdt => Ok(Self::BDT), grpc_api_types::payments::Currency::Bgn => Ok(Self::BGN), grpc_api_types::payments::Currency::Bhd => Ok(Self::BHD), grpc_api_types::payments::Currency::Bif => Ok(Self::BIF), grpc_api_types::payments::Currency::Bmd => Ok(Self::BMD), grpc_api_types::payments::Currency::Bnd => Ok(Self::BND), grpc_api_types::payments::Currency::Bob => Ok(Self::BOB), grpc_api_types::payments::Currency::Brl => Ok(Self::BRL), grpc_api_types::payments::Currency::Bsd => Ok(Self::BSD), grpc_api_types::payments::Currency::Bwp => Ok(Self::BWP), grpc_api_types::payments::Currency::Byn => Ok(Self::BYN), grpc_api_types::payments::Currency::Bzd => Ok(Self::BZD), grpc_api_types::payments::Currency::Cad => Ok(Self::CAD),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 925, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_925_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs impl ForeignTryFrom<grpc_api_types::payments::Currency> for common_enums::Currency { type Error = ApplicationErrorResponse; fn foreign_try_from( value: grpc_api_types::payments::Currency, ) -> Result<Self, error_stack::Report<Self::Error>> { match value { grpc_api_types::payments::Currency::Aed => Ok(Self::AED), grpc_api_types::payments::Currency::All => Ok(Self::ALL), grpc_api_types::payments::Currency::Amd => Ok(Self::AMD), grpc_api_types::payments::Currency::Ang => Ok(Self::ANG), grpc_api_types::payments::Currency::Aoa => Ok(Self::AOA), grpc_api_types::payments::Currency::Ars => Ok(Self::ARS), grpc_api_types::payments::Currency::Aud => Ok(Self::AUD), grpc_api_types::payments::Currency::Awg => Ok(Self::AWG), grpc_api_types::payments::Currency::Azn => Ok(Self::AZN), grpc_api_types::payments::Currency::Bam => Ok(Self::BAM), grpc_api_types::payments::Currency::Bbd => Ok(Self::BBD), grpc_api_types::payments::Currency::Bdt => Ok(Self::BDT), grpc_api_types::payments::Currency::Bgn => Ok(Self::BGN), grpc_api_types::payments::Currency::Bhd => Ok(Self::BHD), grpc_api_types::payments::Currency::Bif => Ok(Self::BIF), grpc_api_types::payments::Currency::Bmd => Ok(Self::BMD), grpc_api_types::payments::Currency::Bnd => Ok(Self::BND), grpc_api_types::payments::Currency::Bob => Ok(Self::BOB), grpc_api_types::payments::Currency::Brl => Ok(Self::BRL), grpc_api_types::payments::Currency::Bsd => Ok(Self::BSD), grpc_api_types::payments::Currency::Bwp => Ok(Self::BWP), grpc_api_types::payments::Currency::Byn => Ok(Self::BYN), grpc_api_types::payments::Currency::Bzd => Ok(Self::BZD), grpc_api_types::payments::Currency::Cad => Ok(Self::CAD), grpc_api_types::payments::Currency::Chf => Ok(Self::CHF), grpc_api_types::payments::Currency::Clp => Ok(Self::CLP), grpc_api_types::payments::Currency::Cny => Ok(Self::CNY), grpc_api_types::payments::Currency::Cop => Ok(Self::COP), grpc_api_types::payments::Currency::Crc => Ok(Self::CRC), grpc_api_types::payments::Currency::Cup => Ok(Self::CUP), grpc_api_types::payments::Currency::Cve => Ok(Self::CVE), grpc_api_types::payments::Currency::Czk => Ok(Self::CZK), grpc_api_types::payments::Currency::Djf => Ok(Self::DJF), grpc_api_types::payments::Currency::Dkk => Ok(Self::DKK), grpc_api_types::payments::Currency::Dop => Ok(Self::DOP), grpc_api_types::payments::Currency::Dzd => Ok(Self::DZD), grpc_api_types::payments::Currency::Egp => Ok(Self::EGP), grpc_api_types::payments::Currency::Etb => Ok(Self::ETB), grpc_api_types::payments::Currency::Eur => Ok(Self::EUR), grpc_api_types::payments::Currency::Fjd => Ok(Self::FJD), grpc_api_types::payments::Currency::Fkp => Ok(Self::FKP), grpc_api_types::payments::Currency::Gbp => Ok(Self::GBP), grpc_api_types::payments::Currency::Gel => Ok(Self::GEL), grpc_api_types::payments::Currency::Ghs => Ok(Self::GHS),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 925, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_950_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Bsd => Ok(Self::BSD), grpc_api_types::payments::Currency::Bwp => Ok(Self::BWP), grpc_api_types::payments::Currency::Byn => Ok(Self::BYN), grpc_api_types::payments::Currency::Bzd => Ok(Self::BZD), grpc_api_types::payments::Currency::Cad => Ok(Self::CAD), grpc_api_types::payments::Currency::Chf => Ok(Self::CHF), grpc_api_types::payments::Currency::Clp => Ok(Self::CLP), grpc_api_types::payments::Currency::Cny => Ok(Self::CNY), grpc_api_types::payments::Currency::Cop => Ok(Self::COP), grpc_api_types::payments::Currency::Crc => Ok(Self::CRC), grpc_api_types::payments::Currency::Cup => Ok(Self::CUP), grpc_api_types::payments::Currency::Cve => Ok(Self::CVE), grpc_api_types::payments::Currency::Czk => Ok(Self::CZK), grpc_api_types::payments::Currency::Djf => Ok(Self::DJF), grpc_api_types::payments::Currency::Dkk => Ok(Self::DKK),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 950, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_950_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Bsd => Ok(Self::BSD), grpc_api_types::payments::Currency::Bwp => Ok(Self::BWP), grpc_api_types::payments::Currency::Byn => Ok(Self::BYN), grpc_api_types::payments::Currency::Bzd => Ok(Self::BZD), grpc_api_types::payments::Currency::Cad => Ok(Self::CAD), grpc_api_types::payments::Currency::Chf => Ok(Self::CHF), grpc_api_types::payments::Currency::Clp => Ok(Self::CLP), grpc_api_types::payments::Currency::Cny => Ok(Self::CNY), grpc_api_types::payments::Currency::Cop => Ok(Self::COP), grpc_api_types::payments::Currency::Crc => Ok(Self::CRC), grpc_api_types::payments::Currency::Cup => Ok(Self::CUP), grpc_api_types::payments::Currency::Cve => Ok(Self::CVE), grpc_api_types::payments::Currency::Czk => Ok(Self::CZK), grpc_api_types::payments::Currency::Djf => Ok(Self::DJF), grpc_api_types::payments::Currency::Dkk => Ok(Self::DKK), grpc_api_types::payments::Currency::Dop => Ok(Self::DOP), grpc_api_types::payments::Currency::Dzd => Ok(Self::DZD), grpc_api_types::payments::Currency::Egp => Ok(Self::EGP), grpc_api_types::payments::Currency::Etb => Ok(Self::ETB), grpc_api_types::payments::Currency::Eur => Ok(Self::EUR), grpc_api_types::payments::Currency::Fjd => Ok(Self::FJD), grpc_api_types::payments::Currency::Fkp => Ok(Self::FKP), grpc_api_types::payments::Currency::Gbp => Ok(Self::GBP), grpc_api_types::payments::Currency::Gel => Ok(Self::GEL), grpc_api_types::payments::Currency::Ghs => Ok(Self::GHS), grpc_api_types::payments::Currency::Gip => Ok(Self::GIP), grpc_api_types::payments::Currency::Gmd => Ok(Self::GMD), grpc_api_types::payments::Currency::Gnf => Ok(Self::GNF), grpc_api_types::payments::Currency::Gtq => Ok(Self::GTQ), grpc_api_types::payments::Currency::Gyd => Ok(Self::GYD),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 950, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_950_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Bsd => Ok(Self::BSD), grpc_api_types::payments::Currency::Bwp => Ok(Self::BWP), grpc_api_types::payments::Currency::Byn => Ok(Self::BYN), grpc_api_types::payments::Currency::Bzd => Ok(Self::BZD), grpc_api_types::payments::Currency::Cad => Ok(Self::CAD), grpc_api_types::payments::Currency::Chf => Ok(Self::CHF), grpc_api_types::payments::Currency::Clp => Ok(Self::CLP), grpc_api_types::payments::Currency::Cny => Ok(Self::CNY), grpc_api_types::payments::Currency::Cop => Ok(Self::COP), grpc_api_types::payments::Currency::Crc => Ok(Self::CRC), grpc_api_types::payments::Currency::Cup => Ok(Self::CUP), grpc_api_types::payments::Currency::Cve => Ok(Self::CVE), grpc_api_types::payments::Currency::Czk => Ok(Self::CZK), grpc_api_types::payments::Currency::Djf => Ok(Self::DJF), grpc_api_types::payments::Currency::Dkk => Ok(Self::DKK), grpc_api_types::payments::Currency::Dop => Ok(Self::DOP), grpc_api_types::payments::Currency::Dzd => Ok(Self::DZD), grpc_api_types::payments::Currency::Egp => Ok(Self::EGP), grpc_api_types::payments::Currency::Etb => Ok(Self::ETB), grpc_api_types::payments::Currency::Eur => Ok(Self::EUR), grpc_api_types::payments::Currency::Fjd => Ok(Self::FJD), grpc_api_types::payments::Currency::Fkp => Ok(Self::FKP), grpc_api_types::payments::Currency::Gbp => Ok(Self::GBP), grpc_api_types::payments::Currency::Gel => Ok(Self::GEL), grpc_api_types::payments::Currency::Ghs => Ok(Self::GHS), grpc_api_types::payments::Currency::Gip => Ok(Self::GIP), grpc_api_types::payments::Currency::Gmd => Ok(Self::GMD), grpc_api_types::payments::Currency::Gnf => Ok(Self::GNF), grpc_api_types::payments::Currency::Gtq => Ok(Self::GTQ), grpc_api_types::payments::Currency::Gyd => Ok(Self::GYD), grpc_api_types::payments::Currency::Hkd => Ok(Self::HKD), grpc_api_types::payments::Currency::Hnl => Ok(Self::HNL), grpc_api_types::payments::Currency::Hrk => Ok(Self::HRK), grpc_api_types::payments::Currency::Htg => Ok(Self::HTG), grpc_api_types::payments::Currency::Huf => Ok(Self::HUF), grpc_api_types::payments::Currency::Idr => Ok(Self::IDR), grpc_api_types::payments::Currency::Ils => Ok(Self::ILS), grpc_api_types::payments::Currency::Inr => Ok(Self::INR), grpc_api_types::payments::Currency::Iqd => Ok(Self::IQD), grpc_api_types::payments::Currency::Jmd => Ok(Self::JMD), grpc_api_types::payments::Currency::Jod => Ok(Self::JOD), grpc_api_types::payments::Currency::Jpy => Ok(Self::JPY), grpc_api_types::payments::Currency::Kes => Ok(Self::KES), grpc_api_types::payments::Currency::Kgs => Ok(Self::KGS), grpc_api_types::payments::Currency::Khr => Ok(Self::KHR), grpc_api_types::payments::Currency::Kmf => Ok(Self::KMF), grpc_api_types::payments::Currency::Krw => Ok(Self::KRW), grpc_api_types::payments::Currency::Kwd => Ok(Self::KWD), grpc_api_types::payments::Currency::Kyd => Ok(Self::KYD), grpc_api_types::payments::Currency::Kzt => Ok(Self::KZT),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 950, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_975_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Gip => Ok(Self::GIP), grpc_api_types::payments::Currency::Gmd => Ok(Self::GMD), grpc_api_types::payments::Currency::Gnf => Ok(Self::GNF), grpc_api_types::payments::Currency::Gtq => Ok(Self::GTQ), grpc_api_types::payments::Currency::Gyd => Ok(Self::GYD), grpc_api_types::payments::Currency::Hkd => Ok(Self::HKD), grpc_api_types::payments::Currency::Hnl => Ok(Self::HNL), grpc_api_types::payments::Currency::Hrk => Ok(Self::HRK), grpc_api_types::payments::Currency::Htg => Ok(Self::HTG), grpc_api_types::payments::Currency::Huf => Ok(Self::HUF), grpc_api_types::payments::Currency::Idr => Ok(Self::IDR), grpc_api_types::payments::Currency::Ils => Ok(Self::ILS), grpc_api_types::payments::Currency::Inr => Ok(Self::INR), grpc_api_types::payments::Currency::Iqd => Ok(Self::IQD), grpc_api_types::payments::Currency::Jmd => Ok(Self::JMD),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 975, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_975_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Gip => Ok(Self::GIP), grpc_api_types::payments::Currency::Gmd => Ok(Self::GMD), grpc_api_types::payments::Currency::Gnf => Ok(Self::GNF), grpc_api_types::payments::Currency::Gtq => Ok(Self::GTQ), grpc_api_types::payments::Currency::Gyd => Ok(Self::GYD), grpc_api_types::payments::Currency::Hkd => Ok(Self::HKD), grpc_api_types::payments::Currency::Hnl => Ok(Self::HNL), grpc_api_types::payments::Currency::Hrk => Ok(Self::HRK), grpc_api_types::payments::Currency::Htg => Ok(Self::HTG), grpc_api_types::payments::Currency::Huf => Ok(Self::HUF), grpc_api_types::payments::Currency::Idr => Ok(Self::IDR), grpc_api_types::payments::Currency::Ils => Ok(Self::ILS), grpc_api_types::payments::Currency::Inr => Ok(Self::INR), grpc_api_types::payments::Currency::Iqd => Ok(Self::IQD), grpc_api_types::payments::Currency::Jmd => Ok(Self::JMD), grpc_api_types::payments::Currency::Jod => Ok(Self::JOD), grpc_api_types::payments::Currency::Jpy => Ok(Self::JPY), grpc_api_types::payments::Currency::Kes => Ok(Self::KES), grpc_api_types::payments::Currency::Kgs => Ok(Self::KGS), grpc_api_types::payments::Currency::Khr => Ok(Self::KHR), grpc_api_types::payments::Currency::Kmf => Ok(Self::KMF), grpc_api_types::payments::Currency::Krw => Ok(Self::KRW), grpc_api_types::payments::Currency::Kwd => Ok(Self::KWD), grpc_api_types::payments::Currency::Kyd => Ok(Self::KYD), grpc_api_types::payments::Currency::Kzt => Ok(Self::KZT), grpc_api_types::payments::Currency::Lak => Ok(Self::LAK), grpc_api_types::payments::Currency::Lbp => Ok(Self::LBP), grpc_api_types::payments::Currency::Lkr => Ok(Self::LKR), grpc_api_types::payments::Currency::Lrd => Ok(Self::LRD), grpc_api_types::payments::Currency::Lsl => Ok(Self::LSL),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 975, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_975_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Gip => Ok(Self::GIP), grpc_api_types::payments::Currency::Gmd => Ok(Self::GMD), grpc_api_types::payments::Currency::Gnf => Ok(Self::GNF), grpc_api_types::payments::Currency::Gtq => Ok(Self::GTQ), grpc_api_types::payments::Currency::Gyd => Ok(Self::GYD), grpc_api_types::payments::Currency::Hkd => Ok(Self::HKD), grpc_api_types::payments::Currency::Hnl => Ok(Self::HNL), grpc_api_types::payments::Currency::Hrk => Ok(Self::HRK), grpc_api_types::payments::Currency::Htg => Ok(Self::HTG), grpc_api_types::payments::Currency::Huf => Ok(Self::HUF), grpc_api_types::payments::Currency::Idr => Ok(Self::IDR), grpc_api_types::payments::Currency::Ils => Ok(Self::ILS), grpc_api_types::payments::Currency::Inr => Ok(Self::INR), grpc_api_types::payments::Currency::Iqd => Ok(Self::IQD), grpc_api_types::payments::Currency::Jmd => Ok(Self::JMD), grpc_api_types::payments::Currency::Jod => Ok(Self::JOD), grpc_api_types::payments::Currency::Jpy => Ok(Self::JPY), grpc_api_types::payments::Currency::Kes => Ok(Self::KES), grpc_api_types::payments::Currency::Kgs => Ok(Self::KGS), grpc_api_types::payments::Currency::Khr => Ok(Self::KHR), grpc_api_types::payments::Currency::Kmf => Ok(Self::KMF), grpc_api_types::payments::Currency::Krw => Ok(Self::KRW), grpc_api_types::payments::Currency::Kwd => Ok(Self::KWD), grpc_api_types::payments::Currency::Kyd => Ok(Self::KYD), grpc_api_types::payments::Currency::Kzt => Ok(Self::KZT), grpc_api_types::payments::Currency::Lak => Ok(Self::LAK), grpc_api_types::payments::Currency::Lbp => Ok(Self::LBP), grpc_api_types::payments::Currency::Lkr => Ok(Self::LKR), grpc_api_types::payments::Currency::Lrd => Ok(Self::LRD), grpc_api_types::payments::Currency::Lsl => Ok(Self::LSL), grpc_api_types::payments::Currency::Lyd => Ok(Self::LYD), grpc_api_types::payments::Currency::Mad => Ok(Self::MAD), grpc_api_types::payments::Currency::Mdl => Ok(Self::MDL), grpc_api_types::payments::Currency::Mga => Ok(Self::MGA), grpc_api_types::payments::Currency::Mkd => Ok(Self::MKD), grpc_api_types::payments::Currency::Mmk => Ok(Self::MMK), grpc_api_types::payments::Currency::Mnt => Ok(Self::MNT), grpc_api_types::payments::Currency::Mop => Ok(Self::MOP), grpc_api_types::payments::Currency::Mru => Ok(Self::MRU), grpc_api_types::payments::Currency::Mur => Ok(Self::MUR), grpc_api_types::payments::Currency::Mvr => Ok(Self::MVR), grpc_api_types::payments::Currency::Mwk => Ok(Self::MWK), grpc_api_types::payments::Currency::Mxn => Ok(Self::MXN), grpc_api_types::payments::Currency::Myr => Ok(Self::MYR), grpc_api_types::payments::Currency::Mzn => Ok(Self::MZN), grpc_api_types::payments::Currency::Nad => Ok(Self::NAD), grpc_api_types::payments::Currency::Ngn => Ok(Self::NGN), grpc_api_types::payments::Currency::Nio => Ok(Self::NIO), grpc_api_types::payments::Currency::Nok => Ok(Self::NOK), grpc_api_types::payments::Currency::Npr => Ok(Self::NPR),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 975, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1000_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Lak => Ok(Self::LAK), grpc_api_types::payments::Currency::Lbp => Ok(Self::LBP), grpc_api_types::payments::Currency::Lkr => Ok(Self::LKR), grpc_api_types::payments::Currency::Lrd => Ok(Self::LRD), grpc_api_types::payments::Currency::Lsl => Ok(Self::LSL), grpc_api_types::payments::Currency::Lyd => Ok(Self::LYD), grpc_api_types::payments::Currency::Mad => Ok(Self::MAD), grpc_api_types::payments::Currency::Mdl => Ok(Self::MDL), grpc_api_types::payments::Currency::Mga => Ok(Self::MGA), grpc_api_types::payments::Currency::Mkd => Ok(Self::MKD), grpc_api_types::payments::Currency::Mmk => Ok(Self::MMK), grpc_api_types::payments::Currency::Mnt => Ok(Self::MNT), grpc_api_types::payments::Currency::Mop => Ok(Self::MOP), grpc_api_types::payments::Currency::Mru => Ok(Self::MRU), grpc_api_types::payments::Currency::Mur => Ok(Self::MUR),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1000, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1000_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Lak => Ok(Self::LAK), grpc_api_types::payments::Currency::Lbp => Ok(Self::LBP), grpc_api_types::payments::Currency::Lkr => Ok(Self::LKR), grpc_api_types::payments::Currency::Lrd => Ok(Self::LRD), grpc_api_types::payments::Currency::Lsl => Ok(Self::LSL), grpc_api_types::payments::Currency::Lyd => Ok(Self::LYD), grpc_api_types::payments::Currency::Mad => Ok(Self::MAD), grpc_api_types::payments::Currency::Mdl => Ok(Self::MDL), grpc_api_types::payments::Currency::Mga => Ok(Self::MGA), grpc_api_types::payments::Currency::Mkd => Ok(Self::MKD), grpc_api_types::payments::Currency::Mmk => Ok(Self::MMK), grpc_api_types::payments::Currency::Mnt => Ok(Self::MNT), grpc_api_types::payments::Currency::Mop => Ok(Self::MOP), grpc_api_types::payments::Currency::Mru => Ok(Self::MRU), grpc_api_types::payments::Currency::Mur => Ok(Self::MUR), grpc_api_types::payments::Currency::Mvr => Ok(Self::MVR), grpc_api_types::payments::Currency::Mwk => Ok(Self::MWK), grpc_api_types::payments::Currency::Mxn => Ok(Self::MXN), grpc_api_types::payments::Currency::Myr => Ok(Self::MYR), grpc_api_types::payments::Currency::Mzn => Ok(Self::MZN), grpc_api_types::payments::Currency::Nad => Ok(Self::NAD), grpc_api_types::payments::Currency::Ngn => Ok(Self::NGN), grpc_api_types::payments::Currency::Nio => Ok(Self::NIO), grpc_api_types::payments::Currency::Nok => Ok(Self::NOK), grpc_api_types::payments::Currency::Npr => Ok(Self::NPR), grpc_api_types::payments::Currency::Nzd => Ok(Self::NZD), grpc_api_types::payments::Currency::Omr => Ok(Self::OMR), grpc_api_types::payments::Currency::Pab => Ok(Self::PAB), grpc_api_types::payments::Currency::Pen => Ok(Self::PEN), grpc_api_types::payments::Currency::Pgk => Ok(Self::PGK),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1000, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1000_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Lak => Ok(Self::LAK), grpc_api_types::payments::Currency::Lbp => Ok(Self::LBP), grpc_api_types::payments::Currency::Lkr => Ok(Self::LKR), grpc_api_types::payments::Currency::Lrd => Ok(Self::LRD), grpc_api_types::payments::Currency::Lsl => Ok(Self::LSL), grpc_api_types::payments::Currency::Lyd => Ok(Self::LYD), grpc_api_types::payments::Currency::Mad => Ok(Self::MAD), grpc_api_types::payments::Currency::Mdl => Ok(Self::MDL), grpc_api_types::payments::Currency::Mga => Ok(Self::MGA), grpc_api_types::payments::Currency::Mkd => Ok(Self::MKD), grpc_api_types::payments::Currency::Mmk => Ok(Self::MMK), grpc_api_types::payments::Currency::Mnt => Ok(Self::MNT), grpc_api_types::payments::Currency::Mop => Ok(Self::MOP), grpc_api_types::payments::Currency::Mru => Ok(Self::MRU), grpc_api_types::payments::Currency::Mur => Ok(Self::MUR), grpc_api_types::payments::Currency::Mvr => Ok(Self::MVR), grpc_api_types::payments::Currency::Mwk => Ok(Self::MWK), grpc_api_types::payments::Currency::Mxn => Ok(Self::MXN), grpc_api_types::payments::Currency::Myr => Ok(Self::MYR), grpc_api_types::payments::Currency::Mzn => Ok(Self::MZN), grpc_api_types::payments::Currency::Nad => Ok(Self::NAD), grpc_api_types::payments::Currency::Ngn => Ok(Self::NGN), grpc_api_types::payments::Currency::Nio => Ok(Self::NIO), grpc_api_types::payments::Currency::Nok => Ok(Self::NOK), grpc_api_types::payments::Currency::Npr => Ok(Self::NPR), grpc_api_types::payments::Currency::Nzd => Ok(Self::NZD), grpc_api_types::payments::Currency::Omr => Ok(Self::OMR), grpc_api_types::payments::Currency::Pab => Ok(Self::PAB), grpc_api_types::payments::Currency::Pen => Ok(Self::PEN), grpc_api_types::payments::Currency::Pgk => Ok(Self::PGK), grpc_api_types::payments::Currency::Php => Ok(Self::PHP), grpc_api_types::payments::Currency::Pkr => Ok(Self::PKR), grpc_api_types::payments::Currency::Pln => Ok(Self::PLN), grpc_api_types::payments::Currency::Pyg => Ok(Self::PYG), grpc_api_types::payments::Currency::Qar => Ok(Self::QAR), grpc_api_types::payments::Currency::Ron => Ok(Self::RON), grpc_api_types::payments::Currency::Rsd => Ok(Self::RSD), grpc_api_types::payments::Currency::Rub => Ok(Self::RUB), grpc_api_types::payments::Currency::Rwf => Ok(Self::RWF), grpc_api_types::payments::Currency::Sar => Ok(Self::SAR), grpc_api_types::payments::Currency::Sbd => Ok(Self::SBD), grpc_api_types::payments::Currency::Scr => Ok(Self::SCR), grpc_api_types::payments::Currency::Sek => Ok(Self::SEK), grpc_api_types::payments::Currency::Sgd => Ok(Self::SGD), grpc_api_types::payments::Currency::Shp => Ok(Self::SHP), grpc_api_types::payments::Currency::Sle => Ok(Self::SLE), grpc_api_types::payments::Currency::Sll => Ok(Self::SLL), grpc_api_types::payments::Currency::Sos => Ok(Self::SOS), grpc_api_types::payments::Currency::Srd => Ok(Self::SRD), grpc_api_types::payments::Currency::Ssp => Ok(Self::SSP),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1000, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1025_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Nzd => Ok(Self::NZD), grpc_api_types::payments::Currency::Omr => Ok(Self::OMR), grpc_api_types::payments::Currency::Pab => Ok(Self::PAB), grpc_api_types::payments::Currency::Pen => Ok(Self::PEN), grpc_api_types::payments::Currency::Pgk => Ok(Self::PGK), grpc_api_types::payments::Currency::Php => Ok(Self::PHP), grpc_api_types::payments::Currency::Pkr => Ok(Self::PKR), grpc_api_types::payments::Currency::Pln => Ok(Self::PLN), grpc_api_types::payments::Currency::Pyg => Ok(Self::PYG), grpc_api_types::payments::Currency::Qar => Ok(Self::QAR), grpc_api_types::payments::Currency::Ron => Ok(Self::RON), grpc_api_types::payments::Currency::Rsd => Ok(Self::RSD), grpc_api_types::payments::Currency::Rub => Ok(Self::RUB), grpc_api_types::payments::Currency::Rwf => Ok(Self::RWF), grpc_api_types::payments::Currency::Sar => Ok(Self::SAR),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1025, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1025_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Nzd => Ok(Self::NZD), grpc_api_types::payments::Currency::Omr => Ok(Self::OMR), grpc_api_types::payments::Currency::Pab => Ok(Self::PAB), grpc_api_types::payments::Currency::Pen => Ok(Self::PEN), grpc_api_types::payments::Currency::Pgk => Ok(Self::PGK), grpc_api_types::payments::Currency::Php => Ok(Self::PHP), grpc_api_types::payments::Currency::Pkr => Ok(Self::PKR), grpc_api_types::payments::Currency::Pln => Ok(Self::PLN), grpc_api_types::payments::Currency::Pyg => Ok(Self::PYG), grpc_api_types::payments::Currency::Qar => Ok(Self::QAR), grpc_api_types::payments::Currency::Ron => Ok(Self::RON), grpc_api_types::payments::Currency::Rsd => Ok(Self::RSD), grpc_api_types::payments::Currency::Rub => Ok(Self::RUB), grpc_api_types::payments::Currency::Rwf => Ok(Self::RWF), grpc_api_types::payments::Currency::Sar => Ok(Self::SAR), grpc_api_types::payments::Currency::Sbd => Ok(Self::SBD), grpc_api_types::payments::Currency::Scr => Ok(Self::SCR), grpc_api_types::payments::Currency::Sek => Ok(Self::SEK), grpc_api_types::payments::Currency::Sgd => Ok(Self::SGD), grpc_api_types::payments::Currency::Shp => Ok(Self::SHP), grpc_api_types::payments::Currency::Sle => Ok(Self::SLE), grpc_api_types::payments::Currency::Sll => Ok(Self::SLL), grpc_api_types::payments::Currency::Sos => Ok(Self::SOS), grpc_api_types::payments::Currency::Srd => Ok(Self::SRD), grpc_api_types::payments::Currency::Ssp => Ok(Self::SSP), grpc_api_types::payments::Currency::Stn => Ok(Self::STN), grpc_api_types::payments::Currency::Svc => Ok(Self::SVC), grpc_api_types::payments::Currency::Szl => Ok(Self::SZL), grpc_api_types::payments::Currency::Thb => Ok(Self::THB), grpc_api_types::payments::Currency::Tnd => Ok(Self::TND),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1025, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1025_50
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Nzd => Ok(Self::NZD), grpc_api_types::payments::Currency::Omr => Ok(Self::OMR), grpc_api_types::payments::Currency::Pab => Ok(Self::PAB), grpc_api_types::payments::Currency::Pen => Ok(Self::PEN), grpc_api_types::payments::Currency::Pgk => Ok(Self::PGK), grpc_api_types::payments::Currency::Php => Ok(Self::PHP), grpc_api_types::payments::Currency::Pkr => Ok(Self::PKR), grpc_api_types::payments::Currency::Pln => Ok(Self::PLN), grpc_api_types::payments::Currency::Pyg => Ok(Self::PYG), grpc_api_types::payments::Currency::Qar => Ok(Self::QAR), grpc_api_types::payments::Currency::Ron => Ok(Self::RON), grpc_api_types::payments::Currency::Rsd => Ok(Self::RSD), grpc_api_types::payments::Currency::Rub => Ok(Self::RUB), grpc_api_types::payments::Currency::Rwf => Ok(Self::RWF), grpc_api_types::payments::Currency::Sar => Ok(Self::SAR), grpc_api_types::payments::Currency::Sbd => Ok(Self::SBD), grpc_api_types::payments::Currency::Scr => Ok(Self::SCR), grpc_api_types::payments::Currency::Sek => Ok(Self::SEK), grpc_api_types::payments::Currency::Sgd => Ok(Self::SGD), grpc_api_types::payments::Currency::Shp => Ok(Self::SHP), grpc_api_types::payments::Currency::Sle => Ok(Self::SLE), grpc_api_types::payments::Currency::Sll => Ok(Self::SLL), grpc_api_types::payments::Currency::Sos => Ok(Self::SOS), grpc_api_types::payments::Currency::Srd => Ok(Self::SRD), grpc_api_types::payments::Currency::Ssp => Ok(Self::SSP), grpc_api_types::payments::Currency::Stn => Ok(Self::STN), grpc_api_types::payments::Currency::Svc => Ok(Self::SVC), grpc_api_types::payments::Currency::Szl => Ok(Self::SZL), grpc_api_types::payments::Currency::Thb => Ok(Self::THB), grpc_api_types::payments::Currency::Tnd => Ok(Self::TND), grpc_api_types::payments::Currency::Top => Ok(Self::TOP), grpc_api_types::payments::Currency::Try => Ok(Self::TRY), grpc_api_types::payments::Currency::Ttd => Ok(Self::TTD), grpc_api_types::payments::Currency::Twd => Ok(Self::TWD), grpc_api_types::payments::Currency::Tzs => Ok(Self::TZS), grpc_api_types::payments::Currency::Uah => Ok(Self::UAH), grpc_api_types::payments::Currency::Ugx => Ok(Self::UGX), grpc_api_types::payments::Currency::Usd => Ok(Self::USD), grpc_api_types::payments::Currency::Uyu => Ok(Self::UYU), grpc_api_types::payments::Currency::Uzs => Ok(Self::UZS), grpc_api_types::payments::Currency::Ves => Ok(Self::VES), grpc_api_types::payments::Currency::Vnd => Ok(Self::VND), grpc_api_types::payments::Currency::Vuv => Ok(Self::VUV), grpc_api_types::payments::Currency::Wst => Ok(Self::WST), grpc_api_types::payments::Currency::Xaf => Ok(Self::XAF), grpc_api_types::payments::Currency::Xcd => Ok(Self::XCD), grpc_api_types::payments::Currency::Xof => Ok(Self::XOF), grpc_api_types::payments::Currency::Xpf => Ok(Self::XPF), grpc_api_types::payments::Currency::Yer => Ok(Self::YER), grpc_api_types::payments::Currency::Zar => Ok(Self::ZAR),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1025, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1050_15
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Stn => Ok(Self::STN), grpc_api_types::payments::Currency::Svc => Ok(Self::SVC), grpc_api_types::payments::Currency::Szl => Ok(Self::SZL), grpc_api_types::payments::Currency::Thb => Ok(Self::THB), grpc_api_types::payments::Currency::Tnd => Ok(Self::TND), grpc_api_types::payments::Currency::Top => Ok(Self::TOP), grpc_api_types::payments::Currency::Try => Ok(Self::TRY), grpc_api_types::payments::Currency::Ttd => Ok(Self::TTD), grpc_api_types::payments::Currency::Twd => Ok(Self::TWD), grpc_api_types::payments::Currency::Tzs => Ok(Self::TZS), grpc_api_types::payments::Currency::Uah => Ok(Self::UAH), grpc_api_types::payments::Currency::Ugx => Ok(Self::UGX), grpc_api_types::payments::Currency::Usd => Ok(Self::USD), grpc_api_types::payments::Currency::Uyu => Ok(Self::UYU), grpc_api_types::payments::Currency::Uzs => Ok(Self::UZS),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1050, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7881285798716424113_1050_30
clm
snippet
// connector-service/backend/domain_types/src/types.rs grpc_api_types::payments::Currency::Stn => Ok(Self::STN), grpc_api_types::payments::Currency::Svc => Ok(Self::SVC), grpc_api_types::payments::Currency::Szl => Ok(Self::SZL), grpc_api_types::payments::Currency::Thb => Ok(Self::THB), grpc_api_types::payments::Currency::Tnd => Ok(Self::TND), grpc_api_types::payments::Currency::Top => Ok(Self::TOP), grpc_api_types::payments::Currency::Try => Ok(Self::TRY), grpc_api_types::payments::Currency::Ttd => Ok(Self::TTD), grpc_api_types::payments::Currency::Twd => Ok(Self::TWD), grpc_api_types::payments::Currency::Tzs => Ok(Self::TZS), grpc_api_types::payments::Currency::Uah => Ok(Self::UAH), grpc_api_types::payments::Currency::Ugx => Ok(Self::UGX), grpc_api_types::payments::Currency::Usd => Ok(Self::USD), grpc_api_types::payments::Currency::Uyu => Ok(Self::UYU), grpc_api_types::payments::Currency::Uzs => Ok(Self::UZS), grpc_api_types::payments::Currency::Ves => Ok(Self::VES), grpc_api_types::payments::Currency::Vnd => Ok(Self::VND), grpc_api_types::payments::Currency::Vuv => Ok(Self::VUV), grpc_api_types::payments::Currency::Wst => Ok(Self::WST), grpc_api_types::payments::Currency::Xaf => Ok(Self::XAF), grpc_api_types::payments::Currency::Xcd => Ok(Self::XCD), grpc_api_types::payments::Currency::Xof => Ok(Self::XOF), grpc_api_types::payments::Currency::Xpf => Ok(Self::XPF), grpc_api_types::payments::Currency::Yer => Ok(Self::YER), grpc_api_types::payments::Currency::Zar => Ok(Self::ZAR), grpc_api_types::payments::Currency::Zmw => Ok(Self::ZMW), _ => Err(report!(ApplicationErrorResponse::BadRequest(ApiError { sub_code: "unsupported_currency".to_string(), error_identifier: 4001, error_message: format!("Currency {value:?} is not supported"),
{ "chunk": null, "crate": "domain_types", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 1050, "struct_name": null, "total_crates": null, "trait_name": null }