id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_snippet_-5184931324552524607_1625_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
#[serde(untagged)]
pub enum BraintreeCancelResponse {
CancelResponse(Box<CancelResponse>),
ErrorResponse(Box<ErrorResponse>),
}
impl<F> TryFrom<ResponseRouterData<BraintreeCancelResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<BraintreeCancelResponse, Self>,
) -> Result<Self, Self::Error> {
match item.response {
BraintreeCancelResponse::ErrorResponse(error_response) => Ok(Self {
response: build_error_response(&error_response.errors, item.http_code)
.map_err(|err| *err),
..item.router_data
}),
BraintreeCancelResponse::CancelResponse(void_response) => {
let void_data = void_response.data.reverse_transaction.reversal;
let status = enums::AttemptStatus::from(void_data.status.clone());
let response = if domain_types::utils::is_payment_failure(status) {
Err(create_failure_error_response(
void_data.status,
None,
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::NoResponseId,
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
resource_common_data: PaymentFlowData {
status,
..item.router_data.resource_common_data
},
response,
..item.router_data
})
}
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1650_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
void_data.status,
None,
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::NoResponseId,
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1650_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
void_data.status,
None,
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::NoResponseId,
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
resource_common_data: PaymentFlowData {
status,
..item.router_data.resource_common_data
},
response,
..item.router_data
})
}
}
}
}
impl<
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1650_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
void_data.status,
None,
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::NoResponseId,
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
resource_common_data: PaymentFlowData {
status,
..item.router_data.resource_common_data
},
response,
..item.router_data
})
}
}
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
T,
>,
> for BraintreePSyncRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
T,
>,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1675_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
}
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1675_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
}
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
T,
>,
> for BraintreePSyncRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let transaction_id = item
.router_data
.request
.connector_transaction_id
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1675_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
}
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
T,
>,
> for BraintreePSyncRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: BraintreeRouterData<
RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let transaction_id = item
.router_data
.request
.connector_transaction_id
.get_connector_transaction_id()
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
Ok(Self {
query: constants::TRANSACTION_QUERY.to_string(),
variables: PSyncInput {
input: TransactionSearchInput {
id: IdFilter { is: transaction_id },
},
},
})
}
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NodeData {
id: String,
status: BraintreePaymentStatus,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1700_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
) -> Result<Self, Self::Error> {
let transaction_id = item
.router_data
.request
.connector_transaction_id
.get_connector_transaction_id()
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
Ok(Self {
query: constants::TRANSACTION_QUERY.to_string(),
variables: PSyncInput {
input: TransactionSearchInput {
id: IdFilter { is: transaction_id },
},
},
})
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1700_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
) -> Result<Self, Self::Error> {
let transaction_id = item
.router_data
.request
.connector_transaction_id
.get_connector_transaction_id()
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
Ok(Self {
query: constants::TRANSACTION_QUERY.to_string(),
variables: PSyncInput {
input: TransactionSearchInput {
id: IdFilter { is: transaction_id },
},
},
})
}
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NodeData {
id: String,
status: BraintreePaymentStatus,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct EdgeData {
node: NodeData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1700_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
) -> Result<Self, Self::Error> {
let transaction_id = item
.router_data
.request
.connector_transaction_id
.get_connector_transaction_id()
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
Ok(Self {
query: constants::TRANSACTION_QUERY.to_string(),
variables: PSyncInput {
input: TransactionSearchInput {
id: IdFilter { is: transaction_id },
},
},
})
}
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NodeData {
id: String,
status: BraintreePaymentStatus,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct EdgeData {
node: NodeData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TransactionData {
edges: Vec<EdgeData>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SearchData {
transactions: TransactionData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PSyncResponseData {
search: SearchData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PSyncResponse {
data: PSyncResponseData,
}
impl<F> TryFrom<ResponseRouterData<BraintreePSyncResponse, Self>>
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1725_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
pub struct EdgeData {
node: NodeData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TransactionData {
edges: Vec<EdgeData>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SearchData {
transactions: TransactionData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1725_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
pub struct EdgeData {
node: NodeData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TransactionData {
edges: Vec<EdgeData>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SearchData {
transactions: TransactionData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PSyncResponseData {
search: SearchData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PSyncResponse {
data: PSyncResponseData,
}
impl<F> TryFrom<ResponseRouterData<BraintreePSyncResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<BraintreePSyncResponse, Self>,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1725_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
pub struct EdgeData {
node: NodeData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TransactionData {
edges: Vec<EdgeData>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SearchData {
transactions: TransactionData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PSyncResponseData {
search: SearchData,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PSyncResponse {
data: PSyncResponseData,
}
impl<F> TryFrom<ResponseRouterData<BraintreePSyncResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<BraintreePSyncResponse, Self>,
) -> Result<Self, Self::Error> {
match item.response {
BraintreePSyncResponse::ErrorResponse(error_response) => Ok(Self {
response: build_error_response(&error_response.errors, item.http_code)
.map_err(|err| *err),
..item.router_data
}),
BraintreePSyncResponse::SuccessResponse(psync_response) => {
let edge_data = psync_response
.data
.search
.transactions
.edges
.first()
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?;
let status = enums::AttemptStatus::from(edge_data.node.status.clone());
let response = if domain_types::utils::is_payment_failure(status) {
Err(create_failure_error_response(
edge_data.node.status.clone(),
None,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1750_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
for RouterDataV2<F, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<BraintreePSyncResponse, Self>,
) -> Result<Self, Self::Error> {
match item.response {
BraintreePSyncResponse::ErrorResponse(error_response) => Ok(Self {
response: build_error_response(&error_response.errors, item.http_code)
.map_err(|err| *err),
..item.router_data
}),
BraintreePSyncResponse::SuccessResponse(psync_response) => {
let edge_data = psync_response
.data
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1750_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
for RouterDataV2<F, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<BraintreePSyncResponse, Self>,
) -> Result<Self, Self::Error> {
match item.response {
BraintreePSyncResponse::ErrorResponse(error_response) => Ok(Self {
response: build_error_response(&error_response.errors, item.http_code)
.map_err(|err| *err),
..item.router_data
}),
BraintreePSyncResponse::SuccessResponse(psync_response) => {
let edge_data = psync_response
.data
.search
.transactions
.edges
.first()
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?;
let status = enums::AttemptStatus::from(edge_data.node.status.clone());
let response = if domain_types::utils::is_payment_failure(status) {
Err(create_failure_error_response(
edge_data.node.status.clone(),
None,
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(edge_data.node.id.clone()),
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1750_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
for RouterDataV2<F, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<BraintreePSyncResponse, Self>,
) -> Result<Self, Self::Error> {
match item.response {
BraintreePSyncResponse::ErrorResponse(error_response) => Ok(Self {
response: build_error_response(&error_response.errors, item.http_code)
.map_err(|err| *err),
..item.router_data
}),
BraintreePSyncResponse::SuccessResponse(psync_response) => {
let edge_data = psync_response
.data
.search
.transactions
.edges
.first()
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?;
let status = enums::AttemptStatus::from(edge_data.node.status.clone());
let response = if domain_types::utils::is_payment_failure(status) {
Err(create_failure_error_response(
edge_data.node.status.clone(),
None,
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(edge_data.node.id.clone()),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
resource_common_data: PaymentFlowData {
status,
..item.router_data.resource_common_data
},
response,
..item.router_data
})
}
}
}
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1775_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(edge_data.node.id.clone()),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1775_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(edge_data.node.id.clone()),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
resource_common_data: PaymentFlowData {
status,
..item.router_data.resource_common_data
},
response,
..item.router_data
})
}
}
}
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsResponse {
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1775_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
item.http_code,
))
} else {
Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(edge_data.node.id.clone()),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
incremental_authorization_allowed: None,
status_code: item.http_code,
})
};
Ok(Self {
resource_common_data: PaymentFlowData {
status,
..item.router_data.resource_common_data
},
response,
..item.router_data
})
}
}
}
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsResponse {
pub nonce: Secret<String>,
pub liability_shifted: bool,
pub liability_shift_possible: bool,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsErrorResponse {
pub code: String,
pub message: String,
}
#[derive(Debug, Deserialize)]
pub struct BraintreeRedirectionResponse {
pub authentication_response: String,
}
fn get_card_isin_from_payment_method_data<T>(
card_details: &PaymentMethodData<T>,
) -> Result<String, error_stack::Report<errors::ConnectorError>>
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1800_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsResponse {
pub nonce: Secret<String>,
pub liability_shifted: bool,
pub liability_shift_possible: bool,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsErrorResponse {
pub code: String,
pub message: String,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1800_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsResponse {
pub nonce: Secret<String>,
pub liability_shifted: bool,
pub liability_shift_possible: bool,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsErrorResponse {
pub code: String,
pub message: String,
}
#[derive(Debug, Deserialize)]
pub struct BraintreeRedirectionResponse {
pub authentication_response: String,
}
fn get_card_isin_from_payment_method_data<T>(
card_details: &PaymentMethodData<T>,
) -> Result<String, error_stack::Report<errors::ConnectorError>>
where
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1800_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsResponse {
pub nonce: Secret<String>,
pub liability_shifted: bool,
pub liability_shift_possible: bool,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BraintreeThreeDsErrorResponse {
pub code: String,
pub message: String,
}
#[derive(Debug, Deserialize)]
pub struct BraintreeRedirectionResponse {
pub authentication_response: String,
}
fn get_card_isin_from_payment_method_data<T>(
card_details: &PaymentMethodData<T>,
) -> Result<String, error_stack::Report<errors::ConnectorError>>
where
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
{
match card_details {
PaymentMethodData::Card(card_data) => {
let card_number_str = format!("{:?}", card_data.card_number.0);
let cleaned_number = card_number_str
.chars()
.filter(|c| c.is_ascii_digit())
.take(6)
.collect::<String>();
Ok(cleaned_number)
}
_ => Err(errors::ConnectorError::NotImplemented("given payment method".to_owned()).into()),
}
}
impl TryFrom<BraintreeMeta> for BraintreeClientTokenRequest {
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(metadata: BraintreeMeta) -> Result<Self, Self::Error> {
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1825_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
where
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
{
match card_details {
PaymentMethodData::Card(card_data) => {
let card_number_str = format!("{:?}", card_data.card_number.0);
let cleaned_number = card_number_str
.chars()
.filter(|c| c.is_ascii_digit())
.take(6)
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1825_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
where
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
{
match card_details {
PaymentMethodData::Card(card_data) => {
let card_number_str = format!("{:?}", card_data.card_number.0);
let cleaned_number = card_number_str
.chars()
.filter(|c| c.is_ascii_digit())
.take(6)
.collect::<String>();
Ok(cleaned_number)
}
_ => Err(errors::ConnectorError::NotImplemented("given payment method".to_owned()).into()),
}
}
impl TryFrom<BraintreeMeta> for BraintreeClientTokenRequest {
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(metadata: BraintreeMeta) -> Result<Self, Self::Error> {
Ok(Self {
query: constants::CLIENT_TOKEN_MUTATION.to_owned(),
variables: VariableClientTokenInput {
input: InputClientTokenData {
client_token: ClientTokenInput {
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1825_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
where
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
{
match card_details {
PaymentMethodData::Card(card_data) => {
let card_number_str = format!("{:?}", card_data.card_number.0);
let cleaned_number = card_number_str
.chars()
.filter(|c| c.is_ascii_digit())
.take(6)
.collect::<String>();
Ok(cleaned_number)
}
_ => Err(errors::ConnectorError::NotImplemented("given payment method".to_owned()).into()),
}
}
impl TryFrom<BraintreeMeta> for BraintreeClientTokenRequest {
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(metadata: BraintreeMeta) -> Result<Self, Self::Error> {
Ok(Self {
query: constants::CLIENT_TOKEN_MUTATION.to_owned(),
variables: VariableClientTokenInput {
input: InputClientTokenData {
client_token: ClientTokenInput {
merchant_account_id: metadata.merchant_account_id,
},
},
},
})
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<(
BraintreeRouterData<
RouterDataV2<
Authorize,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1850_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
Ok(Self {
query: constants::CLIENT_TOKEN_MUTATION.to_owned(),
variables: VariableClientTokenInput {
input: InputClientTokenData {
client_token: ClientTokenInput {
merchant_account_id: metadata.merchant_account_id,
},
},
},
})
}
}
impl<
T: PaymentMethodDataTypes
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1850_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
Ok(Self {
query: constants::CLIENT_TOKEN_MUTATION.to_owned(),
variables: VariableClientTokenInput {
input: InputClientTokenData {
client_token: ClientTokenInput {
merchant_account_id: metadata.merchant_account_id,
},
},
},
})
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<(
BraintreeRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1850_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
Ok(Self {
query: constants::CLIENT_TOKEN_MUTATION.to_owned(),
variables: VariableClientTokenInput {
input: InputClientTokenData {
client_token: ClientTokenInput {
merchant_account_id: metadata.merchant_account_id,
},
},
},
})
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<(
BraintreeRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
)> for CardPaymentRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
(item, metadata): (
BraintreeRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
),
) -> Result<Self, Self::Error> {
let reference_id = Some(
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1875_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
)> for CardPaymentRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
(item, metadata): (
BraintreeRouterData<
RouterDataV2<
Authorize,
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1875_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
)> for CardPaymentRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
(item, metadata): (
BraintreeRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
),
) -> Result<Self, Self::Error> {
let reference_id = Some(
item.router_data
.resource_common_data
.connector_request_reference_id
.clone(),
);
| {
"chunk": null,
"crate": "connector-integration",
"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_-5184931324552524607_1875_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
)> for CardPaymentRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
(item, metadata): (
BraintreeRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
BraintreeMeta,
),
) -> Result<Self, Self::Error> {
let reference_id = Some(
item.router_data
.resource_common_data
.connector_request_reference_id
.clone(),
);
let order_id = reference_id.ok_or(
errors::ConnectorError::MissingConnectorRelatedTransactionID {
id: "order_id".to_string(),
},
)?;
let amount = item
.connector
.amount_converter
.convert(
item.router_data.request.minor_amount,
item.router_data.request.currency,
)
.change_context(ConnectorError::AmountConversionFailed)?;
let (query, transaction_body) = if item.router_data.request.is_mandate_payment() {
(
if item.router_data.request.is_auto_capture()? {
constants::CHARGE_AND_VAULT_TRANSACTION_MUTATION.to_string()
} else {
constants::AUTHORIZE_AND_VAULT_CREDIT_CARD_MUTATION.to_string()
},
| {
"chunk": null,
"crate": "connector-integration",
"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
} |
connector-service_snippet_-5184931324552524607_1900_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
item.router_data
.resource_common_data
.connector_request_reference_id
.clone(),
);
let order_id = reference_id.ok_or(
errors::ConnectorError::MissingConnectorRelatedTransactionID {
id: "order_id".to_string(),
},
)?;
let amount = item
.connector
.amount_converter
.convert(
item.router_data.request.minor_amount,
| {
"chunk": null,
"crate": "connector-integration",
"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": 1900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1900_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
item.router_data
.resource_common_data
.connector_request_reference_id
.clone(),
);
let order_id = reference_id.ok_or(
errors::ConnectorError::MissingConnectorRelatedTransactionID {
id: "order_id".to_string(),
},
)?;
let amount = item
.connector
.amount_converter
.convert(
item.router_data.request.minor_amount,
item.router_data.request.currency,
)
.change_context(ConnectorError::AmountConversionFailed)?;
let (query, transaction_body) = if item.router_data.request.is_mandate_payment() {
(
if item.router_data.request.is_auto_capture()? {
constants::CHARGE_AND_VAULT_TRANSACTION_MUTATION.to_string()
} else {
constants::AUTHORIZE_AND_VAULT_CREDIT_CARD_MUTATION.to_string()
},
TransactionBody::Vault(VaultTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
vault_payment_method_after_transacting: TransactionTiming {
when: "ALWAYS".to_string(),
| {
"chunk": null,
"crate": "connector-integration",
"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": 1900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1900_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
item.router_data
.resource_common_data
.connector_request_reference_id
.clone(),
);
let order_id = reference_id.ok_or(
errors::ConnectorError::MissingConnectorRelatedTransactionID {
id: "order_id".to_string(),
},
)?;
let amount = item
.connector
.amount_converter
.convert(
item.router_data.request.minor_amount,
item.router_data.request.currency,
)
.change_context(ConnectorError::AmountConversionFailed)?;
let (query, transaction_body) = if item.router_data.request.is_mandate_payment() {
(
if item.router_data.request.is_auto_capture()? {
constants::CHARGE_AND_VAULT_TRANSACTION_MUTATION.to_string()
} else {
constants::AUTHORIZE_AND_VAULT_CREDIT_CARD_MUTATION.to_string()
},
TransactionBody::Vault(VaultTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
vault_payment_method_after_transacting: TransactionTiming {
when: "ALWAYS".to_string(),
},
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
} else {
(
if item.router_data.request.is_auto_capture()? {
constants::CHARGE_CREDIT_CARD_MUTATION.to_string()
} else {
constants::AUTHORIZE_CREDIT_CARD_MUTATION.to_string()
},
TransactionBody::Regular(RegularTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
| {
"chunk": null,
"crate": "connector-integration",
"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": 1900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1925_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
TransactionBody::Vault(VaultTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
vault_payment_method_after_transacting: TransactionTiming {
when: "ALWAYS".to_string(),
},
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
| {
"chunk": null,
"crate": "connector-integration",
"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": 1925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1925_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
TransactionBody::Vault(VaultTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
vault_payment_method_after_transacting: TransactionTiming {
when: "ALWAYS".to_string(),
},
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
} else {
(
if item.router_data.request.is_auto_capture()? {
constants::CHARGE_CREDIT_CARD_MUTATION.to_string()
} else {
constants::AUTHORIZE_CREDIT_CARD_MUTATION.to_string()
},
TransactionBody::Regular(RegularTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
channel: constants::CHANNEL_CODE.to_string(),
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
| {
"chunk": null,
"crate": "connector-integration",
"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": 1925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1925_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
TransactionBody::Vault(VaultTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
vault_payment_method_after_transacting: TransactionTiming {
when: "ALWAYS".to_string(),
},
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
} else {
(
if item.router_data.request.is_auto_capture()? {
constants::CHARGE_CREDIT_CARD_MUTATION.to_string()
} else {
constants::AUTHORIZE_CREDIT_CARD_MUTATION.to_string()
},
TransactionBody::Regular(RegularTransactionBody {
amount,
merchant_account_id: metadata.merchant_account_id,
channel: constants::CHANNEL_CODE.to_string(),
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
};
Ok(Self {
query,
variables: VariablePaymentInput {
input: PaymentInput {
payment_method_id: match item
.router_data
.resource_common_data
.get_payment_method_token()?
{
PaymentMethodTokenFlow::Token(token) => token,
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(
unimplemented_payment_method!("Apple Pay", "Simplified", "Braintree"),
)?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
| {
"chunk": null,
"crate": "connector-integration",
"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": 1925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1950_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
channel: constants::CHANNEL_CODE.to_string(),
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
};
Ok(Self {
query,
variables: VariablePaymentInput {
input: PaymentInput {
| {
"chunk": null,
"crate": "connector-integration",
"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": 1950,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1950_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
channel: constants::CHANNEL_CODE.to_string(),
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
};
Ok(Self {
query,
variables: VariablePaymentInput {
input: PaymentInput {
payment_method_id: match item
.router_data
.resource_common_data
.get_payment_method_token()?
{
PaymentMethodTokenFlow::Token(token) => token,
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(
unimplemented_payment_method!("Apple Pay", "Simplified", "Braintree"),
)?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 1950,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1950_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
channel: constants::CHANNEL_CODE.to_string(),
customer_details: item
.router_data
.resource_common_data
.get_billing_email()
.ok()
.map(|email| CustomerBody { email }),
order_id,
}),
)
};
Ok(Self {
query,
variables: VariablePaymentInput {
input: PaymentInput {
payment_method_id: match item
.router_data
.resource_common_data
.get_payment_method_token()?
{
PaymentMethodTokenFlow::Token(token) => token,
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(
unimplemented_payment_method!("Apple Pay", "Simplified", "Braintree"),
)?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
transaction: transaction_body,
},
},
})
}
}
fn get_braintree_redirect_form<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>(
client_token_data: ClientTokenResponse,
payment_method_token: PaymentMethodTokenFlow,
card_details: PaymentMethodData<T>,
complete_authorize_url: String,
| {
"chunk": null,
"crate": "connector-integration",
"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": 1950,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1975_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
transaction: transaction_body,
},
},
})
}
}
fn get_braintree_redirect_form<
T: PaymentMethodDataTypes
| {
"chunk": null,
"crate": "connector-integration",
"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": 1975,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1975_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
transaction: transaction_body,
},
},
})
}
}
fn get_braintree_redirect_form<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>(
client_token_data: ClientTokenResponse,
payment_method_token: PaymentMethodTokenFlow,
card_details: PaymentMethodData<T>,
complete_authorize_url: String,
) -> Result<RedirectForm, error_stack::Report<errors::ConnectorError>> {
Ok(RedirectForm::Braintree {
client_token: client_token_data
.data
.create_client_token
| {
"chunk": null,
"crate": "connector-integration",
"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": 1975,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_1975_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
transaction: transaction_body,
},
},
})
}
}
fn get_braintree_redirect_form<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>(
client_token_data: ClientTokenResponse,
payment_method_token: PaymentMethodTokenFlow,
card_details: PaymentMethodData<T>,
complete_authorize_url: String,
) -> Result<RedirectForm, error_stack::Report<errors::ConnectorError>> {
Ok(RedirectForm::Braintree {
client_token: client_token_data
.data
.create_client_token
.client_token
.expose(),
card_token: match payment_method_token {
PaymentMethodTokenFlow::Token(token) => token.expose(),
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(unimplemented_payment_method!(
"Apple Pay",
"Simplified",
"Braintree"
))?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
bin: match card_details {
PaymentMethodData::Card(_) => get_card_isin_from_payment_method_data(&card_details)?,
PaymentMethodData::CardRedirect(_)
| PaymentMethodData::Wallet(_)
| {
"chunk": null,
"crate": "connector-integration",
"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": 1975,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2000_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
) -> Result<RedirectForm, error_stack::Report<errors::ConnectorError>> {
Ok(RedirectForm::Braintree {
client_token: client_token_data
.data
.create_client_token
.client_token
.expose(),
card_token: match payment_method_token {
PaymentMethodTokenFlow::Token(token) => token.expose(),
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(unimplemented_payment_method!(
"Apple Pay",
"Simplified",
"Braintree"
))?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
| {
"chunk": null,
"crate": "connector-integration",
"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": 2000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2000_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
) -> Result<RedirectForm, error_stack::Report<errors::ConnectorError>> {
Ok(RedirectForm::Braintree {
client_token: client_token_data
.data
.create_client_token
.client_token
.expose(),
card_token: match payment_method_token {
PaymentMethodTokenFlow::Token(token) => token.expose(),
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(unimplemented_payment_method!(
"Apple Pay",
"Simplified",
"Braintree"
))?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
bin: match card_details {
PaymentMethodData::Card(_) => get_card_isin_from_payment_method_data(&card_details)?,
PaymentMethodData::CardRedirect(_)
| PaymentMethodData::Wallet(_)
| PaymentMethodData::PayLater(_)
| PaymentMethodData::BankRedirect(_)
| PaymentMethodData::BankDebit(_)
| PaymentMethodData::BankTransfer(_)
| PaymentMethodData::Crypto(_)
| {
"chunk": null,
"crate": "connector-integration",
"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": 2000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2000_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
) -> Result<RedirectForm, error_stack::Report<errors::ConnectorError>> {
Ok(RedirectForm::Braintree {
client_token: client_token_data
.data
.create_client_token
.client_token
.expose(),
card_token: match payment_method_token {
PaymentMethodTokenFlow::Token(token) => token.expose(),
PaymentMethodTokenFlow::ApplePayDecrypt(_) => Err(unimplemented_payment_method!(
"Apple Pay",
"Simplified",
"Braintree"
))?,
PaymentMethodTokenFlow::PazeDecrypt(_) => {
Err(unimplemented_payment_method!("Paze", "Braintree"))?
}
PaymentMethodTokenFlow::GooglePayDecrypt(_) => {
Err(unimplemented_payment_method!("Google Pay", "Braintree"))?
}
},
bin: match card_details {
PaymentMethodData::Card(_) => get_card_isin_from_payment_method_data(&card_details)?,
PaymentMethodData::CardRedirect(_)
| PaymentMethodData::Wallet(_)
| PaymentMethodData::PayLater(_)
| PaymentMethodData::BankRedirect(_)
| PaymentMethodData::BankDebit(_)
| PaymentMethodData::BankTransfer(_)
| PaymentMethodData::Crypto(_)
| PaymentMethodData::MandatePayment
| PaymentMethodData::OpenBanking(_)
| PaymentMethodData::Reward
| PaymentMethodData::RealTimePayment(_)
| PaymentMethodData::MobilePayment(_)
| PaymentMethodData::Upi(_)
| PaymentMethodData::Voucher(_)
| PaymentMethodData::GiftCard(_)
| PaymentMethodData::CardToken(_)
| PaymentMethodData::NetworkToken(_)
| PaymentMethodData::CardDetailsForNetworkTransactionId(_) => Err(
errors::ConnectorError::NotImplemented("given payment method".to_owned()),
)?,
},
acs_url: complete_authorize_url,
})
}
fn validate_currency(
request_currency: enums::Currency,
| {
"chunk": null,
"crate": "connector-integration",
"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": 2000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2025_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
| PaymentMethodData::PayLater(_)
| PaymentMethodData::BankRedirect(_)
| PaymentMethodData::BankDebit(_)
| PaymentMethodData::BankTransfer(_)
| PaymentMethodData::Crypto(_)
| PaymentMethodData::MandatePayment
| PaymentMethodData::OpenBanking(_)
| PaymentMethodData::Reward
| PaymentMethodData::RealTimePayment(_)
| PaymentMethodData::MobilePayment(_)
| PaymentMethodData::Upi(_)
| PaymentMethodData::Voucher(_)
| PaymentMethodData::GiftCard(_)
| PaymentMethodData::CardToken(_)
| PaymentMethodData::NetworkToken(_)
| {
"chunk": null,
"crate": "connector-integration",
"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": 2025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2025_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
| PaymentMethodData::PayLater(_)
| PaymentMethodData::BankRedirect(_)
| PaymentMethodData::BankDebit(_)
| PaymentMethodData::BankTransfer(_)
| PaymentMethodData::Crypto(_)
| PaymentMethodData::MandatePayment
| PaymentMethodData::OpenBanking(_)
| PaymentMethodData::Reward
| PaymentMethodData::RealTimePayment(_)
| PaymentMethodData::MobilePayment(_)
| PaymentMethodData::Upi(_)
| PaymentMethodData::Voucher(_)
| PaymentMethodData::GiftCard(_)
| PaymentMethodData::CardToken(_)
| PaymentMethodData::NetworkToken(_)
| PaymentMethodData::CardDetailsForNetworkTransactionId(_) => Err(
errors::ConnectorError::NotImplemented("given payment method".to_owned()),
)?,
},
acs_url: complete_authorize_url,
})
}
fn validate_currency(
request_currency: enums::Currency,
merchant_config_currency: Option<enums::Currency>,
) -> Result<(), errors::ConnectorError> {
let merchant_config_currency =
merchant_config_currency.ok_or(errors::ConnectorError::NoConnectorMetaData)?;
if request_currency != merchant_config_currency {
| {
"chunk": null,
"crate": "connector-integration",
"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": 2025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2025_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
| PaymentMethodData::PayLater(_)
| PaymentMethodData::BankRedirect(_)
| PaymentMethodData::BankDebit(_)
| PaymentMethodData::BankTransfer(_)
| PaymentMethodData::Crypto(_)
| PaymentMethodData::MandatePayment
| PaymentMethodData::OpenBanking(_)
| PaymentMethodData::Reward
| PaymentMethodData::RealTimePayment(_)
| PaymentMethodData::MobilePayment(_)
| PaymentMethodData::Upi(_)
| PaymentMethodData::Voucher(_)
| PaymentMethodData::GiftCard(_)
| PaymentMethodData::CardToken(_)
| PaymentMethodData::NetworkToken(_)
| PaymentMethodData::CardDetailsForNetworkTransactionId(_) => Err(
errors::ConnectorError::NotImplemented("given payment method".to_owned()),
)?,
},
acs_url: complete_authorize_url,
})
}
fn validate_currency(
request_currency: enums::Currency,
merchant_config_currency: Option<enums::Currency>,
) -> Result<(), errors::ConnectorError> {
let merchant_config_currency =
merchant_config_currency.ok_or(errors::ConnectorError::NoConnectorMetaData)?;
if request_currency != merchant_config_currency {
Err(errors::ConnectorError::NotSupported {
message: format!(
"currency {request_currency} is not supported for this merchant account",
),
connector: "Braintree",
})?
}
Ok(())
}
#[derive(Debug, Deserialize)]
pub struct BraintreeWebhookResponse {
pub bt_signature: String,
pub bt_payload: String,
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct Notification {
pub kind: String, // xml parse only string to fields
| {
"chunk": null,
"crate": "connector-integration",
"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": 2025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2050_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
merchant_config_currency: Option<enums::Currency>,
) -> Result<(), errors::ConnectorError> {
let merchant_config_currency =
merchant_config_currency.ok_or(errors::ConnectorError::NoConnectorMetaData)?;
if request_currency != merchant_config_currency {
Err(errors::ConnectorError::NotSupported {
message: format!(
"currency {request_currency} is not supported for this merchant account",
),
connector: "Braintree",
})?
}
Ok(())
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 2050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2050_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
merchant_config_currency: Option<enums::Currency>,
) -> Result<(), errors::ConnectorError> {
let merchant_config_currency =
merchant_config_currency.ok_or(errors::ConnectorError::NoConnectorMetaData)?;
if request_currency != merchant_config_currency {
Err(errors::ConnectorError::NotSupported {
message: format!(
"currency {request_currency} is not supported for this merchant account",
),
connector: "Braintree",
})?
}
Ok(())
}
#[derive(Debug, Deserialize)]
pub struct BraintreeWebhookResponse {
pub bt_signature: String,
pub bt_payload: String,
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct Notification {
pub kind: String, // xml parse only string to fields
pub timestamp: String,
pub dispute: Option<BraintreeDisputeData>,
}
#[derive(Debug, Deserialize, Serialize)]
| {
"chunk": null,
"crate": "connector-integration",
"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": 2050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2050_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
merchant_config_currency: Option<enums::Currency>,
) -> Result<(), errors::ConnectorError> {
let merchant_config_currency =
merchant_config_currency.ok_or(errors::ConnectorError::NoConnectorMetaData)?;
if request_currency != merchant_config_currency {
Err(errors::ConnectorError::NotSupported {
message: format!(
"currency {request_currency} is not supported for this merchant account",
),
connector: "Braintree",
})?
}
Ok(())
}
#[derive(Debug, Deserialize)]
pub struct BraintreeWebhookResponse {
pub bt_signature: String,
pub bt_payload: String,
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct Notification {
pub kind: String, // xml parse only string to fields
pub timestamp: String,
pub dispute: Option<BraintreeDisputeData>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct BraintreeDisputeData {
pub amount_disputed: MinorUnit,
pub amount_won: Option<String>,
pub case_number: Option<String>,
pub chargeback_protection_level: Option<String>,
pub currency_iso_code: enums::Currency,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub created_at: Option<PrimitiveDateTime>,
pub evidence: Option<DisputeEvidence>,
pub id: String,
pub kind: String, // xml parse only string to fields
pub status: String,
pub reason: Option<String>,
pub reason_code: Option<String>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub updated_at: Option<PrimitiveDateTime>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub reply_by_date: Option<PrimitiveDateTime>,
pub transaction: DisputeTransaction,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 2050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2075_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
pub timestamp: String,
pub dispute: Option<BraintreeDisputeData>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct BraintreeDisputeData {
pub amount_disputed: MinorUnit,
pub amount_won: Option<String>,
pub case_number: Option<String>,
pub chargeback_protection_level: Option<String>,
pub currency_iso_code: enums::Currency,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub created_at: Option<PrimitiveDateTime>,
pub evidence: Option<DisputeEvidence>,
pub id: String,
| {
"chunk": null,
"crate": "connector-integration",
"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": 2075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2075_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
pub timestamp: String,
pub dispute: Option<BraintreeDisputeData>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct BraintreeDisputeData {
pub amount_disputed: MinorUnit,
pub amount_won: Option<String>,
pub case_number: Option<String>,
pub chargeback_protection_level: Option<String>,
pub currency_iso_code: enums::Currency,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub created_at: Option<PrimitiveDateTime>,
pub evidence: Option<DisputeEvidence>,
pub id: String,
pub kind: String, // xml parse only string to fields
pub status: String,
pub reason: Option<String>,
pub reason_code: Option<String>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub updated_at: Option<PrimitiveDateTime>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub reply_by_date: Option<PrimitiveDateTime>,
pub transaction: DisputeTransaction,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeTransaction {
pub amount: StringMajorUnit,
pub id: String,
| {
"chunk": null,
"crate": "connector-integration",
"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": 2075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2075_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
pub timestamp: String,
pub dispute: Option<BraintreeDisputeData>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct BraintreeDisputeData {
pub amount_disputed: MinorUnit,
pub amount_won: Option<String>,
pub case_number: Option<String>,
pub chargeback_protection_level: Option<String>,
pub currency_iso_code: enums::Currency,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub created_at: Option<PrimitiveDateTime>,
pub evidence: Option<DisputeEvidence>,
pub id: String,
pub kind: String, // xml parse only string to fields
pub status: String,
pub reason: Option<String>,
pub reason_code: Option<String>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub updated_at: Option<PrimitiveDateTime>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub reply_by_date: Option<PrimitiveDateTime>,
pub transaction: DisputeTransaction,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeTransaction {
pub amount: StringMajorUnit,
pub id: String,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeEvidence {
pub comment: String,
pub id: Secret<String>,
pub created_at: Option<PrimitiveDateTime>,
pub url: url::Url,
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 38,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2100_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeTransaction {
pub amount: StringMajorUnit,
pub id: String,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeEvidence {
pub comment: String,
pub id: Secret<String>,
pub created_at: Option<PrimitiveDateTime>,
pub url: url::Url,
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 13,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2100_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeTransaction {
pub amount: StringMajorUnit,
pub id: String,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeEvidence {
pub comment: String,
pub id: Secret<String>,
pub created_at: Option<PrimitiveDateTime>,
pub url: url::Url,
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 13,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5184931324552524607_2100_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeTransaction {
pub amount: StringMajorUnit,
pub id: String,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DisputeEvidence {
pub comment: String,
pub id: Secret<String>,
pub created_at: Option<PrimitiveDateTime>,
pub url: url::Url,
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 13,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_0_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
use domain_types::errors;
use error_stack::ResultExt;
use hyperswitch_masking::Secret;
use serde::{Deserialize, Serialize};
use url::Url;
use super::requests::*;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayPaymentsResponse {
pub outcome: PaymentOutcome,
pub transaction_reference: Option<String>,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<SelfLink>,
| {
"chunk": null,
"crate": "connector-integration",
"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": 0,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_0_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
use domain_types::errors;
use error_stack::ResultExt;
use hyperswitch_masking::Secret;
use serde::{Deserialize, Serialize};
use url::Url;
use super::requests::*;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayPaymentsResponse {
pub outcome: PaymentOutcome,
pub transaction_reference: Option<String>,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<SelfLink>,
#[serde(rename = "_actions", skip_serializing_if = "Option::is_none")]
pub actions: Option<ActionLinks>,
#[serde(flatten)]
pub other_fields: Option<WorldpayPaymentResponseFields>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum WorldpayPaymentResponseFields {
RefusedResponse(RefusedResponse),
DDCResponse(DDCResponse),
ThreeDsChallenged(ThreeDsChallengedResponse),
FraudHighRisk(FraudHighRiskResponse),
AuthorizedResponse(Box<AuthorizedResponse>),
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 0,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_0_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
use domain_types::errors;
use error_stack::ResultExt;
use hyperswitch_masking::Secret;
use serde::{Deserialize, Serialize};
use url::Url;
use super::requests::*;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayPaymentsResponse {
pub outcome: PaymentOutcome,
pub transaction_reference: Option<String>,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<SelfLink>,
#[serde(rename = "_actions", skip_serializing_if = "Option::is_none")]
pub actions: Option<ActionLinks>,
#[serde(flatten)]
pub other_fields: Option<WorldpayPaymentResponseFields>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum WorldpayPaymentResponseFields {
RefusedResponse(RefusedResponse),
DDCResponse(DDCResponse),
ThreeDsChallenged(ThreeDsChallengedResponse),
FraudHighRisk(FraudHighRiskResponse),
AuthorizedResponse(Box<AuthorizedResponse>),
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthorizedResponse {
pub payment_instrument: PaymentsResPaymentInstrument,
#[serde(skip_serializing_if = "Option::is_none")]
pub issuer: Option<Issuer>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<PaymentsResponseScheme>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
pub risk_factors: Option<Vec<RiskFactorsInner>>,
pub fraud: Option<Fraud>,
/// Mandate's token
pub token: Option<MandateToken>,
/// Network transaction ID
pub scheme_reference: Option<Secret<String>>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
| {
"chunk": null,
"crate": "connector-integration",
"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": 0,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_25_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
DDCResponse(DDCResponse),
ThreeDsChallenged(ThreeDsChallengedResponse),
FraudHighRisk(FraudHighRiskResponse),
AuthorizedResponse(Box<AuthorizedResponse>),
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthorizedResponse {
pub payment_instrument: PaymentsResPaymentInstrument,
#[serde(skip_serializing_if = "Option::is_none")]
pub issuer: Option<Issuer>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<PaymentsResponseScheme>,
#[serde(skip_serializing_if = "Option::is_none")]
| {
"chunk": null,
"crate": "connector-integration",
"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": 25,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_25_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
DDCResponse(DDCResponse),
ThreeDsChallenged(ThreeDsChallengedResponse),
FraudHighRisk(FraudHighRiskResponse),
AuthorizedResponse(Box<AuthorizedResponse>),
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthorizedResponse {
pub payment_instrument: PaymentsResPaymentInstrument,
#[serde(skip_serializing_if = "Option::is_none")]
pub issuer: Option<Issuer>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<PaymentsResponseScheme>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
pub risk_factors: Option<Vec<RiskFactorsInner>>,
pub fraud: Option<Fraud>,
/// Mandate's token
pub token: Option<MandateToken>,
/// Network transaction ID
pub scheme_reference: Option<Secret<String>>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MandateToken {
pub href: Secret<String>,
pub token_id: String,
pub token_expiry_date_time: String,
| {
"chunk": null,
"crate": "connector-integration",
"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": 25,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_25_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
DDCResponse(DDCResponse),
ThreeDsChallenged(ThreeDsChallengedResponse),
FraudHighRisk(FraudHighRiskResponse),
AuthorizedResponse(Box<AuthorizedResponse>),
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthorizedResponse {
pub payment_instrument: PaymentsResPaymentInstrument,
#[serde(skip_serializing_if = "Option::is_none")]
pub issuer: Option<Issuer>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<PaymentsResponseScheme>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
pub risk_factors: Option<Vec<RiskFactorsInner>>,
pub fraud: Option<Fraud>,
/// Mandate's token
pub token: Option<MandateToken>,
/// Network transaction ID
pub scheme_reference: Option<Secret<String>>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MandateToken {
pub href: Secret<String>,
pub token_id: String,
pub token_expiry_date_time: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FraudHighRiskResponse {
pub score: f32,
pub reason: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RefusedResponse {
pub refusal_description: String,
// Access Worldpay returns a raw response code in the refusalCode field (if enabled) containing the unmodified response code received either directly from the card scheme for Worldpay-acquired transactions, or from third party acquirers.
pub refusal_code: String,
pub risk_factors: Option<Vec<RiskFactorsInner>>,
pub fraud: Option<Fraud>,
#[serde(rename = "threeDS")]
pub three_ds: Option<ThreeDsResponse>,
pub advice: Option<Advice>,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 25,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_50_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[serde(rename_all = "camelCase")]
pub struct MandateToken {
pub href: Secret<String>,
pub token_id: String,
pub token_expiry_date_time: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FraudHighRiskResponse {
pub score: f32,
pub reason: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
| {
"chunk": null,
"crate": "connector-integration",
"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": 50,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_50_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[serde(rename_all = "camelCase")]
pub struct MandateToken {
pub href: Secret<String>,
pub token_id: String,
pub token_expiry_date_time: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FraudHighRiskResponse {
pub score: f32,
pub reason: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RefusedResponse {
pub refusal_description: String,
// Access Worldpay returns a raw response code in the refusalCode field (if enabled) containing the unmodified response code received either directly from the card scheme for Worldpay-acquired transactions, or from third party acquirers.
pub refusal_code: String,
pub risk_factors: Option<Vec<RiskFactorsInner>>,
pub fraud: Option<Fraud>,
#[serde(rename = "threeDS")]
pub three_ds: Option<ThreeDsResponse>,
pub advice: Option<Advice>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Advice {
pub code: Option<String>,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 50,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_50_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[serde(rename_all = "camelCase")]
pub struct MandateToken {
pub href: Secret<String>,
pub token_id: String,
pub token_expiry_date_time: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FraudHighRiskResponse {
pub score: f32,
pub reason: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RefusedResponse {
pub refusal_description: String,
// Access Worldpay returns a raw response code in the refusalCode field (if enabled) containing the unmodified response code received either directly from the card scheme for Worldpay-acquired transactions, or from third party acquirers.
pub refusal_code: String,
pub risk_factors: Option<Vec<RiskFactorsInner>>,
pub fraud: Option<Fraud>,
#[serde(rename = "threeDS")]
pub three_ds: Option<ThreeDsResponse>,
pub advice: Option<Advice>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Advice {
pub code: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsResponse {
pub outcome: String,
pub issuer_response: IssuerResponse,
pub version: Option<String>,
pub eci: Option<String>,
pub applied: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsChallengedResponse {
pub authentication: AuthenticationResponse,
pub challenge: ThreeDsChallenge,
#[serde(rename = "_actions")]
pub actions: CompleteThreeDsActionLink,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 50,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_75_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Advice {
pub code: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsResponse {
pub outcome: String,
pub issuer_response: IssuerResponse,
pub version: Option<String>,
pub eci: Option<String>,
pub applied: Option<String>,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 75,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_75_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Advice {
pub code: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsResponse {
pub outcome: String,
pub issuer_response: IssuerResponse,
pub version: Option<String>,
pub eci: Option<String>,
pub applied: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsChallengedResponse {
pub authentication: AuthenticationResponse,
pub challenge: ThreeDsChallenge,
#[serde(rename = "_actions")]
pub actions: CompleteThreeDsActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthenticationResponse {
pub version: String,
pub eci: Option<String>,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 75,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_75_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Advice {
pub code: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsResponse {
pub outcome: String,
pub issuer_response: IssuerResponse,
pub version: Option<String>,
pub eci: Option<String>,
pub applied: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreeDsChallengedResponse {
pub authentication: AuthenticationResponse,
pub challenge: ThreeDsChallenge,
#[serde(rename = "_actions")]
pub actions: CompleteThreeDsActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthenticationResponse {
pub version: String,
pub eci: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ThreeDsChallenge {
pub reference: String,
pub url: Url,
pub jwt: Secret<String>,
pub payload: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CompleteThreeDsActionLink {
#[serde(rename = "complete3dsChallenge")]
pub complete_three_ds_challenge: ActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum IssuerResponse {
Challenged,
Frictionless,
| {
"chunk": null,
"crate": "connector-integration",
"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": 75,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_100_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthenticationResponse {
pub version: String,
pub eci: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ThreeDsChallenge {
pub reference: String,
pub url: Url,
pub jwt: Secret<String>,
pub payload: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
| {
"chunk": null,
"crate": "connector-integration",
"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": 100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_100_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthenticationResponse {
pub version: String,
pub eci: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ThreeDsChallenge {
pub reference: String,
pub url: Url,
pub jwt: Secret<String>,
pub payload: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CompleteThreeDsActionLink {
#[serde(rename = "complete3dsChallenge")]
pub complete_three_ds_challenge: ActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum IssuerResponse {
Challenged,
Frictionless,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DDCResponse {
| {
"chunk": null,
"crate": "connector-integration",
"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": 100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_100_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthenticationResponse {
pub version: String,
pub eci: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ThreeDsChallenge {
pub reference: String,
pub url: Url,
pub jwt: Secret<String>,
pub payload: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CompleteThreeDsActionLink {
#[serde(rename = "complete3dsChallenge")]
pub complete_three_ds_challenge: ActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum IssuerResponse {
Challenged,
Frictionless,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DDCResponse {
pub device_data_collection: DDCToken,
#[serde(rename = "_actions")]
pub actions: DDCActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCToken {
pub jwt: Secret<String>,
pub url: Url,
pub bin: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCActionLink {
#[serde(rename = "supply3dsDeviceData")]
pub supply_ddc_data: ActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
| {
"chunk": null,
"crate": "connector-integration",
"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": 100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_125_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DDCResponse {
pub device_data_collection: DDCToken,
#[serde(rename = "_actions")]
pub actions: DDCActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCToken {
pub jwt: Secret<String>,
pub url: Url,
pub bin: Secret<String>,
| {
"chunk": null,
"crate": "connector-integration",
"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": 125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_125_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DDCResponse {
pub device_data_collection: DDCToken,
#[serde(rename = "_actions")]
pub actions: DDCActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCToken {
pub jwt: Secret<String>,
pub url: Url,
pub bin: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCActionLink {
#[serde(rename = "supply3dsDeviceData")]
pub supply_ddc_data: ActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum PaymentOutcome {
#[serde(alias = "authorized", alias = "Authorized")]
Authorized,
Refused,
SentForSettlement,
| {
"chunk": null,
"crate": "connector-integration",
"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": 125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_125_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DDCResponse {
pub device_data_collection: DDCToken,
#[serde(rename = "_actions")]
pub actions: DDCActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCToken {
pub jwt: Secret<String>,
pub url: Url,
pub bin: Secret<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DDCActionLink {
#[serde(rename = "supply3dsDeviceData")]
pub supply_ddc_data: ActionLink,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum PaymentOutcome {
#[serde(alias = "authorized", alias = "Authorized")]
Authorized,
Refused,
SentForSettlement,
SentForRefund,
FraudHighRisk,
#[serde(alias = "3dsDeviceDataRequired")]
ThreeDsDeviceDataRequired,
SentForCancellation,
#[serde(alias = "3dsAuthenticationFailed")]
ThreeDsAuthenticationFailed,
SentForPartialRefund,
#[serde(alias = "3dsChallenged")]
ThreeDsChallenged,
#[serde(alias = "3dsUnavailable")]
ThreeDsUnavailable,
}
impl std::fmt::Display for PaymentOutcome {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Authorized => write!(f, "authorized"),
Self::Refused => write!(f, "refused"),
Self::SentForSettlement => write!(f, "sentForSettlement"),
| {
"chunk": null,
"crate": "connector-integration",
"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": 125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_150_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
pub enum PaymentOutcome {
#[serde(alias = "authorized", alias = "Authorized")]
Authorized,
Refused,
SentForSettlement,
SentForRefund,
FraudHighRisk,
#[serde(alias = "3dsDeviceDataRequired")]
ThreeDsDeviceDataRequired,
SentForCancellation,
#[serde(alias = "3dsAuthenticationFailed")]
ThreeDsAuthenticationFailed,
SentForPartialRefund,
#[serde(alias = "3dsChallenged")]
ThreeDsChallenged,
| {
"chunk": null,
"crate": "connector-integration",
"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": 150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_150_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
pub enum PaymentOutcome {
#[serde(alias = "authorized", alias = "Authorized")]
Authorized,
Refused,
SentForSettlement,
SentForRefund,
FraudHighRisk,
#[serde(alias = "3dsDeviceDataRequired")]
ThreeDsDeviceDataRequired,
SentForCancellation,
#[serde(alias = "3dsAuthenticationFailed")]
ThreeDsAuthenticationFailed,
SentForPartialRefund,
#[serde(alias = "3dsChallenged")]
ThreeDsChallenged,
#[serde(alias = "3dsUnavailable")]
ThreeDsUnavailable,
}
impl std::fmt::Display for PaymentOutcome {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Authorized => write!(f, "authorized"),
Self::Refused => write!(f, "refused"),
Self::SentForSettlement => write!(f, "sentForSettlement"),
Self::SentForRefund => write!(f, "sentForRefund"),
Self::FraudHighRisk => write!(f, "fraudHighRisk"),
Self::ThreeDsDeviceDataRequired => write!(f, "3dsDeviceDataRequired"),
Self::SentForCancellation => write!(f, "sentForCancellation"),
Self::ThreeDsAuthenticationFailed => write!(f, "3dsAuthenticationFailed"),
| {
"chunk": null,
"crate": "connector-integration",
"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": 150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_150_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
pub enum PaymentOutcome {
#[serde(alias = "authorized", alias = "Authorized")]
Authorized,
Refused,
SentForSettlement,
SentForRefund,
FraudHighRisk,
#[serde(alias = "3dsDeviceDataRequired")]
ThreeDsDeviceDataRequired,
SentForCancellation,
#[serde(alias = "3dsAuthenticationFailed")]
ThreeDsAuthenticationFailed,
SentForPartialRefund,
#[serde(alias = "3dsChallenged")]
ThreeDsChallenged,
#[serde(alias = "3dsUnavailable")]
ThreeDsUnavailable,
}
impl std::fmt::Display for PaymentOutcome {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Authorized => write!(f, "authorized"),
Self::Refused => write!(f, "refused"),
Self::SentForSettlement => write!(f, "sentForSettlement"),
Self::SentForRefund => write!(f, "sentForRefund"),
Self::FraudHighRisk => write!(f, "fraudHighRisk"),
Self::ThreeDsDeviceDataRequired => write!(f, "3dsDeviceDataRequired"),
Self::SentForCancellation => write!(f, "sentForCancellation"),
Self::ThreeDsAuthenticationFailed => write!(f, "3dsAuthenticationFailed"),
Self::SentForPartialRefund => write!(f, "sentForPartialRefund"),
Self::ThreeDsChallenged => write!(f, "3dsChallenged"),
Self::ThreeDsUnavailable => write!(f, "3dsUnavailable"),
}
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLink {
#[serde(rename = "self")]
pub self_link: SelfLinkInner,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLinkInner {
pub href: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
| {
"chunk": null,
"crate": "connector-integration",
"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": 150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_175_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
Self::SentForRefund => write!(f, "sentForRefund"),
Self::FraudHighRisk => write!(f, "fraudHighRisk"),
Self::ThreeDsDeviceDataRequired => write!(f, "3dsDeviceDataRequired"),
Self::SentForCancellation => write!(f, "sentForCancellation"),
Self::ThreeDsAuthenticationFailed => write!(f, "3dsAuthenticationFailed"),
Self::SentForPartialRefund => write!(f, "sentForPartialRefund"),
Self::ThreeDsChallenged => write!(f, "3dsChallenged"),
Self::ThreeDsUnavailable => write!(f, "3dsUnavailable"),
}
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLink {
#[serde(rename = "self")]
| {
"chunk": null,
"crate": "connector-integration",
"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": 175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_175_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
Self::SentForRefund => write!(f, "sentForRefund"),
Self::FraudHighRisk => write!(f, "fraudHighRisk"),
Self::ThreeDsDeviceDataRequired => write!(f, "3dsDeviceDataRequired"),
Self::SentForCancellation => write!(f, "sentForCancellation"),
Self::ThreeDsAuthenticationFailed => write!(f, "3dsAuthenticationFailed"),
Self::SentForPartialRefund => write!(f, "sentForPartialRefund"),
Self::ThreeDsChallenged => write!(f, "3dsChallenged"),
Self::ThreeDsUnavailable => write!(f, "3dsUnavailable"),
}
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLink {
#[serde(rename = "self")]
pub self_link: SelfLinkInner,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLinkInner {
pub href: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ActionLinks {
supply_3ds_device_data: Option<ActionLink>,
settle_payment: Option<ActionLink>,
partially_settle_payment: Option<ActionLink>,
refund_payment: Option<ActionLink>,
| {
"chunk": null,
"crate": "connector-integration",
"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": 175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_175_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
Self::SentForRefund => write!(f, "sentForRefund"),
Self::FraudHighRisk => write!(f, "fraudHighRisk"),
Self::ThreeDsDeviceDataRequired => write!(f, "3dsDeviceDataRequired"),
Self::SentForCancellation => write!(f, "sentForCancellation"),
Self::ThreeDsAuthenticationFailed => write!(f, "3dsAuthenticationFailed"),
Self::SentForPartialRefund => write!(f, "sentForPartialRefund"),
Self::ThreeDsChallenged => write!(f, "3dsChallenged"),
Self::ThreeDsUnavailable => write!(f, "3dsUnavailable"),
}
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLink {
#[serde(rename = "self")]
pub self_link: SelfLinkInner,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelfLinkInner {
pub href: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ActionLinks {
supply_3ds_device_data: Option<ActionLink>,
settle_payment: Option<ActionLink>,
partially_settle_payment: Option<ActionLink>,
refund_payment: Option<ActionLink>,
partially_refund_payment: Option<ActionLink>,
cancel_payment: Option<ActionLink>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActionLink {
pub href: String,
pub method: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Fraud {
pub outcome: FraudOutcome,
pub score: f32,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum FraudOutcome {
LowRisk,
| {
"chunk": null,
"crate": "connector-integration",
"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": 175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_200_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
pub struct ActionLinks {
supply_3ds_device_data: Option<ActionLink>,
settle_payment: Option<ActionLink>,
partially_settle_payment: Option<ActionLink>,
refund_payment: Option<ActionLink>,
partially_refund_payment: Option<ActionLink>,
cancel_payment: Option<ActionLink>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActionLink {
pub href: String,
pub method: String,
}
| {
"chunk": null,
"crate": "connector-integration",
"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": 200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_200_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
pub struct ActionLinks {
supply_3ds_device_data: Option<ActionLink>,
settle_payment: Option<ActionLink>,
partially_settle_payment: Option<ActionLink>,
refund_payment: Option<ActionLink>,
partially_refund_payment: Option<ActionLink>,
cancel_payment: Option<ActionLink>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActionLink {
pub href: String,
pub method: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Fraud {
pub outcome: FraudOutcome,
pub score: f32,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum FraudOutcome {
LowRisk,
HighRisk,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
| {
"chunk": null,
"crate": "connector-integration",
"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": 200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_200_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
pub struct ActionLinks {
supply_3ds_device_data: Option<ActionLink>,
settle_payment: Option<ActionLink>,
partially_settle_payment: Option<ActionLink>,
refund_payment: Option<ActionLink>,
partially_refund_payment: Option<ActionLink>,
cancel_payment: Option<ActionLink>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActionLink {
pub href: String,
pub method: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Fraud {
pub outcome: FraudOutcome,
pub score: f32,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum FraudOutcome {
LowRisk,
HighRisk,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayEventResponse {
pub last_event: EventType,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<EventLinks>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum EventType {
SentForAuthorization,
#[serde(alias = "Authorized")]
Authorized,
#[serde(alias = "Sent for Settlement")]
SentForSettlement,
Settled,
SettlementFailed,
Cancelled,
Error,
Expired,
Refused,
| {
"chunk": null,
"crate": "connector-integration",
"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": 200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_225_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
HighRisk,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayEventResponse {
pub last_event: EventType,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<EventLinks>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum EventType {
SentForAuthorization,
| {
"chunk": null,
"crate": "connector-integration",
"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": 225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_225_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
HighRisk,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayEventResponse {
pub last_event: EventType,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<EventLinks>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum EventType {
SentForAuthorization,
#[serde(alias = "Authorized")]
Authorized,
#[serde(alias = "Sent for Settlement")]
SentForSettlement,
Settled,
SettlementFailed,
Cancelled,
Error,
Expired,
Refused,
#[serde(alias = "Sent for Refund")]
SentForRefund,
Refunded,
RefundFailed,
#[serde(other)]
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_225_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
HighRisk,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WorldpayEventResponse {
pub last_event: EventType,
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub links: Option<EventLinks>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum EventType {
SentForAuthorization,
#[serde(alias = "Authorized")]
Authorized,
#[serde(alias = "Sent for Settlement")]
SentForSettlement,
Settled,
SettlementFailed,
Cancelled,
Error,
Expired,
Refused,
#[serde(alias = "Sent for Refund")]
SentForRefund,
Refunded,
RefundFailed,
#[serde(other)]
Unknown,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EventLinks {
#[serde(rename = "payments:events", skip_serializing_if = "Option::is_none")]
pub events: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PaymentLink {
pub href: String,
}
pub fn get_resource_id<T, F>(
response: WorldpayPaymentsResponse,
connector_transaction_id: Option<String>,
transform_fn: F,
) -> Result<T, error_stack::Report<errors::ConnectorError>>
where
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_250_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[serde(alias = "Sent for Refund")]
SentForRefund,
Refunded,
RefundFailed,
#[serde(other)]
Unknown,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EventLinks {
#[serde(rename = "payments:events", skip_serializing_if = "Option::is_none")]
pub events: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_250_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[serde(alias = "Sent for Refund")]
SentForRefund,
Refunded,
RefundFailed,
#[serde(other)]
Unknown,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EventLinks {
#[serde(rename = "payments:events", skip_serializing_if = "Option::is_none")]
pub events: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PaymentLink {
pub href: String,
}
pub fn get_resource_id<T, F>(
response: WorldpayPaymentsResponse,
connector_transaction_id: Option<String>,
transform_fn: F,
) -> Result<T, error_stack::Report<errors::ConnectorError>>
where
F: Fn(String) -> T,
{
// First check top-level _links (for capture, authorize, etc.)
let optional_reference_id = response
.links
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_250_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
#[serde(alias = "Sent for Refund")]
SentForRefund,
Refunded,
RefundFailed,
#[serde(other)]
Unknown,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EventLinks {
#[serde(rename = "payments:events", skip_serializing_if = "Option::is_none")]
pub events: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PaymentLink {
pub href: String,
}
pub fn get_resource_id<T, F>(
response: WorldpayPaymentsResponse,
connector_transaction_id: Option<String>,
transform_fn: F,
) -> Result<T, error_stack::Report<errors::ConnectorError>>
where
F: Fn(String) -> T,
{
// First check top-level _links (for capture, authorize, etc.)
let optional_reference_id = response
.links
.as_ref()
.and_then(|link| link.self_link.href.rsplit_once('/').map(|(_, h)| h))
.or_else(|| {
// Fallback to variant-specific logic for DDC and 3DS challenges
response
.other_fields
.as_ref()
.and_then(|other_fields| match other_fields {
WorldpayPaymentResponseFields::DDCResponse(res) => {
res.actions.supply_ddc_data.href.split('/').nth_back(1)
}
WorldpayPaymentResponseFields::ThreeDsChallenged(res) => res
.actions
.complete_three_ds_challenge
.href
.split('/')
.nth_back(1),
_ => None,
})
})
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_275_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
F: Fn(String) -> T,
{
// First check top-level _links (for capture, authorize, etc.)
let optional_reference_id = response
.links
.as_ref()
.and_then(|link| link.self_link.href.rsplit_once('/').map(|(_, h)| h))
.or_else(|| {
// Fallback to variant-specific logic for DDC and 3DS challenges
response
.other_fields
.as_ref()
.and_then(|other_fields| match other_fields {
WorldpayPaymentResponseFields::DDCResponse(res) => {
res.actions.supply_ddc_data.href.split('/').nth_back(1)
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_275_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
F: Fn(String) -> T,
{
// First check top-level _links (for capture, authorize, etc.)
let optional_reference_id = response
.links
.as_ref()
.and_then(|link| link.self_link.href.rsplit_once('/').map(|(_, h)| h))
.or_else(|| {
// Fallback to variant-specific logic for DDC and 3DS challenges
response
.other_fields
.as_ref()
.and_then(|other_fields| match other_fields {
WorldpayPaymentResponseFields::DDCResponse(res) => {
res.actions.supply_ddc_data.href.split('/').nth_back(1)
}
WorldpayPaymentResponseFields::ThreeDsChallenged(res) => res
.actions
.complete_three_ds_challenge
.href
.split('/')
.nth_back(1),
_ => None,
})
})
.map(|href| {
urlencoding::decode(href)
.map(|s| transform_fn(s.into_owned()))
.change_context(errors::ConnectorError::ResponseHandlingFailed)
})
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_275_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
F: Fn(String) -> T,
{
// First check top-level _links (for capture, authorize, etc.)
let optional_reference_id = response
.links
.as_ref()
.and_then(|link| link.self_link.href.rsplit_once('/').map(|(_, h)| h))
.or_else(|| {
// Fallback to variant-specific logic for DDC and 3DS challenges
response
.other_fields
.as_ref()
.and_then(|other_fields| match other_fields {
WorldpayPaymentResponseFields::DDCResponse(res) => {
res.actions.supply_ddc_data.href.split('/').nth_back(1)
}
WorldpayPaymentResponseFields::ThreeDsChallenged(res) => res
.actions
.complete_three_ds_challenge
.href
.split('/')
.nth_back(1),
_ => None,
})
})
.map(|href| {
urlencoding::decode(href)
.map(|s| transform_fn(s.into_owned()))
.change_context(errors::ConnectorError::ResponseHandlingFailed)
})
.transpose()?;
optional_reference_id
.or_else(|| response.transaction_reference.map(&transform_fn))
.or_else(|| connector_transaction_id.map(&transform_fn))
.ok_or_else(|| {
errors::ConnectorError::MissingRequiredField {
field_name: "_links.self.href or transactionReference",
}
.into()
})
}
pub struct ResponseIdStr {
pub id: String,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Issuer {
pub authorization_code: Secret<String>,
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_300_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
.map(|href| {
urlencoding::decode(href)
.map(|s| transform_fn(s.into_owned()))
.change_context(errors::ConnectorError::ResponseHandlingFailed)
})
.transpose()?;
optional_reference_id
.or_else(|| response.transaction_reference.map(&transform_fn))
.or_else(|| connector_transaction_id.map(&transform_fn))
.ok_or_else(|| {
errors::ConnectorError::MissingRequiredField {
field_name: "_links.self.href or transactionReference",
}
.into()
})
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_300_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
.map(|href| {
urlencoding::decode(href)
.map(|s| transform_fn(s.into_owned()))
.change_context(errors::ConnectorError::ResponseHandlingFailed)
})
.transpose()?;
optional_reference_id
.or_else(|| response.transaction_reference.map(&transform_fn))
.or_else(|| connector_transaction_id.map(&transform_fn))
.ok_or_else(|| {
errors::ConnectorError::MissingRequiredField {
field_name: "_links.self.href or transactionReference",
}
.into()
})
}
pub struct ResponseIdStr {
pub id: String,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Issuer {
pub authorization_code: Secret<String>,
}
impl Issuer {
pub fn new(code: String) -> Self {
Self {
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_300_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
.map(|href| {
urlencoding::decode(href)
.map(|s| transform_fn(s.into_owned()))
.change_context(errors::ConnectorError::ResponseHandlingFailed)
})
.transpose()?;
optional_reference_id
.or_else(|| response.transaction_reference.map(&transform_fn))
.or_else(|| connector_transaction_id.map(&transform_fn))
.ok_or_else(|| {
errors::ConnectorError::MissingRequiredField {
field_name: "_links.self.href or transactionReference",
}
.into()
})
}
pub struct ResponseIdStr {
pub id: String,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Issuer {
pub authorization_code: Secret<String>,
}
impl Issuer {
pub fn new(code: String) -> Self {
Self {
authorization_code: Secret::new(code),
}
}
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PaymentsResPaymentInstrument {
#[serde(rename = "type")]
pub payment_instrument_type: String,
pub card_bin: Option<String>,
pub last_four: Option<String>,
pub expiry_date: Option<ExpiryDate>,
pub card_brand: Option<String>,
pub funding_type: Option<String>,
pub category: Option<String>,
pub issuer_name: Option<String>,
pub payment_account_reference: Option<Secret<String>>,
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_325_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
}
impl Issuer {
pub fn new(code: String) -> Self {
Self {
authorization_code: Secret::new(code),
}
}
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PaymentsResPaymentInstrument {
#[serde(rename = "type")]
pub payment_instrument_type: String,
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_325_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
}
impl Issuer {
pub fn new(code: String) -> Self {
Self {
authorization_code: Secret::new(code),
}
}
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PaymentsResPaymentInstrument {
#[serde(rename = "type")]
pub payment_instrument_type: String,
pub card_bin: Option<String>,
pub last_four: Option<String>,
pub expiry_date: Option<ExpiryDate>,
pub card_brand: Option<String>,
pub funding_type: Option<String>,
pub category: Option<String>,
pub issuer_name: Option<String>,
pub payment_account_reference: Option<Secret<String>>,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RiskFactorsInner {
#[serde(rename = "type")]
pub risk_type: RiskType,
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5409969266194052518_325_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
}
impl Issuer {
pub fn new(code: String) -> Self {
Self {
authorization_code: Secret::new(code),
}
}
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PaymentsResPaymentInstrument {
#[serde(rename = "type")]
pub payment_instrument_type: String,
pub card_bin: Option<String>,
pub last_four: Option<String>,
pub expiry_date: Option<ExpiryDate>,
pub card_brand: Option<String>,
pub funding_type: Option<String>,
pub category: Option<String>,
pub issuer_name: Option<String>,
pub payment_account_reference: Option<Secret<String>>,
}
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RiskFactorsInner {
#[serde(rename = "type")]
pub risk_type: RiskType,
#[serde(skip_serializing_if = "Option::is_none")]
pub detail: Option<Detail>,
pub risk: Risk,
}
impl RiskFactorsInner {
pub fn new(risk_type: RiskType, risk: Risk) -> Self {
Self {
risk_type,
detail: None,
risk,
}
}
}
#[derive(
Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize,
)]
#[serde(rename_all = "camelCase")]
pub enum RiskType {
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.