mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(events): add masked json serializer for logging PII values (#2681)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -14,12 +14,12 @@ use crate::{
|
||||
payment_methods,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
pub struct MerchantAccountListRequest {
|
||||
pub organization_id: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct MerchantAccountCreate {
|
||||
/// The identifier for the Merchant Account
|
||||
@ -111,7 +111,7 @@ pub struct MerchantAccountMetadata {
|
||||
#[serde(flatten)]
|
||||
pub data: Option<pii::SecretSerdeValue>,
|
||||
}
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct MerchantAccountUpdate {
|
||||
/// The identifier for the Merchant Account
|
||||
@ -1006,7 +1006,7 @@ pub enum PayoutStraightThroughAlgorithm {
|
||||
Single(api_enums::PayoutConnectors),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Default)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Default, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct BusinessProfileCreate {
|
||||
/// A short name to identify the business profile
|
||||
@ -1127,7 +1127,7 @@ pub struct BusinessProfileResponse {
|
||||
pub applepay_verified_domains: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct BusinessProfileUpdate {
|
||||
/// A short name to identify the business profile
|
||||
|
||||
@ -5,7 +5,7 @@ use time::PrimitiveDateTime;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// The request body for creating an API Key.
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
#[derive(Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct CreateApiKeyRequest {
|
||||
/// A unique name for the API Key to help you identify it.
|
||||
@ -111,7 +111,7 @@ pub struct RetrieveApiKeyResponse {
|
||||
}
|
||||
|
||||
/// The request body for updating an API Key.
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
#[derive(Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct UpdateApiKeyRequest {
|
||||
/// A unique name for the API Key to help you identify it.
|
||||
|
||||
@ -8,7 +8,7 @@ pub struct CardsInfoRequestParams {
|
||||
pub client_secret: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, Debug)]
|
||||
#[derive(serde::Deserialize, Debug, serde::Serialize)]
|
||||
pub struct CardsInfoRequest {
|
||||
pub client_secret: Option<String>,
|
||||
pub card_iin: String,
|
||||
|
||||
@ -99,7 +99,7 @@ pub struct DisputeEvidenceBlock {
|
||||
pub file_metadata_response: files::FileMetadataResponse,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct DisputeListConstraints {
|
||||
/// limit on the number of objects to return
|
||||
|
||||
@ -62,7 +62,7 @@ pub struct MandateCardDetails {
|
||||
pub card_fingerprint: Option<Secret<String>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct MandateListConstraints {
|
||||
/// limit on the number of objects to return
|
||||
|
||||
@ -2111,7 +2111,7 @@ pub struct PaymentsResponse {
|
||||
pub merchant_connector_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, serde::Deserialize, ToSchema, serde::Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct PaymentListConstraints {
|
||||
/// The identifier for customer
|
||||
@ -2187,7 +2187,7 @@ pub struct PaymentListResponseV2 {
|
||||
pub data: Vec<PaymentsResponse>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct PaymentListFilterConstraints {
|
||||
/// The identifier for payment
|
||||
pub payment_id: Option<String>,
|
||||
@ -3100,7 +3100,7 @@ pub struct PaymentLinkObject {
|
||||
pub merchant_custom_domain_name: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, serde::Deserialize, Clone, ToSchema)]
|
||||
#[derive(Default, Debug, serde::Deserialize, Clone, ToSchema, serde::Serialize)]
|
||||
pub struct RetrievePaymentLinkRequest {
|
||||
pub client_secret: Option<String>,
|
||||
}
|
||||
@ -3128,7 +3128,7 @@ pub struct RetrievePaymentLinkResponse {
|
||||
pub link_expiry: Option<PrimitiveDateTime>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]
|
||||
#[derive(Clone, Debug, serde::Deserialize, ToSchema, serde::Serialize)]
|
||||
pub struct PaymentLinkInitiateRequest {
|
||||
pub merchant_id: String,
|
||||
pub payment_id: String,
|
||||
|
||||
@ -5,7 +5,7 @@ use utoipa::ToSchema;
|
||||
|
||||
use crate::{admin, enums};
|
||||
|
||||
#[derive(Default, Debug, ToSchema, Clone, Deserialize)]
|
||||
#[derive(Default, Debug, ToSchema, Clone, Deserialize, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct RefundRequest {
|
||||
/// Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refund initiated against the same payment. If the identifiers is not defined by the merchant, this filed shall be auto generated and provide in the API response. It is recommended to generate uuid(v4) as the refund_id.
|
||||
@ -54,7 +54,7 @@ pub struct RefundsRetrieveBody {
|
||||
pub force_sync: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, ToSchema, Clone, Deserialize)]
|
||||
#[derive(Default, Debug, ToSchema, Clone, Deserialize, Serialize)]
|
||||
pub struct RefundsRetrieveRequest {
|
||||
/// Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refund initiated against the same payment. If the identifiers is not defined by the merchant, this filed shall be auto generated and provide in the API response. It is recommended to generate uuid(v4) as the refund_id.
|
||||
#[schema(
|
||||
@ -72,7 +72,7 @@ pub struct RefundsRetrieveRequest {
|
||||
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, ToSchema, Clone, Deserialize)]
|
||||
#[derive(Default, Debug, ToSchema, Clone, Deserialize, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct RefundUpdateRequest {
|
||||
/// An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive
|
||||
|
||||
Reference in New Issue
Block a user