mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor: use hashmap deserializer for generic_link options (#5157)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -989,7 +989,7 @@ pub struct PaymentMethodCollectLinkResponse {
|
||||
|
||||
/// URL to the form's link generated for collecting payment method details.
|
||||
#[schema(value_type = String, example = "https://sandbox.hyperswitch.io/payment_method/collect/pm_collect_link_2bdacf398vwzq5n422S1")]
|
||||
pub link: masking::Secret<String>,
|
||||
pub link: masking::Secret<url::Url>,
|
||||
|
||||
/// Redirect to this URL post completion
|
||||
#[schema(value_type = Option<String>, example = "https://sandbox.hyperswitch.io/payment_method/collect/pm_collect_link_2bdacf398vwzq5n422S1/status")]
|
||||
@ -1026,7 +1026,7 @@ pub struct PaymentMethodCollectLinkDetails {
|
||||
pub session_expiry: time::PrimitiveDateTime,
|
||||
pub return_url: Option<String>,
|
||||
#[serde(flatten)]
|
||||
pub ui_config: link_utils::GenericLinkUIConfigFormData,
|
||||
pub ui_config: link_utils::GenericLinkUiConfigFormData,
|
||||
pub enabled_payment_methods: Option<Vec<link_utils::EnabledPaymentMethod>>,
|
||||
}
|
||||
|
||||
@ -1036,10 +1036,10 @@ pub struct PaymentMethodCollectLinkStatusDetails {
|
||||
pub customer_id: id_type::CustomerId,
|
||||
#[serde(with = "common_utils::custom_serde::iso8601")]
|
||||
pub session_expiry: time::PrimitiveDateTime,
|
||||
pub return_url: Option<String>,
|
||||
pub return_url: Option<url::Url>,
|
||||
pub status: link_utils::PaymentMethodCollectStatus,
|
||||
#[serde(flatten)]
|
||||
pub ui_config: link_utils::GenericLinkUIConfigFormData,
|
||||
pub ui_config: link_utils::GenericLinkUiConfigFormData,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
|
||||
@ -702,7 +702,7 @@ pub struct PayoutListFilters {
|
||||
pub struct PayoutLinkResponse {
|
||||
pub payout_link_id: String,
|
||||
#[schema(value_type = String)]
|
||||
pub link: Secret<String>,
|
||||
pub link: Secret<url::Url>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, ToSchema, serde::Serialize)]
|
||||
@ -720,9 +720,9 @@ pub struct PayoutLinkDetails {
|
||||
pub customer_id: id_type::CustomerId,
|
||||
#[serde(with = "common_utils::custom_serde::iso8601")]
|
||||
pub session_expiry: PrimitiveDateTime,
|
||||
pub return_url: Option<String>,
|
||||
pub return_url: Option<url::Url>,
|
||||
#[serde(flatten)]
|
||||
pub ui_config: link_utils::GenericLinkUIConfigFormData,
|
||||
pub ui_config: link_utils::GenericLinkUiConfigFormData,
|
||||
pub enabled_payment_methods: Vec<link_utils::EnabledPaymentMethod>,
|
||||
pub amount: common_utils::types::StringMajorUnit,
|
||||
pub currency: common_enums::Currency,
|
||||
@ -735,10 +735,10 @@ pub struct PayoutLinkStatusDetails {
|
||||
pub customer_id: id_type::CustomerId,
|
||||
#[serde(with = "common_utils::custom_serde::iso8601")]
|
||||
pub session_expiry: PrimitiveDateTime,
|
||||
pub return_url: Option<String>,
|
||||
pub return_url: Option<url::Url>,
|
||||
pub status: api_enums::PayoutStatus,
|
||||
pub error_code: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
#[serde(flatten)]
|
||||
pub ui_config: link_utils::GenericLinkUIConfigFormData,
|
||||
pub ui_config: link_utils::GenericLinkUiConfigFormData,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user