stripe/model/
payment_pages_checkout_session_custom_fields.rs

1use serde::{Serialize, Deserialize};
2use super::{
3    PaymentPagesCheckoutSessionCustomFieldsDropdown,
4    PaymentPagesCheckoutSessionCustomFieldsLabel,
5    PaymentPagesCheckoutSessionCustomFieldsNumeric,
6    PaymentPagesCheckoutSessionCustomFieldsText,
7};
8///
9#[derive(Debug, Clone, Serialize, Deserialize, Default)]
10pub struct PaymentPagesCheckoutSessionCustomFields {
11    ///
12    #[serde(skip_serializing_if = "Option::is_none")]
13    pub dropdown: Option<PaymentPagesCheckoutSessionCustomFieldsDropdown>,
14    ///String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
15    pub key: String,
16    ///
17    pub label: PaymentPagesCheckoutSessionCustomFieldsLabel,
18    ///
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub numeric: Option<PaymentPagesCheckoutSessionCustomFieldsNumeric>,
21    ///Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
22    pub optional: bool,
23    ///
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub text: Option<PaymentPagesCheckoutSessionCustomFieldsText>,
26    ///The type of the field.
27    #[serde(rename = "type")]
28    pub type_: String,
29}
30impl std::fmt::Display for PaymentPagesCheckoutSessionCustomFields {
31    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
32        write!(f, "{}", serde_json::to_string(self).unwrap())
33    }
34}