id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_snippet_2738435745298344692_1850_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.clone()
.unwrap_or_else(|| consts::NO_ERROR_MESSAGE.to_string()),
reason: optional_message,
attempt_status: None,
connector_transaction_id: Some(response.tran_id.clone()),
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
} else {
None
};
let payments_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.tran_id.clone().to_string()),
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,
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FiuuPaymentCancelRequest {
#[serde(rename = "txnID")]
txn_id: String,
domain: String,
skey: Secret<String>,
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuPaymentCancelResponse {
#[serde(rename = "TranID")]
tran_id: String,
stat_code: String,
#[serde(rename = "miscellaneous")]
miscellaneous: Option<HashMap<String, 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": 1850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_1875_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FiuuPaymentCancelRequest {
#[serde(rename = "txnID")]
txn_id: String,
domain: String,
skey: 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": 1875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_1875_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FiuuPaymentCancelRequest {
#[serde(rename = "txnID")]
txn_id: String,
domain: String,
skey: Secret<String>,
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuPaymentCancelResponse {
#[serde(rename = "TranID")]
tran_id: String,
stat_code: String,
#[serde(rename = "miscellaneous")]
miscellaneous: Option<HashMap<String, Secret<String>>>,
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
| {
"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_2738435745298344692_1875_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FiuuPaymentCancelRequest {
#[serde(rename = "txnID")]
txn_id: String,
domain: String,
skey: Secret<String>,
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuPaymentCancelResponse {
#[serde(rename = "TranID")]
tran_id: String,
stat_code: String,
#[serde(rename = "miscellaneous")]
miscellaneous: Option<HashMap<String, Secret<String>>>,
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
> for FiuuPaymentCancelRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let txn_id = item.router_data.request.connector_transaction_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": 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_2738435745298344692_1900_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
> for FiuuPaymentCancelRequest
| {
"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_2738435745298344692_1900_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
> for FiuuPaymentCancelRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let txn_id = item.router_data.request.connector_transaction_id.clone();
let merchant_id = auth.merchant_id.peek().to_string();
let secret_key = auth.secret_key.peek().to_string();
Ok(Self {
txn_id: txn_id.clone(),
domain: merchant_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": 1900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_1900_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
> for FiuuPaymentCancelRequest
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let txn_id = item.router_data.request.connector_transaction_id.clone();
let merchant_id = auth.merchant_id.peek().to_string();
let secret_key = auth.secret_key.peek().to_string();
Ok(Self {
txn_id: txn_id.clone(),
domain: merchant_id.clone(),
skey: calculate_signature(format!("{txn_id}{merchant_id}{secret_key}"))?,
})
}
}
fn void_status_codes() -> HashMap<&'static str, &'static str> {
[
("00", "Success (will proceed the request)"),
("11", "Failure"),
("12", "Invalid or unmatched security hash string"),
("13", "Not a refundable transaction"),
("14", "Transaction date more than 180 days"),
("15", "Requested day is on settlement day"),
("16", "Forbidden transaction"),
("17", "Transaction not found"),
("18", "Duplicate partial refund request"),
("19", "Merchant not found"),
("20", "Missing required parameter"),
(
"21",
| {
"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_2738435745298344692_1925_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
let merchant_id = auth.merchant_id.peek().to_string();
let secret_key = auth.secret_key.peek().to_string();
Ok(Self {
txn_id: txn_id.clone(),
domain: merchant_id.clone(),
skey: calculate_signature(format!("{txn_id}{merchant_id}{secret_key}"))?,
})
}
}
fn void_status_codes() -> HashMap<&'static str, &'static str> {
[
("00", "Success (will proceed the request)"),
("11", "Failure"),
("12", "Invalid or unmatched security hash 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": 1925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_1925_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
let merchant_id = auth.merchant_id.peek().to_string();
let secret_key = auth.secret_key.peek().to_string();
Ok(Self {
txn_id: txn_id.clone(),
domain: merchant_id.clone(),
skey: calculate_signature(format!("{txn_id}{merchant_id}{secret_key}"))?,
})
}
}
fn void_status_codes() -> HashMap<&'static str, &'static str> {
[
("00", "Success (will proceed the request)"),
("11", "Failure"),
("12", "Invalid or unmatched security hash string"),
("13", "Not a refundable transaction"),
("14", "Transaction date more than 180 days"),
("15", "Requested day is on settlement day"),
("16", "Forbidden transaction"),
("17", "Transaction not found"),
("18", "Duplicate partial refund request"),
("19", "Merchant not found"),
("20", "Missing required parameter"),
(
"21",
"Transaction must be in authorized/captured/settled status",
),
]
.into_iter()
.collect()
| {
"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_2738435745298344692_1925_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
let merchant_id = auth.merchant_id.peek().to_string();
let secret_key = auth.secret_key.peek().to_string();
Ok(Self {
txn_id: txn_id.clone(),
domain: merchant_id.clone(),
skey: calculate_signature(format!("{txn_id}{merchant_id}{secret_key}"))?,
})
}
}
fn void_status_codes() -> HashMap<&'static str, &'static str> {
[
("00", "Success (will proceed the request)"),
("11", "Failure"),
("12", "Invalid or unmatched security hash string"),
("13", "Not a refundable transaction"),
("14", "Transaction date more than 180 days"),
("15", "Requested day is on settlement day"),
("16", "Forbidden transaction"),
("17", "Transaction not found"),
("18", "Duplicate partial refund request"),
("19", "Merchant not found"),
("20", "Missing required parameter"),
(
"21",
"Transaction must be in authorized/captured/settled status",
),
]
.into_iter()
.collect()
}
impl<F> TryFrom<ResponseRouterData<FiuuPaymentCancelResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuPaymentCancelResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
response,
router_data,
http_code: _http_code,
} = item;
let status_code = response.stat_code;
let status = match status_code.as_str() {
"00" => Ok(common_enums::AttemptStatus::Voided),
"11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" => {
Ok(common_enums::AttemptStatus::VoidFailed)
}
| {
"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_2738435745298344692_1950_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
"Transaction must be in authorized/captured/settled status",
),
]
.into_iter()
.collect()
}
impl<F> TryFrom<ResponseRouterData<FiuuPaymentCancelResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuPaymentCancelResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
| {
"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_2738435745298344692_1950_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
"Transaction must be in authorized/captured/settled status",
),
]
.into_iter()
.collect()
}
impl<F> TryFrom<ResponseRouterData<FiuuPaymentCancelResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuPaymentCancelResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
response,
router_data,
http_code: _http_code,
} = item;
let status_code = response.stat_code;
let status = match status_code.as_str() {
"00" => Ok(common_enums::AttemptStatus::Voided),
"11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" => {
Ok(common_enums::AttemptStatus::VoidFailed)
}
other => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from(other.to_owned()),
)),
}?;
let void_message_status = void_status_codes();
| {
"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_2738435745298344692_1950_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
"Transaction must be in authorized/captured/settled status",
),
]
.into_iter()
.collect()
}
impl<F> TryFrom<ResponseRouterData<FiuuPaymentCancelResponse, Self>>
for RouterDataV2<F, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuPaymentCancelResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
response,
router_data,
http_code: _http_code,
} = item;
let status_code = response.stat_code;
let status = match status_code.as_str() {
"00" => Ok(common_enums::AttemptStatus::Voided),
"11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" => {
Ok(common_enums::AttemptStatus::VoidFailed)
}
other => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from(other.to_owned()),
)),
}?;
let void_message_status = void_status_codes();
let error_response = if status == common_enums::AttemptStatus::VoidFailed {
let optional_message = void_message_status
.get(status_code.as_str())
.copied()
.map(String::from);
Some(ErrorResponse {
status_code: item.http_code,
code: status_code.to_owned(),
message: optional_message
.clone()
.unwrap_or_else(|| consts::NO_ERROR_MESSAGE.to_string()),
reason: optional_message,
attempt_status: None,
connector_transaction_id: Some(response.tran_id.clone()),
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
} else {
| {
"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_2738435745298344692_1975_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
other => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from(other.to_owned()),
)),
}?;
let void_message_status = void_status_codes();
let error_response = if status == common_enums::AttemptStatus::VoidFailed {
let optional_message = void_message_status
.get(status_code.as_str())
.copied()
.map(String::from);
Some(ErrorResponse {
status_code: item.http_code,
code: status_code.to_owned(),
message: optional_message
| {
"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_2738435745298344692_1975_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
other => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from(other.to_owned()),
)),
}?;
let void_message_status = void_status_codes();
let error_response = if status == common_enums::AttemptStatus::VoidFailed {
let optional_message = void_message_status
.get(status_code.as_str())
.copied()
.map(String::from);
Some(ErrorResponse {
status_code: item.http_code,
code: status_code.to_owned(),
message: optional_message
.clone()
.unwrap_or_else(|| consts::NO_ERROR_MESSAGE.to_string()),
reason: optional_message,
attempt_status: None,
connector_transaction_id: Some(response.tran_id.clone()),
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
} else {
None
};
let payments_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.tran_id.clone().to_string()),
redirection_data: 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": 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_2738435745298344692_1975_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
other => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from(other.to_owned()),
)),
}?;
let void_message_status = void_status_codes();
let error_response = if status == common_enums::AttemptStatus::VoidFailed {
let optional_message = void_message_status
.get(status_code.as_str())
.copied()
.map(String::from);
Some(ErrorResponse {
status_code: item.http_code,
code: status_code.to_owned(),
message: optional_message
.clone()
.unwrap_or_else(|| consts::NO_ERROR_MESSAGE.to_string()),
reason: optional_message,
attempt_status: None,
connector_transaction_id: Some(response.tran_id.clone()),
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
} else {
None
};
let payments_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.tran_id.clone().to_string()),
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,
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
| {
"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_2738435745298344692_2000_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
None
};
let payments_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.tran_id.clone().to_string()),
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,
| {
"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_2738435745298344692_2000_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
None
};
let payments_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.tran_id.clone().to_string()),
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,
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuRefundSyncRequest {
#[serde(rename = "TxnID")]
txn_id: String,
#[serde(rename = "MerchantID")]
merchant_id: 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": 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_2738435745298344692_2000_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
None
};
let payments_response_data = PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(response.tran_id.clone().to_string()),
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,
..router_data.resource_common_data
},
response: error_response.map_or_else(|| Ok(payments_response_data), Err),
..router_data
})
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuRefundSyncRequest {
#[serde(rename = "TxnID")]
txn_id: String,
#[serde(rename = "MerchantID")]
merchant_id: Secret<String>,
signature: Secret<String>,
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T>,
> for FiuuRefundSyncRequest
{
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
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": 2000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2025_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub struct FiuuRefundSyncRequest {
#[serde(rename = "TxnID")]
txn_id: String,
#[serde(rename = "MerchantID")]
merchant_id: Secret<String>,
signature: Secret<String>,
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ 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": 2025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2025_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub struct FiuuRefundSyncRequest {
#[serde(rename = "TxnID")]
txn_id: String,
#[serde(rename = "MerchantID")]
merchant_id: Secret<String>,
signature: Secret<String>,
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T>,
> for FiuuRefundSyncRequest
{
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let (txn_id, merchant_id, verify_key) = (
item.router_data.request.connector_transaction_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": 2025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2025_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub struct FiuuRefundSyncRequest {
#[serde(rename = "TxnID")]
txn_id: String,
#[serde(rename = "MerchantID")]
merchant_id: Secret<String>,
signature: Secret<String>,
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T>,
> for FiuuRefundSyncRequest
{
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
T,
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let (txn_id, merchant_id, verify_key) = (
item.router_data.request.connector_transaction_id.clone(),
auth.merchant_id.peek().to_string(),
auth.verify_key.peek().to_string(),
);
let signature = calculate_signature(format!("{txn_id}{merchant_id}{verify_key}"))?;
Ok(Self {
txn_id,
merchant_id: auth.merchant_id,
signature,
})
}
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FiuuRefundSyncResponse {
Success(Vec<RefundData>),
Error(FiuuErrorResponse),
Webhook(FiuuWebhooksRefundResponse),
}
| {
"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_2738435745298344692_2050_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let (txn_id, merchant_id, verify_key) = (
item.router_data.request.connector_transaction_id.clone(),
auth.merchant_id.peek().to_string(),
auth.verify_key.peek().to_string(),
);
let signature = calculate_signature(format!("{txn_id}{merchant_id}{verify_key}"))?;
Ok(Self {
txn_id,
merchant_id: auth.merchant_id,
signature,
})
}
| {
"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_2738435745298344692_2050_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let (txn_id, merchant_id, verify_key) = (
item.router_data.request.connector_transaction_id.clone(),
auth.merchant_id.peek().to_string(),
auth.verify_key.peek().to_string(),
);
let signature = calculate_signature(format!("{txn_id}{merchant_id}{verify_key}"))?;
Ok(Self {
txn_id,
merchant_id: auth.merchant_id,
signature,
})
}
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FiuuRefundSyncResponse {
Success(Vec<RefundData>),
Error(FiuuErrorResponse),
Webhook(FiuuWebhooksRefundResponse),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RefundData {
#[serde(rename = "RefundID")]
refund_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": 2050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2050_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
>,
) -> Result<Self, Self::Error> {
let auth = FiuuAuthType::try_from(&item.router_data.connector_auth_type)?;
let (txn_id, merchant_id, verify_key) = (
item.router_data.request.connector_transaction_id.clone(),
auth.merchant_id.peek().to_string(),
auth.verify_key.peek().to_string(),
);
let signature = calculate_signature(format!("{txn_id}{merchant_id}{verify_key}"))?;
Ok(Self {
txn_id,
merchant_id: auth.merchant_id,
signature,
})
}
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FiuuRefundSyncResponse {
Success(Vec<RefundData>),
Error(FiuuErrorResponse),
Webhook(FiuuWebhooksRefundResponse),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RefundData {
#[serde(rename = "RefundID")]
refund_id: String,
status: RefundStatus,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum RefundStatus {
Success,
Pending,
Rejected,
Processing,
}
impl<F> TryFrom<ResponseRouterData<FiuuRefundSyncResponse, Self>>
for RouterDataV2<F, RefundFlowData, RefundSyncData, RefundsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuRefundSyncResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
| {
"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_2738435745298344692_2075_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RefundData {
#[serde(rename = "RefundID")]
refund_id: String,
status: RefundStatus,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum RefundStatus {
Success,
Pending,
Rejected,
Processing,
| {
"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_2738435745298344692_2075_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RefundData {
#[serde(rename = "RefundID")]
refund_id: String,
status: RefundStatus,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum RefundStatus {
Success,
Pending,
Rejected,
Processing,
}
impl<F> TryFrom<ResponseRouterData<FiuuRefundSyncResponse, Self>>
for RouterDataV2<F, RefundFlowData, RefundSyncData, RefundsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuRefundSyncResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
response,
router_data,
http_code: _http_code,
} = item;
match response {
| {
"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_2738435745298344692_2075_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RefundData {
#[serde(rename = "RefundID")]
refund_id: String,
status: RefundStatus,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum RefundStatus {
Success,
Pending,
Rejected,
Processing,
}
impl<F> TryFrom<ResponseRouterData<FiuuRefundSyncResponse, Self>>
for RouterDataV2<F, RefundFlowData, RefundSyncData, RefundsResponseData>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: ResponseRouterData<FiuuRefundSyncResponse, Self>,
) -> Result<Self, Self::Error> {
let ResponseRouterData {
response,
router_data,
http_code: _http_code,
} = item;
match response {
FiuuRefundSyncResponse::Error(error) => Ok(Self {
response: Err(ErrorResponse {
code: error.error_code.clone(),
message: error.error_desc.clone(),
reason: Some(error.error_desc),
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
}),
..router_data
}),
FiuuRefundSyncResponse::Success(refund_data) => {
let refund = refund_data
.iter()
.find(|refund| {
Some(refund.refund_id.clone())
== Some(router_data.request.connector_refund_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": 50,
"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_2738435745298344692_2100_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
response,
router_data,
http_code: _http_code,
} = item;
match response {
FiuuRefundSyncResponse::Error(error) => Ok(Self {
response: Err(ErrorResponse {
code: error.error_code.clone(),
message: error.error_desc.clone(),
reason: Some(error.error_desc),
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: 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": 2100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2100_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
response,
router_data,
http_code: _http_code,
} = item;
match response {
FiuuRefundSyncResponse::Error(error) => Ok(Self {
response: Err(ErrorResponse {
code: error.error_code.clone(),
message: error.error_desc.clone(),
reason: Some(error.error_desc),
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
}),
..router_data
}),
FiuuRefundSyncResponse::Success(refund_data) => {
let refund = refund_data
.iter()
.find(|refund| {
Some(refund.refund_id.clone())
== Some(router_data.request.connector_refund_id.clone())
})
.ok_or_else(|| errors::ConnectorError::MissingConnectorRefundID)?;
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: refund.refund_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": 2100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2100_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
response,
router_data,
http_code: _http_code,
} = item;
match response {
FiuuRefundSyncResponse::Error(error) => Ok(Self {
response: Err(ErrorResponse {
code: error.error_code.clone(),
message: error.error_desc.clone(),
reason: Some(error.error_desc),
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
}),
..router_data
}),
FiuuRefundSyncResponse::Success(refund_data) => {
let refund = refund_data
.iter()
.find(|refund| {
Some(refund.refund_id.clone())
== Some(router_data.request.connector_refund_id.clone())
})
.ok_or_else(|| errors::ConnectorError::MissingConnectorRefundID)?;
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: refund.refund_id.clone(),
refund_status: common_enums::RefundStatus::from(refund.status.clone()),
status_code: item.http_code,
}),
..router_data
})
}
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: fiuu_webhooks_refund_response.refund_id,
refund_status: common_enums::RefundStatus::from(
fiuu_webhooks_refund_response.status.clone(),
),
status_code: item.http_code,
}),
..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": 2100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2125_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
})
.ok_or_else(|| errors::ConnectorError::MissingConnectorRefundID)?;
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: refund.refund_id.clone(),
refund_status: common_enums::RefundStatus::from(refund.status.clone()),
status_code: item.http_code,
}),
..router_data
})
}
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: fiuu_webhooks_refund_response.refund_id,
refund_status: common_enums::RefundStatus::from(
| {
"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": 2125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2125_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
})
.ok_or_else(|| errors::ConnectorError::MissingConnectorRefundID)?;
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: refund.refund_id.clone(),
refund_status: common_enums::RefundStatus::from(refund.status.clone()),
status_code: item.http_code,
}),
..router_data
})
}
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: fiuu_webhooks_refund_response.refund_id,
refund_status: common_enums::RefundStatus::from(
fiuu_webhooks_refund_response.status.clone(),
),
status_code: item.http_code,
}),
..router_data
}),
}
}
}
impl From<RefundStatus> for common_enums::RefundStatus {
fn from(item: RefundStatus) -> Self {
match item {
RefundStatus::Pending => Self::Pending,
RefundStatus::Success => Self::Success,
| {
"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": 2125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2125_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
})
.ok_or_else(|| errors::ConnectorError::MissingConnectorRefundID)?;
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: refund.refund_id.clone(),
refund_status: common_enums::RefundStatus::from(refund.status.clone()),
status_code: item.http_code,
}),
..router_data
})
}
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: fiuu_webhooks_refund_response.refund_id,
refund_status: common_enums::RefundStatus::from(
fiuu_webhooks_refund_response.status.clone(),
),
status_code: item.http_code,
}),
..router_data
}),
}
}
}
impl From<RefundStatus> for common_enums::RefundStatus {
fn from(item: RefundStatus) -> Self {
match item {
RefundStatus::Pending => Self::Pending,
RefundStatus::Success => Self::Success,
RefundStatus::Rejected => Self::Failure,
RefundStatus::Processing => Self::Pending,
}
}
}
pub fn get_qr_metadata(
response: &DuitNowQrCodeResponse,
) -> CustomResult<Option<serde_json::Value>, errors::ConnectorError> {
let image_data = QrImage::new_colored_from_data(
response.txn_data.request_data.qr_data.peek().clone(),
DUIT_NOW_BRAND_COLOR,
)
.change_context(errors::ConnectorError::ResponseHandlingFailed)?;
let image_data_url = Url::parse(image_data.data.clone().as_str()).ok();
let display_to_timestamp = None;
if let Some(color_image_data_url) = image_data_url {
let qr_code_info = QrCodeInformation::QrColorDataUrl {
| {
"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": 2125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2150_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl From<RefundStatus> for common_enums::RefundStatus {
fn from(item: RefundStatus) -> Self {
match item {
RefundStatus::Pending => Self::Pending,
RefundStatus::Success => Self::Success,
RefundStatus::Rejected => Self::Failure,
RefundStatus::Processing => Self::Pending,
}
}
}
pub fn get_qr_metadata(
response: &DuitNowQrCodeResponse,
) -> CustomResult<Option<serde_json::Value>, errors::ConnectorError> {
let image_data = QrImage::new_colored_from_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": 2150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2150_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl From<RefundStatus> for common_enums::RefundStatus {
fn from(item: RefundStatus) -> Self {
match item {
RefundStatus::Pending => Self::Pending,
RefundStatus::Success => Self::Success,
RefundStatus::Rejected => Self::Failure,
RefundStatus::Processing => Self::Pending,
}
}
}
pub fn get_qr_metadata(
response: &DuitNowQrCodeResponse,
) -> CustomResult<Option<serde_json::Value>, errors::ConnectorError> {
let image_data = QrImage::new_colored_from_data(
response.txn_data.request_data.qr_data.peek().clone(),
DUIT_NOW_BRAND_COLOR,
)
.change_context(errors::ConnectorError::ResponseHandlingFailed)?;
let image_data_url = Url::parse(image_data.data.clone().as_str()).ok();
let display_to_timestamp = None;
if let Some(color_image_data_url) = image_data_url {
let qr_code_info = QrCodeInformation::QrColorDataUrl {
color_image_data_url,
display_to_timestamp,
display_text: Some(DUIT_NOW_BRAND_TEXT.to_string()),
border_color: Some(DUIT_NOW_BRAND_COLOR.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": 2150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2150_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl From<RefundStatus> for common_enums::RefundStatus {
fn from(item: RefundStatus) -> Self {
match item {
RefundStatus::Pending => Self::Pending,
RefundStatus::Success => Self::Success,
RefundStatus::Rejected => Self::Failure,
RefundStatus::Processing => Self::Pending,
}
}
}
pub fn get_qr_metadata(
response: &DuitNowQrCodeResponse,
) -> CustomResult<Option<serde_json::Value>, errors::ConnectorError> {
let image_data = QrImage::new_colored_from_data(
response.txn_data.request_data.qr_data.peek().clone(),
DUIT_NOW_BRAND_COLOR,
)
.change_context(errors::ConnectorError::ResponseHandlingFailed)?;
let image_data_url = Url::parse(image_data.data.clone().as_str()).ok();
let display_to_timestamp = None;
if let Some(color_image_data_url) = image_data_url {
let qr_code_info = QrCodeInformation::QrColorDataUrl {
color_image_data_url,
display_to_timestamp,
display_text: Some(DUIT_NOW_BRAND_TEXT.to_string()),
border_color: Some(DUIT_NOW_BRAND_COLOR.to_string()),
};
Some(qr_code_info.encode_to_value())
.transpose()
.change_context(errors::ConnectorError::ResponseHandlingFailed)
} else {
Ok(None)
}
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(untagged)]
pub enum FiuuWebhooksResponse {
FiuuWebhookPaymentResponse(FiuuWebhooksPaymentResponse),
FiuuWebhookRefundResponse(FiuuWebhooksRefundResponse),
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhooksPaymentResponse {
pub skey: Secret<String>,
pub status: FiuuPaymentWebhookStatus,
| {
"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": 2150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2175_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
color_image_data_url,
display_to_timestamp,
display_text: Some(DUIT_NOW_BRAND_TEXT.to_string()),
border_color: Some(DUIT_NOW_BRAND_COLOR.to_string()),
};
Some(qr_code_info.encode_to_value())
.transpose()
.change_context(errors::ConnectorError::ResponseHandlingFailed)
} else {
Ok(None)
}
}
#[derive(Debug, Deserialize, Serialize, 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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2175_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
color_image_data_url,
display_to_timestamp,
display_text: Some(DUIT_NOW_BRAND_TEXT.to_string()),
border_color: Some(DUIT_NOW_BRAND_COLOR.to_string()),
};
Some(qr_code_info.encode_to_value())
.transpose()
.change_context(errors::ConnectorError::ResponseHandlingFailed)
} else {
Ok(None)
}
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(untagged)]
pub enum FiuuWebhooksResponse {
FiuuWebhookPaymentResponse(FiuuWebhooksPaymentResponse),
FiuuWebhookRefundResponse(FiuuWebhooksRefundResponse),
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhooksPaymentResponse {
pub skey: Secret<String>,
pub status: FiuuPaymentWebhookStatus,
#[serde(rename = "orderid")]
pub order_id: String,
#[serde(rename = "tranID")]
pub tran_id: String,
pub nbcb: 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": 2175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2175_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
color_image_data_url,
display_to_timestamp,
display_text: Some(DUIT_NOW_BRAND_TEXT.to_string()),
border_color: Some(DUIT_NOW_BRAND_COLOR.to_string()),
};
Some(qr_code_info.encode_to_value())
.transpose()
.change_context(errors::ConnectorError::ResponseHandlingFailed)
} else {
Ok(None)
}
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(untagged)]
pub enum FiuuWebhooksResponse {
FiuuWebhookPaymentResponse(FiuuWebhooksPaymentResponse),
FiuuWebhookRefundResponse(FiuuWebhooksRefundResponse),
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhooksPaymentResponse {
pub skey: Secret<String>,
pub status: FiuuPaymentWebhookStatus,
#[serde(rename = "orderid")]
pub order_id: String,
#[serde(rename = "tranID")]
pub tran_id: String,
pub nbcb: String,
pub amount: StringMajorUnit,
pub currency: String,
pub domain: Secret<String>,
pub appcode: Option<Secret<String>>,
pub paydate: String,
pub channel: String,
pub error_desc: Option<String>,
pub error_code: Option<String>,
#[serde(rename = "extraP")]
pub extra_parameters: Option<Secret<String>>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuPaymentRedirectResponse {
pub skey: Secret<String>,
#[serde(rename = "tranID")]
pub tran_id: String,
pub status: FiuuPaymentWebhookStatus,
pub appcode: Option<String>,
pub error_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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2175,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2200_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[serde(rename = "orderid")]
pub order_id: String,
#[serde(rename = "tranID")]
pub tran_id: String,
pub nbcb: String,
pub amount: StringMajorUnit,
pub currency: String,
pub domain: Secret<String>,
pub appcode: Option<Secret<String>>,
pub paydate: String,
pub channel: String,
pub error_desc: Option<String>,
pub error_code: Option<String>,
#[serde(rename = "extraP")]
pub extra_parameters: 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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2200_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[serde(rename = "orderid")]
pub order_id: String,
#[serde(rename = "tranID")]
pub tran_id: String,
pub nbcb: String,
pub amount: StringMajorUnit,
pub currency: String,
pub domain: Secret<String>,
pub appcode: Option<Secret<String>>,
pub paydate: String,
pub channel: String,
pub error_desc: Option<String>,
pub error_code: Option<String>,
#[serde(rename = "extraP")]
pub extra_parameters: Option<Secret<String>>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuPaymentRedirectResponse {
pub skey: Secret<String>,
#[serde(rename = "tranID")]
pub tran_id: String,
pub status: FiuuPaymentWebhookStatus,
pub appcode: Option<String>,
pub error_code: Option<String>,
pub error_desc: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "PascalCase")]
| {
"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": 2200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2200_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[serde(rename = "orderid")]
pub order_id: String,
#[serde(rename = "tranID")]
pub tran_id: String,
pub nbcb: String,
pub amount: StringMajorUnit,
pub currency: String,
pub domain: Secret<String>,
pub appcode: Option<Secret<String>>,
pub paydate: String,
pub channel: String,
pub error_desc: Option<String>,
pub error_code: Option<String>,
#[serde(rename = "extraP")]
pub extra_parameters: Option<Secret<String>>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuPaymentRedirectResponse {
pub skey: Secret<String>,
#[serde(rename = "tranID")]
pub tran_id: String,
pub status: FiuuPaymentWebhookStatus,
pub appcode: Option<String>,
pub error_code: Option<String>,
pub error_desc: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuWebhooksRefundResponse {
pub refund_type: FiuuWebhooksRefundType,
#[serde(rename = "MerchantID")]
pub merchant_id: Secret<String>,
#[serde(rename = "RefID")]
pub ref_id: String,
#[serde(rename = "RefundID")]
pub refund_id: String,
#[serde(rename = "TxnID")]
pub txn_id: String,
pub amount: StringMajorUnit,
pub status: FiuuRefundsWebhookStatus,
pub signature: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuRefundsWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
RefundSuccess,
| {
"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": 2200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2225_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub error_desc: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuWebhooksRefundResponse {
pub refund_type: FiuuWebhooksRefundType,
#[serde(rename = "MerchantID")]
pub merchant_id: Secret<String>,
#[serde(rename = "RefID")]
pub ref_id: String,
#[serde(rename = "RefundID")]
pub refund_id: String,
#[serde(rename = "TxnID")]
pub txn_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": 2225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2225_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub error_desc: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuWebhooksRefundResponse {
pub refund_type: FiuuWebhooksRefundType,
#[serde(rename = "MerchantID")]
pub merchant_id: Secret<String>,
#[serde(rename = "RefID")]
pub ref_id: String,
#[serde(rename = "RefundID")]
pub refund_id: String,
#[serde(rename = "TxnID")]
pub txn_id: String,
pub amount: StringMajorUnit,
pub status: FiuuRefundsWebhookStatus,
pub signature: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuRefundsWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
RefundSuccess,
#[strum(serialize = "11")]
#[serde(rename = "11")]
RefundFailure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
| {
"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": 2225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2225_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub error_desc: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "PascalCase")]
pub struct FiuuWebhooksRefundResponse {
pub refund_type: FiuuWebhooksRefundType,
#[serde(rename = "MerchantID")]
pub merchant_id: Secret<String>,
#[serde(rename = "RefID")]
pub ref_id: String,
#[serde(rename = "RefundID")]
pub refund_id: String,
#[serde(rename = "TxnID")]
pub txn_id: String,
pub amount: StringMajorUnit,
pub status: FiuuRefundsWebhookStatus,
pub signature: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuRefundsWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
RefundSuccess,
#[strum(serialize = "11")]
#[serde(rename = "11")]
RefundFailure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
RefundPending,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuWebhooksRefundType {
P,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookSignature {
pub skey: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookResourceId {
pub skey: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuWebhookEvent {
| {
"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": 2225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2250_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[strum(serialize = "11")]
#[serde(rename = "11")]
RefundFailure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
RefundPending,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuWebhooksRefundType {
P,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookSignature {
| {
"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": 2250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2250_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[strum(serialize = "11")]
#[serde(rename = "11")]
RefundFailure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
RefundPending,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuWebhooksRefundType {
P,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookSignature {
pub skey: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookResourceId {
pub skey: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuWebhookEvent {
pub status: FiuuPaymentWebhookStatus,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuPaymentWebhookStatus {
| {
"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": 2250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2250_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
#[strum(serialize = "11")]
#[serde(rename = "11")]
RefundFailure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
RefundPending,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuWebhooksRefundType {
P,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookSignature {
pub skey: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuuWebhookResourceId {
pub skey: Secret<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct FiuWebhookEvent {
pub status: FiuuPaymentWebhookStatus,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuPaymentWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
Success,
#[strum(serialize = "11")]
#[serde(rename = "11")]
Failure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
Pending,
}
impl From<FiuuPaymentWebhookStatus> for StatCode {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::Success,
FiuuPaymentWebhookStatus::Failure => Self::Failure,
FiuuPaymentWebhookStatus::Pending => Self::Pending,
}
}
}
| {
"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": 2250,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2275_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub status: FiuuPaymentWebhookStatus,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuPaymentWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
Success,
#[strum(serialize = "11")]
#[serde(rename = "11")]
Failure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
Pending,
}
| {
"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": 2275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2275_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub status: FiuuPaymentWebhookStatus,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuPaymentWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
Success,
#[strum(serialize = "11")]
#[serde(rename = "11")]
Failure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
Pending,
}
impl From<FiuuPaymentWebhookStatus> for StatCode {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::Success,
FiuuPaymentWebhookStatus::Failure => Self::Failure,
FiuuPaymentWebhookStatus::Pending => Self::Pending,
}
}
}
impl From<FiuuPaymentWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
| {
"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": 2275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2275_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub status: FiuuPaymentWebhookStatus,
}
#[derive(Debug, Deserialize, Serialize, Clone, strum::Display)]
pub enum FiuuPaymentWebhookStatus {
#[strum(serialize = "00")]
#[serde(rename = "00")]
Success,
#[strum(serialize = "11")]
#[serde(rename = "11")]
Failure,
#[strum(serialize = "22")]
#[serde(rename = "22")]
Pending,
}
impl From<FiuuPaymentWebhookStatus> for StatCode {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::Success,
FiuuPaymentWebhookStatus::Failure => Self::Failure,
FiuuPaymentWebhookStatus::Pending => Self::Pending,
}
}
}
impl From<FiuuPaymentWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
}
}
impl From<FiuuRefundsWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::EventNotSupported,
}
}
}
impl From<FiuuRefundsWebhookStatus> for common_enums::RefundStatus {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundFailure => Self::Failure,
| {
"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": 2275,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2300_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl From<FiuuPaymentWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
}
}
impl From<FiuuRefundsWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
| {
"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": 2300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2300_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl From<FiuuPaymentWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
}
}
impl From<FiuuRefundsWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::EventNotSupported,
}
}
}
impl From<FiuuRefundsWebhookStatus> for common_enums::RefundStatus {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundFailure => Self::Failure,
FiuuRefundsWebhookStatus::RefundSuccess => Self::Success,
FiuuRefundsWebhookStatus::RefundPending => Self::Pending,
}
}
}
| {
"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": 2300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2300_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
impl From<FiuuPaymentWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
}
}
impl From<FiuuRefundsWebhookStatus> for interfaces::webhooks::IncomingWebhookEvent {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::EventNotSupported,
}
}
}
impl From<FiuuRefundsWebhookStatus> for common_enums::RefundStatus {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundFailure => Self::Failure,
FiuuRefundsWebhookStatus::RefundSuccess => Self::Success,
FiuuRefundsWebhookStatus::RefundPending => Self::Pending,
}
}
}
//new additions structs
#[derive(Serialize, Debug, Clone)]
#[serde(untagged)]
pub enum FiuuPaymentsRequest<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> {
FiuuPaymentRequest(Box<FiuuPaymentRequest<T>>),
FiuuMandateRequest(FiuuMandateRequest),
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
| {
"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": 2300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2325_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
FiuuRefundsWebhookStatus::RefundSuccess => Self::Success,
FiuuRefundsWebhookStatus::RefundPending => Self::Pending,
}
}
}
//new additions structs
#[derive(Serialize, Debug, Clone)]
#[serde(untagged)]
pub enum FiuuPaymentsRequest<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
| {
"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": 2325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2325_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
FiuuRefundsWebhookStatus::RefundSuccess => Self::Success,
FiuuRefundsWebhookStatus::RefundPending => Self::Pending,
}
}
}
//new additions structs
#[derive(Serialize, Debug, Clone)]
#[serde(untagged)]
pub enum FiuuPaymentsRequest<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> {
FiuuPaymentRequest(Box<FiuuPaymentRequest<T>>),
FiuuMandateRequest(FiuuMandateRequest),
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> GetFormData for FiuuPaymentsRequest<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": 2325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2325_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
FiuuRefundsWebhookStatus::RefundSuccess => Self::Success,
FiuuRefundsWebhookStatus::RefundPending => Self::Pending,
}
}
}
//new additions structs
#[derive(Serialize, Debug, Clone)]
#[serde(untagged)]
pub enum FiuuPaymentsRequest<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> {
FiuuPaymentRequest(Box<FiuuPaymentRequest<T>>),
FiuuMandateRequest(FiuuMandateRequest),
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> GetFormData for FiuuPaymentsRequest<T>
{
fn get_form_data(&self) -> reqwest::multipart::Form {
match self {
FiuuPaymentsRequest::FiuuPaymentRequest::<T>(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
FiuuPaymentsRequest::FiuuMandateRequest(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
}
}
impl GetFormData for FiuuPaymentSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for PaymentCaptureRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
| {
"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": 2325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2350_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
+ std::marker::Send
+ 'static
+ Serialize,
> GetFormData for FiuuPaymentsRequest<T>
{
fn get_form_data(&self) -> reqwest::multipart::Form {
match self {
FiuuPaymentsRequest::FiuuPaymentRequest::<T>(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
FiuuPaymentsRequest::FiuuMandateRequest(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
}
| {
"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": 2350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2350_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
+ std::marker::Send
+ 'static
+ Serialize,
> GetFormData for FiuuPaymentsRequest<T>
{
fn get_form_data(&self) -> reqwest::multipart::Form {
match self {
FiuuPaymentsRequest::FiuuPaymentRequest::<T>(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
FiuuPaymentsRequest::FiuuMandateRequest(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
}
}
impl GetFormData for FiuuPaymentSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for PaymentCaptureRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuPaymentCancelRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
| {
"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": 2350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2350_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
+ std::marker::Send
+ 'static
+ Serialize,
> GetFormData for FiuuPaymentsRequest<T>
{
fn get_form_data(&self) -> reqwest::multipart::Form {
match self {
FiuuPaymentsRequest::FiuuPaymentRequest::<T>(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
FiuuPaymentsRequest::FiuuMandateRequest(req) => {
build_form_from_struct(req).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
}
}
impl GetFormData for FiuuPaymentSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for PaymentCaptureRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuPaymentCancelRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
pub fn build_form_from_struct<T: Serialize>(
data: T,
) -> Result<reqwest::multipart::Form, errors::ParsingError> {
let mut form = reqwest::multipart::Form::new();
let serialized =
serde_json::to_value(&data).map_err(|_| errors::ParsingError::EncodeError("json-value"))?;
let serialized_object = serialized
| {
"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": 2350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2375_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
}
}
impl GetFormData for FiuuPaymentCancelRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
| {
"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": 2375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2375_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
}
}
impl GetFormData for FiuuPaymentCancelRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
pub fn build_form_from_struct<T: Serialize>(
data: T,
) -> Result<reqwest::multipart::Form, errors::ParsingError> {
let mut form = reqwest::multipart::Form::new();
let serialized =
serde_json::to_value(&data).map_err(|_| errors::ParsingError::EncodeError("json-value"))?;
let serialized_object = serialized
.as_object()
.ok_or(errors::ParsingError::EncodeError("Expected object"))?;
for (key, values) in serialized_object {
let value = match values {
Value::String(s) => s.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": 2375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2375_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
}
}
impl GetFormData for FiuuPaymentCancelRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
impl GetFormData for FiuuRefundSyncRequest {
fn get_form_data(&self) -> reqwest::multipart::Form {
build_form_from_struct(self).unwrap_or_else(|_| reqwest::multipart::Form::new())
}
}
pub fn build_form_from_struct<T: Serialize>(
data: T,
) -> Result<reqwest::multipart::Form, errors::ParsingError> {
let mut form = reqwest::multipart::Form::new();
let serialized =
serde_json::to_value(&data).map_err(|_| errors::ParsingError::EncodeError("json-value"))?;
let serialized_object = serialized
.as_object()
.ok_or(errors::ParsingError::EncodeError("Expected object"))?;
for (key, values) in serialized_object {
let value = match values {
Value::String(s) => s.clone(),
Value::Number(n) => n.to_string(),
Value::Bool(b) => b.to_string(),
Value::Array(_) | Value::Object(_) | Value::Null => "".to_string(),
};
form = form.text(key.clone(), value.clone());
}
Ok(form)
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<
| {
"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": 2375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2400_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.as_object()
.ok_or(errors::ParsingError::EncodeError("Expected object"))?;
for (key, values) in serialized_object {
let value = match values {
Value::String(s) => s.clone(),
Value::Number(n) => n.to_string(),
Value::Bool(b) => b.to_string(),
Value::Array(_) | Value::Object(_) | Value::Null => "".to_string(),
};
form = form.text(key.clone(), value.clone());
}
Ok(form)
}
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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2400_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.as_object()
.ok_or(errors::ParsingError::EncodeError("Expected object"))?;
for (key, values) in serialized_object {
let value = match values {
Value::String(s) => s.clone(),
Value::Number(n) => n.to_string(),
Value::Bool(b) => b.to_string(),
Value::Array(_) | Value::Object(_) | Value::Null => "".to_string(),
};
form = form.text(key.clone(), value.clone());
}
Ok(form)
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
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": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2400_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.as_object()
.ok_or(errors::ParsingError::EncodeError("Expected object"))?;
for (key, values) in serialized_object {
let value = match values {
Value::String(s) => s.clone(),
Value::Number(n) => n.to_string(),
Value::Bool(b) => b.to_string(),
Value::Array(_) | Value::Object(_) | Value::Null => "".to_string(),
};
form = form.text(key.clone(), value.clone());
}
Ok(form)
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
TryFrom<
FiuuRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
> for FiuuPaymentsRequest<T>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
) -> Result<Self, Self::Error> {
let optional_is_mit_flow = item.router_data.request.off_session;
let optional_is_nti_flow = item
.router_data
.request
| {
"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": 2400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2425_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
> for FiuuPaymentsRequest<T>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
| {
"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": 2425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2425_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
> for FiuuPaymentsRequest<T>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
) -> Result<Self, Self::Error> {
let optional_is_mit_flow = item.router_data.request.off_session;
let optional_is_nti_flow = item
.router_data
.request
.mandate_id
.as_ref()
.map(|mandate_id| mandate_id.is_network_transaction_id_flow());
match (optional_is_mit_flow, optional_is_nti_flow) {
(Some(true), Some(false)) => {
| {
"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": 2425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2425_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
> for FiuuPaymentsRequest<T>
{
type Error = error_stack::Report<ConnectorError>;
fn try_from(
item: FiuuRouterData<
RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<T>,
PaymentsResponseData,
>,
T,
>,
) -> Result<Self, Self::Error> {
let optional_is_mit_flow = item.router_data.request.off_session;
let optional_is_nti_flow = item
.router_data
.request
.mandate_id
.as_ref()
.map(|mandate_id| mandate_id.is_network_transaction_id_flow());
match (optional_is_mit_flow, optional_is_nti_flow) {
(Some(true), Some(false)) => {
let recurring_request = FiuuMandateRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuMandateRequest(recurring_request))
}
_ => {
let payment_request: FiuuPaymentRequest<T> = FiuuPaymentRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuPaymentRequest(Box::new(
payment_request,
)))
}
}
}
}
#[macro_export]
macro_rules! unimplemented_payment_method {
($payment_method:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} through {}",
$payment_method, $connector
))
| {
"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": 2425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2450_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.mandate_id
.as_ref()
.map(|mandate_id| mandate_id.is_network_transaction_id_flow());
match (optional_is_mit_flow, optional_is_nti_flow) {
(Some(true), Some(false)) => {
let recurring_request = FiuuMandateRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuMandateRequest(recurring_request))
}
_ => {
let payment_request: FiuuPaymentRequest<T> = FiuuPaymentRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuPaymentRequest(Box::new(
payment_request,
)))
}
}
| {
"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": 2450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2450_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.mandate_id
.as_ref()
.map(|mandate_id| mandate_id.is_network_transaction_id_flow());
match (optional_is_mit_flow, optional_is_nti_flow) {
(Some(true), Some(false)) => {
let recurring_request = FiuuMandateRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuMandateRequest(recurring_request))
}
_ => {
let payment_request: FiuuPaymentRequest<T> = FiuuPaymentRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuPaymentRequest(Box::new(
payment_request,
)))
}
}
}
}
#[macro_export]
macro_rules! unimplemented_payment_method {
($payment_method:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} through {}",
$payment_method, $connector
))
};
($payment_method:expr, $flow:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} {} through {}",
$payment_method, $flow, $connector
| {
"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": 2450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2450_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
.mandate_id
.as_ref()
.map(|mandate_id| mandate_id.is_network_transaction_id_flow());
match (optional_is_mit_flow, optional_is_nti_flow) {
(Some(true), Some(false)) => {
let recurring_request = FiuuMandateRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuMandateRequest(recurring_request))
}
_ => {
let payment_request: FiuuPaymentRequest<T> = FiuuPaymentRequest::try_from(&item)?;
Ok(FiuuPaymentsRequest::FiuuPaymentRequest(Box::new(
payment_request,
)))
}
}
}
}
#[macro_export]
macro_rules! unimplemented_payment_method {
($payment_method:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} through {}",
$payment_method, $connector
))
};
($payment_method:expr, $flow:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} {} through {}",
$payment_method, $flow, $connector
))
};
}
use crate::unimplemented_payment_method;
pub const DUIT_NOW_BRAND_COLOR: &str = "#ED2E67";
pub const DUIT_NOW_BRAND_TEXT: &str = "MALAYSIA NATIONAL QR";
#[derive(Debug)]
pub struct QrImage {
pub data: String,
}
// Qr Image data source starts with this string
// The base64 image data will be appended to it to image data source
pub(crate) const QR_IMAGE_DATA_SOURCE_STRING: &str = "data:image/png;base64";
impl QrImage {
| {
"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": 2450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2475_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
};
($payment_method:expr, $flow:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} {} through {}",
$payment_method, $flow, $connector
))
};
}
use crate::unimplemented_payment_method;
pub const DUIT_NOW_BRAND_COLOR: &str = "#ED2E67";
pub const DUIT_NOW_BRAND_TEXT: &str = "MALAYSIA NATIONAL QR";
| {
"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": 2475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2475_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
};
($payment_method:expr, $flow:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} {} through {}",
$payment_method, $flow, $connector
))
};
}
use crate::unimplemented_payment_method;
pub const DUIT_NOW_BRAND_COLOR: &str = "#ED2E67";
pub const DUIT_NOW_BRAND_TEXT: &str = "MALAYSIA NATIONAL QR";
#[derive(Debug)]
pub struct QrImage {
pub data: String,
}
// Qr Image data source starts with this string
// The base64 image data will be appended to it to image data source
pub(crate) const QR_IMAGE_DATA_SOURCE_STRING: &str = "data:image/png;base64";
impl QrImage {
pub fn new_from_data(data: String) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
| {
"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": 2475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2475_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
};
($payment_method:expr, $flow:expr, $connector:expr) => {
errors::ConnectorError::NotImplemented(format!(
"{} {} through {}",
$payment_method, $flow, $connector
))
};
}
use crate::unimplemented_payment_method;
pub const DUIT_NOW_BRAND_COLOR: &str = "#ED2E67";
pub const DUIT_NOW_BRAND_TEXT: &str = "MALAYSIA NATIONAL QR";
#[derive(Debug)]
pub struct QrImage {
pub data: String,
}
// Qr Image data source starts with this string
// The base64 image data will be appended to it to image data source
pub(crate) const QR_IMAGE_DATA_SOURCE_STRING: &str = "data:image/png;base64";
impl QrImage {
pub fn new_from_data(data: String) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let qrcode_dynamic_image = DynamicImage::ImageLuma8(qrcode_image_buffer);
let mut image_bytes = std::io::BufWriter::new(std::io::Cursor::new(Vec::new()));
// Encodes qrcode_dynamic_image and write it to image_bytes
let _ = qrcode_dynamic_image.write_to(&mut image_bytes, ImageFormat::Png);
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.buffer())
);
Ok(Self {
data: image_data_source,
})
}
pub fn new_colored_from_data(
data: String,
hex_color: &str,
| {
"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": 2475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2500_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub fn new_from_data(data: String) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let qrcode_dynamic_image = DynamicImage::ImageLuma8(qrcode_image_buffer);
let mut image_bytes = std::io::BufWriter::new(std::io::Cursor::new(Vec::new()));
// Encodes qrcode_dynamic_image and write it to image_bytes
let _ = qrcode_dynamic_image.write_to(&mut image_bytes, ImageFormat::Png);
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_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": 2500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2500_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub fn new_from_data(data: String) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let qrcode_dynamic_image = DynamicImage::ImageLuma8(qrcode_image_buffer);
let mut image_bytes = std::io::BufWriter::new(std::io::Cursor::new(Vec::new()));
// Encodes qrcode_dynamic_image and write it to image_bytes
let _ = qrcode_dynamic_image.write_to(&mut image_bytes, ImageFormat::Png);
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.buffer())
);
Ok(Self {
data: image_data_source,
})
}
pub fn new_colored_from_data(
data: String,
hex_color: &str,
) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
| {
"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": 2500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2500_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
pub fn new_from_data(data: String) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let qrcode_dynamic_image = DynamicImage::ImageLuma8(qrcode_image_buffer);
let mut image_bytes = std::io::BufWriter::new(std::io::Cursor::new(Vec::new()));
// Encodes qrcode_dynamic_image and write it to image_bytes
let _ = qrcode_dynamic_image.write_to(&mut image_bytes, ImageFormat::Png);
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.buffer())
);
Ok(Self {
data: image_data_source,
})
}
pub fn new_colored_from_data(
data: String,
hex_color: &str,
) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let (width, height) = qrcode_image_buffer.dimensions();
let mut colored_image = ImageBuffer::new(width, height);
let rgb = Self::parse_hex_color(hex_color)?;
for (x, y, pixel) in qrcode_image_buffer.enumerate_pixels() {
let luminance = pixel.0[0];
let color = if luminance == 0 {
Rgba([rgb.0, rgb.1, rgb.2, 255])
} else {
Rgba([255, 255, 255, 255])
};
colored_image.put_pixel(x, y, color);
}
let qrcode_dynamic_image = DynamicImage::ImageRgba8(colored_image);
let mut image_bytes = std::io::Cursor::new(Vec::new());
qrcode_dynamic_image
.write_to(&mut image_bytes, ImageFormat::Png)
.change_context(QrCodeError::FailedToCreateQrCode)?;
| {
"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": 2500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2525_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let (width, height) = qrcode_image_buffer.dimensions();
let mut colored_image = ImageBuffer::new(width, height);
let rgb = Self::parse_hex_color(hex_color)?;
for (x, y, pixel) in qrcode_image_buffer.enumerate_pixels() {
let luminance = pixel.0[0];
let color = if luminance == 0 {
Rgba([rgb.0, rgb.1, rgb.2, 255])
} else {
Rgba([255, 255, 255, 255])
| {
"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": 2525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2525_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let (width, height) = qrcode_image_buffer.dimensions();
let mut colored_image = ImageBuffer::new(width, height);
let rgb = Self::parse_hex_color(hex_color)?;
for (x, y, pixel) in qrcode_image_buffer.enumerate_pixels() {
let luminance = pixel.0[0];
let color = if luminance == 0 {
Rgba([rgb.0, rgb.1, rgb.2, 255])
} else {
Rgba([255, 255, 255, 255])
};
colored_image.put_pixel(x, y, color);
}
let qrcode_dynamic_image = DynamicImage::ImageRgba8(colored_image);
let mut image_bytes = std::io::Cursor::new(Vec::new());
qrcode_dynamic_image
.write_to(&mut image_bytes, ImageFormat::Png)
.change_context(QrCodeError::FailedToCreateQrCode)?;
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.get_ref())
);
| {
"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": 2525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2525_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
) -> Result<Self, error_stack::Report<QrCodeError>> {
let qr_code = qrcode::QrCode::new(data.as_bytes())
.change_context(QrCodeError::FailedToCreateQrCode)?;
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let (width, height) = qrcode_image_buffer.dimensions();
let mut colored_image = ImageBuffer::new(width, height);
let rgb = Self::parse_hex_color(hex_color)?;
for (x, y, pixel) in qrcode_image_buffer.enumerate_pixels() {
let luminance = pixel.0[0];
let color = if luminance == 0 {
Rgba([rgb.0, rgb.1, rgb.2, 255])
} else {
Rgba([255, 255, 255, 255])
};
colored_image.put_pixel(x, y, color);
}
let qrcode_dynamic_image = DynamicImage::ImageRgba8(colored_image);
let mut image_bytes = std::io::Cursor::new(Vec::new());
qrcode_dynamic_image
.write_to(&mut image_bytes, ImageFormat::Png)
.change_context(QrCodeError::FailedToCreateQrCode)?;
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.get_ref())
);
Ok(Self {
data: image_data_source,
})
}
pub fn parse_hex_color(hex: &str) -> Result<(u8, u8, u8), QrCodeError> {
let hex = hex.trim_start_matches('#');
if hex.len() == 6 {
let r = u8::from_str_radix(&hex[0..2], 16).ok();
let g = u8::from_str_radix(&hex[2..4], 16).ok();
let b = u8::from_str_radix(&hex[4..6], 16).ok();
if let (Some(r), Some(g), Some(b)) = (r, g, b) {
return Ok((r, g, b));
}
}
Err(QrCodeError::InvalidHexColor)
}
}
| {
"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": 2525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2550_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.get_ref())
);
Ok(Self {
data: image_data_source,
})
}
pub fn parse_hex_color(hex: &str) -> Result<(u8, u8, u8), QrCodeError> {
let hex = hex.trim_start_matches('#');
if hex.len() == 6 {
let r = u8::from_str_radix(&hex[0..2], 16).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": 2550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2550_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.get_ref())
);
Ok(Self {
data: image_data_source,
})
}
pub fn parse_hex_color(hex: &str) -> Result<(u8, u8, u8), QrCodeError> {
let hex = hex.trim_start_matches('#');
if hex.len() == 6 {
let r = u8::from_str_radix(&hex[0..2], 16).ok();
let g = u8::from_str_radix(&hex[2..4], 16).ok();
let b = u8::from_str_radix(&hex[4..6], 16).ok();
if let (Some(r), Some(g), Some(b)) = (r, g, b) {
return Ok((r, g, b));
}
}
Err(QrCodeError::InvalidHexColor)
}
}
/// Errors for Qr code handling
#[derive(Debug, thiserror::Error)]
pub enum QrCodeError {
/// Failed to encode data into Qr code
#[error("Failed to create Qr 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": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2550_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
let image_data_source = format!(
"{},{}",
QR_IMAGE_DATA_SOURCE_STRING,
BASE64_ENGINE.encode(image_bytes.get_ref())
);
Ok(Self {
data: image_data_source,
})
}
pub fn parse_hex_color(hex: &str) -> Result<(u8, u8, u8), QrCodeError> {
let hex = hex.trim_start_matches('#');
if hex.len() == 6 {
let r = u8::from_str_radix(&hex[0..2], 16).ok();
let g = u8::from_str_radix(&hex[2..4], 16).ok();
let b = u8::from_str_radix(&hex[4..6], 16).ok();
if let (Some(r), Some(g), Some(b)) = (r, g, b) {
return Ok((r, g, b));
}
}
Err(QrCodeError::InvalidHexColor)
}
}
/// Errors for Qr code handling
#[derive(Debug, thiserror::Error)]
pub enum QrCodeError {
/// Failed to encode data into Qr code
#[error("Failed to create Qr code")]
FailedToCreateQrCode,
/// Failed to parse hex color
#[error("Invalid hex color code supplied")]
InvalidHexColor,
}
use base64::Engine;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
use image::{DynamicImage, ImageBuffer, ImageFormat, Luma, Rgba};
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[serde(untagged)]
// the enum order shouldn't be changed as this is being used during serialization and deserialization
pub enum QrCodeInformation {
QrCodeUrl {
image_data_url: Url,
qr_code_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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2575_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
/// Errors for Qr code handling
#[derive(Debug, thiserror::Error)]
pub enum QrCodeError {
/// Failed to encode data into Qr code
#[error("Failed to create Qr code")]
FailedToCreateQrCode,
/// Failed to parse hex color
#[error("Invalid hex color code supplied")]
InvalidHexColor,
}
use base64::Engine;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
| {
"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": 2575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2575_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
/// Errors for Qr code handling
#[derive(Debug, thiserror::Error)]
pub enum QrCodeError {
/// Failed to encode data into Qr code
#[error("Failed to create Qr code")]
FailedToCreateQrCode,
/// Failed to parse hex color
#[error("Invalid hex color code supplied")]
InvalidHexColor,
}
use base64::Engine;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
use image::{DynamicImage, ImageBuffer, ImageFormat, Luma, Rgba};
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[serde(untagged)]
// the enum order shouldn't be changed as this is being used during serialization and deserialization
pub enum QrCodeInformation {
QrCodeUrl {
image_data_url: Url,
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrDataUrl {
image_data_url: Url,
display_to_timestamp: Option<i64>,
| {
"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": 2575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2575_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
/// Errors for Qr code handling
#[derive(Debug, thiserror::Error)]
pub enum QrCodeError {
/// Failed to encode data into Qr code
#[error("Failed to create Qr code")]
FailedToCreateQrCode,
/// Failed to parse hex color
#[error("Invalid hex color code supplied")]
InvalidHexColor,
}
use base64::Engine;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
use image::{DynamicImage, ImageBuffer, ImageFormat, Luma, Rgba};
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[serde(untagged)]
// the enum order shouldn't be changed as this is being used during serialization and deserialization
pub enum QrCodeInformation {
QrCodeUrl {
image_data_url: Url,
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrDataUrl {
image_data_url: Url,
display_to_timestamp: Option<i64>,
},
QrCodeImageUrl {
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrColorDataUrl {
color_image_data_url: Url,
display_to_timestamp: Option<i64>,
display_text: Option<String>,
border_color: Option<String>,
},
}
impl From<FiuuPaymentWebhookStatus> for EventType {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
| {
"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": 2575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2600_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
display_to_timestamp: Option<i64>,
},
QrDataUrl {
image_data_url: Url,
display_to_timestamp: Option<i64>,
},
QrCodeImageUrl {
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrColorDataUrl {
color_image_data_url: Url,
display_to_timestamp: Option<i64>,
display_text: Option<String>,
border_color: 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": 2600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2600_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
display_to_timestamp: Option<i64>,
},
QrDataUrl {
image_data_url: Url,
display_to_timestamp: Option<i64>,
},
QrCodeImageUrl {
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrColorDataUrl {
color_image_data_url: Url,
display_to_timestamp: Option<i64>,
display_text: Option<String>,
border_color: Option<String>,
},
}
impl From<FiuuPaymentWebhookStatus> for EventType {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
}
}
impl From<FiuuRefundsWebhookStatus> for EventType {
fn from(value: FiuuRefundsWebhookStatus) -> 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": 2600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2600_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
display_to_timestamp: Option<i64>,
},
QrDataUrl {
image_data_url: Url,
display_to_timestamp: Option<i64>,
},
QrCodeImageUrl {
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrColorDataUrl {
color_image_data_url: Url,
display_to_timestamp: Option<i64>,
display_text: Option<String>,
border_color: Option<String>,
},
}
impl From<FiuuPaymentWebhookStatus> for EventType {
fn from(value: FiuuPaymentWebhookStatus) -> Self {
match value {
FiuuPaymentWebhookStatus::Success => Self::PaymentIntentSuccess,
FiuuPaymentWebhookStatus::Failure => Self::PaymentIntentFailure,
FiuuPaymentWebhookStatus::Pending => Self::PaymentIntentProcessing,
}
}
}
impl From<FiuuRefundsWebhookStatus> for EventType {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::IncomingWebhookEventUnspecified,
}
}
}
impl TryFrom<FiuuRefundSyncResponse> for RefundWebhookDetailsResponse {
type Error = error_stack::Report<ConnectorError>;
fn try_from(notif: FiuuRefundSyncResponse) -> Result<Self, Self::Error> {
match notif {
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
connector_refund_id: Some(fiuu_webhooks_refund_response.refund_id),
status: common_enums::RefundStatus::from(
fiuu_webhooks_refund_response.status.clone(),
),
status_code: 200,
connector_response_reference_id: 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": 2600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2625_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
}
}
impl From<FiuuRefundsWebhookStatus> for EventType {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::IncomingWebhookEventUnspecified,
}
}
}
impl TryFrom<FiuuRefundSyncResponse> for RefundWebhookDetailsResponse {
type Error = error_stack::Report<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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2625_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
}
}
impl From<FiuuRefundsWebhookStatus> for EventType {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::IncomingWebhookEventUnspecified,
}
}
}
impl TryFrom<FiuuRefundSyncResponse> for RefundWebhookDetailsResponse {
type Error = error_stack::Report<ConnectorError>;
fn try_from(notif: FiuuRefundSyncResponse) -> Result<Self, Self::Error> {
match notif {
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
connector_refund_id: Some(fiuu_webhooks_refund_response.refund_id),
status: common_enums::RefundStatus::from(
fiuu_webhooks_refund_response.status.clone(),
),
status_code: 200,
connector_response_reference_id: None,
error_code: None,
error_message: None,
raw_connector_response: None,
response_headers: 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": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_2738435745298344692_2625_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
}
}
impl From<FiuuRefundsWebhookStatus> for EventType {
fn from(value: FiuuRefundsWebhookStatus) -> Self {
match value {
FiuuRefundsWebhookStatus::RefundSuccess => Self::RefundSuccess,
FiuuRefundsWebhookStatus::RefundFailure => Self::RefundFailure,
FiuuRefundsWebhookStatus::RefundPending => Self::IncomingWebhookEventUnspecified,
}
}
}
impl TryFrom<FiuuRefundSyncResponse> for RefundWebhookDetailsResponse {
type Error = error_stack::Report<ConnectorError>;
fn try_from(notif: FiuuRefundSyncResponse) -> Result<Self, Self::Error> {
match notif {
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
connector_refund_id: Some(fiuu_webhooks_refund_response.refund_id),
status: common_enums::RefundStatus::from(
fiuu_webhooks_refund_response.status.clone(),
),
status_code: 200,
connector_response_reference_id: None,
error_code: None,
error_message: None,
raw_connector_response: None,
response_headers: None,
}),
_ => Err(errors::ConnectorError::WebhookBodyDecodingFailed)?,
}
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 34,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 2625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-6830782010146565307_0_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/aci/aci_result_codes.rs
pub(super) const FAILURE_CODES: [&str; 502] = [
"100.370.100",
"100.370.110",
"100.370.111",
"100.380.100",
"100.380.101",
"100.380.110",
"100.380.201",
"100.380.305",
"100.380.306",
"100.380.401",
"100.380.501",
"100.395.502",
"100.396.101",
"100.400.000",
| {
"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_-6830782010146565307_0_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/aci/aci_result_codes.rs
pub(super) const FAILURE_CODES: [&str; 502] = [
"100.370.100",
"100.370.110",
"100.370.111",
"100.380.100",
"100.380.101",
"100.380.110",
"100.380.201",
"100.380.305",
"100.380.306",
"100.380.401",
"100.380.501",
"100.395.502",
"100.396.101",
"100.400.000",
"100.400.001",
"100.400.002",
"100.400.005",
"100.400.007",
"100.400.020",
"100.400.021",
"100.400.030",
"100.400.039",
"100.400.040",
"100.400.041",
"100.400.042",
"100.400.043",
"100.400.044",
"100.400.045",
"100.400.051",
| {
"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_-6830782010146565307_0_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/aci/aci_result_codes.rs
pub(super) const FAILURE_CODES: [&str; 502] = [
"100.370.100",
"100.370.110",
"100.370.111",
"100.380.100",
"100.380.101",
"100.380.110",
"100.380.201",
"100.380.305",
"100.380.306",
"100.380.401",
"100.380.501",
"100.395.502",
"100.396.101",
"100.400.000",
"100.400.001",
"100.400.002",
"100.400.005",
"100.400.007",
"100.400.020",
"100.400.021",
"100.400.030",
"100.400.039",
"100.400.040",
"100.400.041",
"100.400.042",
"100.400.043",
"100.400.044",
"100.400.045",
"100.400.051",
"100.400.060",
"100.400.061",
"100.400.063",
"100.400.064",
"100.400.065",
"100.400.071",
"100.400.080",
"100.400.081",
"100.400.083",
"100.400.084",
"100.400.085",
"100.400.086",
"100.400.087",
"100.400.091",
"100.400.100",
"100.400.120",
"100.400.121",
"100.400.122",
"100.400.123",
"100.400.130",
| {
"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_-6830782010146565307_25_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/aci/aci_result_codes.rs
"100.400.042",
"100.400.043",
"100.400.044",
"100.400.045",
"100.400.051",
"100.400.060",
"100.400.061",
"100.400.063",
"100.400.064",
"100.400.065",
"100.400.071",
"100.400.080",
"100.400.081",
"100.400.083",
"100.400.084",
| {
"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_-6830782010146565307_25_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/aci/aci_result_codes.rs
"100.400.042",
"100.400.043",
"100.400.044",
"100.400.045",
"100.400.051",
"100.400.060",
"100.400.061",
"100.400.063",
"100.400.064",
"100.400.065",
"100.400.071",
"100.400.080",
"100.400.081",
"100.400.083",
"100.400.084",
"100.400.085",
"100.400.086",
"100.400.087",
"100.400.091",
"100.400.100",
"100.400.120",
"100.400.121",
"100.400.122",
"100.400.123",
"100.400.130",
"100.400.139",
"100.400.140",
"100.400.141",
"100.400.142",
"100.400.143",
| {
"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_-6830782010146565307_25_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/aci/aci_result_codes.rs
"100.400.042",
"100.400.043",
"100.400.044",
"100.400.045",
"100.400.051",
"100.400.060",
"100.400.061",
"100.400.063",
"100.400.064",
"100.400.065",
"100.400.071",
"100.400.080",
"100.400.081",
"100.400.083",
"100.400.084",
"100.400.085",
"100.400.086",
"100.400.087",
"100.400.091",
"100.400.100",
"100.400.120",
"100.400.121",
"100.400.122",
"100.400.123",
"100.400.130",
"100.400.139",
"100.400.140",
"100.400.141",
"100.400.142",
"100.400.143",
"100.400.144",
"100.400.145",
"100.400.146",
"100.400.147",
"100.400.148",
"100.400.149",
"100.400.150",
"100.400.151",
"100.400.152",
"100.400.241",
"100.400.242",
"100.400.243",
"100.400.260",
"100.400.300",
"100.400.301",
"100.400.302",
"100.400.303",
"100.400.304",
"100.400.305",
"100.400.306",
| {
"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
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.