stripe/model/
issuing_card_authorization_controls.rs

1use serde::{Serialize, Deserialize};
2use super::IssuingCardSpendingLimit;
3///
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct IssuingCardAuthorizationControls {
6    ///Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub allowed_categories: Option<Vec<String>>,
9    ///Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub blocked_categories: Option<Vec<String>>,
12    ///Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub spending_limits: Option<Vec<IssuingCardSpendingLimit>>,
15    ///Currency of the amounts within `spending_limits`. Always the same as the currency of the card.
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub spending_limits_currency: Option<String>,
18}
19impl std::fmt::Display for IssuingCardAuthorizationControls {
20    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
21        write!(f, "{}", serde_json::to_string(self).unwrap())
22    }
23}