stripe/resources/
issuing_authorization_ext.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5#[serde(rename_all = "snake_case")]
6pub enum IssuingAuthorizationCheck {
7 Match,
8 Mismatch,
9 NotProvided,
10}
11
12impl std::default::Default for IssuingAuthorizationCheck {
13 fn default() -> Self {
14 Self::NotProvided
15 }
16}
17
18#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
20#[serde(rename_all = "snake_case")]
21pub enum IssuingAuthorizationMethod {
22 KeyedIn,
23 Swipe,
24 Chip,
25 Contactless,
26 Online,
27}
28
29impl std::default::Default for IssuingAuthorizationMethod {
30 fn default() -> Self {
31 Self::Online
32 }
33}
34
35#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
37#[serde(rename_all = "snake_case")]
38pub enum IssuingAuthorizationReason {
39 AuthenticationFailed,
40 AuthorizationControls,
41 CardActive,
42 CardInactive,
43 InsufficientFunds,
44 AccountComplianceDisabled,
45 AccountInactive,
46 SuspectedFraud,
47 WebhookApproved,
48 WebhookDeclined,
49 WebhookTimeout,
50}
51
52impl std::default::Default for IssuingAuthorizationReason {
53 fn default() -> Self {
54 Self::AuthenticationFailed
55 }
56}
57
58#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
60#[serde(rename_all = "snake_case")]
61pub enum IssuingAuthorizationWalletProvider {
62 ApplePay,
63 GooglePay,
64 SamsungPay,
65}
66
67impl IssuingAuthorizationWalletProvider {
68 pub fn as_str(self) -> &'static str {
69 match self {
70 IssuingAuthorizationWalletProvider::ApplePay => "apple_pay",
71 IssuingAuthorizationWalletProvider::GooglePay => "google_pay",
72 IssuingAuthorizationWalletProvider::SamsungPay => "samsung_pay",
73 }
74 }
75}
76
77impl AsRef<str> for IssuingAuthorizationWalletProvider {
78 fn as_ref(&self) -> &str {
79 self.as_str()
80 }
81}
82
83impl std::fmt::Display for IssuingAuthorizationWalletProvider {
84 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
85 self.as_str().fmt(f)
86 }
87}
88
89impl std::default::Default for IssuingAuthorizationWalletProvider {
90 fn default() -> Self {
91 Self::ApplePay
92 }
93}