bitwarden_api_api/models/
gateway_type.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12use serde_repr::{Deserialize_repr, Serialize_repr};
13
14use crate::models;
15///
16#[repr(i64)]
17#[derive(
18    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
19)]
20pub enum GatewayType {
21    Stripe = 0,
22    Braintree = 1,
23    AppStore = 2,
24    PlayStore = 3,
25    BitPay = 4,
26    PayPal = 5,
27    Bank = 6,
28}
29
30impl std::fmt::Display for GatewayType {
31    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32        write!(
33            f,
34            "{}",
35            match self {
36                Self::Stripe => "0",
37                Self::Braintree => "1",
38                Self::AppStore => "2",
39                Self::PlayStore => "3",
40                Self::BitPay => "4",
41                Self::PayPal => "5",
42                Self::Bank => "6",
43            }
44        )
45    }
46}
47impl Default for GatewayType {
48    fn default() -> GatewayType {
49        Self::Stripe
50    }
51}