mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
chore: change serde value to strict type in payment intent domain and diesel model (#6393)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
mod payments;
|
||||
use std::num::{ParseFloatError, TryFromIntError};
|
||||
|
||||
pub use payments::ProductType;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use utoipa::ToSchema;
|
||||
|
||||
@ -1575,6 +1577,8 @@ pub enum PaymentMethodType {
|
||||
OpenBankingPIS,
|
||||
}
|
||||
|
||||
impl masking::SerializableSecret for PaymentMethodType {}
|
||||
|
||||
/// Indicates the type of payment method. Eg: 'card', 'wallet', etc.
|
||||
#[derive(
|
||||
Clone,
|
||||
|
||||
14
crates/common_enums/src/enums/payments.rs
Normal file
14
crates/common_enums/src/enums/payments.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use serde;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ProductType {
|
||||
#[default]
|
||||
Physical,
|
||||
Digital,
|
||||
Travel,
|
||||
Ride,
|
||||
Event,
|
||||
Accommodation,
|
||||
}
|
||||
Reference in New Issue
Block a user