stripe/model/payment_method_domain.rs
1use serde::{Serialize, Deserialize};
2use super::PaymentMethodDomainResourcePaymentMethodStatus;
3/**A payment method domain represents a web domain that you have registered with Stripe.
4Stripe Elements use registered payment method domains to control where certain payment methods are shown.
5
6Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).*/
7#[derive(Debug, Clone, Serialize, Deserialize, Default)]
8pub struct PaymentMethodDomain {
9 ///Indicates the status of a specific payment method on a payment method domain.
10 pub apple_pay: PaymentMethodDomainResourcePaymentMethodStatus,
11 ///Time at which the object was created. Measured in seconds since the Unix epoch.
12 pub created: i64,
13 ///The domain name that this payment method domain object represents.
14 pub domain_name: String,
15 ///Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
16 pub enabled: bool,
17 ///Indicates the status of a specific payment method on a payment method domain.
18 pub google_pay: PaymentMethodDomainResourcePaymentMethodStatus,
19 ///Unique identifier for the object.
20 pub id: String,
21 ///Indicates the status of a specific payment method on a payment method domain.
22 pub link: PaymentMethodDomainResourcePaymentMethodStatus,
23 ///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
24 pub livemode: bool,
25 ///String representing the object's type. Objects of the same type share the same value.
26 pub object: String,
27 ///Indicates the status of a specific payment method on a payment method domain.
28 pub paypal: PaymentMethodDomainResourcePaymentMethodStatus,
29}
30impl std::fmt::Display for PaymentMethodDomain {
31 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
32 write!(f, "{}", serde_json::to_string(self).unwrap())
33 }
34}