feat(payment_methods): Added value Field in required Field for Pre-filling (#1827)

Co-authored-by: Sarthak Soni <sarthak.soni@juspay.in>
Co-authored-by: AkshayaFoiger <akshaya.shankar@juspay.in>
Co-authored-by: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com>
This commit is contained in:
Sarthak Soni
2023-08-01 18:28:26 +05:30
committed by GitHub
parent 801946f29f
commit e047a11ded
6 changed files with 527 additions and 709 deletions

View File

@ -1,4 +1,4 @@
use std::collections::HashSet;
use std::collections::HashMap;
use cards::CardNumber;
use common_utils::{crypto::OptionalEncryptableName, pii};
@ -220,7 +220,7 @@ pub struct ResponsePaymentMethodTypes {
pub bank_transfers: Option<BankTransferTypes>,
/// Required fields for the payment_method_type.
pub required_fields: Option<HashSet<RequiredFieldInfo>>,
pub required_fields: Option<HashMap<String, RequiredFieldInfo>>,
}
/// Required fields info used while listing the payment_method_data
@ -235,6 +235,8 @@ pub struct RequiredFieldInfo {
/// Possible field type of required field
#[schema(value_type = FieldType)]
pub field_type: api_enums::FieldType,
pub value: Option<String>,
}
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)]