refactor: Add secret to metadata (#706)

This commit is contained in:
Kartikeya Hegde
2023-03-08 13:05:07 +05:30
committed by GitHub
parent c451368f7b
commit d36afbed7f
19 changed files with 74 additions and 65 deletions

View File

@ -36,7 +36,7 @@ pub struct PaymentMethodCreate {
/// 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>,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<serde_json::Value>,
pub metadata: Option<pii::SecretSerdeValue>,
/// The unique identifier of the customer.
#[schema(example = "cus_meowerunwiuwiwqw")]
@ -64,7 +64,7 @@ pub struct PaymentMethodUpdate {
/// 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>,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<serde_json::Value>,
pub metadata: Option<pii::SecretSerdeValue>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
@ -127,7 +127,7 @@ pub struct PaymentMethodResponse {
/// 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>,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<serde_json::Value>,
pub metadata: Option<pii::SecretSerdeValue>,
/// A timestamp (ISO 8601 code) that determines when the customer was created
#[schema(value_type = Option<PrimitiveDateTime>,example = "2023-01-18T11:04:09.922Z")]
@ -514,7 +514,7 @@ pub struct CustomerPaymentMethod {
/// 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>,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<serde_json::Value>,
pub metadata: Option<pii::SecretSerdeValue>,
/// A timestamp (ISO 8601 code) that determines when the customer was created
#[schema(value_type = Option<PrimitiveDateTime>,example = "2023-01-18T11:04:09.922Z")]