feat: store card network for cards (#687)

This commit is contained in:
Narayan Bhat
2023-02-28 18:30:03 +05:30
committed by GitHub
parent 5c29f37ab2
commit bfca26d9fd
3 changed files with 19 additions and 1 deletions

View File

@ -41,6 +41,10 @@ pub struct CreatePaymentMethod {
/// The unique identifier of the customer.
#[schema(example = "cus_meowerunwiuwiwqw")]
pub customer_id: Option<String>,
/// The card network
#[schema(example = "Visa")]
pub card_network: Option<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
@ -54,6 +58,10 @@ pub struct UpdatePaymentMethod {
"card_holder_name": "John Doe"}))]
pub card: Option<CardDetail>,
/// 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<CardNetwork>,example = "Visa")]
pub card_network: Option<api_enums::CardNetwork>,
/// 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>,