feat: list payment_methods with the required fields in each method (#1310)

Co-authored-by: Sangamesh Kulkarni <59434228+Sangamesh26@users.noreply.github.com>
Co-authored-by: Prasunna Soppa <prasunna.soppa@juspay.in>
This commit is contained in:
Chethan Rao
2023-07-04 19:11:55 +05:30
committed by GitHub
parent 04c60d73cb
commit 6447b04574
8 changed files with 1004 additions and 3 deletions

View File

@ -974,6 +974,26 @@ pub struct UnresolvedResponseReason {
pub message: String,
}
/// Possible field type of required fields in payment_method_data
#[derive(
Clone,
Debug,
Eq,
PartialEq,
serde::Deserialize,
serde::Serialize,
strum::Display,
strum::EnumString,
ToSchema,
Hash,
)]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
pub enum FieldType {
Text,
DropDown { options: Vec<String> },
}
#[derive(
Debug,
serde::Deserialize,