mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com> Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
40 lines
1.3 KiB
Rust
40 lines
1.3 KiB
Rust
use rustc_hash::FxHashMap;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::enums;
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct MandateData {
|
|
pub mandate_acceptance_type: Option<enums::MandateAcceptanceType>,
|
|
pub mandate_type: Option<enums::MandateType>,
|
|
pub payment_type: Option<enums::PaymentType>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct PaymentMethodInput {
|
|
pub payment_method: Option<enums::PaymentMethod>,
|
|
pub payment_method_type: Option<enums::PaymentMethodType>,
|
|
pub card_network: Option<enums::CardNetwork>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct PaymentInput {
|
|
pub amount: common_utils::types::MinorUnit,
|
|
pub currency: enums::Currency,
|
|
pub authentication_type: Option<enums::AuthenticationType>,
|
|
pub card_bin: Option<String>,
|
|
pub capture_method: Option<enums::CaptureMethod>,
|
|
pub business_country: Option<enums::Country>,
|
|
pub billing_country: Option<enums::Country>,
|
|
pub business_label: Option<String>,
|
|
pub setup_future_usage: Option<enums::SetupFutureUsage>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct BackendInput {
|
|
pub metadata: Option<FxHashMap<String, String>>,
|
|
pub payment: PaymentInput,
|
|
pub payment_method: PaymentMethodInput,
|
|
pub mandate: MandateData,
|
|
}
|