square_api_client/models/
card_payment_details.rs

1//! Model struct for CardPaymentDetails type.
2
3use serde::{Deserialize, Serialize};
4
5use super::{
6    enums::{
7        CardPaymentDetailsAvsStatus, CardPaymentDetailsCvvStatus, CardPaymentDetailsEntryMethod,
8        CardPaymentDetailsStatus, CardPaymentDetailsVerificationMethod,
9        CardPaymentDetailsVerificationResult,
10    },
11    errors::Error,
12    Card, CardPaymentTimeline, DeviceDetails,
13};
14
15/// Reflects the current status of a card payment.
16///
17/// Contains only non-confidential information.
18#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
19pub struct CardPaymentDetails {
20    /// The card payment's current state.
21    pub status: Option<CardPaymentDetailsStatus>,
22    /// The credit card's non-confidential details.
23    pub card: Option<Card>,
24    /// The method used to enter the card's details for the payment.
25    pub entry_method: Option<CardPaymentDetailsEntryMethod>,
26    /// The status code returned from the Card Verification Value (CVV) check.
27    pub cvv_status: Option<CardPaymentDetailsCvvStatus>,
28    /// The status code returned from the Address Verification System (AVS) check.
29    pub avs_status: Option<CardPaymentDetailsAvsStatus>,
30    /// The status code returned by the card issuer that describes the payment's authorization
31    /// status.
32    pub auth_result_code: Option<String>,
33    /// For EMV payments, the application ID identifies the EMV application used for the payment.
34    pub application_identifier: Option<String>,
35    /// For EMV payments, the human-readable name of the EMV application used for the payment.
36    pub application_name: Option<String>,
37    /// For EMV payments, the cryptogram generated for the payment.
38    pub application_cryptogram: Option<String>,
39    /// For EMV payments, the method used to verify the cardholder's identity.
40    pub verification_method: Option<CardPaymentDetailsVerificationMethod>,
41    /// For EMV payments, the results of the cardholder verification.
42    pub verfication_results: Option<CardPaymentDetailsVerificationResult>,
43    /// The statement description sent to the card networks.
44    ///
45    /// Note: The actual statement description varies and is likely to be truncated and appended
46    /// with additional information on a per issuer basis.
47    pub statement_description: Option<String>,
48    /// **Deprecated:** Use `Payment.device_details` instead.
49    ///
50    /// Details about the device that took the payment.
51    #[deprecated]
52    pub device_details: Option<DeviceDetails>,
53    /// The timeline for card payments.
54    pub card_payment_timeline: Option<CardPaymentTimeline>,
55    /// Whether the card must be physically present for the payment to be refunded. If set to
56    /// `true`, the card must be present.
57    pub refund_requires_card_presence: Option<bool>,
58    /// Information about errors encountered during the request.
59    pub errors: Option<Vec<Error>>,
60}