lockbook_server_lib/billing/
stripe_model.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug)]
7#[serde(untagged)]
8pub enum StripeDeclineCodeCatcher {
9 Known(StripeKnownDeclineCode),
10 Unknown(String),
11}
12
13#[derive(Debug, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub enum StripeKnownDeclineCode {
17 ApproveWithId,
18 CallIssuer,
19 CardNotSupported,
20 CardVelocityExceeded,
21 CurrencyNotSupported,
22 DoNotHonor,
23 DoNotTryAgain,
24 ExpiredCard,
25 Fraudulent,
26 GenericDecline,
27 IncorrectNumber,
28 IncorrectCvc,
29 InsufficientFunds,
30 InvalidCvc,
31 InvalidExpiryMonth,
32 InvalidExpiryYear,
33 InvalidNumber,
34 IssuerNotAvailable,
35 LostCard,
36 MerchantBlacklist,
37 NewAccountInformationAvailable,
38 NoActionTaken,
39 NotPermitted,
40 PickupCard,
41 ProcessingError,
42 ReenterTransaction,
43 RestrictedCard,
44 RevocationOfAllAuthorizations,
45 RevocationOfAuthorization,
46 SecurityViolation,
47 ServiceNotAllowed,
48 StolenCard,
49 StopPaymentOrder,
50 TransactionNotAllowed,
51 TryAgainLater,
52 WithdrawalCountLimitExceeded,
53}