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:
Hrithikesh
2024-11-08 12:48:01 +05:30
committed by GitHub
parent 01951de7aa
commit a5ac69d1a7
46 changed files with 1030 additions and 263 deletions

View File

@ -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,

View 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,
}