stripe/model/
account_capability_future_requirements.rs

1use serde::{Serialize, Deserialize};
2use super::{AccountRequirementsAlternative, AccountRequirementsError};
3///
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct AccountCapabilityFutureRequirements {
6    ///Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub alternatives: Option<Vec<AccountRequirementsAlternative>>,
9    ///Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub current_deadline: Option<i64>,
12    ///Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
13    pub currently_due: Vec<String>,
14    ///This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub disabled_reason: Option<String>,
17    ///Fields that are `currently_due` and need to be collected again because validation or verification failed.
18    pub errors: Vec<AccountRequirementsError>,
19    ///Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.
20    pub eventually_due: Vec<String>,
21    ///Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
22    pub past_due: Vec<String>,
23    ///Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.
24    pub pending_verification: Vec<String>,
25}
26impl std::fmt::Display for AccountCapabilityFutureRequirements {
27    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
28        write!(f, "{}", serde_json::to_string(self).unwrap())
29    }
30}