mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
refactor: Add secret to metadata (#706)
This commit is contained in:
@ -6,10 +6,7 @@ use router_derive::Setter;
|
||||
use time::PrimitiveDateTime;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::{
|
||||
enums::{self as api_enums},
|
||||
refunds,
|
||||
};
|
||||
use crate::{enums as api_enums, refunds};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum PaymentOp {
|
||||
@ -882,7 +879,7 @@ pub struct PaymentsResponse {
|
||||
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub metadata: Option<serde_json::Value>,
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// description: The customer's email address
|
||||
#[schema(max_length = 255, value_type = Option<String>, example = "johntest@test.com")]
|
||||
@ -1187,7 +1184,7 @@ pub struct Metadata {
|
||||
/// Any other metadata that is to be provided
|
||||
#[schema(value_type = Object, example = r#"{ "city": "NY", "unit": "245" }"#)]
|
||||
#[serde(flatten)]
|
||||
pub data: serde_json::Value,
|
||||
pub data: pii::SecretSerdeValue,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user