stripe/model/
account_capability_requirements.rs

1use serde::{Serialize, Deserialize};
2use super::{AccountRequirementsAlternative, AccountRequirementsError};
3///
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct AccountCapabilityRequirements {
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 by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
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 `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
13    pub currently_due: Vec<String>,
14    /**If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
15
16`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:
17
18- [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses)
19
20If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.*/
21    #[serde(skip_serializing_if = "Option::is_none")]
22    pub disabled_reason: Option<String>,
23    ///Fields that are `currently_due` and need to be collected again because validation or verification failed.
24    pub errors: Vec<AccountRequirementsError>,
25    ///Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
26    pub eventually_due: Vec<String>,
27    ///Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.
28    pub past_due: Vec<String>,
29    ///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`, `currently_due`, or `past_due`.
30    pub pending_verification: Vec<String>,
31}
32impl std::fmt::Display for AccountCapabilityRequirements {
33    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
34        write!(f, "{}", serde_json::to_string(self).unwrap())
35    }
36}