mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor: Pass country and currency as json format in MCA (#523)
This commit is contained in:
@ -4,7 +4,7 @@ use common_utils::pii;
|
||||
use serde::de;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::enums as api_enums;
|
||||
use crate::{admin, enums as api_enums};
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@ -322,12 +322,24 @@ pub struct ListPaymentMethod {
|
||||
pub payment_schemes: Option<Vec<String>>,
|
||||
|
||||
/// List of Countries accepted or has the processing capabilities of the processor
|
||||
#[schema(example = json!(["US", "UK", "IN"]))]
|
||||
pub accepted_countries: Option<Vec<String>>,
|
||||
#[schema(example = json!(
|
||||
{
|
||||
"enable_all":false,
|
||||
"disable_only": ["FR", "DE","IN"],
|
||||
"enable_only": ["UK","AU"]
|
||||
}
|
||||
))]
|
||||
pub accepted_countries: Option<admin::AcceptedCountries>,
|
||||
|
||||
/// List of currencies accepted or has the processing capabilities of the processor
|
||||
#[schema(value_type = Option<Vec<Currency>>,example = json!(["USD", "EUR"]))]
|
||||
pub accepted_currencies: Option<Vec<api_enums::Currency>>,
|
||||
#[schema(example = json!(
|
||||
{
|
||||
"enable_all":false,
|
||||
"disable_only": ["INR", "CAD", "AED","JPY"],
|
||||
"enable_only": ["EUR","USD"]
|
||||
}
|
||||
))]
|
||||
pub accepted_currencies: Option<admin::AcceptedCurrencies>,
|
||||
|
||||
/// Minimum amount supported by the processor. To be represented in the lowest denomination of
|
||||
/// the target currency (For example, for USD it should be in cents)
|
||||
|
||||
Reference in New Issue
Block a user