id stringlengths 20 153 | type stringclasses 1 value | granularity stringclasses 14 values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_snippet_-7881285798716424113_1050_50 | 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"),
error_object: None,
}))),
}
}
}
impl<
T: PaymentMethodDataTypes
+ Default
+ Debug
+ Send
+ Eq
+ PartialEq
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ CardConversionHelper<T>,
> ForeignTryFrom<PaymentServiceAuthorizeRequest> for PaymentsAuthorizeData<T>
{
type Error = 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": 50,
"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_1075_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
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"),
error_object: None,
}))),
}
}
}
impl<
T: PaymentMethodDataTypes
+ Default
+ Debug
| {
"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": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1075_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
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"),
error_object: None,
}))),
}
}
}
impl<
T: PaymentMethodDataTypes
+ Default
+ Debug
+ Send
+ Eq
+ PartialEq
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ CardConversionHelper<T>,
> ForeignTryFrom<PaymentServiceAuthorizeRequest> for PaymentsAuthorizeData<T>
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: PaymentServiceAuthorizeRequest,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email: Option<Email> = match value.email {
| {
"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": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1075_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
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"),
error_object: None,
}))),
}
}
}
impl<
T: PaymentMethodDataTypes
+ Default
+ Debug
+ Send
+ Eq
+ PartialEq
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ CardConversionHelper<T>,
> ForeignTryFrom<PaymentServiceAuthorizeRequest> for PaymentsAuthorizeData<T>
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: PaymentServiceAuthorizeRequest,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email: Option<Email> = match value.email {
Some(ref email_str) => {
Some(Email::try_from(email_str.clone().expose()).map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL_FORMAT".to_owned(),
error_identifier: 400,
error_message: "Invalid email".to_owned(),
error_object: None,
}))
})?)
}
None => None,
};
let merchant_config_currency = common_enums::Currency::foreign_try_from(value.currency())?;
// Extract merchant_account_id from metadata before moving it
let merchant_account_id = value.metadata.get("merchant_account_id").cloned();
// Store merchant_account_metadata for connector use
let merchant_account_metadata = (!value.merchant_account_metadata.is_empty())
| {
"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": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1100_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
value: PaymentServiceAuthorizeRequest,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email: Option<Email> = match value.email {
Some(ref email_str) => {
Some(Email::try_from(email_str.clone().expose()).map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL_FORMAT".to_owned(),
error_identifier: 400,
error_message: "Invalid email".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": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1100_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
value: PaymentServiceAuthorizeRequest,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email: Option<Email> = match value.email {
Some(ref email_str) => {
Some(Email::try_from(email_str.clone().expose()).map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL_FORMAT".to_owned(),
error_identifier: 400,
error_message: "Invalid email".to_owned(),
error_object: None,
}))
})?)
}
None => None,
};
let merchant_config_currency = common_enums::Currency::foreign_try_from(value.currency())?;
// Extract merchant_account_id from metadata before moving it
let merchant_account_id = value.metadata.get("merchant_account_id").cloned();
// Store merchant_account_metadata for connector use
let merchant_account_metadata = (!value.merchant_account_metadata.is_empty())
.then(|| {
serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
| {
"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": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1100_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
value: PaymentServiceAuthorizeRequest,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email: Option<Email> = match value.email {
Some(ref email_str) => {
Some(Email::try_from(email_str.clone().expose()).map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL_FORMAT".to_owned(),
error_identifier: 400,
error_message: "Invalid email".to_owned(),
error_object: None,
}))
})?)
}
None => None,
};
let merchant_config_currency = common_enums::Currency::foreign_try_from(value.currency())?;
// Extract merchant_account_id from metadata before moving it
let merchant_account_id = value.metadata.get("merchant_account_id").cloned();
// Store merchant_account_metadata for connector use
let merchant_account_metadata = (!value.merchant_account_metadata.is_empty())
.then(|| {
serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata"
.to_owned(),
error_object: None,
},
))
})
})
.transpose()?;
let setup_future_usage = value
.setup_future_usage
.map(|usage| {
grpc_api_types::payments::FutureUsage::try_from(usage)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_SETUP_FUTURE_USAGE".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": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1125_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
.then(|| {
serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata"
.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": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1125_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
.then(|| {
serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata"
.to_owned(),
error_object: None,
},
))
})
})
.transpose()?;
let setup_future_usage = value
.setup_future_usage
.map(|usage| {
grpc_api_types::payments::FutureUsage::try_from(usage)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_SETUP_FUTURE_USAGE".to_owned(),
error_identifier: 400,
error_message: "Invalid setup future usage value".to_owned(),
error_object: None,
}))
})
.and_then(|proto_usage| {
| {
"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": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1125_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
.then(|| {
serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata"
.to_owned(),
error_object: None,
},
))
})
})
.transpose()?;
let setup_future_usage = value
.setup_future_usage
.map(|usage| {
grpc_api_types::payments::FutureUsage::try_from(usage)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_SETUP_FUTURE_USAGE".to_owned(),
error_identifier: 400,
error_message: "Invalid setup future usage value".to_owned(),
error_object: None,
}))
})
.and_then(|proto_usage| {
common_enums::FutureUsage::foreign_try_from(proto_usage)
})
})
.transpose()?;
let customer_acceptance = value.customer_acceptance.clone();
let authentication_data = value
.authentication_data
.clone()
.map(router_request_types::AuthenticationData::try_from)
.transpose()?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
| {
"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": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1150_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
error_message: "Invalid setup future usage value".to_owned(),
error_object: None,
}))
})
.and_then(|proto_usage| {
common_enums::FutureUsage::foreign_try_from(proto_usage)
})
})
.transpose()?;
let customer_acceptance = value.customer_acceptance.clone();
let authentication_data = value
.authentication_data
.clone()
.map(router_request_types::AuthenticationData::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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1150_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
error_message: "Invalid setup future usage value".to_owned(),
error_object: None,
}))
})
.and_then(|proto_usage| {
common_enums::FutureUsage::foreign_try_from(proto_usage)
})
})
.transpose()?;
let customer_acceptance = value.customer_acceptance.clone();
let authentication_data = value
.authentication_data
.clone()
.map(router_request_types::AuthenticationData::try_from)
.transpose()?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
});
Ok(Self {
authentication_data,
capture_method: Some(common_enums::CaptureMethod::foreign_try_from(
value.capture_method(),
| {
"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": 1150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1150_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
error_message: "Invalid setup future usage value".to_owned(),
error_object: None,
}))
})
.and_then(|proto_usage| {
common_enums::FutureUsage::foreign_try_from(proto_usage)
})
})
.transpose()?;
let customer_acceptance = value.customer_acceptance.clone();
let authentication_data = value
.authentication_data
.clone()
.map(router_request_types::AuthenticationData::try_from)
.transpose()?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
});
Ok(Self {
authentication_data,
capture_method: Some(common_enums::CaptureMethod::foreign_try_from(
value.capture_method(),
)?),
payment_method_data: PaymentMethodData::<T>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
)
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(),
error_identifier: 400,
error_message: "Payment method data construction failed".to_owned(),
error_object: None,
}))?,
amount: value.amount,
currency: common_enums::Currency::foreign_try_from(value.currency())?,
confirm: true,
| {
"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": 1150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1175_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
});
Ok(Self {
authentication_data,
capture_method: Some(common_enums::CaptureMethod::foreign_try_from(
value.capture_method(),
)?),
payment_method_data: PaymentMethodData::<T>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
| {
"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": 1175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1175_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
});
Ok(Self {
authentication_data,
capture_method: Some(common_enums::CaptureMethod::foreign_try_from(
value.capture_method(),
)?),
payment_method_data: PaymentMethodData::<T>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
)
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(),
error_identifier: 400,
error_message: "Payment method data construction failed".to_owned(),
error_object: None,
}))?,
amount: value.amount,
currency: common_enums::Currency::foreign_try_from(value.currency())?,
confirm: true,
webhook_url: value.webhook_url.clone(),
browser_info: value
.browser_info
.as_ref()
.cloned()
| {
"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": 1175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1175_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
});
Ok(Self {
authentication_data,
capture_method: Some(common_enums::CaptureMethod::foreign_try_from(
value.capture_method(),
)?),
payment_method_data: PaymentMethodData::<T>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
)
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_PAYMENT_METHOD_DATA".to_owned(),
error_identifier: 400,
error_message: "Payment method data construction failed".to_owned(),
error_object: None,
}))?,
amount: value.amount,
currency: common_enums::Currency::foreign_try_from(value.currency())?,
confirm: true,
webhook_url: value.webhook_url.clone(),
browser_info: value
.browser_info
.as_ref()
.cloned()
.map(BrowserInformation::foreign_try_from)
.transpose()?,
payment_method_type: <Option<PaymentMethodType>>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
)?,
minor_amount: common_utils::types::MinorUnit::new(value.minor_amount),
email,
customer_name: None,
statement_descriptor_suffix: value.statement_descriptor_suffix,
statement_descriptor: value.statement_descriptor_name,
router_return_url: value.return_url.clone(),
complete_authorize_url: value.complete_authorize_url,
| {
"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": 1175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1200_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
webhook_url: value.webhook_url.clone(),
browser_info: value
.browser_info
.as_ref()
.cloned()
.map(BrowserInformation::foreign_try_from)
.transpose()?,
payment_method_type: <Option<PaymentMethodType>>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
| {
"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": 1200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1200_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
webhook_url: value.webhook_url.clone(),
browser_info: value
.browser_info
.as_ref()
.cloned()
.map(BrowserInformation::foreign_try_from)
.transpose()?,
payment_method_type: <Option<PaymentMethodType>>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
)?,
minor_amount: common_utils::types::MinorUnit::new(value.minor_amount),
email,
customer_name: None,
statement_descriptor_suffix: value.statement_descriptor_suffix,
statement_descriptor: value.statement_descriptor_name,
router_return_url: value.return_url.clone(),
complete_authorize_url: value.complete_authorize_url,
setup_future_usage,
mandate_id: None,
off_session: value.off_session,
order_category: value.order_category,
session_token: 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": 1200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1200_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
webhook_url: value.webhook_url.clone(),
browser_info: value
.browser_info
.as_ref()
.cloned()
.map(BrowserInformation::foreign_try_from)
.transpose()?,
payment_method_type: <Option<PaymentMethodType>>::foreign_try_from(
value.payment_method.clone().ok_or_else(|| {
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,
})
})?,
)?,
minor_amount: common_utils::types::MinorUnit::new(value.minor_amount),
email,
customer_name: None,
statement_descriptor_suffix: value.statement_descriptor_suffix,
statement_descriptor: value.statement_descriptor_name,
router_return_url: value.return_url.clone(),
complete_authorize_url: value.complete_authorize_url,
setup_future_usage,
mandate_id: None,
off_session: value.off_session,
order_category: value.order_category,
session_token: None,
access_token,
customer_acceptance: customer_acceptance
.map(mandates::CustomerAcceptance::foreign_try_from)
.transpose()?,
enrolled_for_3ds: false,
related_transaction_id: None,
payment_experience: None,
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_CUSTOMER_ID".to_owned(),
error_identifier: 400,
error_message: "Failed to parse Customer Id".to_owned(),
error_object: None,
}))?,
request_incremental_authorization: false,
metadata: if value.metadata.is_empty() {
| {
"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": 1200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1225_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
setup_future_usage,
mandate_id: None,
off_session: value.off_session,
order_category: value.order_category,
session_token: None,
access_token,
customer_acceptance: customer_acceptance
.map(mandates::CustomerAcceptance::foreign_try_from)
.transpose()?,
enrolled_for_3ds: false,
related_transaction_id: None,
payment_experience: None,
customer_id: value
.customer_id
.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": 1225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1225_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
setup_future_usage,
mandate_id: None,
off_session: value.off_session,
order_category: value.order_category,
session_token: None,
access_token,
customer_acceptance: customer_acceptance
.map(mandates::CustomerAcceptance::foreign_try_from)
.transpose()?,
enrolled_for_3ds: false,
related_transaction_id: None,
payment_experience: None,
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_CUSTOMER_ID".to_owned(),
error_identifier: 400,
error_message: "Failed to parse Customer Id".to_owned(),
error_object: None,
}))?,
request_incremental_authorization: false,
metadata: if value.metadata.is_empty() {
None
} else {
Some(serde_json::Value::Object(
value
.metadata
| {
"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": 1225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1225_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
setup_future_usage,
mandate_id: None,
off_session: value.off_session,
order_category: value.order_category,
session_token: None,
access_token,
customer_acceptance: customer_acceptance
.map(mandates::CustomerAcceptance::foreign_try_from)
.transpose()?,
enrolled_for_3ds: false,
related_transaction_id: None,
payment_experience: None,
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_CUSTOMER_ID".to_owned(),
error_identifier: 400,
error_message: "Failed to parse Customer Id".to_owned(),
error_object: None,
}))?,
request_incremental_authorization: false,
metadata: if value.metadata.is_empty() {
None
} else {
Some(serde_json::Value::Object(
value
.metadata
.into_iter()
.map(|(k, v)| (k, serde_json::Value::String(v)))
.collect(),
))
},
merchant_order_reference_id: value.merchant_order_reference_id,
order_tax_amount: None,
shipping_cost: None,
merchant_account_id,
integrity_object: None,
merchant_config_currency: Some(merchant_config_currency),
all_keys_required: None, // Field not available in new proto structure
split_payments: None,
enable_overcapture: None,
setup_mandate_details: value
.setup_mandate_details
.map(mandates::MandateData::foreign_try_from)
.transpose()?,
request_extended_authorization: value.request_extended_authorization,
merchant_account_metadata,
| {
"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": 1225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1250_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
None
} else {
Some(serde_json::Value::Object(
value
.metadata
.into_iter()
.map(|(k, v)| (k, serde_json::Value::String(v)))
.collect(),
))
},
merchant_order_reference_id: value.merchant_order_reference_id,
order_tax_amount: None,
shipping_cost: None,
merchant_account_id,
integrity_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": 1250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1250_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
None
} else {
Some(serde_json::Value::Object(
value
.metadata
.into_iter()
.map(|(k, v)| (k, serde_json::Value::String(v)))
.collect(),
))
},
merchant_order_reference_id: value.merchant_order_reference_id,
order_tax_amount: None,
shipping_cost: None,
merchant_account_id,
integrity_object: None,
merchant_config_currency: Some(merchant_config_currency),
all_keys_required: None, // Field not available in new proto structure
split_payments: None,
enable_overcapture: None,
setup_mandate_details: value
.setup_mandate_details
.map(mandates::MandateData::foreign_try_from)
.transpose()?,
request_extended_authorization: value.request_extended_authorization,
merchant_account_metadata,
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::PaymentAddress> for payment_address::PaymentAddress {
| {
"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": 1250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1250_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
None
} else {
Some(serde_json::Value::Object(
value
.metadata
.into_iter()
.map(|(k, v)| (k, serde_json::Value::String(v)))
.collect(),
))
},
merchant_order_reference_id: value.merchant_order_reference_id,
order_tax_amount: None,
shipping_cost: None,
merchant_account_id,
integrity_object: None,
merchant_config_currency: Some(merchant_config_currency),
all_keys_required: None, // Field not available in new proto structure
split_payments: None,
enable_overcapture: None,
setup_mandate_details: value
.setup_mandate_details
.map(mandates::MandateData::foreign_try_from)
.transpose()?,
request_extended_authorization: value.request_extended_authorization,
merchant_account_metadata,
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::PaymentAddress> for payment_address::PaymentAddress {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::PaymentAddress,
) -> Result<Self, error_stack::Report<Self::Error>> {
let shipping = match value.shipping_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let billing = match value.billing_address.clone() {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let payment_method_billing = match value.billing_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
Ok(Self::new(
| {
"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": 1250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1275_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::PaymentAddress> for payment_address::PaymentAddress {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::PaymentAddress,
) -> Result<Self, error_stack::Report<Self::Error>> {
let shipping = match value.shipping_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let billing = match value.billing_address.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": 1275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1275_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::PaymentAddress> for payment_address::PaymentAddress {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::PaymentAddress,
) -> Result<Self, error_stack::Report<Self::Error>> {
let shipping = match value.shipping_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let billing = match value.billing_address.clone() {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let payment_method_billing = match value.billing_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
Ok(Self::new(
shipping,
billing,
payment_method_billing,
Some(false), // should_unify_address set to false
))
| {
"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": 1275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1275_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::PaymentAddress> for payment_address::PaymentAddress {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::PaymentAddress,
) -> Result<Self, error_stack::Report<Self::Error>> {
let shipping = match value.shipping_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let billing = match value.billing_address.clone() {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
let payment_method_billing = match value.billing_address {
Some(address) => Some(Address::foreign_try_from(address)?),
None => None,
};
Ok(Self::new(
shipping,
billing,
payment_method_billing,
Some(false), // should_unify_address set to false
))
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for Address {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email = match value.email.clone() {
Some(email) => Some(
common_utils::pii::Email::from_str(&email.expose()).change_context(
ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL".to_owned(),
error_identifier: 400,
error_message: "Invalid email".to_owned(),
error_object: None,
}),
)?,
),
None => 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": 1275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1300_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
shipping,
billing,
payment_method_billing,
Some(false), // should_unify_address set to false
))
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for Address {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email = match value.email.clone() {
Some(email) => Some(
| {
"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": 1300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1300_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
shipping,
billing,
payment_method_billing,
Some(false), // should_unify_address set to false
))
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for Address {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email = match value.email.clone() {
Some(email) => Some(
common_utils::pii::Email::from_str(&email.expose()).change_context(
ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL".to_owned(),
error_identifier: 400,
error_message: "Invalid email".to_owned(),
error_object: None,
}),
)?,
),
None => None,
};
Ok(Self {
address: Some(AddressDetails::foreign_try_from(value.clone())?),
phone: value.phone_number.map(|phone_number| PhoneDetails {
number: Some(phone_number),
| {
"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": 1300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1300_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
shipping,
billing,
payment_method_billing,
Some(false), // should_unify_address set to false
))
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for Address {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
let email = match value.email.clone() {
Some(email) => Some(
common_utils::pii::Email::from_str(&email.expose()).change_context(
ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_EMAIL".to_owned(),
error_identifier: 400,
error_message: "Invalid email".to_owned(),
error_object: None,
}),
)?,
),
None => None,
};
Ok(Self {
address: Some(AddressDetails::foreign_try_from(value.clone())?),
phone: value.phone_number.map(|phone_number| PhoneDetails {
number: Some(phone_number),
country_code: value.phone_country_code,
}),
email,
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::CountryAlpha2> for common_enums::CountryAlpha2 {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::CountryAlpha2,
) -> Result<Self, error_stack::Report<Self::Error>> {
match value {
grpc_api_types::payments::CountryAlpha2::Us => Ok(Self::US),
grpc_api_types::payments::CountryAlpha2::Af => Ok(Self::AF),
grpc_api_types::payments::CountryAlpha2::Ax => Ok(Self::AX),
grpc_api_types::payments::CountryAlpha2::Al => Ok(Self::AL),
grpc_api_types::payments::CountryAlpha2::Dz => Ok(Self::DZ),
grpc_api_types::payments::CountryAlpha2::As => Ok(Self::AS),
| {
"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": 1300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1325_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
};
Ok(Self {
address: Some(AddressDetails::foreign_try_from(value.clone())?),
phone: value.phone_number.map(|phone_number| PhoneDetails {
number: Some(phone_number),
country_code: value.phone_country_code,
}),
email,
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::CountryAlpha2> for common_enums::CountryAlpha2 {
type Error = 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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1325_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
};
Ok(Self {
address: Some(AddressDetails::foreign_try_from(value.clone())?),
phone: value.phone_number.map(|phone_number| PhoneDetails {
number: Some(phone_number),
country_code: value.phone_country_code,
}),
email,
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::CountryAlpha2> for common_enums::CountryAlpha2 {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::CountryAlpha2,
) -> Result<Self, error_stack::Report<Self::Error>> {
match value {
grpc_api_types::payments::CountryAlpha2::Us => Ok(Self::US),
grpc_api_types::payments::CountryAlpha2::Af => Ok(Self::AF),
grpc_api_types::payments::CountryAlpha2::Ax => Ok(Self::AX),
grpc_api_types::payments::CountryAlpha2::Al => Ok(Self::AL),
grpc_api_types::payments::CountryAlpha2::Dz => Ok(Self::DZ),
grpc_api_types::payments::CountryAlpha2::As => Ok(Self::AS),
grpc_api_types::payments::CountryAlpha2::Ad => Ok(Self::AD),
grpc_api_types::payments::CountryAlpha2::Ao => Ok(Self::AO),
grpc_api_types::payments::CountryAlpha2::Ai => Ok(Self::AI),
grpc_api_types::payments::CountryAlpha2::Aq => Ok(Self::AQ),
grpc_api_types::payments::CountryAlpha2::Ag => Ok(Self::AG),
| {
"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": 1325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1325_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
};
Ok(Self {
address: Some(AddressDetails::foreign_try_from(value.clone())?),
phone: value.phone_number.map(|phone_number| PhoneDetails {
number: Some(phone_number),
country_code: value.phone_country_code,
}),
email,
})
}
}
impl ForeignTryFrom<grpc_api_types::payments::CountryAlpha2> for common_enums::CountryAlpha2 {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::CountryAlpha2,
) -> Result<Self, error_stack::Report<Self::Error>> {
match value {
grpc_api_types::payments::CountryAlpha2::Us => Ok(Self::US),
grpc_api_types::payments::CountryAlpha2::Af => Ok(Self::AF),
grpc_api_types::payments::CountryAlpha2::Ax => Ok(Self::AX),
grpc_api_types::payments::CountryAlpha2::Al => Ok(Self::AL),
grpc_api_types::payments::CountryAlpha2::Dz => Ok(Self::DZ),
grpc_api_types::payments::CountryAlpha2::As => Ok(Self::AS),
grpc_api_types::payments::CountryAlpha2::Ad => Ok(Self::AD),
grpc_api_types::payments::CountryAlpha2::Ao => Ok(Self::AO),
grpc_api_types::payments::CountryAlpha2::Ai => Ok(Self::AI),
grpc_api_types::payments::CountryAlpha2::Aq => Ok(Self::AQ),
grpc_api_types::payments::CountryAlpha2::Ag => Ok(Self::AG),
grpc_api_types::payments::CountryAlpha2::Ar => Ok(Self::AR),
grpc_api_types::payments::CountryAlpha2::Am => Ok(Self::AM),
grpc_api_types::payments::CountryAlpha2::Aw => Ok(Self::AW),
grpc_api_types::payments::CountryAlpha2::Au => Ok(Self::AU),
grpc_api_types::payments::CountryAlpha2::At => Ok(Self::AT),
grpc_api_types::payments::CountryAlpha2::Az => Ok(Self::AZ),
grpc_api_types::payments::CountryAlpha2::Bs => Ok(Self::BS),
grpc_api_types::payments::CountryAlpha2::Bh => Ok(Self::BH),
grpc_api_types::payments::CountryAlpha2::Bd => Ok(Self::BD),
grpc_api_types::payments::CountryAlpha2::Bb => Ok(Self::BB),
grpc_api_types::payments::CountryAlpha2::By => Ok(Self::BY),
grpc_api_types::payments::CountryAlpha2::Be => Ok(Self::BE),
grpc_api_types::payments::CountryAlpha2::Bz => Ok(Self::BZ),
grpc_api_types::payments::CountryAlpha2::Bj => Ok(Self::BJ),
grpc_api_types::payments::CountryAlpha2::Bm => Ok(Self::BM),
grpc_api_types::payments::CountryAlpha2::Bt => Ok(Self::BT),
grpc_api_types::payments::CountryAlpha2::Bo => Ok(Self::BO),
grpc_api_types::payments::CountryAlpha2::Bq => Ok(Self::BQ),
grpc_api_types::payments::CountryAlpha2::Ba => Ok(Self::BA),
grpc_api_types::payments::CountryAlpha2::Bw => Ok(Self::BW),
| {
"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": 1325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1350_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Ad => Ok(Self::AD),
grpc_api_types::payments::CountryAlpha2::Ao => Ok(Self::AO),
grpc_api_types::payments::CountryAlpha2::Ai => Ok(Self::AI),
grpc_api_types::payments::CountryAlpha2::Aq => Ok(Self::AQ),
grpc_api_types::payments::CountryAlpha2::Ag => Ok(Self::AG),
grpc_api_types::payments::CountryAlpha2::Ar => Ok(Self::AR),
grpc_api_types::payments::CountryAlpha2::Am => Ok(Self::AM),
grpc_api_types::payments::CountryAlpha2::Aw => Ok(Self::AW),
grpc_api_types::payments::CountryAlpha2::Au => Ok(Self::AU),
grpc_api_types::payments::CountryAlpha2::At => Ok(Self::AT),
grpc_api_types::payments::CountryAlpha2::Az => Ok(Self::AZ),
grpc_api_types::payments::CountryAlpha2::Bs => Ok(Self::BS),
grpc_api_types::payments::CountryAlpha2::Bh => Ok(Self::BH),
grpc_api_types::payments::CountryAlpha2::Bd => Ok(Self::BD),
grpc_api_types::payments::CountryAlpha2::Bb => Ok(Self::BB),
| {
"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": 1350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1350_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Ad => Ok(Self::AD),
grpc_api_types::payments::CountryAlpha2::Ao => Ok(Self::AO),
grpc_api_types::payments::CountryAlpha2::Ai => Ok(Self::AI),
grpc_api_types::payments::CountryAlpha2::Aq => Ok(Self::AQ),
grpc_api_types::payments::CountryAlpha2::Ag => Ok(Self::AG),
grpc_api_types::payments::CountryAlpha2::Ar => Ok(Self::AR),
grpc_api_types::payments::CountryAlpha2::Am => Ok(Self::AM),
grpc_api_types::payments::CountryAlpha2::Aw => Ok(Self::AW),
grpc_api_types::payments::CountryAlpha2::Au => Ok(Self::AU),
grpc_api_types::payments::CountryAlpha2::At => Ok(Self::AT),
grpc_api_types::payments::CountryAlpha2::Az => Ok(Self::AZ),
grpc_api_types::payments::CountryAlpha2::Bs => Ok(Self::BS),
grpc_api_types::payments::CountryAlpha2::Bh => Ok(Self::BH),
grpc_api_types::payments::CountryAlpha2::Bd => Ok(Self::BD),
grpc_api_types::payments::CountryAlpha2::Bb => Ok(Self::BB),
grpc_api_types::payments::CountryAlpha2::By => Ok(Self::BY),
grpc_api_types::payments::CountryAlpha2::Be => Ok(Self::BE),
grpc_api_types::payments::CountryAlpha2::Bz => Ok(Self::BZ),
grpc_api_types::payments::CountryAlpha2::Bj => Ok(Self::BJ),
grpc_api_types::payments::CountryAlpha2::Bm => Ok(Self::BM),
grpc_api_types::payments::CountryAlpha2::Bt => Ok(Self::BT),
grpc_api_types::payments::CountryAlpha2::Bo => Ok(Self::BO),
grpc_api_types::payments::CountryAlpha2::Bq => Ok(Self::BQ),
grpc_api_types::payments::CountryAlpha2::Ba => Ok(Self::BA),
grpc_api_types::payments::CountryAlpha2::Bw => Ok(Self::BW),
grpc_api_types::payments::CountryAlpha2::Bv => Ok(Self::BV),
grpc_api_types::payments::CountryAlpha2::Br => Ok(Self::BR),
grpc_api_types::payments::CountryAlpha2::Io => Ok(Self::IO),
grpc_api_types::payments::CountryAlpha2::Bn => Ok(Self::BN),
grpc_api_types::payments::CountryAlpha2::Bg => Ok(Self::BG),
| {
"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": 1350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1350_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Ad => Ok(Self::AD),
grpc_api_types::payments::CountryAlpha2::Ao => Ok(Self::AO),
grpc_api_types::payments::CountryAlpha2::Ai => Ok(Self::AI),
grpc_api_types::payments::CountryAlpha2::Aq => Ok(Self::AQ),
grpc_api_types::payments::CountryAlpha2::Ag => Ok(Self::AG),
grpc_api_types::payments::CountryAlpha2::Ar => Ok(Self::AR),
grpc_api_types::payments::CountryAlpha2::Am => Ok(Self::AM),
grpc_api_types::payments::CountryAlpha2::Aw => Ok(Self::AW),
grpc_api_types::payments::CountryAlpha2::Au => Ok(Self::AU),
grpc_api_types::payments::CountryAlpha2::At => Ok(Self::AT),
grpc_api_types::payments::CountryAlpha2::Az => Ok(Self::AZ),
grpc_api_types::payments::CountryAlpha2::Bs => Ok(Self::BS),
grpc_api_types::payments::CountryAlpha2::Bh => Ok(Self::BH),
grpc_api_types::payments::CountryAlpha2::Bd => Ok(Self::BD),
grpc_api_types::payments::CountryAlpha2::Bb => Ok(Self::BB),
grpc_api_types::payments::CountryAlpha2::By => Ok(Self::BY),
grpc_api_types::payments::CountryAlpha2::Be => Ok(Self::BE),
grpc_api_types::payments::CountryAlpha2::Bz => Ok(Self::BZ),
grpc_api_types::payments::CountryAlpha2::Bj => Ok(Self::BJ),
grpc_api_types::payments::CountryAlpha2::Bm => Ok(Self::BM),
grpc_api_types::payments::CountryAlpha2::Bt => Ok(Self::BT),
grpc_api_types::payments::CountryAlpha2::Bo => Ok(Self::BO),
grpc_api_types::payments::CountryAlpha2::Bq => Ok(Self::BQ),
grpc_api_types::payments::CountryAlpha2::Ba => Ok(Self::BA),
grpc_api_types::payments::CountryAlpha2::Bw => Ok(Self::BW),
grpc_api_types::payments::CountryAlpha2::Bv => Ok(Self::BV),
grpc_api_types::payments::CountryAlpha2::Br => Ok(Self::BR),
grpc_api_types::payments::CountryAlpha2::Io => Ok(Self::IO),
grpc_api_types::payments::CountryAlpha2::Bn => Ok(Self::BN),
grpc_api_types::payments::CountryAlpha2::Bg => Ok(Self::BG),
grpc_api_types::payments::CountryAlpha2::Bf => Ok(Self::BF),
grpc_api_types::payments::CountryAlpha2::Bi => Ok(Self::BI),
grpc_api_types::payments::CountryAlpha2::Kh => Ok(Self::KH),
grpc_api_types::payments::CountryAlpha2::Cm => Ok(Self::CM),
grpc_api_types::payments::CountryAlpha2::Ca => Ok(Self::CA),
grpc_api_types::payments::CountryAlpha2::Cv => Ok(Self::CV),
grpc_api_types::payments::CountryAlpha2::Ky => Ok(Self::KY),
grpc_api_types::payments::CountryAlpha2::Cf => Ok(Self::CF),
grpc_api_types::payments::CountryAlpha2::Td => Ok(Self::TD),
grpc_api_types::payments::CountryAlpha2::Cl => Ok(Self::CL),
grpc_api_types::payments::CountryAlpha2::Cn => Ok(Self::CN),
grpc_api_types::payments::CountryAlpha2::Cx => Ok(Self::CX),
grpc_api_types::payments::CountryAlpha2::Cc => Ok(Self::CC),
grpc_api_types::payments::CountryAlpha2::Co => Ok(Self::CO),
grpc_api_types::payments::CountryAlpha2::Km => Ok(Self::KM),
grpc_api_types::payments::CountryAlpha2::Cg => Ok(Self::CG),
grpc_api_types::payments::CountryAlpha2::Cd => Ok(Self::CD),
grpc_api_types::payments::CountryAlpha2::Ck => Ok(Self::CK),
grpc_api_types::payments::CountryAlpha2::Cr => Ok(Self::CR),
grpc_api_types::payments::CountryAlpha2::Ci => Ok(Self::CI),
| {
"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": 1350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1375_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Bv => Ok(Self::BV),
grpc_api_types::payments::CountryAlpha2::Br => Ok(Self::BR),
grpc_api_types::payments::CountryAlpha2::Io => Ok(Self::IO),
grpc_api_types::payments::CountryAlpha2::Bn => Ok(Self::BN),
grpc_api_types::payments::CountryAlpha2::Bg => Ok(Self::BG),
grpc_api_types::payments::CountryAlpha2::Bf => Ok(Self::BF),
grpc_api_types::payments::CountryAlpha2::Bi => Ok(Self::BI),
grpc_api_types::payments::CountryAlpha2::Kh => Ok(Self::KH),
grpc_api_types::payments::CountryAlpha2::Cm => Ok(Self::CM),
grpc_api_types::payments::CountryAlpha2::Ca => Ok(Self::CA),
grpc_api_types::payments::CountryAlpha2::Cv => Ok(Self::CV),
grpc_api_types::payments::CountryAlpha2::Ky => Ok(Self::KY),
grpc_api_types::payments::CountryAlpha2::Cf => Ok(Self::CF),
grpc_api_types::payments::CountryAlpha2::Td => Ok(Self::TD),
grpc_api_types::payments::CountryAlpha2::Cl => Ok(Self::CL),
| {
"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": 1375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1375_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Bv => Ok(Self::BV),
grpc_api_types::payments::CountryAlpha2::Br => Ok(Self::BR),
grpc_api_types::payments::CountryAlpha2::Io => Ok(Self::IO),
grpc_api_types::payments::CountryAlpha2::Bn => Ok(Self::BN),
grpc_api_types::payments::CountryAlpha2::Bg => Ok(Self::BG),
grpc_api_types::payments::CountryAlpha2::Bf => Ok(Self::BF),
grpc_api_types::payments::CountryAlpha2::Bi => Ok(Self::BI),
grpc_api_types::payments::CountryAlpha2::Kh => Ok(Self::KH),
grpc_api_types::payments::CountryAlpha2::Cm => Ok(Self::CM),
grpc_api_types::payments::CountryAlpha2::Ca => Ok(Self::CA),
grpc_api_types::payments::CountryAlpha2::Cv => Ok(Self::CV),
grpc_api_types::payments::CountryAlpha2::Ky => Ok(Self::KY),
grpc_api_types::payments::CountryAlpha2::Cf => Ok(Self::CF),
grpc_api_types::payments::CountryAlpha2::Td => Ok(Self::TD),
grpc_api_types::payments::CountryAlpha2::Cl => Ok(Self::CL),
grpc_api_types::payments::CountryAlpha2::Cn => Ok(Self::CN),
grpc_api_types::payments::CountryAlpha2::Cx => Ok(Self::CX),
grpc_api_types::payments::CountryAlpha2::Cc => Ok(Self::CC),
grpc_api_types::payments::CountryAlpha2::Co => Ok(Self::CO),
grpc_api_types::payments::CountryAlpha2::Km => Ok(Self::KM),
grpc_api_types::payments::CountryAlpha2::Cg => Ok(Self::CG),
grpc_api_types::payments::CountryAlpha2::Cd => Ok(Self::CD),
grpc_api_types::payments::CountryAlpha2::Ck => Ok(Self::CK),
grpc_api_types::payments::CountryAlpha2::Cr => Ok(Self::CR),
grpc_api_types::payments::CountryAlpha2::Ci => Ok(Self::CI),
grpc_api_types::payments::CountryAlpha2::Hr => Ok(Self::HR),
grpc_api_types::payments::CountryAlpha2::Cu => Ok(Self::CU),
grpc_api_types::payments::CountryAlpha2::Cw => Ok(Self::CW),
grpc_api_types::payments::CountryAlpha2::Cy => Ok(Self::CY),
grpc_api_types::payments::CountryAlpha2::Cz => Ok(Self::CZ),
| {
"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": 1375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1375_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Bv => Ok(Self::BV),
grpc_api_types::payments::CountryAlpha2::Br => Ok(Self::BR),
grpc_api_types::payments::CountryAlpha2::Io => Ok(Self::IO),
grpc_api_types::payments::CountryAlpha2::Bn => Ok(Self::BN),
grpc_api_types::payments::CountryAlpha2::Bg => Ok(Self::BG),
grpc_api_types::payments::CountryAlpha2::Bf => Ok(Self::BF),
grpc_api_types::payments::CountryAlpha2::Bi => Ok(Self::BI),
grpc_api_types::payments::CountryAlpha2::Kh => Ok(Self::KH),
grpc_api_types::payments::CountryAlpha2::Cm => Ok(Self::CM),
grpc_api_types::payments::CountryAlpha2::Ca => Ok(Self::CA),
grpc_api_types::payments::CountryAlpha2::Cv => Ok(Self::CV),
grpc_api_types::payments::CountryAlpha2::Ky => Ok(Self::KY),
grpc_api_types::payments::CountryAlpha2::Cf => Ok(Self::CF),
grpc_api_types::payments::CountryAlpha2::Td => Ok(Self::TD),
grpc_api_types::payments::CountryAlpha2::Cl => Ok(Self::CL),
grpc_api_types::payments::CountryAlpha2::Cn => Ok(Self::CN),
grpc_api_types::payments::CountryAlpha2::Cx => Ok(Self::CX),
grpc_api_types::payments::CountryAlpha2::Cc => Ok(Self::CC),
grpc_api_types::payments::CountryAlpha2::Co => Ok(Self::CO),
grpc_api_types::payments::CountryAlpha2::Km => Ok(Self::KM),
grpc_api_types::payments::CountryAlpha2::Cg => Ok(Self::CG),
grpc_api_types::payments::CountryAlpha2::Cd => Ok(Self::CD),
grpc_api_types::payments::CountryAlpha2::Ck => Ok(Self::CK),
grpc_api_types::payments::CountryAlpha2::Cr => Ok(Self::CR),
grpc_api_types::payments::CountryAlpha2::Ci => Ok(Self::CI),
grpc_api_types::payments::CountryAlpha2::Hr => Ok(Self::HR),
grpc_api_types::payments::CountryAlpha2::Cu => Ok(Self::CU),
grpc_api_types::payments::CountryAlpha2::Cw => Ok(Self::CW),
grpc_api_types::payments::CountryAlpha2::Cy => Ok(Self::CY),
grpc_api_types::payments::CountryAlpha2::Cz => Ok(Self::CZ),
grpc_api_types::payments::CountryAlpha2::Dk => Ok(Self::DK),
grpc_api_types::payments::CountryAlpha2::Dj => Ok(Self::DJ),
grpc_api_types::payments::CountryAlpha2::Dm => Ok(Self::DM),
grpc_api_types::payments::CountryAlpha2::Do => Ok(Self::DO),
grpc_api_types::payments::CountryAlpha2::Ec => Ok(Self::EC),
grpc_api_types::payments::CountryAlpha2::Eg => Ok(Self::EG),
grpc_api_types::payments::CountryAlpha2::Sv => Ok(Self::SV),
grpc_api_types::payments::CountryAlpha2::Gq => Ok(Self::GQ),
grpc_api_types::payments::CountryAlpha2::Er => Ok(Self::ER),
grpc_api_types::payments::CountryAlpha2::Ee => Ok(Self::EE),
grpc_api_types::payments::CountryAlpha2::Et => Ok(Self::ET),
grpc_api_types::payments::CountryAlpha2::Fk => Ok(Self::FK),
grpc_api_types::payments::CountryAlpha2::Fo => Ok(Self::FO),
grpc_api_types::payments::CountryAlpha2::Fj => Ok(Self::FJ),
grpc_api_types::payments::CountryAlpha2::Fi => Ok(Self::FI),
grpc_api_types::payments::CountryAlpha2::Fr => Ok(Self::FR),
grpc_api_types::payments::CountryAlpha2::Gf => Ok(Self::GF),
grpc_api_types::payments::CountryAlpha2::Pf => Ok(Self::PF),
grpc_api_types::payments::CountryAlpha2::Tf => Ok(Self::TF),
grpc_api_types::payments::CountryAlpha2::Ga => Ok(Self::GA),
| {
"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": 1375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1400_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Hr => Ok(Self::HR),
grpc_api_types::payments::CountryAlpha2::Cu => Ok(Self::CU),
grpc_api_types::payments::CountryAlpha2::Cw => Ok(Self::CW),
grpc_api_types::payments::CountryAlpha2::Cy => Ok(Self::CY),
grpc_api_types::payments::CountryAlpha2::Cz => Ok(Self::CZ),
grpc_api_types::payments::CountryAlpha2::Dk => Ok(Self::DK),
grpc_api_types::payments::CountryAlpha2::Dj => Ok(Self::DJ),
grpc_api_types::payments::CountryAlpha2::Dm => Ok(Self::DM),
grpc_api_types::payments::CountryAlpha2::Do => Ok(Self::DO),
grpc_api_types::payments::CountryAlpha2::Ec => Ok(Self::EC),
grpc_api_types::payments::CountryAlpha2::Eg => Ok(Self::EG),
grpc_api_types::payments::CountryAlpha2::Sv => Ok(Self::SV),
grpc_api_types::payments::CountryAlpha2::Gq => Ok(Self::GQ),
grpc_api_types::payments::CountryAlpha2::Er => Ok(Self::ER),
grpc_api_types::payments::CountryAlpha2::Ee => Ok(Self::EE),
| {
"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": 1400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1400_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Hr => Ok(Self::HR),
grpc_api_types::payments::CountryAlpha2::Cu => Ok(Self::CU),
grpc_api_types::payments::CountryAlpha2::Cw => Ok(Self::CW),
grpc_api_types::payments::CountryAlpha2::Cy => Ok(Self::CY),
grpc_api_types::payments::CountryAlpha2::Cz => Ok(Self::CZ),
grpc_api_types::payments::CountryAlpha2::Dk => Ok(Self::DK),
grpc_api_types::payments::CountryAlpha2::Dj => Ok(Self::DJ),
grpc_api_types::payments::CountryAlpha2::Dm => Ok(Self::DM),
grpc_api_types::payments::CountryAlpha2::Do => Ok(Self::DO),
grpc_api_types::payments::CountryAlpha2::Ec => Ok(Self::EC),
grpc_api_types::payments::CountryAlpha2::Eg => Ok(Self::EG),
grpc_api_types::payments::CountryAlpha2::Sv => Ok(Self::SV),
grpc_api_types::payments::CountryAlpha2::Gq => Ok(Self::GQ),
grpc_api_types::payments::CountryAlpha2::Er => Ok(Self::ER),
grpc_api_types::payments::CountryAlpha2::Ee => Ok(Self::EE),
grpc_api_types::payments::CountryAlpha2::Et => Ok(Self::ET),
grpc_api_types::payments::CountryAlpha2::Fk => Ok(Self::FK),
grpc_api_types::payments::CountryAlpha2::Fo => Ok(Self::FO),
grpc_api_types::payments::CountryAlpha2::Fj => Ok(Self::FJ),
grpc_api_types::payments::CountryAlpha2::Fi => Ok(Self::FI),
grpc_api_types::payments::CountryAlpha2::Fr => Ok(Self::FR),
grpc_api_types::payments::CountryAlpha2::Gf => Ok(Self::GF),
grpc_api_types::payments::CountryAlpha2::Pf => Ok(Self::PF),
grpc_api_types::payments::CountryAlpha2::Tf => Ok(Self::TF),
grpc_api_types::payments::CountryAlpha2::Ga => Ok(Self::GA),
grpc_api_types::payments::CountryAlpha2::Gm => Ok(Self::GM),
grpc_api_types::payments::CountryAlpha2::Ge => Ok(Self::GE),
grpc_api_types::payments::CountryAlpha2::De => Ok(Self::DE),
grpc_api_types::payments::CountryAlpha2::Gh => Ok(Self::GH),
grpc_api_types::payments::CountryAlpha2::Gi => Ok(Self::GI),
| {
"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": 1400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1400_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Hr => Ok(Self::HR),
grpc_api_types::payments::CountryAlpha2::Cu => Ok(Self::CU),
grpc_api_types::payments::CountryAlpha2::Cw => Ok(Self::CW),
grpc_api_types::payments::CountryAlpha2::Cy => Ok(Self::CY),
grpc_api_types::payments::CountryAlpha2::Cz => Ok(Self::CZ),
grpc_api_types::payments::CountryAlpha2::Dk => Ok(Self::DK),
grpc_api_types::payments::CountryAlpha2::Dj => Ok(Self::DJ),
grpc_api_types::payments::CountryAlpha2::Dm => Ok(Self::DM),
grpc_api_types::payments::CountryAlpha2::Do => Ok(Self::DO),
grpc_api_types::payments::CountryAlpha2::Ec => Ok(Self::EC),
grpc_api_types::payments::CountryAlpha2::Eg => Ok(Self::EG),
grpc_api_types::payments::CountryAlpha2::Sv => Ok(Self::SV),
grpc_api_types::payments::CountryAlpha2::Gq => Ok(Self::GQ),
grpc_api_types::payments::CountryAlpha2::Er => Ok(Self::ER),
grpc_api_types::payments::CountryAlpha2::Ee => Ok(Self::EE),
grpc_api_types::payments::CountryAlpha2::Et => Ok(Self::ET),
grpc_api_types::payments::CountryAlpha2::Fk => Ok(Self::FK),
grpc_api_types::payments::CountryAlpha2::Fo => Ok(Self::FO),
grpc_api_types::payments::CountryAlpha2::Fj => Ok(Self::FJ),
grpc_api_types::payments::CountryAlpha2::Fi => Ok(Self::FI),
grpc_api_types::payments::CountryAlpha2::Fr => Ok(Self::FR),
grpc_api_types::payments::CountryAlpha2::Gf => Ok(Self::GF),
grpc_api_types::payments::CountryAlpha2::Pf => Ok(Self::PF),
grpc_api_types::payments::CountryAlpha2::Tf => Ok(Self::TF),
grpc_api_types::payments::CountryAlpha2::Ga => Ok(Self::GA),
grpc_api_types::payments::CountryAlpha2::Gm => Ok(Self::GM),
grpc_api_types::payments::CountryAlpha2::Ge => Ok(Self::GE),
grpc_api_types::payments::CountryAlpha2::De => Ok(Self::DE),
grpc_api_types::payments::CountryAlpha2::Gh => Ok(Self::GH),
grpc_api_types::payments::CountryAlpha2::Gi => Ok(Self::GI),
grpc_api_types::payments::CountryAlpha2::Gr => Ok(Self::GR),
grpc_api_types::payments::CountryAlpha2::Gl => Ok(Self::GL),
grpc_api_types::payments::CountryAlpha2::Gd => Ok(Self::GD),
grpc_api_types::payments::CountryAlpha2::Gp => Ok(Self::GP),
grpc_api_types::payments::CountryAlpha2::Gu => Ok(Self::GU),
grpc_api_types::payments::CountryAlpha2::Gt => Ok(Self::GT),
grpc_api_types::payments::CountryAlpha2::Gg => Ok(Self::GG),
grpc_api_types::payments::CountryAlpha2::Gn => Ok(Self::GN),
grpc_api_types::payments::CountryAlpha2::Gw => Ok(Self::GW),
grpc_api_types::payments::CountryAlpha2::Gy => Ok(Self::GY),
grpc_api_types::payments::CountryAlpha2::Ht => Ok(Self::HT),
grpc_api_types::payments::CountryAlpha2::Hm => Ok(Self::HM),
grpc_api_types::payments::CountryAlpha2::Va => Ok(Self::VA),
grpc_api_types::payments::CountryAlpha2::Hn => Ok(Self::HN),
grpc_api_types::payments::CountryAlpha2::Hk => Ok(Self::HK),
grpc_api_types::payments::CountryAlpha2::Hu => Ok(Self::HU),
grpc_api_types::payments::CountryAlpha2::Is => Ok(Self::IS),
grpc_api_types::payments::CountryAlpha2::In => Ok(Self::IN),
grpc_api_types::payments::CountryAlpha2::Id => Ok(Self::ID),
grpc_api_types::payments::CountryAlpha2::Ir => Ok(Self::IR),
| {
"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": 1400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1425_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Gm => Ok(Self::GM),
grpc_api_types::payments::CountryAlpha2::Ge => Ok(Self::GE),
grpc_api_types::payments::CountryAlpha2::De => Ok(Self::DE),
grpc_api_types::payments::CountryAlpha2::Gh => Ok(Self::GH),
grpc_api_types::payments::CountryAlpha2::Gi => Ok(Self::GI),
grpc_api_types::payments::CountryAlpha2::Gr => Ok(Self::GR),
grpc_api_types::payments::CountryAlpha2::Gl => Ok(Self::GL),
grpc_api_types::payments::CountryAlpha2::Gd => Ok(Self::GD),
grpc_api_types::payments::CountryAlpha2::Gp => Ok(Self::GP),
grpc_api_types::payments::CountryAlpha2::Gu => Ok(Self::GU),
grpc_api_types::payments::CountryAlpha2::Gt => Ok(Self::GT),
grpc_api_types::payments::CountryAlpha2::Gg => Ok(Self::GG),
grpc_api_types::payments::CountryAlpha2::Gn => Ok(Self::GN),
grpc_api_types::payments::CountryAlpha2::Gw => Ok(Self::GW),
grpc_api_types::payments::CountryAlpha2::Gy => Ok(Self::GY),
| {
"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": 1425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1425_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Gm => Ok(Self::GM),
grpc_api_types::payments::CountryAlpha2::Ge => Ok(Self::GE),
grpc_api_types::payments::CountryAlpha2::De => Ok(Self::DE),
grpc_api_types::payments::CountryAlpha2::Gh => Ok(Self::GH),
grpc_api_types::payments::CountryAlpha2::Gi => Ok(Self::GI),
grpc_api_types::payments::CountryAlpha2::Gr => Ok(Self::GR),
grpc_api_types::payments::CountryAlpha2::Gl => Ok(Self::GL),
grpc_api_types::payments::CountryAlpha2::Gd => Ok(Self::GD),
grpc_api_types::payments::CountryAlpha2::Gp => Ok(Self::GP),
grpc_api_types::payments::CountryAlpha2::Gu => Ok(Self::GU),
grpc_api_types::payments::CountryAlpha2::Gt => Ok(Self::GT),
grpc_api_types::payments::CountryAlpha2::Gg => Ok(Self::GG),
grpc_api_types::payments::CountryAlpha2::Gn => Ok(Self::GN),
grpc_api_types::payments::CountryAlpha2::Gw => Ok(Self::GW),
grpc_api_types::payments::CountryAlpha2::Gy => Ok(Self::GY),
grpc_api_types::payments::CountryAlpha2::Ht => Ok(Self::HT),
grpc_api_types::payments::CountryAlpha2::Hm => Ok(Self::HM),
grpc_api_types::payments::CountryAlpha2::Va => Ok(Self::VA),
grpc_api_types::payments::CountryAlpha2::Hn => Ok(Self::HN),
grpc_api_types::payments::CountryAlpha2::Hk => Ok(Self::HK),
grpc_api_types::payments::CountryAlpha2::Hu => Ok(Self::HU),
grpc_api_types::payments::CountryAlpha2::Is => Ok(Self::IS),
grpc_api_types::payments::CountryAlpha2::In => Ok(Self::IN),
grpc_api_types::payments::CountryAlpha2::Id => Ok(Self::ID),
grpc_api_types::payments::CountryAlpha2::Ir => Ok(Self::IR),
grpc_api_types::payments::CountryAlpha2::Iq => Ok(Self::IQ),
grpc_api_types::payments::CountryAlpha2::Ie => Ok(Self::IE),
grpc_api_types::payments::CountryAlpha2::Im => Ok(Self::IM),
grpc_api_types::payments::CountryAlpha2::Il => Ok(Self::IL),
grpc_api_types::payments::CountryAlpha2::It => Ok(Self::IT),
| {
"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": 1425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1425_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Gm => Ok(Self::GM),
grpc_api_types::payments::CountryAlpha2::Ge => Ok(Self::GE),
grpc_api_types::payments::CountryAlpha2::De => Ok(Self::DE),
grpc_api_types::payments::CountryAlpha2::Gh => Ok(Self::GH),
grpc_api_types::payments::CountryAlpha2::Gi => Ok(Self::GI),
grpc_api_types::payments::CountryAlpha2::Gr => Ok(Self::GR),
grpc_api_types::payments::CountryAlpha2::Gl => Ok(Self::GL),
grpc_api_types::payments::CountryAlpha2::Gd => Ok(Self::GD),
grpc_api_types::payments::CountryAlpha2::Gp => Ok(Self::GP),
grpc_api_types::payments::CountryAlpha2::Gu => Ok(Self::GU),
grpc_api_types::payments::CountryAlpha2::Gt => Ok(Self::GT),
grpc_api_types::payments::CountryAlpha2::Gg => Ok(Self::GG),
grpc_api_types::payments::CountryAlpha2::Gn => Ok(Self::GN),
grpc_api_types::payments::CountryAlpha2::Gw => Ok(Self::GW),
grpc_api_types::payments::CountryAlpha2::Gy => Ok(Self::GY),
grpc_api_types::payments::CountryAlpha2::Ht => Ok(Self::HT),
grpc_api_types::payments::CountryAlpha2::Hm => Ok(Self::HM),
grpc_api_types::payments::CountryAlpha2::Va => Ok(Self::VA),
grpc_api_types::payments::CountryAlpha2::Hn => Ok(Self::HN),
grpc_api_types::payments::CountryAlpha2::Hk => Ok(Self::HK),
grpc_api_types::payments::CountryAlpha2::Hu => Ok(Self::HU),
grpc_api_types::payments::CountryAlpha2::Is => Ok(Self::IS),
grpc_api_types::payments::CountryAlpha2::In => Ok(Self::IN),
grpc_api_types::payments::CountryAlpha2::Id => Ok(Self::ID),
grpc_api_types::payments::CountryAlpha2::Ir => Ok(Self::IR),
grpc_api_types::payments::CountryAlpha2::Iq => Ok(Self::IQ),
grpc_api_types::payments::CountryAlpha2::Ie => Ok(Self::IE),
grpc_api_types::payments::CountryAlpha2::Im => Ok(Self::IM),
grpc_api_types::payments::CountryAlpha2::Il => Ok(Self::IL),
grpc_api_types::payments::CountryAlpha2::It => Ok(Self::IT),
grpc_api_types::payments::CountryAlpha2::Jm => Ok(Self::JM),
grpc_api_types::payments::CountryAlpha2::Jp => Ok(Self::JP),
grpc_api_types::payments::CountryAlpha2::Je => Ok(Self::JE),
grpc_api_types::payments::CountryAlpha2::Jo => Ok(Self::JO),
grpc_api_types::payments::CountryAlpha2::Kz => Ok(Self::KZ),
grpc_api_types::payments::CountryAlpha2::Ke => Ok(Self::KE),
grpc_api_types::payments::CountryAlpha2::Ki => Ok(Self::KI),
grpc_api_types::payments::CountryAlpha2::Kp => Ok(Self::KP),
grpc_api_types::payments::CountryAlpha2::Kr => Ok(Self::KR),
grpc_api_types::payments::CountryAlpha2::Kw => Ok(Self::KW),
grpc_api_types::payments::CountryAlpha2::Kg => Ok(Self::KG),
grpc_api_types::payments::CountryAlpha2::La => Ok(Self::LA),
grpc_api_types::payments::CountryAlpha2::Lv => Ok(Self::LV),
grpc_api_types::payments::CountryAlpha2::Lb => Ok(Self::LB),
grpc_api_types::payments::CountryAlpha2::Ls => Ok(Self::LS),
grpc_api_types::payments::CountryAlpha2::Lr => Ok(Self::LR),
grpc_api_types::payments::CountryAlpha2::Ly => Ok(Self::LY),
grpc_api_types::payments::CountryAlpha2::Li => Ok(Self::LI),
grpc_api_types::payments::CountryAlpha2::Lt => Ok(Self::LT),
grpc_api_types::payments::CountryAlpha2::Lu => Ok(Self::LU),
| {
"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": 1425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1450_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Iq => Ok(Self::IQ),
grpc_api_types::payments::CountryAlpha2::Ie => Ok(Self::IE),
grpc_api_types::payments::CountryAlpha2::Im => Ok(Self::IM),
grpc_api_types::payments::CountryAlpha2::Il => Ok(Self::IL),
grpc_api_types::payments::CountryAlpha2::It => Ok(Self::IT),
grpc_api_types::payments::CountryAlpha2::Jm => Ok(Self::JM),
grpc_api_types::payments::CountryAlpha2::Jp => Ok(Self::JP),
grpc_api_types::payments::CountryAlpha2::Je => Ok(Self::JE),
grpc_api_types::payments::CountryAlpha2::Jo => Ok(Self::JO),
grpc_api_types::payments::CountryAlpha2::Kz => Ok(Self::KZ),
grpc_api_types::payments::CountryAlpha2::Ke => Ok(Self::KE),
grpc_api_types::payments::CountryAlpha2::Ki => Ok(Self::KI),
grpc_api_types::payments::CountryAlpha2::Kp => Ok(Self::KP),
grpc_api_types::payments::CountryAlpha2::Kr => Ok(Self::KR),
grpc_api_types::payments::CountryAlpha2::Kw => Ok(Self::KW),
| {
"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": 1450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1450_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Iq => Ok(Self::IQ),
grpc_api_types::payments::CountryAlpha2::Ie => Ok(Self::IE),
grpc_api_types::payments::CountryAlpha2::Im => Ok(Self::IM),
grpc_api_types::payments::CountryAlpha2::Il => Ok(Self::IL),
grpc_api_types::payments::CountryAlpha2::It => Ok(Self::IT),
grpc_api_types::payments::CountryAlpha2::Jm => Ok(Self::JM),
grpc_api_types::payments::CountryAlpha2::Jp => Ok(Self::JP),
grpc_api_types::payments::CountryAlpha2::Je => Ok(Self::JE),
grpc_api_types::payments::CountryAlpha2::Jo => Ok(Self::JO),
grpc_api_types::payments::CountryAlpha2::Kz => Ok(Self::KZ),
grpc_api_types::payments::CountryAlpha2::Ke => Ok(Self::KE),
grpc_api_types::payments::CountryAlpha2::Ki => Ok(Self::KI),
grpc_api_types::payments::CountryAlpha2::Kp => Ok(Self::KP),
grpc_api_types::payments::CountryAlpha2::Kr => Ok(Self::KR),
grpc_api_types::payments::CountryAlpha2::Kw => Ok(Self::KW),
grpc_api_types::payments::CountryAlpha2::Kg => Ok(Self::KG),
grpc_api_types::payments::CountryAlpha2::La => Ok(Self::LA),
grpc_api_types::payments::CountryAlpha2::Lv => Ok(Self::LV),
grpc_api_types::payments::CountryAlpha2::Lb => Ok(Self::LB),
grpc_api_types::payments::CountryAlpha2::Ls => Ok(Self::LS),
grpc_api_types::payments::CountryAlpha2::Lr => Ok(Self::LR),
grpc_api_types::payments::CountryAlpha2::Ly => Ok(Self::LY),
grpc_api_types::payments::CountryAlpha2::Li => Ok(Self::LI),
grpc_api_types::payments::CountryAlpha2::Lt => Ok(Self::LT),
grpc_api_types::payments::CountryAlpha2::Lu => Ok(Self::LU),
grpc_api_types::payments::CountryAlpha2::Mo => Ok(Self::MO),
grpc_api_types::payments::CountryAlpha2::Mk => Ok(Self::MK),
grpc_api_types::payments::CountryAlpha2::Mg => Ok(Self::MG),
grpc_api_types::payments::CountryAlpha2::Mw => Ok(Self::MW),
grpc_api_types::payments::CountryAlpha2::My => Ok(Self::MY),
| {
"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": 1450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1450_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Iq => Ok(Self::IQ),
grpc_api_types::payments::CountryAlpha2::Ie => Ok(Self::IE),
grpc_api_types::payments::CountryAlpha2::Im => Ok(Self::IM),
grpc_api_types::payments::CountryAlpha2::Il => Ok(Self::IL),
grpc_api_types::payments::CountryAlpha2::It => Ok(Self::IT),
grpc_api_types::payments::CountryAlpha2::Jm => Ok(Self::JM),
grpc_api_types::payments::CountryAlpha2::Jp => Ok(Self::JP),
grpc_api_types::payments::CountryAlpha2::Je => Ok(Self::JE),
grpc_api_types::payments::CountryAlpha2::Jo => Ok(Self::JO),
grpc_api_types::payments::CountryAlpha2::Kz => Ok(Self::KZ),
grpc_api_types::payments::CountryAlpha2::Ke => Ok(Self::KE),
grpc_api_types::payments::CountryAlpha2::Ki => Ok(Self::KI),
grpc_api_types::payments::CountryAlpha2::Kp => Ok(Self::KP),
grpc_api_types::payments::CountryAlpha2::Kr => Ok(Self::KR),
grpc_api_types::payments::CountryAlpha2::Kw => Ok(Self::KW),
grpc_api_types::payments::CountryAlpha2::Kg => Ok(Self::KG),
grpc_api_types::payments::CountryAlpha2::La => Ok(Self::LA),
grpc_api_types::payments::CountryAlpha2::Lv => Ok(Self::LV),
grpc_api_types::payments::CountryAlpha2::Lb => Ok(Self::LB),
grpc_api_types::payments::CountryAlpha2::Ls => Ok(Self::LS),
grpc_api_types::payments::CountryAlpha2::Lr => Ok(Self::LR),
grpc_api_types::payments::CountryAlpha2::Ly => Ok(Self::LY),
grpc_api_types::payments::CountryAlpha2::Li => Ok(Self::LI),
grpc_api_types::payments::CountryAlpha2::Lt => Ok(Self::LT),
grpc_api_types::payments::CountryAlpha2::Lu => Ok(Self::LU),
grpc_api_types::payments::CountryAlpha2::Mo => Ok(Self::MO),
grpc_api_types::payments::CountryAlpha2::Mk => Ok(Self::MK),
grpc_api_types::payments::CountryAlpha2::Mg => Ok(Self::MG),
grpc_api_types::payments::CountryAlpha2::Mw => Ok(Self::MW),
grpc_api_types::payments::CountryAlpha2::My => Ok(Self::MY),
grpc_api_types::payments::CountryAlpha2::Mv => Ok(Self::MV),
grpc_api_types::payments::CountryAlpha2::Ml => Ok(Self::ML),
grpc_api_types::payments::CountryAlpha2::Mt => Ok(Self::MT),
grpc_api_types::payments::CountryAlpha2::Mh => Ok(Self::MH),
grpc_api_types::payments::CountryAlpha2::Mq => Ok(Self::MQ),
grpc_api_types::payments::CountryAlpha2::Mr => Ok(Self::MR),
grpc_api_types::payments::CountryAlpha2::Mu => Ok(Self::MU),
grpc_api_types::payments::CountryAlpha2::Yt => Ok(Self::YT),
grpc_api_types::payments::CountryAlpha2::Mx => Ok(Self::MX),
grpc_api_types::payments::CountryAlpha2::Fm => Ok(Self::FM),
grpc_api_types::payments::CountryAlpha2::Md => Ok(Self::MD),
grpc_api_types::payments::CountryAlpha2::Mc => Ok(Self::MC),
grpc_api_types::payments::CountryAlpha2::Mn => Ok(Self::MN),
grpc_api_types::payments::CountryAlpha2::Me => Ok(Self::ME),
grpc_api_types::payments::CountryAlpha2::Ms => Ok(Self::MS),
grpc_api_types::payments::CountryAlpha2::Ma => Ok(Self::MA),
grpc_api_types::payments::CountryAlpha2::Mz => Ok(Self::MZ),
grpc_api_types::payments::CountryAlpha2::Mm => Ok(Self::MM),
grpc_api_types::payments::CountryAlpha2::Na => Ok(Self::NA),
grpc_api_types::payments::CountryAlpha2::Nr => Ok(Self::NR),
| {
"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": 1450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1475_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Mo => Ok(Self::MO),
grpc_api_types::payments::CountryAlpha2::Mk => Ok(Self::MK),
grpc_api_types::payments::CountryAlpha2::Mg => Ok(Self::MG),
grpc_api_types::payments::CountryAlpha2::Mw => Ok(Self::MW),
grpc_api_types::payments::CountryAlpha2::My => Ok(Self::MY),
grpc_api_types::payments::CountryAlpha2::Mv => Ok(Self::MV),
grpc_api_types::payments::CountryAlpha2::Ml => Ok(Self::ML),
grpc_api_types::payments::CountryAlpha2::Mt => Ok(Self::MT),
grpc_api_types::payments::CountryAlpha2::Mh => Ok(Self::MH),
grpc_api_types::payments::CountryAlpha2::Mq => Ok(Self::MQ),
grpc_api_types::payments::CountryAlpha2::Mr => Ok(Self::MR),
grpc_api_types::payments::CountryAlpha2::Mu => Ok(Self::MU),
grpc_api_types::payments::CountryAlpha2::Yt => Ok(Self::YT),
grpc_api_types::payments::CountryAlpha2::Mx => Ok(Self::MX),
grpc_api_types::payments::CountryAlpha2::Fm => Ok(Self::FM),
| {
"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": 1475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1475_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Mo => Ok(Self::MO),
grpc_api_types::payments::CountryAlpha2::Mk => Ok(Self::MK),
grpc_api_types::payments::CountryAlpha2::Mg => Ok(Self::MG),
grpc_api_types::payments::CountryAlpha2::Mw => Ok(Self::MW),
grpc_api_types::payments::CountryAlpha2::My => Ok(Self::MY),
grpc_api_types::payments::CountryAlpha2::Mv => Ok(Self::MV),
grpc_api_types::payments::CountryAlpha2::Ml => Ok(Self::ML),
grpc_api_types::payments::CountryAlpha2::Mt => Ok(Self::MT),
grpc_api_types::payments::CountryAlpha2::Mh => Ok(Self::MH),
grpc_api_types::payments::CountryAlpha2::Mq => Ok(Self::MQ),
grpc_api_types::payments::CountryAlpha2::Mr => Ok(Self::MR),
grpc_api_types::payments::CountryAlpha2::Mu => Ok(Self::MU),
grpc_api_types::payments::CountryAlpha2::Yt => Ok(Self::YT),
grpc_api_types::payments::CountryAlpha2::Mx => Ok(Self::MX),
grpc_api_types::payments::CountryAlpha2::Fm => Ok(Self::FM),
grpc_api_types::payments::CountryAlpha2::Md => Ok(Self::MD),
grpc_api_types::payments::CountryAlpha2::Mc => Ok(Self::MC),
grpc_api_types::payments::CountryAlpha2::Mn => Ok(Self::MN),
grpc_api_types::payments::CountryAlpha2::Me => Ok(Self::ME),
grpc_api_types::payments::CountryAlpha2::Ms => Ok(Self::MS),
grpc_api_types::payments::CountryAlpha2::Ma => Ok(Self::MA),
grpc_api_types::payments::CountryAlpha2::Mz => Ok(Self::MZ),
grpc_api_types::payments::CountryAlpha2::Mm => Ok(Self::MM),
grpc_api_types::payments::CountryAlpha2::Na => Ok(Self::NA),
grpc_api_types::payments::CountryAlpha2::Nr => Ok(Self::NR),
grpc_api_types::payments::CountryAlpha2::Np => Ok(Self::NP),
grpc_api_types::payments::CountryAlpha2::Nl => Ok(Self::NL),
grpc_api_types::payments::CountryAlpha2::Nc => Ok(Self::NC),
grpc_api_types::payments::CountryAlpha2::Nz => Ok(Self::NZ),
grpc_api_types::payments::CountryAlpha2::Ni => Ok(Self::NI),
| {
"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": 1475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1475_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Mo => Ok(Self::MO),
grpc_api_types::payments::CountryAlpha2::Mk => Ok(Self::MK),
grpc_api_types::payments::CountryAlpha2::Mg => Ok(Self::MG),
grpc_api_types::payments::CountryAlpha2::Mw => Ok(Self::MW),
grpc_api_types::payments::CountryAlpha2::My => Ok(Self::MY),
grpc_api_types::payments::CountryAlpha2::Mv => Ok(Self::MV),
grpc_api_types::payments::CountryAlpha2::Ml => Ok(Self::ML),
grpc_api_types::payments::CountryAlpha2::Mt => Ok(Self::MT),
grpc_api_types::payments::CountryAlpha2::Mh => Ok(Self::MH),
grpc_api_types::payments::CountryAlpha2::Mq => Ok(Self::MQ),
grpc_api_types::payments::CountryAlpha2::Mr => Ok(Self::MR),
grpc_api_types::payments::CountryAlpha2::Mu => Ok(Self::MU),
grpc_api_types::payments::CountryAlpha2::Yt => Ok(Self::YT),
grpc_api_types::payments::CountryAlpha2::Mx => Ok(Self::MX),
grpc_api_types::payments::CountryAlpha2::Fm => Ok(Self::FM),
grpc_api_types::payments::CountryAlpha2::Md => Ok(Self::MD),
grpc_api_types::payments::CountryAlpha2::Mc => Ok(Self::MC),
grpc_api_types::payments::CountryAlpha2::Mn => Ok(Self::MN),
grpc_api_types::payments::CountryAlpha2::Me => Ok(Self::ME),
grpc_api_types::payments::CountryAlpha2::Ms => Ok(Self::MS),
grpc_api_types::payments::CountryAlpha2::Ma => Ok(Self::MA),
grpc_api_types::payments::CountryAlpha2::Mz => Ok(Self::MZ),
grpc_api_types::payments::CountryAlpha2::Mm => Ok(Self::MM),
grpc_api_types::payments::CountryAlpha2::Na => Ok(Self::NA),
grpc_api_types::payments::CountryAlpha2::Nr => Ok(Self::NR),
grpc_api_types::payments::CountryAlpha2::Np => Ok(Self::NP),
grpc_api_types::payments::CountryAlpha2::Nl => Ok(Self::NL),
grpc_api_types::payments::CountryAlpha2::Nc => Ok(Self::NC),
grpc_api_types::payments::CountryAlpha2::Nz => Ok(Self::NZ),
grpc_api_types::payments::CountryAlpha2::Ni => Ok(Self::NI),
grpc_api_types::payments::CountryAlpha2::Ne => Ok(Self::NE),
grpc_api_types::payments::CountryAlpha2::Ng => Ok(Self::NG),
grpc_api_types::payments::CountryAlpha2::Nu => Ok(Self::NU),
grpc_api_types::payments::CountryAlpha2::Nf => Ok(Self::NF),
grpc_api_types::payments::CountryAlpha2::Mp => Ok(Self::MP),
grpc_api_types::payments::CountryAlpha2::No => Ok(Self::NO),
grpc_api_types::payments::CountryAlpha2::Om => Ok(Self::OM),
grpc_api_types::payments::CountryAlpha2::Pk => Ok(Self::PK),
grpc_api_types::payments::CountryAlpha2::Pw => Ok(Self::PW),
grpc_api_types::payments::CountryAlpha2::Ps => Ok(Self::PS),
grpc_api_types::payments::CountryAlpha2::Pa => Ok(Self::PA),
grpc_api_types::payments::CountryAlpha2::Pg => Ok(Self::PG),
grpc_api_types::payments::CountryAlpha2::Py => Ok(Self::PY),
grpc_api_types::payments::CountryAlpha2::Pe => Ok(Self::PE),
grpc_api_types::payments::CountryAlpha2::Ph => Ok(Self::PH),
grpc_api_types::payments::CountryAlpha2::Pn => Ok(Self::PN),
grpc_api_types::payments::CountryAlpha2::Pl => Ok(Self::PL),
grpc_api_types::payments::CountryAlpha2::Pt => Ok(Self::PT),
grpc_api_types::payments::CountryAlpha2::Pr => Ok(Self::PR),
grpc_api_types::payments::CountryAlpha2::Qa => Ok(Self::QA),
| {
"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": 1475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1500_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Np => Ok(Self::NP),
grpc_api_types::payments::CountryAlpha2::Nl => Ok(Self::NL),
grpc_api_types::payments::CountryAlpha2::Nc => Ok(Self::NC),
grpc_api_types::payments::CountryAlpha2::Nz => Ok(Self::NZ),
grpc_api_types::payments::CountryAlpha2::Ni => Ok(Self::NI),
grpc_api_types::payments::CountryAlpha2::Ne => Ok(Self::NE),
grpc_api_types::payments::CountryAlpha2::Ng => Ok(Self::NG),
grpc_api_types::payments::CountryAlpha2::Nu => Ok(Self::NU),
grpc_api_types::payments::CountryAlpha2::Nf => Ok(Self::NF),
grpc_api_types::payments::CountryAlpha2::Mp => Ok(Self::MP),
grpc_api_types::payments::CountryAlpha2::No => Ok(Self::NO),
grpc_api_types::payments::CountryAlpha2::Om => Ok(Self::OM),
grpc_api_types::payments::CountryAlpha2::Pk => Ok(Self::PK),
grpc_api_types::payments::CountryAlpha2::Pw => Ok(Self::PW),
grpc_api_types::payments::CountryAlpha2::Ps => Ok(Self::PS),
| {
"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": 1500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1500_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Np => Ok(Self::NP),
grpc_api_types::payments::CountryAlpha2::Nl => Ok(Self::NL),
grpc_api_types::payments::CountryAlpha2::Nc => Ok(Self::NC),
grpc_api_types::payments::CountryAlpha2::Nz => Ok(Self::NZ),
grpc_api_types::payments::CountryAlpha2::Ni => Ok(Self::NI),
grpc_api_types::payments::CountryAlpha2::Ne => Ok(Self::NE),
grpc_api_types::payments::CountryAlpha2::Ng => Ok(Self::NG),
grpc_api_types::payments::CountryAlpha2::Nu => Ok(Self::NU),
grpc_api_types::payments::CountryAlpha2::Nf => Ok(Self::NF),
grpc_api_types::payments::CountryAlpha2::Mp => Ok(Self::MP),
grpc_api_types::payments::CountryAlpha2::No => Ok(Self::NO),
grpc_api_types::payments::CountryAlpha2::Om => Ok(Self::OM),
grpc_api_types::payments::CountryAlpha2::Pk => Ok(Self::PK),
grpc_api_types::payments::CountryAlpha2::Pw => Ok(Self::PW),
grpc_api_types::payments::CountryAlpha2::Ps => Ok(Self::PS),
grpc_api_types::payments::CountryAlpha2::Pa => Ok(Self::PA),
grpc_api_types::payments::CountryAlpha2::Pg => Ok(Self::PG),
grpc_api_types::payments::CountryAlpha2::Py => Ok(Self::PY),
grpc_api_types::payments::CountryAlpha2::Pe => Ok(Self::PE),
grpc_api_types::payments::CountryAlpha2::Ph => Ok(Self::PH),
grpc_api_types::payments::CountryAlpha2::Pn => Ok(Self::PN),
grpc_api_types::payments::CountryAlpha2::Pl => Ok(Self::PL),
grpc_api_types::payments::CountryAlpha2::Pt => Ok(Self::PT),
grpc_api_types::payments::CountryAlpha2::Pr => Ok(Self::PR),
grpc_api_types::payments::CountryAlpha2::Qa => Ok(Self::QA),
grpc_api_types::payments::CountryAlpha2::Re => Ok(Self::RE),
grpc_api_types::payments::CountryAlpha2::Ro => Ok(Self::RO),
grpc_api_types::payments::CountryAlpha2::Ru => Ok(Self::RU),
grpc_api_types::payments::CountryAlpha2::Rw => Ok(Self::RW),
grpc_api_types::payments::CountryAlpha2::Bl => Ok(Self::BL),
| {
"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": 1500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1500_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Np => Ok(Self::NP),
grpc_api_types::payments::CountryAlpha2::Nl => Ok(Self::NL),
grpc_api_types::payments::CountryAlpha2::Nc => Ok(Self::NC),
grpc_api_types::payments::CountryAlpha2::Nz => Ok(Self::NZ),
grpc_api_types::payments::CountryAlpha2::Ni => Ok(Self::NI),
grpc_api_types::payments::CountryAlpha2::Ne => Ok(Self::NE),
grpc_api_types::payments::CountryAlpha2::Ng => Ok(Self::NG),
grpc_api_types::payments::CountryAlpha2::Nu => Ok(Self::NU),
grpc_api_types::payments::CountryAlpha2::Nf => Ok(Self::NF),
grpc_api_types::payments::CountryAlpha2::Mp => Ok(Self::MP),
grpc_api_types::payments::CountryAlpha2::No => Ok(Self::NO),
grpc_api_types::payments::CountryAlpha2::Om => Ok(Self::OM),
grpc_api_types::payments::CountryAlpha2::Pk => Ok(Self::PK),
grpc_api_types::payments::CountryAlpha2::Pw => Ok(Self::PW),
grpc_api_types::payments::CountryAlpha2::Ps => Ok(Self::PS),
grpc_api_types::payments::CountryAlpha2::Pa => Ok(Self::PA),
grpc_api_types::payments::CountryAlpha2::Pg => Ok(Self::PG),
grpc_api_types::payments::CountryAlpha2::Py => Ok(Self::PY),
grpc_api_types::payments::CountryAlpha2::Pe => Ok(Self::PE),
grpc_api_types::payments::CountryAlpha2::Ph => Ok(Self::PH),
grpc_api_types::payments::CountryAlpha2::Pn => Ok(Self::PN),
grpc_api_types::payments::CountryAlpha2::Pl => Ok(Self::PL),
grpc_api_types::payments::CountryAlpha2::Pt => Ok(Self::PT),
grpc_api_types::payments::CountryAlpha2::Pr => Ok(Self::PR),
grpc_api_types::payments::CountryAlpha2::Qa => Ok(Self::QA),
grpc_api_types::payments::CountryAlpha2::Re => Ok(Self::RE),
grpc_api_types::payments::CountryAlpha2::Ro => Ok(Self::RO),
grpc_api_types::payments::CountryAlpha2::Ru => Ok(Self::RU),
grpc_api_types::payments::CountryAlpha2::Rw => Ok(Self::RW),
grpc_api_types::payments::CountryAlpha2::Bl => Ok(Self::BL),
grpc_api_types::payments::CountryAlpha2::Sh => Ok(Self::SH),
grpc_api_types::payments::CountryAlpha2::Kn => Ok(Self::KN),
grpc_api_types::payments::CountryAlpha2::Lc => Ok(Self::LC),
grpc_api_types::payments::CountryAlpha2::Mf => Ok(Self::MF),
grpc_api_types::payments::CountryAlpha2::Pm => Ok(Self::PM),
grpc_api_types::payments::CountryAlpha2::Vc => Ok(Self::VC),
grpc_api_types::payments::CountryAlpha2::Ws => Ok(Self::WS),
grpc_api_types::payments::CountryAlpha2::Sm => Ok(Self::SM),
grpc_api_types::payments::CountryAlpha2::St => Ok(Self::ST),
grpc_api_types::payments::CountryAlpha2::Sa => Ok(Self::SA),
grpc_api_types::payments::CountryAlpha2::Sn => Ok(Self::SN),
grpc_api_types::payments::CountryAlpha2::Rs => Ok(Self::RS),
grpc_api_types::payments::CountryAlpha2::Sc => Ok(Self::SC),
grpc_api_types::payments::CountryAlpha2::Sl => Ok(Self::SL),
grpc_api_types::payments::CountryAlpha2::Sg => Ok(Self::SG),
grpc_api_types::payments::CountryAlpha2::Sx => Ok(Self::SX),
grpc_api_types::payments::CountryAlpha2::Sk => Ok(Self::SK),
grpc_api_types::payments::CountryAlpha2::Si => Ok(Self::SI),
grpc_api_types::payments::CountryAlpha2::Sb => Ok(Self::SB),
grpc_api_types::payments::CountryAlpha2::So => Ok(Self::SO),
| {
"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": 1500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1525_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Re => Ok(Self::RE),
grpc_api_types::payments::CountryAlpha2::Ro => Ok(Self::RO),
grpc_api_types::payments::CountryAlpha2::Ru => Ok(Self::RU),
grpc_api_types::payments::CountryAlpha2::Rw => Ok(Self::RW),
grpc_api_types::payments::CountryAlpha2::Bl => Ok(Self::BL),
grpc_api_types::payments::CountryAlpha2::Sh => Ok(Self::SH),
grpc_api_types::payments::CountryAlpha2::Kn => Ok(Self::KN),
grpc_api_types::payments::CountryAlpha2::Lc => Ok(Self::LC),
grpc_api_types::payments::CountryAlpha2::Mf => Ok(Self::MF),
grpc_api_types::payments::CountryAlpha2::Pm => Ok(Self::PM),
grpc_api_types::payments::CountryAlpha2::Vc => Ok(Self::VC),
grpc_api_types::payments::CountryAlpha2::Ws => Ok(Self::WS),
grpc_api_types::payments::CountryAlpha2::Sm => Ok(Self::SM),
grpc_api_types::payments::CountryAlpha2::St => Ok(Self::ST),
grpc_api_types::payments::CountryAlpha2::Sa => Ok(Self::SA),
| {
"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": 1525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1525_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Re => Ok(Self::RE),
grpc_api_types::payments::CountryAlpha2::Ro => Ok(Self::RO),
grpc_api_types::payments::CountryAlpha2::Ru => Ok(Self::RU),
grpc_api_types::payments::CountryAlpha2::Rw => Ok(Self::RW),
grpc_api_types::payments::CountryAlpha2::Bl => Ok(Self::BL),
grpc_api_types::payments::CountryAlpha2::Sh => Ok(Self::SH),
grpc_api_types::payments::CountryAlpha2::Kn => Ok(Self::KN),
grpc_api_types::payments::CountryAlpha2::Lc => Ok(Self::LC),
grpc_api_types::payments::CountryAlpha2::Mf => Ok(Self::MF),
grpc_api_types::payments::CountryAlpha2::Pm => Ok(Self::PM),
grpc_api_types::payments::CountryAlpha2::Vc => Ok(Self::VC),
grpc_api_types::payments::CountryAlpha2::Ws => Ok(Self::WS),
grpc_api_types::payments::CountryAlpha2::Sm => Ok(Self::SM),
grpc_api_types::payments::CountryAlpha2::St => Ok(Self::ST),
grpc_api_types::payments::CountryAlpha2::Sa => Ok(Self::SA),
grpc_api_types::payments::CountryAlpha2::Sn => Ok(Self::SN),
grpc_api_types::payments::CountryAlpha2::Rs => Ok(Self::RS),
grpc_api_types::payments::CountryAlpha2::Sc => Ok(Self::SC),
grpc_api_types::payments::CountryAlpha2::Sl => Ok(Self::SL),
grpc_api_types::payments::CountryAlpha2::Sg => Ok(Self::SG),
grpc_api_types::payments::CountryAlpha2::Sx => Ok(Self::SX),
grpc_api_types::payments::CountryAlpha2::Sk => Ok(Self::SK),
grpc_api_types::payments::CountryAlpha2::Si => Ok(Self::SI),
grpc_api_types::payments::CountryAlpha2::Sb => Ok(Self::SB),
grpc_api_types::payments::CountryAlpha2::So => Ok(Self::SO),
grpc_api_types::payments::CountryAlpha2::Za => Ok(Self::ZA),
grpc_api_types::payments::CountryAlpha2::Gs => Ok(Self::GS),
grpc_api_types::payments::CountryAlpha2::Ss => Ok(Self::SS),
grpc_api_types::payments::CountryAlpha2::Es => Ok(Self::ES),
grpc_api_types::payments::CountryAlpha2::Lk => Ok(Self::LK),
| {
"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": 1525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1525_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Re => Ok(Self::RE),
grpc_api_types::payments::CountryAlpha2::Ro => Ok(Self::RO),
grpc_api_types::payments::CountryAlpha2::Ru => Ok(Self::RU),
grpc_api_types::payments::CountryAlpha2::Rw => Ok(Self::RW),
grpc_api_types::payments::CountryAlpha2::Bl => Ok(Self::BL),
grpc_api_types::payments::CountryAlpha2::Sh => Ok(Self::SH),
grpc_api_types::payments::CountryAlpha2::Kn => Ok(Self::KN),
grpc_api_types::payments::CountryAlpha2::Lc => Ok(Self::LC),
grpc_api_types::payments::CountryAlpha2::Mf => Ok(Self::MF),
grpc_api_types::payments::CountryAlpha2::Pm => Ok(Self::PM),
grpc_api_types::payments::CountryAlpha2::Vc => Ok(Self::VC),
grpc_api_types::payments::CountryAlpha2::Ws => Ok(Self::WS),
grpc_api_types::payments::CountryAlpha2::Sm => Ok(Self::SM),
grpc_api_types::payments::CountryAlpha2::St => Ok(Self::ST),
grpc_api_types::payments::CountryAlpha2::Sa => Ok(Self::SA),
grpc_api_types::payments::CountryAlpha2::Sn => Ok(Self::SN),
grpc_api_types::payments::CountryAlpha2::Rs => Ok(Self::RS),
grpc_api_types::payments::CountryAlpha2::Sc => Ok(Self::SC),
grpc_api_types::payments::CountryAlpha2::Sl => Ok(Self::SL),
grpc_api_types::payments::CountryAlpha2::Sg => Ok(Self::SG),
grpc_api_types::payments::CountryAlpha2::Sx => Ok(Self::SX),
grpc_api_types::payments::CountryAlpha2::Sk => Ok(Self::SK),
grpc_api_types::payments::CountryAlpha2::Si => Ok(Self::SI),
grpc_api_types::payments::CountryAlpha2::Sb => Ok(Self::SB),
grpc_api_types::payments::CountryAlpha2::So => Ok(Self::SO),
grpc_api_types::payments::CountryAlpha2::Za => Ok(Self::ZA),
grpc_api_types::payments::CountryAlpha2::Gs => Ok(Self::GS),
grpc_api_types::payments::CountryAlpha2::Ss => Ok(Self::SS),
grpc_api_types::payments::CountryAlpha2::Es => Ok(Self::ES),
grpc_api_types::payments::CountryAlpha2::Lk => Ok(Self::LK),
grpc_api_types::payments::CountryAlpha2::Sd => Ok(Self::SD),
grpc_api_types::payments::CountryAlpha2::Sr => Ok(Self::SR),
grpc_api_types::payments::CountryAlpha2::Sj => Ok(Self::SJ),
grpc_api_types::payments::CountryAlpha2::Sz => Ok(Self::SZ),
grpc_api_types::payments::CountryAlpha2::Se => Ok(Self::SE),
grpc_api_types::payments::CountryAlpha2::Ch => Ok(Self::CH),
grpc_api_types::payments::CountryAlpha2::Sy => Ok(Self::SY),
grpc_api_types::payments::CountryAlpha2::Tw => Ok(Self::TW),
grpc_api_types::payments::CountryAlpha2::Tj => Ok(Self::TJ),
grpc_api_types::payments::CountryAlpha2::Tz => Ok(Self::TZ),
grpc_api_types::payments::CountryAlpha2::Th => Ok(Self::TH),
grpc_api_types::payments::CountryAlpha2::Tl => Ok(Self::TL),
grpc_api_types::payments::CountryAlpha2::Tg => Ok(Self::TG),
grpc_api_types::payments::CountryAlpha2::Tk => Ok(Self::TK),
grpc_api_types::payments::CountryAlpha2::To => Ok(Self::TO),
grpc_api_types::payments::CountryAlpha2::Tt => Ok(Self::TT),
grpc_api_types::payments::CountryAlpha2::Tn => Ok(Self::TN),
grpc_api_types::payments::CountryAlpha2::Tr => Ok(Self::TR),
grpc_api_types::payments::CountryAlpha2::Tm => Ok(Self::TM),
grpc_api_types::payments::CountryAlpha2::Tc => Ok(Self::TC),
| {
"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": 1525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1550_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Za => Ok(Self::ZA),
grpc_api_types::payments::CountryAlpha2::Gs => Ok(Self::GS),
grpc_api_types::payments::CountryAlpha2::Ss => Ok(Self::SS),
grpc_api_types::payments::CountryAlpha2::Es => Ok(Self::ES),
grpc_api_types::payments::CountryAlpha2::Lk => Ok(Self::LK),
grpc_api_types::payments::CountryAlpha2::Sd => Ok(Self::SD),
grpc_api_types::payments::CountryAlpha2::Sr => Ok(Self::SR),
grpc_api_types::payments::CountryAlpha2::Sj => Ok(Self::SJ),
grpc_api_types::payments::CountryAlpha2::Sz => Ok(Self::SZ),
grpc_api_types::payments::CountryAlpha2::Se => Ok(Self::SE),
grpc_api_types::payments::CountryAlpha2::Ch => Ok(Self::CH),
grpc_api_types::payments::CountryAlpha2::Sy => Ok(Self::SY),
grpc_api_types::payments::CountryAlpha2::Tw => Ok(Self::TW),
grpc_api_types::payments::CountryAlpha2::Tj => Ok(Self::TJ),
grpc_api_types::payments::CountryAlpha2::Tz => Ok(Self::TZ),
| {
"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": 1550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1550_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Za => Ok(Self::ZA),
grpc_api_types::payments::CountryAlpha2::Gs => Ok(Self::GS),
grpc_api_types::payments::CountryAlpha2::Ss => Ok(Self::SS),
grpc_api_types::payments::CountryAlpha2::Es => Ok(Self::ES),
grpc_api_types::payments::CountryAlpha2::Lk => Ok(Self::LK),
grpc_api_types::payments::CountryAlpha2::Sd => Ok(Self::SD),
grpc_api_types::payments::CountryAlpha2::Sr => Ok(Self::SR),
grpc_api_types::payments::CountryAlpha2::Sj => Ok(Self::SJ),
grpc_api_types::payments::CountryAlpha2::Sz => Ok(Self::SZ),
grpc_api_types::payments::CountryAlpha2::Se => Ok(Self::SE),
grpc_api_types::payments::CountryAlpha2::Ch => Ok(Self::CH),
grpc_api_types::payments::CountryAlpha2::Sy => Ok(Self::SY),
grpc_api_types::payments::CountryAlpha2::Tw => Ok(Self::TW),
grpc_api_types::payments::CountryAlpha2::Tj => Ok(Self::TJ),
grpc_api_types::payments::CountryAlpha2::Tz => Ok(Self::TZ),
grpc_api_types::payments::CountryAlpha2::Th => Ok(Self::TH),
grpc_api_types::payments::CountryAlpha2::Tl => Ok(Self::TL),
grpc_api_types::payments::CountryAlpha2::Tg => Ok(Self::TG),
grpc_api_types::payments::CountryAlpha2::Tk => Ok(Self::TK),
grpc_api_types::payments::CountryAlpha2::To => Ok(Self::TO),
grpc_api_types::payments::CountryAlpha2::Tt => Ok(Self::TT),
grpc_api_types::payments::CountryAlpha2::Tn => Ok(Self::TN),
grpc_api_types::payments::CountryAlpha2::Tr => Ok(Self::TR),
grpc_api_types::payments::CountryAlpha2::Tm => Ok(Self::TM),
grpc_api_types::payments::CountryAlpha2::Tc => Ok(Self::TC),
grpc_api_types::payments::CountryAlpha2::Tv => Ok(Self::TV),
grpc_api_types::payments::CountryAlpha2::Ug => Ok(Self::UG),
grpc_api_types::payments::CountryAlpha2::Ua => Ok(Self::UA),
grpc_api_types::payments::CountryAlpha2::Ae => Ok(Self::AE),
grpc_api_types::payments::CountryAlpha2::Gb => Ok(Self::GB),
| {
"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": 1550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1550_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Za => Ok(Self::ZA),
grpc_api_types::payments::CountryAlpha2::Gs => Ok(Self::GS),
grpc_api_types::payments::CountryAlpha2::Ss => Ok(Self::SS),
grpc_api_types::payments::CountryAlpha2::Es => Ok(Self::ES),
grpc_api_types::payments::CountryAlpha2::Lk => Ok(Self::LK),
grpc_api_types::payments::CountryAlpha2::Sd => Ok(Self::SD),
grpc_api_types::payments::CountryAlpha2::Sr => Ok(Self::SR),
grpc_api_types::payments::CountryAlpha2::Sj => Ok(Self::SJ),
grpc_api_types::payments::CountryAlpha2::Sz => Ok(Self::SZ),
grpc_api_types::payments::CountryAlpha2::Se => Ok(Self::SE),
grpc_api_types::payments::CountryAlpha2::Ch => Ok(Self::CH),
grpc_api_types::payments::CountryAlpha2::Sy => Ok(Self::SY),
grpc_api_types::payments::CountryAlpha2::Tw => Ok(Self::TW),
grpc_api_types::payments::CountryAlpha2::Tj => Ok(Self::TJ),
grpc_api_types::payments::CountryAlpha2::Tz => Ok(Self::TZ),
grpc_api_types::payments::CountryAlpha2::Th => Ok(Self::TH),
grpc_api_types::payments::CountryAlpha2::Tl => Ok(Self::TL),
grpc_api_types::payments::CountryAlpha2::Tg => Ok(Self::TG),
grpc_api_types::payments::CountryAlpha2::Tk => Ok(Self::TK),
grpc_api_types::payments::CountryAlpha2::To => Ok(Self::TO),
grpc_api_types::payments::CountryAlpha2::Tt => Ok(Self::TT),
grpc_api_types::payments::CountryAlpha2::Tn => Ok(Self::TN),
grpc_api_types::payments::CountryAlpha2::Tr => Ok(Self::TR),
grpc_api_types::payments::CountryAlpha2::Tm => Ok(Self::TM),
grpc_api_types::payments::CountryAlpha2::Tc => Ok(Self::TC),
grpc_api_types::payments::CountryAlpha2::Tv => Ok(Self::TV),
grpc_api_types::payments::CountryAlpha2::Ug => Ok(Self::UG),
grpc_api_types::payments::CountryAlpha2::Ua => Ok(Self::UA),
grpc_api_types::payments::CountryAlpha2::Ae => Ok(Self::AE),
grpc_api_types::payments::CountryAlpha2::Gb => Ok(Self::GB),
grpc_api_types::payments::CountryAlpha2::Um => Ok(Self::UM),
grpc_api_types::payments::CountryAlpha2::Uy => Ok(Self::UY),
grpc_api_types::payments::CountryAlpha2::Uz => Ok(Self::UZ),
grpc_api_types::payments::CountryAlpha2::Vu => Ok(Self::VU),
grpc_api_types::payments::CountryAlpha2::Ve => Ok(Self::VE),
grpc_api_types::payments::CountryAlpha2::Vn => Ok(Self::VN),
grpc_api_types::payments::CountryAlpha2::Vg => Ok(Self::VG),
grpc_api_types::payments::CountryAlpha2::Vi => Ok(Self::VI),
grpc_api_types::payments::CountryAlpha2::Wf => Ok(Self::WF),
grpc_api_types::payments::CountryAlpha2::Eh => Ok(Self::EH),
grpc_api_types::payments::CountryAlpha2::Ye => Ok(Self::YE),
grpc_api_types::payments::CountryAlpha2::Zm => Ok(Self::ZM),
grpc_api_types::payments::CountryAlpha2::Zw => Ok(Self::ZW),
grpc_api_types::payments::CountryAlpha2::Unspecified => Ok(Self::US), // Default to US if unspecified
}
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for AddressDetails {
type Error = 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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1575_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Tv => Ok(Self::TV),
grpc_api_types::payments::CountryAlpha2::Ug => Ok(Self::UG),
grpc_api_types::payments::CountryAlpha2::Ua => Ok(Self::UA),
grpc_api_types::payments::CountryAlpha2::Ae => Ok(Self::AE),
grpc_api_types::payments::CountryAlpha2::Gb => Ok(Self::GB),
grpc_api_types::payments::CountryAlpha2::Um => Ok(Self::UM),
grpc_api_types::payments::CountryAlpha2::Uy => Ok(Self::UY),
grpc_api_types::payments::CountryAlpha2::Uz => Ok(Self::UZ),
grpc_api_types::payments::CountryAlpha2::Vu => Ok(Self::VU),
grpc_api_types::payments::CountryAlpha2::Ve => Ok(Self::VE),
grpc_api_types::payments::CountryAlpha2::Vn => Ok(Self::VN),
grpc_api_types::payments::CountryAlpha2::Vg => Ok(Self::VG),
grpc_api_types::payments::CountryAlpha2::Vi => Ok(Self::VI),
grpc_api_types::payments::CountryAlpha2::Wf => Ok(Self::WF),
grpc_api_types::payments::CountryAlpha2::Eh => Ok(Self::EH),
| {
"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": 1575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1575_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Tv => Ok(Self::TV),
grpc_api_types::payments::CountryAlpha2::Ug => Ok(Self::UG),
grpc_api_types::payments::CountryAlpha2::Ua => Ok(Self::UA),
grpc_api_types::payments::CountryAlpha2::Ae => Ok(Self::AE),
grpc_api_types::payments::CountryAlpha2::Gb => Ok(Self::GB),
grpc_api_types::payments::CountryAlpha2::Um => Ok(Self::UM),
grpc_api_types::payments::CountryAlpha2::Uy => Ok(Self::UY),
grpc_api_types::payments::CountryAlpha2::Uz => Ok(Self::UZ),
grpc_api_types::payments::CountryAlpha2::Vu => Ok(Self::VU),
grpc_api_types::payments::CountryAlpha2::Ve => Ok(Self::VE),
grpc_api_types::payments::CountryAlpha2::Vn => Ok(Self::VN),
grpc_api_types::payments::CountryAlpha2::Vg => Ok(Self::VG),
grpc_api_types::payments::CountryAlpha2::Vi => Ok(Self::VI),
grpc_api_types::payments::CountryAlpha2::Wf => Ok(Self::WF),
grpc_api_types::payments::CountryAlpha2::Eh => Ok(Self::EH),
grpc_api_types::payments::CountryAlpha2::Ye => Ok(Self::YE),
grpc_api_types::payments::CountryAlpha2::Zm => Ok(Self::ZM),
grpc_api_types::payments::CountryAlpha2::Zw => Ok(Self::ZW),
grpc_api_types::payments::CountryAlpha2::Unspecified => Ok(Self::US), // Default to US if unspecified
}
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for AddressDetails {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
Ok(Self {
city: value.city.clone().map(|city| city.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": 1575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1575_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
grpc_api_types::payments::CountryAlpha2::Tv => Ok(Self::TV),
grpc_api_types::payments::CountryAlpha2::Ug => Ok(Self::UG),
grpc_api_types::payments::CountryAlpha2::Ua => Ok(Self::UA),
grpc_api_types::payments::CountryAlpha2::Ae => Ok(Self::AE),
grpc_api_types::payments::CountryAlpha2::Gb => Ok(Self::GB),
grpc_api_types::payments::CountryAlpha2::Um => Ok(Self::UM),
grpc_api_types::payments::CountryAlpha2::Uy => Ok(Self::UY),
grpc_api_types::payments::CountryAlpha2::Uz => Ok(Self::UZ),
grpc_api_types::payments::CountryAlpha2::Vu => Ok(Self::VU),
grpc_api_types::payments::CountryAlpha2::Ve => Ok(Self::VE),
grpc_api_types::payments::CountryAlpha2::Vn => Ok(Self::VN),
grpc_api_types::payments::CountryAlpha2::Vg => Ok(Self::VG),
grpc_api_types::payments::CountryAlpha2::Vi => Ok(Self::VI),
grpc_api_types::payments::CountryAlpha2::Wf => Ok(Self::WF),
grpc_api_types::payments::CountryAlpha2::Eh => Ok(Self::EH),
grpc_api_types::payments::CountryAlpha2::Ye => Ok(Self::YE),
grpc_api_types::payments::CountryAlpha2::Zm => Ok(Self::ZM),
grpc_api_types::payments::CountryAlpha2::Zw => Ok(Self::ZW),
grpc_api_types::payments::CountryAlpha2::Unspecified => Ok(Self::US), // Default to US if unspecified
}
}
}
impl ForeignTryFrom<grpc_api_types::payments::Address> for AddressDetails {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
Ok(Self {
city: value.city.clone().map(|city| city.expose()),
country: Some(common_enums::CountryAlpha2::foreign_try_from(
value.country_alpha2_code(),
)?),
line1: value.line1,
line2: value.line2,
line3: value.line3,
zip: value.zip_code,
state: value.state,
first_name: value.first_name,
last_name: value.last_name,
})
}
}
// PhoneDetails conversion removed - phone info is now embedded in Address
impl ForeignTryFrom<(PaymentServiceAuthorizeRequest, Connectors, &MaskedMetadata)>
for PaymentFlowData
{
type Error = 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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1600_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
Ok(Self {
city: value.city.clone().map(|city| city.expose()),
country: Some(common_enums::CountryAlpha2::foreign_try_from(
value.country_alpha2_code(),
)?),
line1: value.line1,
line2: value.line2,
line3: value.line3,
zip: value.zip_code,
state: value.state,
first_name: value.first_name,
last_name: value.last_name,
| {
"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": 1600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1600_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
Ok(Self {
city: value.city.clone().map(|city| city.expose()),
country: Some(common_enums::CountryAlpha2::foreign_try_from(
value.country_alpha2_code(),
)?),
line1: value.line1,
line2: value.line2,
line3: value.line3,
zip: value.zip_code,
state: value.state,
first_name: value.first_name,
last_name: value.last_name,
})
}
}
// PhoneDetails conversion removed - phone info is now embedded in Address
impl ForeignTryFrom<(PaymentServiceAuthorizeRequest, Connectors, &MaskedMetadata)>
for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
PaymentServiceAuthorizeRequest,
Connectors,
| {
"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": 1600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1600_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
value: grpc_api_types::payments::Address,
) -> Result<Self, error_stack::Report<Self::Error>> {
Ok(Self {
city: value.city.clone().map(|city| city.expose()),
country: Some(common_enums::CountryAlpha2::foreign_try_from(
value.country_alpha2_code(),
)?),
line1: value.line1,
line2: value.line2,
line3: value.line3,
zip: value.zip_code,
state: value.state,
first_name: value.first_name,
last_name: value.last_name,
})
}
}
// PhoneDetails conversion removed - phone info is now embedded in Address
impl ForeignTryFrom<(PaymentServiceAuthorizeRequest, Connectors, &MaskedMetadata)>
for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
PaymentServiceAuthorizeRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
)?
}
None => {
return Err(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_ADDRESS".to_owned(),
error_identifier: 400,
error_message: "Address 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": 1600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1625_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
(value, connectors, metadata): (
PaymentServiceAuthorizeRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
)?
| {
"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": 1625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1625_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
(value, connectors, metadata): (
PaymentServiceAuthorizeRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
)?
}
None => {
return Err(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_ADDRESS".to_owned(),
error_identifier: 400,
error_message: "Address is required".to_owned(),
error_object: None,
}))?
}
};
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
// Extract specific headers for vault and other integrations
let vault_headers = extract_headers_from_metadata(metadata);
| {
"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": 1625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1625_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
fn foreign_try_from(
(value, connectors, metadata): (
PaymentServiceAuthorizeRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
)?
}
None => {
return Err(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_ADDRESS".to_owned(),
error_identifier: 400,
error_message: "Address is required".to_owned(),
error_object: None,
}))?
}
};
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
// Extract specific headers for vault and other integrations
let vault_headers = extract_headers_from_metadata(metadata);
let connector_meta_data = serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata".to_owned(),
error_object: None,
},
))
})?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::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": 1625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1650_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
// Extract specific headers for vault and other integrations
let vault_headers = extract_headers_from_metadata(metadata);
let connector_meta_data = serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata".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": 1650,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1650_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
// Extract specific headers for vault and other integrations
let vault_headers = extract_headers_from_metadata(metadata);
let connector_meta_data = serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata".to_owned(),
error_object: None,
},
))
})?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::foreign_try_from(
value.payment_method.unwrap_or_default(),
)?, // Use direct enum
address,
auth_type: common_enums::AuthenticationType::foreign_try_from(
grpc_api_types::payments::AuthenticationType::try_from(value.auth_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": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1650,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1650_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
// Extract specific headers for vault and other integrations
let vault_headers = extract_headers_from_metadata(metadata);
let connector_meta_data = serde_json::to_value(&value.merchant_account_metadata)
.map(common_utils::pii::SecretSerdeValue::new)
.map_err(|_| {
error_stack::Report::new(ApplicationErrorResponse::InternalServerError(
crate::errors::ApiError {
sub_code: "SERDE_JSON_ERROR".to_owned(),
error_identifier: 500,
error_message: "Failed to serialize merchant_account_metadata".to_owned(),
error_object: None,
},
))
})?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::foreign_try_from(
value.payment_method.unwrap_or_default(),
)?, // Use direct enum
address,
auth_type: common_enums::AuthenticationType::foreign_try_from(
grpc_api_types::payments::AuthenticationType::try_from(value.auth_type)
.unwrap_or_default(),
)?, // Use direct enum
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_CUSTOMER_ID".to_owned(),
error_identifier: 400,
error_message: "Failed to parse Customer Id".to_owned(),
error_object: None,
}))?,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: value.return_url.clone(),
connector_meta_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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1650,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1675_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
value.payment_method.unwrap_or_default(),
)?, // Use direct enum
address,
auth_type: common_enums::AuthenticationType::foreign_try_from(
grpc_api_types::payments::AuthenticationType::try_from(value.auth_type)
.unwrap_or_default(),
)?, // Use direct enum
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
| {
"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": 1675,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1675_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
value.payment_method.unwrap_or_default(),
)?, // Use direct enum
address,
auth_type: common_enums::AuthenticationType::foreign_try_from(
grpc_api_types::payments::AuthenticationType::try_from(value.auth_type)
.unwrap_or_default(),
)?, // Use direct enum
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_CUSTOMER_ID".to_owned(),
error_identifier: 400,
error_message: "Failed to parse Customer Id".to_owned(),
error_object: None,
}))?,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: value.return_url.clone(),
connector_meta_data: {
value.metadata.get("connector_meta_data").map(|json_string| {
Ok::<Secret<serde_json::Value>, error_stack::Report<ApplicationErrorResponse>>(Secret::new(serde_json::Value::String(json_string.clone())))
}).transpose()?
.or(Some(connector_meta_data)) // Converts Option<Result<T, E>> to Result<Option<T>, E> and propagates E if it's an Err
},
| {
"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": 1675,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1675_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
value.payment_method.unwrap_or_default(),
)?, // Use direct enum
address,
auth_type: common_enums::AuthenticationType::foreign_try_from(
grpc_api_types::payments::AuthenticationType::try_from(value.auth_type)
.unwrap_or_default(),
)?, // Use direct enum
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: value
.customer_id
.clone()
.map(|customer_id| CustomerId::try_from(Cow::from(customer_id)))
.transpose()
.change_context(ApplicationErrorResponse::BadRequest(ApiError {
sub_code: "INVALID_CUSTOMER_ID".to_owned(),
error_identifier: 400,
error_message: "Failed to parse Customer Id".to_owned(),
error_object: None,
}))?,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: value.return_url.clone(),
connector_meta_data: {
value.metadata.get("connector_meta_data").map(|json_string| {
Ok::<Secret<serde_json::Value>, error_stack::Report<ApplicationErrorResponse>>(Secret::new(serde_json::Value::String(json_string.clone())))
}).transpose()?
.or(Some(connector_meta_data)) // Converts Option<Result<T, E>> to Result<Option<T>, E> and propagates E if it's an Err
},
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
connector_response: None,
vault_headers,
recurring_mandate_payment_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": 1675,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1700_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
value.metadata.get("connector_meta_data").map(|json_string| {
Ok::<Secret<serde_json::Value>, error_stack::Report<ApplicationErrorResponse>>(Secret::new(serde_json::Value::String(json_string.clone())))
}).transpose()?
.or(Some(connector_meta_data)) // Converts Option<Result<T, E>> to Result<Option<T>, E> and propagates E if it's an Err
},
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
| {
"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": 1700,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1700_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
value.metadata.get("connector_meta_data").map(|json_string| {
Ok::<Secret<serde_json::Value>, error_stack::Report<ApplicationErrorResponse>>(Secret::new(serde_json::Value::String(json_string.clone())))
}).transpose()?
.or(Some(connector_meta_data)) // Converts Option<Result<T, E>> to Result<Option<T>, E> and propagates E if it's an Err
},
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
connector_response: None,
vault_headers,
recurring_mandate_payment_data: None,
})
}
}
impl
ForeignTryFrom<(
| {
"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": 1700,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1700_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
value.metadata.get("connector_meta_data").map(|json_string| {
Ok::<Secret<serde_json::Value>, error_stack::Report<ApplicationErrorResponse>>(Secret::new(serde_json::Value::String(json_string.clone())))
}).transpose()?
.or(Some(connector_meta_data)) // Converts Option<Result<T, E>> to Result<Option<T>, E> and propagates E if it's an Err
},
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
connector_response: None,
vault_headers,
recurring_mandate_payment_data: None,
})
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
| {
"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": 1700,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1725_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
| {
"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": 1725,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1725_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
)?
}
None => {
// For repeat payment operations, address information is typically not available or required
payment_address::PaymentAddress::new(
| {
"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": 1725,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1725_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceRepeatEverythingRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
let address = match &value.address {
// Borrow value.address
Some(address_value) => {
// address_value is &grpc_api_types::payments::PaymentAddress
payment_address::PaymentAddress::foreign_try_from(
(*address_value).clone(), // Clone the grpc_api_types::payments::PaymentAddress
)?
}
None => {
// For repeat payment operations, address information is typically not available or required
payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for repeat operations
)
}
};
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
| {
"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": 1725,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1750_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
)?
}
None => {
// For repeat payment operations, address information is typically not available or required
payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for repeat operations
)
}
};
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
| {
"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": 1750,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1750_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
)?
}
None => {
// For repeat payment operations, address information is typically not available or required
payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for repeat operations
)
}
};
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: None,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: 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": 1750,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1750_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
)?
}
None => {
// For repeat payment operations, address information is typically not available or required
payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for repeat operations
)
}
};
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: None,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
connector_response: None,
vault_headers: None,
recurring_mandate_payment_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": 1750,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1775_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
),
customer_id: None,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: 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": 1775,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1775_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
),
customer_id: None,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
connector_response: None,
vault_headers: None,
recurring_mandate_payment_data: None,
})
}
}
impl
| {
"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": 1775,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1775_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
),
customer_id: None,
connector_customer: value.connector_customer_id,
description: value.description,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: value.test_mode,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
connector_response: None,
vault_headers: None,
recurring_mandate_payment_data: None,
})
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For sync operations, address information is typically not available or required
let address: PaymentAddress = crate::payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
| {
"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": 1775,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1800_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
| {
"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": 1800,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1800_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For sync operations, address information is typically not available or required
let address: PaymentAddress = crate::payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for sync operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
| {
"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": 1800,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1800_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl
ForeignTryFrom<(
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
)> for PaymentFlowData
{
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (
grpc_api_types::payments::PaymentServiceGetRequest,
Connectors,
&MaskedMetadata,
),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For sync operations, address information is typically not available or required
let address: PaymentAddress = crate::payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for sync operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
});
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
| {
"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": 1800,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1825_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
Some(false), // should_unify_address = false for sync operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
});
| {
"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": 1825,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1825_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
Some(false), // should_unify_address = false for sync operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
});
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: None,
connector_customer: None,
description: None,
return_url: 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": 1825,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1825_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
Some(false), // should_unify_address = false for sync operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
let access_token = value
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|token| crate::connector_types::AccessTokenResponseData {
access_token: token.token.clone(),
token_type: None,
expires_in: token.expires_in_seconds,
});
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: None,
connector_customer: None,
description: None,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: None,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
vault_headers: None,
connector_response: None,
recurring_mandate_payment_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": 1825,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1850_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
),
customer_id: None,
connector_customer: None,
description: None,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: 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": 1850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1850_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
),
customer_id: None,
connector_customer: None,
description: None,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: None,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
vault_headers: None,
connector_response: None,
recurring_mandate_payment_data: None,
})
}
}
impl ForeignTryFrom<(PaymentServiceVoidRequest, Connectors, &MaskedMetadata)> for PaymentFlowData {
| {
"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": 1850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1850_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
),
customer_id: None,
connector_customer: None,
description: None,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: None,
connector_http_status_code: None,
external_latency: None,
connectors,
raw_connector_response: None,
raw_connector_request: None,
connector_response_headers: None,
vault_headers: None,
connector_response: None,
recurring_mandate_payment_data: None,
})
}
}
impl ForeignTryFrom<(PaymentServiceVoidRequest, Connectors, &MaskedMetadata)> for PaymentFlowData {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (PaymentServiceVoidRequest, Connectors, &MaskedMetadata),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For void operations, address information is typically not available or required
// Since this is a PaymentServiceVoidRequest, we use default address values
let address: PaymentAddress = payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for void operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
| {
"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": 1850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1875_15 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl ForeignTryFrom<(PaymentServiceVoidRequest, Connectors, &MaskedMetadata)> for PaymentFlowData {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (PaymentServiceVoidRequest, Connectors, &MaskedMetadata),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For void operations, address information is typically not available or required
// Since this is a PaymentServiceVoidRequest, we use default address values
let address: PaymentAddress = payment_address::PaymentAddress::new(
None, // shipping
None, // billing
| {
"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": 1875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1875_30 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl ForeignTryFrom<(PaymentServiceVoidRequest, Connectors, &MaskedMetadata)> for PaymentFlowData {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (PaymentServiceVoidRequest, Connectors, &MaskedMetadata),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For void operations, address information is typically not available or required
// Since this is a PaymentServiceVoidRequest, we use default address values
let address: PaymentAddress = payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for void operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
| {
"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": 1875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-7881285798716424113_1875_50 | clm | snippet | // connector-service/backend/domain_types/src/types.rs
})
}
}
impl ForeignTryFrom<(PaymentServiceVoidRequest, Connectors, &MaskedMetadata)> for PaymentFlowData {
type Error = ApplicationErrorResponse;
fn foreign_try_from(
(value, connectors, metadata): (PaymentServiceVoidRequest, Connectors, &MaskedMetadata),
) -> Result<Self, error_stack::Report<Self::Error>> {
// For void operations, address information is typically not available or required
// Since this is a PaymentServiceVoidRequest, we use default address values
let address: PaymentAddress = payment_address::PaymentAddress::new(
None, // shipping
None, // billing
None, // payment_method_billing
Some(false), // should_unify_address = false for void operations
);
let merchant_id_from_header = extract_merchant_id_from_metadata(metadata)?;
Ok(Self {
merchant_id: merchant_id_from_header,
payment_id: "IRRELEVANT_PAYMENT_ID".to_string(),
attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(),
status: common_enums::AttemptStatus::Pending,
payment_method: common_enums::PaymentMethod::Card, //TODO
address,
auth_type: common_enums::AuthenticationType::default(),
connector_request_reference_id: extract_connector_request_reference_id(
&value.request_ref_id,
),
customer_id: None,
connector_customer: None,
description: None,
return_url: None,
connector_meta_data: None,
amount_captured: None,
minor_amount_captured: None,
minor_amount_capturable: None,
access_token: None,
session_token: None,
reference_id: None,
payment_method_token: None,
preprocessing_id: None,
connector_api_version: None,
test_mode: None,
connector_http_status_code: None,
external_latency: None,
connectors,
| {
"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": 1875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.