use masking::Secret; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use crate::{enums as api_enums, payments}; #[derive(Default, Debug, Deserialize, Serialize)] pub struct MandateId { pub mandate_id: String, } #[derive(Default, Debug, Deserialize, Serialize, ToSchema)] pub struct MandateRevokedResponse { /// The identifier for mandate pub mandate_id: String, /// The status for mandates #[schema(value_type = MandateStatus)] pub status: api_enums::MandateStatus, } #[derive(Default, Debug, Deserialize, Serialize, ToSchema)] pub struct MandateResponse { /// The identifier for mandate pub mandate_id: String, /// The status for mandates #[schema(value_type = MandateStatus)] pub status: api_enums::MandateStatus, /// The identifier for payment method pub payment_method_id: String, /// The payment method pub payment_method: String, /// The card details for mandate pub card: Option, /// Details about the customer’s acceptance #[schema(value_type = Option)] pub customer_acceptance: Option, } #[derive(Default, Debug, Deserialize, Serialize, ToSchema)] pub struct MandateCardDetails { /// The last 4 digits of card pub last4_digits: Option, /// The expiry month of card #[schema(value_type = Option)] pub card_exp_month: Option>, /// The expiry year of card #[schema(value_type = Option)] pub card_exp_year: Option>, /// The card holder name #[schema(value_type = Option)] pub card_holder_name: Option>, /// The token from card locker #[schema(value_type = Option)] pub card_token: Option>, /// The card scheme network for the particular card pub scheme: Option, /// The country code in in which the card was issued pub issuer_country: Option, #[schema(value_type = Option)] /// A unique identifier alias to identify a particular card pub card_fingerprint: Option>, }