stripe/model/
issuing_card_spending_limit.rs

1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct IssuingCardSpendingLimit {
5    ///Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
6    pub amount: i64,
7    ///Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub categories: Option<Vec<String>>,
10    ///Interval (or event) to which the amount applies.
11    pub interval: String,
12}
13impl std::fmt::Display for IssuingCardSpendingLimit {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15        write!(f, "{}", serde_json::to_string(self).unwrap())
16    }
17}