Skip to content

Commit

Permalink
feat(events): add masked events for api events
Browse files Browse the repository at this point in the history
  • Loading branch information
lsampras committed Nov 16, 2023
1 parent 87f69dd commit dfbd2e0
Show file tree
Hide file tree
Showing 55 changed files with 63 additions and 56 deletions.
4 changes: 3 additions & 1 deletion crates/masking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ mod vec;
#[cfg(feature = "serde")]
mod serde;
#[cfg(feature = "serde")]
pub use crate::serde::{masked_serialize, Deserialize, SerializableSecret, Serialize};
pub use crate::serde::{
masked_serialize, Deserialize, ErasedMaskSerialize, SerializableSecret, Serialize,
};

/// This module should be included with asterisk.
///
Expand Down
2 changes: 2 additions & 0 deletions crates/masking/src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ pub fn masked_serialize<T: Serialize>(value: &T) -> Result<Value, serde_json::Er
/// In particular, the trait contains generic methods which cannot be made into a trait object.
/// In this case we remove the generic for assuming the serialization to be of 2 types only raw json or masked json
pub trait ErasedMaskSerialize {
/// Masked serialization.
fn masked_serialize(&self) -> Result<Value, serde_json::Error>;
/// Normal serialization.
fn raw_serialize(&self) -> Result<Value, serde_json::Error>;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/aci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ impl api::IncomingWebhook for Aci {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/adyen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ impl api::IncomingWebhook for Adyen {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif = get_webhook_object_from_body(request.body)
.change_context(errors::ConnectorError::WebhookEventTypeNotFound)?;

Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/airwallex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ impl api::IncomingWebhook for Airwallex {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let details: airwallex::AirwallexWebhookObjectResource = request
.body
.parse_struct("AirwallexWebhookObjectResource")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/authorizedotnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ impl api::IncomingWebhook for Authorizedotnet {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let payload: authorizedotnet::AuthorizedotnetWebhookObjectId = request
.body
.parse_struct("AuthorizedotnetWebhookObjectId")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/bambora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ impl api::IncomingWebhook for Bambora {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/bankofamerica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ impl api::IncomingWebhook for Bankofamerica {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/bitpay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ impl api::IncomingWebhook for Bitpay {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif: BitpayWebhookDetails = request
.body
.parse_struct("BitpayWebhookDetails")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/bluesnap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ impl api::IncomingWebhook for Bluesnap {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let resource: bluesnap::BluesnapWebhookObjectResource =
serde_urlencoded::from_bytes(request.body)
.into_report()
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/boku.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ impl api::IncomingWebhook for Boku {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/braintree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ impl api::IncomingWebhook for Braintree {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif = get_webhook_object_from_body(request.body)
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;

Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/cashtocode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ impl api::IncomingWebhook for Cashtocode {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let webhook: transformers::CashtocodeIncomingWebhook = request
.body
.parse_struct("CashtocodeIncomingWebhook")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ impl api::IncomingWebhook for Checkout {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let event_type_data: checkout::CheckoutWebhookEventTypeBody = request
.body
.parse_struct("CheckoutWebhookBody")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ impl api::IncomingWebhook for Coinbase {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif: CoinbaseWebhookDetails = request
.body
.parse_struct("CoinbaseWebhookDetails")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/cryptopay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ impl api::IncomingWebhook for Cryptopay {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif: CryptopayWebhookDetails =
request
.body
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/cybersource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ impl api::IncomingWebhook for Cybersource {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/dlocal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ impl api::IncomingWebhook for Dlocal {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/dummyconnector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ impl<const T: u8> api::IncomingWebhook for DummyConnector<T> {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/fiserv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ impl api::IncomingWebhook for Fiserv {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/forte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ impl api::IncomingWebhook for Forte {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/globalpay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ impl api::IncomingWebhook for Globalpay {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let details = std::str::from_utf8(request.body)
.into_report()
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/globepay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ impl api::IncomingWebhook for Globepay {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/gocardless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ impl api::IncomingWebhook for Gocardless {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let details: gocardless::GocardlessWebhookEvent = request
.body
.parse_struct("GocardlessWebhookEvent")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/helcim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ impl api::IncomingWebhook for Helcim {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/iatapay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ impl api::IncomingWebhook for Iatapay {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif: IatapayPaymentsResponse =
request
.body
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/klarna.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ impl api::IncomingWebhook for Klarna {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/mollie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ impl api::IncomingWebhook for Mollie {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/multisafepay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ impl api::IncomingWebhook for Multisafepay {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/nexinets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ impl api::IncomingWebhook for Nexinets {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/nmi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ impl api::IncomingWebhook for Nmi {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/noon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ impl api::IncomingWebhook for Noon {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let resource: noon::NoonWebhookObject = request
.body
.parse_struct("NoonWebhookObject")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/nuvei.rs
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ impl api::IncomingWebhook for Nuvei {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let body = serde_urlencoded::from_str::<nuvei::NuveiWebhookDetails>(&request.query_params)
.into_report()
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/opayo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ impl api::IncomingWebhook for Opayo {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/opennode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ impl api::IncomingWebhook for Opennode {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let notif = serde_urlencoded::from_bytes::<OpennodeWebhookDetails>(request.body)
.into_report()
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/payeezy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ impl api::IncomingWebhook for Payeezy {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/payme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ impl api::IncomingWebhook for Payme {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let resource =
serde_urlencoded::from_bytes::<payme::WebhookEventDataResource>(request.body)
.into_report()
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/paypal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ impl api::IncomingWebhook for Paypal {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let details: paypal::PaypalWebhooksBody =
request
.body
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/payu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ impl api::IncomingWebhook for Payu {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/powertranz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ impl api::IncomingWebhook for Powertranz {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/prophetpay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl api::IncomingWebhook for Prophetpay {
fn get_webhook_resource_object(
&self,
_request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
Err(errors::ConnectorError::WebhooksNotImplemented).into_report()
}
}
2 changes: 1 addition & 1 deletion crates/router/src/connector/rapyd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ impl api::IncomingWebhook for Rapyd {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let webhook: transformers::RapydIncomingWebhook = request
.body
.parse_struct("RapydIncomingWebhook")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/shift4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ impl api::IncomingWebhook for Shift4 {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let details: shift4::Shift4WebhookObjectResource = request
.body
.parse_struct("Shift4WebhookObjectResource")
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/square.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ impl api::IncomingWebhook for Square {
fn get_webhook_resource_object(
&self,
request: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn erased_serde::Serialize>, errors::ConnectorError> {
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
let details: square::SquareWebhookBody =
request
.body
Expand Down
Loading

0 comments on commit dfbd2e0

Please sign in to comment.