Skip to main content

stripe_connect/account/
requests.rs

1use stripe_client_core::{
2    RequestBuilder, StripeBlockingClient, StripeClient, StripeMethod, StripeRequest,
3};
4
5/// With <a href="/connect">Connect</a>, you can delete accounts you manage.
6///
7/// Test-mode accounts can be deleted at any time.
8///
9/// Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts.
10/// All other Live-mode accounts, can be deleted when all <a href="/api/balance/balance_object">balances</a> are zero.
11///
12/// If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
13#[derive(Clone)]
14#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
15#[derive(serde::Serialize)]
16pub struct DeleteAccount {
17    account: stripe_shared::AccountId,
18}
19#[cfg(feature = "redact-generated-debug")]
20impl std::fmt::Debug for DeleteAccount {
21    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
22        f.debug_struct("DeleteAccount").finish_non_exhaustive()
23    }
24}
25impl DeleteAccount {
26    /// Construct a new `DeleteAccount`.
27    pub fn new(account: impl Into<stripe_shared::AccountId>) -> Self {
28        Self { account: account.into() }
29    }
30}
31impl DeleteAccount {
32    /// Send the request and return the deserialized response.
33    pub async fn send<C: StripeClient>(
34        &self,
35        client: &C,
36    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
37        self.customize().send(client).await
38    }
39
40    /// Send the request and return the deserialized response, blocking until completion.
41    pub fn send_blocking<C: StripeBlockingClient>(
42        &self,
43        client: &C,
44    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
45        self.customize().send_blocking(client)
46    }
47}
48
49impl StripeRequest for DeleteAccount {
50    type Output = stripe_shared::DeletedAccount;
51
52    fn build(&self) -> RequestBuilder {
53        let account = &self.account;
54        RequestBuilder::new(StripeMethod::Delete, format!("/accounts/{account}"))
55    }
56}
57#[derive(Clone, Eq, PartialEq)]
58#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
59#[derive(serde::Serialize)]
60struct RetrieveForMyAccountAccountBuilder {
61    #[serde(skip_serializing_if = "Option::is_none")]
62    expand: Option<Vec<String>>,
63}
64#[cfg(feature = "redact-generated-debug")]
65impl std::fmt::Debug for RetrieveForMyAccountAccountBuilder {
66    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
67        f.debug_struct("RetrieveForMyAccountAccountBuilder").finish_non_exhaustive()
68    }
69}
70impl RetrieveForMyAccountAccountBuilder {
71    fn new() -> Self {
72        Self { expand: None }
73    }
74}
75/// Retrieves the details of an account.
76#[derive(Clone)]
77#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
78#[derive(serde::Serialize)]
79pub struct RetrieveForMyAccountAccount {
80    inner: RetrieveForMyAccountAccountBuilder,
81}
82#[cfg(feature = "redact-generated-debug")]
83impl std::fmt::Debug for RetrieveForMyAccountAccount {
84    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
85        f.debug_struct("RetrieveForMyAccountAccount").finish_non_exhaustive()
86    }
87}
88impl RetrieveForMyAccountAccount {
89    /// Construct a new `RetrieveForMyAccountAccount`.
90    pub fn new() -> Self {
91        Self { inner: RetrieveForMyAccountAccountBuilder::new() }
92    }
93    /// Specifies which fields in the response should be expanded.
94    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
95        self.inner.expand = Some(expand.into());
96        self
97    }
98}
99impl Default for RetrieveForMyAccountAccount {
100    fn default() -> Self {
101        Self::new()
102    }
103}
104impl RetrieveForMyAccountAccount {
105    /// Send the request and return the deserialized response.
106    pub async fn send<C: StripeClient>(
107        &self,
108        client: &C,
109    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
110        self.customize().send(client).await
111    }
112
113    /// Send the request and return the deserialized response, blocking until completion.
114    pub fn send_blocking<C: StripeBlockingClient>(
115        &self,
116        client: &C,
117    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
118        self.customize().send_blocking(client)
119    }
120}
121
122impl StripeRequest for RetrieveForMyAccountAccount {
123    type Output = stripe_shared::Account;
124
125    fn build(&self) -> RequestBuilder {
126        RequestBuilder::new(StripeMethod::Get, "/account").query(&self.inner)
127    }
128}
129#[derive(Clone, Eq, PartialEq)]
130#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
131#[derive(serde::Serialize)]
132struct ListAccountBuilder {
133    #[serde(skip_serializing_if = "Option::is_none")]
134    created: Option<stripe_types::RangeQueryTs>,
135    #[serde(skip_serializing_if = "Option::is_none")]
136    ending_before: Option<String>,
137    #[serde(skip_serializing_if = "Option::is_none")]
138    expand: Option<Vec<String>>,
139    #[serde(skip_serializing_if = "Option::is_none")]
140    limit: Option<i64>,
141    #[serde(skip_serializing_if = "Option::is_none")]
142    starting_after: Option<String>,
143}
144#[cfg(feature = "redact-generated-debug")]
145impl std::fmt::Debug for ListAccountBuilder {
146    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
147        f.debug_struct("ListAccountBuilder").finish_non_exhaustive()
148    }
149}
150impl ListAccountBuilder {
151    fn new() -> Self {
152        Self { created: None, ending_before: None, expand: None, limit: None, starting_after: None }
153    }
154}
155/// Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect).
156/// If you’re not a platform, the list is empty.
157#[derive(Clone)]
158#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
159#[derive(serde::Serialize)]
160pub struct ListAccount {
161    inner: ListAccountBuilder,
162}
163#[cfg(feature = "redact-generated-debug")]
164impl std::fmt::Debug for ListAccount {
165    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
166        f.debug_struct("ListAccount").finish_non_exhaustive()
167    }
168}
169impl ListAccount {
170    /// Construct a new `ListAccount`.
171    pub fn new() -> Self {
172        Self { inner: ListAccountBuilder::new() }
173    }
174    /// Only return connected accounts that were created during the given date interval.
175    pub fn created(mut self, created: impl Into<stripe_types::RangeQueryTs>) -> Self {
176        self.inner.created = Some(created.into());
177        self
178    }
179    /// A cursor for use in pagination.
180    /// `ending_before` is an object ID that defines your place in the list.
181    /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
182    pub fn ending_before(mut self, ending_before: impl Into<String>) -> Self {
183        self.inner.ending_before = Some(ending_before.into());
184        self
185    }
186    /// Specifies which fields in the response should be expanded.
187    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
188        self.inner.expand = Some(expand.into());
189        self
190    }
191    /// A limit on the number of objects to be returned.
192    /// Limit can range between 1 and 100, and the default is 10.
193    pub fn limit(mut self, limit: impl Into<i64>) -> Self {
194        self.inner.limit = Some(limit.into());
195        self
196    }
197    /// A cursor for use in pagination.
198    /// `starting_after` is an object ID that defines your place in the list.
199    /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
200    pub fn starting_after(mut self, starting_after: impl Into<String>) -> Self {
201        self.inner.starting_after = Some(starting_after.into());
202        self
203    }
204}
205impl Default for ListAccount {
206    fn default() -> Self {
207        Self::new()
208    }
209}
210impl ListAccount {
211    /// Send the request and return the deserialized response.
212    pub async fn send<C: StripeClient>(
213        &self,
214        client: &C,
215    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
216        self.customize().send(client).await
217    }
218
219    /// Send the request and return the deserialized response, blocking until completion.
220    pub fn send_blocking<C: StripeBlockingClient>(
221        &self,
222        client: &C,
223    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
224        self.customize().send_blocking(client)
225    }
226
227    pub fn paginate(
228        &self,
229    ) -> stripe_client_core::ListPaginator<stripe_types::List<stripe_shared::Account>> {
230        stripe_client_core::ListPaginator::new_list("/accounts", &self.inner)
231    }
232}
233
234impl StripeRequest for ListAccount {
235    type Output = stripe_types::List<stripe_shared::Account>;
236
237    fn build(&self) -> RequestBuilder {
238        RequestBuilder::new(StripeMethod::Get, "/accounts").query(&self.inner)
239    }
240}
241#[derive(Clone, Eq, PartialEq)]
242#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
243#[derive(serde::Serialize)]
244struct RetrieveAccountBuilder {
245    #[serde(skip_serializing_if = "Option::is_none")]
246    expand: Option<Vec<String>>,
247}
248#[cfg(feature = "redact-generated-debug")]
249impl std::fmt::Debug for RetrieveAccountBuilder {
250    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
251        f.debug_struct("RetrieveAccountBuilder").finish_non_exhaustive()
252    }
253}
254impl RetrieveAccountBuilder {
255    fn new() -> Self {
256        Self { expand: None }
257    }
258}
259/// Retrieves the details of an account.
260#[derive(Clone)]
261#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
262#[derive(serde::Serialize)]
263pub struct RetrieveAccount {
264    inner: RetrieveAccountBuilder,
265    account: stripe_shared::AccountId,
266}
267#[cfg(feature = "redact-generated-debug")]
268impl std::fmt::Debug for RetrieveAccount {
269    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
270        f.debug_struct("RetrieveAccount").finish_non_exhaustive()
271    }
272}
273impl RetrieveAccount {
274    /// Construct a new `RetrieveAccount`.
275    pub fn new(account: impl Into<stripe_shared::AccountId>) -> Self {
276        Self { account: account.into(), inner: RetrieveAccountBuilder::new() }
277    }
278    /// Specifies which fields in the response should be expanded.
279    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
280        self.inner.expand = Some(expand.into());
281        self
282    }
283}
284impl RetrieveAccount {
285    /// Send the request and return the deserialized response.
286    pub async fn send<C: StripeClient>(
287        &self,
288        client: &C,
289    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
290        self.customize().send(client).await
291    }
292
293    /// Send the request and return the deserialized response, blocking until completion.
294    pub fn send_blocking<C: StripeBlockingClient>(
295        &self,
296        client: &C,
297    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
298        self.customize().send_blocking(client)
299    }
300}
301
302impl StripeRequest for RetrieveAccount {
303    type Output = stripe_shared::Account;
304
305    fn build(&self) -> RequestBuilder {
306        let account = &self.account;
307        RequestBuilder::new(StripeMethod::Get, format!("/accounts/{account}")).query(&self.inner)
308    }
309}
310#[derive(Clone, Eq, PartialEq)]
311#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
312#[derive(serde::Serialize)]
313struct CapabilitiesAccountBuilder {
314    #[serde(skip_serializing_if = "Option::is_none")]
315    expand: Option<Vec<String>>,
316}
317#[cfg(feature = "redact-generated-debug")]
318impl std::fmt::Debug for CapabilitiesAccountBuilder {
319    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
320        f.debug_struct("CapabilitiesAccountBuilder").finish_non_exhaustive()
321    }
322}
323impl CapabilitiesAccountBuilder {
324    fn new() -> Self {
325        Self { expand: None }
326    }
327}
328/// Returns a list of capabilities associated with the account.
329/// The capabilities are returned sorted by creation date, with the most recent capability appearing first.
330#[derive(Clone)]
331#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
332#[derive(serde::Serialize)]
333pub struct CapabilitiesAccount {
334    inner: CapabilitiesAccountBuilder,
335    account: stripe_shared::AccountId,
336}
337#[cfg(feature = "redact-generated-debug")]
338impl std::fmt::Debug for CapabilitiesAccount {
339    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
340        f.debug_struct("CapabilitiesAccount").finish_non_exhaustive()
341    }
342}
343impl CapabilitiesAccount {
344    /// Construct a new `CapabilitiesAccount`.
345    pub fn new(account: impl Into<stripe_shared::AccountId>) -> Self {
346        Self { account: account.into(), inner: CapabilitiesAccountBuilder::new() }
347    }
348    /// Specifies which fields in the response should be expanded.
349    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
350        self.inner.expand = Some(expand.into());
351        self
352    }
353}
354impl CapabilitiesAccount {
355    /// Send the request and return the deserialized response.
356    pub async fn send<C: StripeClient>(
357        &self,
358        client: &C,
359    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
360        self.customize().send(client).await
361    }
362
363    /// Send the request and return the deserialized response, blocking until completion.
364    pub fn send_blocking<C: StripeBlockingClient>(
365        &self,
366        client: &C,
367    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
368        self.customize().send_blocking(client)
369    }
370
371    pub fn paginate(
372        &self,
373    ) -> stripe_client_core::ListPaginator<stripe_types::List<stripe_shared::Capability>> {
374        let account = &self.account;
375
376        stripe_client_core::ListPaginator::new_list(
377            format!("/accounts/{account}/capabilities"),
378            &self.inner,
379        )
380    }
381}
382
383impl StripeRequest for CapabilitiesAccount {
384    type Output = stripe_types::List<stripe_shared::Capability>;
385
386    fn build(&self) -> RequestBuilder {
387        let account = &self.account;
388        RequestBuilder::new(StripeMethod::Get, format!("/accounts/{account}/capabilities"))
389            .query(&self.inner)
390    }
391}
392#[derive(Clone, Eq, PartialEq)]
393#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
394#[derive(serde::Serialize)]
395struct PersonsAccountBuilder {
396    #[serde(skip_serializing_if = "Option::is_none")]
397    ending_before: Option<String>,
398    #[serde(skip_serializing_if = "Option::is_none")]
399    expand: Option<Vec<String>>,
400    #[serde(skip_serializing_if = "Option::is_none")]
401    limit: Option<i64>,
402    #[serde(skip_serializing_if = "Option::is_none")]
403    relationship: Option<PersonsAccountRelationship>,
404    #[serde(skip_serializing_if = "Option::is_none")]
405    starting_after: Option<String>,
406}
407#[cfg(feature = "redact-generated-debug")]
408impl std::fmt::Debug for PersonsAccountBuilder {
409    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
410        f.debug_struct("PersonsAccountBuilder").finish_non_exhaustive()
411    }
412}
413impl PersonsAccountBuilder {
414    fn new() -> Self {
415        Self {
416            ending_before: None,
417            expand: None,
418            limit: None,
419            relationship: None,
420            starting_after: None,
421        }
422    }
423}
424/// Filters on the list of people returned based on the person's relationship to the account's company.
425#[derive(Copy, Clone, Eq, PartialEq)]
426#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
427#[derive(serde::Serialize)]
428pub struct PersonsAccountRelationship {
429    /// A filter on the list of people returned based on whether these people are authorizers of the account's representative.
430    #[serde(skip_serializing_if = "Option::is_none")]
431    pub authorizer: Option<bool>,
432    /// A filter on the list of people returned based on whether these people are directors of the account's company.
433    #[serde(skip_serializing_if = "Option::is_none")]
434    pub director: Option<bool>,
435    /// A filter on the list of people returned based on whether these people are executives of the account's company.
436    #[serde(skip_serializing_if = "Option::is_none")]
437    pub executive: Option<bool>,
438    /// A filter on the list of people returned based on whether these people are legal guardians of the account's representative.
439    #[serde(skip_serializing_if = "Option::is_none")]
440    pub legal_guardian: Option<bool>,
441    /// A filter on the list of people returned based on whether these people are owners of the account's company.
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub owner: Option<bool>,
444    /// A filter on the list of people returned based on whether these people are the representative of the account's company.
445    #[serde(skip_serializing_if = "Option::is_none")]
446    pub representative: Option<bool>,
447}
448#[cfg(feature = "redact-generated-debug")]
449impl std::fmt::Debug for PersonsAccountRelationship {
450    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
451        f.debug_struct("PersonsAccountRelationship").finish_non_exhaustive()
452    }
453}
454impl PersonsAccountRelationship {
455    pub fn new() -> Self {
456        Self {
457            authorizer: None,
458            director: None,
459            executive: None,
460            legal_guardian: None,
461            owner: None,
462            representative: None,
463        }
464    }
465}
466impl Default for PersonsAccountRelationship {
467    fn default() -> Self {
468        Self::new()
469    }
470}
471/// Returns a list of people associated with the account’s legal entity.
472/// The people are returned sorted by creation date, with the most recent people appearing first.
473#[derive(Clone)]
474#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
475#[derive(serde::Serialize)]
476pub struct PersonsAccount {
477    inner: PersonsAccountBuilder,
478    account: stripe_shared::AccountId,
479}
480#[cfg(feature = "redact-generated-debug")]
481impl std::fmt::Debug for PersonsAccount {
482    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
483        f.debug_struct("PersonsAccount").finish_non_exhaustive()
484    }
485}
486impl PersonsAccount {
487    /// Construct a new `PersonsAccount`.
488    pub fn new(account: impl Into<stripe_shared::AccountId>) -> Self {
489        Self { account: account.into(), inner: PersonsAccountBuilder::new() }
490    }
491    /// A cursor for use in pagination.
492    /// `ending_before` is an object ID that defines your place in the list.
493    /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
494    pub fn ending_before(mut self, ending_before: impl Into<String>) -> Self {
495        self.inner.ending_before = Some(ending_before.into());
496        self
497    }
498    /// Specifies which fields in the response should be expanded.
499    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
500        self.inner.expand = Some(expand.into());
501        self
502    }
503    /// A limit on the number of objects to be returned.
504    /// Limit can range between 1 and 100, and the default is 10.
505    pub fn limit(mut self, limit: impl Into<i64>) -> Self {
506        self.inner.limit = Some(limit.into());
507        self
508    }
509    /// Filters on the list of people returned based on the person's relationship to the account's company.
510    pub fn relationship(mut self, relationship: impl Into<PersonsAccountRelationship>) -> Self {
511        self.inner.relationship = Some(relationship.into());
512        self
513    }
514    /// A cursor for use in pagination.
515    /// `starting_after` is an object ID that defines your place in the list.
516    /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
517    pub fn starting_after(mut self, starting_after: impl Into<String>) -> Self {
518        self.inner.starting_after = Some(starting_after.into());
519        self
520    }
521}
522impl PersonsAccount {
523    /// Send the request and return the deserialized response.
524    pub async fn send<C: StripeClient>(
525        &self,
526        client: &C,
527    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
528        self.customize().send(client).await
529    }
530
531    /// Send the request and return the deserialized response, blocking until completion.
532    pub fn send_blocking<C: StripeBlockingClient>(
533        &self,
534        client: &C,
535    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
536        self.customize().send_blocking(client)
537    }
538
539    pub fn paginate(
540        &self,
541    ) -> stripe_client_core::ListPaginator<stripe_types::List<stripe_shared::Person>> {
542        let account = &self.account;
543
544        stripe_client_core::ListPaginator::new_list(
545            format!("/accounts/{account}/persons"),
546            &self.inner,
547        )
548    }
549}
550
551impl StripeRequest for PersonsAccount {
552    type Output = stripe_types::List<stripe_shared::Person>;
553
554    fn build(&self) -> RequestBuilder {
555        let account = &self.account;
556        RequestBuilder::new(StripeMethod::Get, format!("/accounts/{account}/persons"))
557            .query(&self.inner)
558    }
559}
560#[derive(Clone)]
561#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
562#[derive(serde::Serialize)]
563struct CreateAccountBuilder {
564    #[serde(skip_serializing_if = "Option::is_none")]
565    account_token: Option<String>,
566    #[serde(skip_serializing_if = "Option::is_none")]
567    business_profile: Option<CreateAccountBusinessProfile>,
568    #[serde(skip_serializing_if = "Option::is_none")]
569    business_type: Option<stripe_shared::AccountBusinessType>,
570    #[serde(skip_serializing_if = "Option::is_none")]
571    capabilities: Option<CapabilitiesParam>,
572    #[serde(skip_serializing_if = "Option::is_none")]
573    company: Option<CreateAccountCompany>,
574    #[serde(skip_serializing_if = "Option::is_none")]
575    controller: Option<CreateAccountController>,
576    #[serde(skip_serializing_if = "Option::is_none")]
577    country: Option<String>,
578    #[serde(skip_serializing_if = "Option::is_none")]
579    default_currency: Option<stripe_types::Currency>,
580    #[serde(skip_serializing_if = "Option::is_none")]
581    documents: Option<DocumentsSpecs>,
582    #[serde(skip_serializing_if = "Option::is_none")]
583    email: Option<String>,
584    #[serde(skip_serializing_if = "Option::is_none")]
585    expand: Option<Vec<String>>,
586    #[serde(skip_serializing_if = "Option::is_none")]
587    external_account: Option<String>,
588    #[serde(skip_serializing_if = "Option::is_none")]
589    groups: Option<AccountGroupsSpecs>,
590    #[serde(skip_serializing_if = "Option::is_none")]
591    individual: Option<CreateAccountIndividual>,
592    #[serde(skip_serializing_if = "Option::is_none")]
593    metadata: Option<std::collections::HashMap<String, String>>,
594    #[serde(skip_serializing_if = "Option::is_none")]
595    settings: Option<CreateAccountSettings>,
596    #[serde(skip_serializing_if = "Option::is_none")]
597    tos_acceptance: Option<TosAcceptanceSpecs>,
598    #[serde(rename = "type")]
599    #[serde(skip_serializing_if = "Option::is_none")]
600    type_: Option<CreateAccountType>,
601}
602#[cfg(feature = "redact-generated-debug")]
603impl std::fmt::Debug for CreateAccountBuilder {
604    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
605        f.debug_struct("CreateAccountBuilder").finish_non_exhaustive()
606    }
607}
608impl CreateAccountBuilder {
609    fn new() -> Self {
610        Self {
611            account_token: None,
612            business_profile: None,
613            business_type: None,
614            capabilities: None,
615            company: None,
616            controller: None,
617            country: None,
618            default_currency: None,
619            documents: None,
620            email: None,
621            expand: None,
622            external_account: None,
623            groups: None,
624            individual: None,
625            metadata: None,
626            settings: None,
627            tos_acceptance: None,
628            type_: None,
629        }
630    }
631}
632/// Business information about the account.
633#[derive(Clone, Eq, PartialEq)]
634#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
635#[derive(serde::Serialize)]
636pub struct CreateAccountBusinessProfile {
637    /// The applicant's gross annual revenue for its preceding fiscal year.
638    #[serde(skip_serializing_if = "Option::is_none")]
639    pub annual_revenue: Option<AnnualRevenueSpecs>,
640    /// An estimated upper bound of employees, contractors, vendors, etc.
641    /// currently working for the business.
642    #[serde(skip_serializing_if = "Option::is_none")]
643    pub estimated_worker_count: Option<u64>,
644    /// [The merchant category code for the account](/connect/setting-mcc).
645    /// MCCs are used to classify businesses based on the goods or services they provide.
646    #[serde(skip_serializing_if = "Option::is_none")]
647    pub mcc: Option<String>,
648    /// Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
649    #[serde(skip_serializing_if = "Option::is_none")]
650    pub minority_owned_business_designation:
651        Option<Vec<CreateAccountBusinessProfileMinorityOwnedBusinessDesignation>>,
652    /// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
653    #[serde(skip_serializing_if = "Option::is_none")]
654    pub monthly_estimated_revenue: Option<MonthlyEstimatedRevenueSpecs>,
655    /// The customer-facing business name.
656    #[serde(skip_serializing_if = "Option::is_none")]
657    pub name: Option<String>,
658    /// Internal-only description of the product sold by, or service provided by, the business.
659    /// Used by Stripe for risk and underwriting purposes.
660    #[serde(skip_serializing_if = "Option::is_none")]
661    pub product_description: Option<String>,
662    /// A publicly available mailing address for sending support issues to.
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub support_address: Option<CreateAccountBusinessProfileSupportAddress>,
665    /// A publicly available email address for sending support issues to.
666    #[serde(skip_serializing_if = "Option::is_none")]
667    pub support_email: Option<String>,
668    /// A publicly available phone number to call with support issues.
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub support_phone: Option<String>,
671    /// A publicly available website for handling support issues.
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub support_url: Option<String>,
674    /// The business's publicly available website.
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub url: Option<String>,
677}
678#[cfg(feature = "redact-generated-debug")]
679impl std::fmt::Debug for CreateAccountBusinessProfile {
680    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
681        f.debug_struct("CreateAccountBusinessProfile").finish_non_exhaustive()
682    }
683}
684impl CreateAccountBusinessProfile {
685    pub fn new() -> Self {
686        Self {
687            annual_revenue: None,
688            estimated_worker_count: None,
689            mcc: None,
690            minority_owned_business_designation: None,
691            monthly_estimated_revenue: None,
692            name: None,
693            product_description: None,
694            support_address: None,
695            support_email: None,
696            support_phone: None,
697            support_url: None,
698            url: None,
699        }
700    }
701}
702impl Default for CreateAccountBusinessProfile {
703    fn default() -> Self {
704        Self::new()
705    }
706}
707/// Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
708#[derive(Clone, Eq, PartialEq)]
709#[non_exhaustive]
710pub enum CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
711    LgbtqiOwnedBusiness,
712    MinorityOwnedBusiness,
713    NoneOfTheseApply,
714    PreferNotToAnswer,
715    WomenOwnedBusiness,
716    /// An unrecognized value from Stripe. Should not be used as a request parameter.
717    Unknown(String),
718}
719impl CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
720    pub fn as_str(&self) -> &str {
721        use CreateAccountBusinessProfileMinorityOwnedBusinessDesignation::*;
722        match self {
723            LgbtqiOwnedBusiness => "lgbtqi_owned_business",
724            MinorityOwnedBusiness => "minority_owned_business",
725            NoneOfTheseApply => "none_of_these_apply",
726            PreferNotToAnswer => "prefer_not_to_answer",
727            WomenOwnedBusiness => "women_owned_business",
728            Unknown(v) => v,
729        }
730    }
731}
732
733impl std::str::FromStr for CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
734    type Err = std::convert::Infallible;
735    fn from_str(s: &str) -> Result<Self, Self::Err> {
736        use CreateAccountBusinessProfileMinorityOwnedBusinessDesignation::*;
737        match s {
738            "lgbtqi_owned_business" => Ok(LgbtqiOwnedBusiness),
739            "minority_owned_business" => Ok(MinorityOwnedBusiness),
740            "none_of_these_apply" => Ok(NoneOfTheseApply),
741            "prefer_not_to_answer" => Ok(PreferNotToAnswer),
742            "women_owned_business" => Ok(WomenOwnedBusiness),
743            v => {
744                tracing::warn!(
745                    "Unknown value '{}' for enum '{}'",
746                    v,
747                    "CreateAccountBusinessProfileMinorityOwnedBusinessDesignation"
748                );
749                Ok(Unknown(v.to_owned()))
750            }
751        }
752    }
753}
754impl std::fmt::Display for CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
755    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
756        f.write_str(self.as_str())
757    }
758}
759
760#[cfg(not(feature = "redact-generated-debug"))]
761impl std::fmt::Debug for CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
762    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
763        f.write_str(self.as_str())
764    }
765}
766#[cfg(feature = "redact-generated-debug")]
767impl std::fmt::Debug for CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
768    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
769        f.debug_struct(stringify!(CreateAccountBusinessProfileMinorityOwnedBusinessDesignation))
770            .finish_non_exhaustive()
771    }
772}
773impl serde::Serialize for CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
774    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
775    where
776        S: serde::Serializer,
777    {
778        serializer.serialize_str(self.as_str())
779    }
780}
781#[cfg(feature = "deserialize")]
782impl<'de> serde::Deserialize<'de> for CreateAccountBusinessProfileMinorityOwnedBusinessDesignation {
783    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
784        use std::str::FromStr;
785        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
786        Ok(Self::from_str(&s).expect("infallible"))
787    }
788}
789/// A publicly available mailing address for sending support issues to.
790#[derive(Clone, Eq, PartialEq)]
791#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
792#[derive(serde::Serialize)]
793pub struct CreateAccountBusinessProfileSupportAddress {
794    /// City, district, suburb, town, or village.
795    #[serde(skip_serializing_if = "Option::is_none")]
796    pub city: Option<String>,
797    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
798    #[serde(skip_serializing_if = "Option::is_none")]
799    pub country: Option<String>,
800    /// Address line 1, such as the street, PO Box, or company name.
801    #[serde(skip_serializing_if = "Option::is_none")]
802    pub line1: Option<String>,
803    /// Address line 2, such as the apartment, suite, unit, or building.
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub line2: Option<String>,
806    /// ZIP or postal code.
807    #[serde(skip_serializing_if = "Option::is_none")]
808    pub postal_code: Option<String>,
809    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
810    #[serde(skip_serializing_if = "Option::is_none")]
811    pub state: Option<String>,
812}
813#[cfg(feature = "redact-generated-debug")]
814impl std::fmt::Debug for CreateAccountBusinessProfileSupportAddress {
815    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
816        f.debug_struct("CreateAccountBusinessProfileSupportAddress").finish_non_exhaustive()
817    }
818}
819impl CreateAccountBusinessProfileSupportAddress {
820    pub fn new() -> Self {
821        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
822    }
823}
824impl Default for CreateAccountBusinessProfileSupportAddress {
825    fn default() -> Self {
826        Self::new()
827    }
828}
829/// Information about the company or business.
830/// This field is available for any `business_type`.
831/// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
832#[derive(Clone, Eq, PartialEq)]
833#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
834#[derive(serde::Serialize)]
835pub struct CreateAccountCompany {
836    /// The company's primary address.
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub address: Option<CreateAccountCompanyAddress>,
839    /// The Kana variation of the company's primary address (Japan only).
840    #[serde(skip_serializing_if = "Option::is_none")]
841    pub address_kana: Option<CreateAccountCompanyAddressKana>,
842    /// The Kanji variation of the company's primary address (Japan only).
843    #[serde(skip_serializing_if = "Option::is_none")]
844    pub address_kanji: Option<CreateAccountCompanyAddressKanji>,
845    /// Whether the company's directors have been provided.
846    /// Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement.
847    /// This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
848    #[serde(skip_serializing_if = "Option::is_none")]
849    pub directors_provided: Option<bool>,
850    /// This hash is used to attest that the directors information provided to Stripe is both current and correct.
851    #[serde(skip_serializing_if = "Option::is_none")]
852    pub directorship_declaration: Option<CompanyDirectorshipDeclaration>,
853    /// Whether the company's executives have been provided.
854    /// Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
855    #[serde(skip_serializing_if = "Option::is_none")]
856    pub executives_provided: Option<bool>,
857    /// The export license ID number of the company, also referred as Import Export Code (India only).
858    #[serde(skip_serializing_if = "Option::is_none")]
859    pub export_license_id: Option<String>,
860    /// The purpose code to use for export transactions (India only).
861    #[serde(skip_serializing_if = "Option::is_none")]
862    pub export_purpose_code: Option<String>,
863    /// The company's legal name.
864    #[serde(skip_serializing_if = "Option::is_none")]
865    pub name: Option<String>,
866    /// The Kana variation of the company's legal name (Japan only).
867    #[serde(skip_serializing_if = "Option::is_none")]
868    pub name_kana: Option<String>,
869    /// The Kanji variation of the company's legal name (Japan only).
870    #[serde(skip_serializing_if = "Option::is_none")]
871    pub name_kanji: Option<String>,
872    /// Whether the company's owners have been provided.
873    /// Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
874    #[serde(skip_serializing_if = "Option::is_none")]
875    pub owners_provided: Option<bool>,
876    /// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
877    #[serde(skip_serializing_if = "Option::is_none")]
878    pub ownership_declaration: Option<CompanyOwnershipDeclaration>,
879    /// This value is used to determine if a business is exempt from providing ultimate beneficial owners.
880    /// See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
881    #[serde(skip_serializing_if = "Option::is_none")]
882    pub ownership_exemption_reason: Option<CreateAccountCompanyOwnershipExemptionReason>,
883    /// The company's phone number (used for verification).
884    #[serde(skip_serializing_if = "Option::is_none")]
885    pub phone: Option<String>,
886    /// When the business was incorporated or registered.
887    #[serde(skip_serializing_if = "Option::is_none")]
888    pub registration_date: Option<RegistrationDateSpecs>,
889    /// The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes.
890    /// (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
891    #[serde(skip_serializing_if = "Option::is_none")]
892    pub registration_number: Option<String>,
893    /// This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
894    #[serde(skip_serializing_if = "Option::is_none")]
895    pub representative_declaration: Option<CompanyRepresentativeDeclaration>,
896    /// The category identifying the legal structure of the company or legal entity.
897    /// See [Business structure](/connect/identity-verification#business-structure) for more details.
898    /// Pass an empty string to unset this value.
899    #[serde(skip_serializing_if = "Option::is_none")]
900    pub structure: Option<CreateAccountCompanyStructure>,
901    /// The business ID number of the company, as appropriate for the company’s country.
902    /// (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.).
903    #[serde(skip_serializing_if = "Option::is_none")]
904    pub tax_id: Option<String>,
905    /// The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub tax_id_registrar: Option<String>,
908    /// The VAT number of the company.
909    #[serde(skip_serializing_if = "Option::is_none")]
910    pub vat_id: Option<String>,
911    /// Information on the verification state of the company.
912    #[serde(skip_serializing_if = "Option::is_none")]
913    pub verification: Option<VerificationSpecs>,
914}
915#[cfg(feature = "redact-generated-debug")]
916impl std::fmt::Debug for CreateAccountCompany {
917    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
918        f.debug_struct("CreateAccountCompany").finish_non_exhaustive()
919    }
920}
921impl CreateAccountCompany {
922    pub fn new() -> Self {
923        Self {
924            address: None,
925            address_kana: None,
926            address_kanji: None,
927            directors_provided: None,
928            directorship_declaration: None,
929            executives_provided: None,
930            export_license_id: None,
931            export_purpose_code: None,
932            name: None,
933            name_kana: None,
934            name_kanji: None,
935            owners_provided: None,
936            ownership_declaration: None,
937            ownership_exemption_reason: None,
938            phone: None,
939            registration_date: None,
940            registration_number: None,
941            representative_declaration: None,
942            structure: None,
943            tax_id: None,
944            tax_id_registrar: None,
945            vat_id: None,
946            verification: None,
947        }
948    }
949}
950impl Default for CreateAccountCompany {
951    fn default() -> Self {
952        Self::new()
953    }
954}
955/// The company's primary address.
956#[derive(Clone, Eq, PartialEq)]
957#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
958#[derive(serde::Serialize)]
959pub struct CreateAccountCompanyAddress {
960    /// City, district, suburb, town, or village.
961    #[serde(skip_serializing_if = "Option::is_none")]
962    pub city: Option<String>,
963    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
964    #[serde(skip_serializing_if = "Option::is_none")]
965    pub country: Option<String>,
966    /// Address line 1, such as the street, PO Box, or company name.
967    #[serde(skip_serializing_if = "Option::is_none")]
968    pub line1: Option<String>,
969    /// Address line 2, such as the apartment, suite, unit, or building.
970    #[serde(skip_serializing_if = "Option::is_none")]
971    pub line2: Option<String>,
972    /// ZIP or postal code.
973    #[serde(skip_serializing_if = "Option::is_none")]
974    pub postal_code: Option<String>,
975    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
976    #[serde(skip_serializing_if = "Option::is_none")]
977    pub state: Option<String>,
978}
979#[cfg(feature = "redact-generated-debug")]
980impl std::fmt::Debug for CreateAccountCompanyAddress {
981    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
982        f.debug_struct("CreateAccountCompanyAddress").finish_non_exhaustive()
983    }
984}
985impl CreateAccountCompanyAddress {
986    pub fn new() -> Self {
987        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
988    }
989}
990impl Default for CreateAccountCompanyAddress {
991    fn default() -> Self {
992        Self::new()
993    }
994}
995/// The Kana variation of the company's primary address (Japan only).
996#[derive(Clone, Eq, PartialEq)]
997#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
998#[derive(serde::Serialize)]
999pub struct CreateAccountCompanyAddressKana {
1000    /// City or ward.
1001    #[serde(skip_serializing_if = "Option::is_none")]
1002    pub city: Option<String>,
1003    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    pub country: Option<String>,
1006    /// Block or building number.
1007    #[serde(skip_serializing_if = "Option::is_none")]
1008    pub line1: Option<String>,
1009    /// Building details.
1010    #[serde(skip_serializing_if = "Option::is_none")]
1011    pub line2: Option<String>,
1012    /// Postal code.
1013    #[serde(skip_serializing_if = "Option::is_none")]
1014    pub postal_code: Option<String>,
1015    /// Prefecture.
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub state: Option<String>,
1018    /// Town or cho-me.
1019    #[serde(skip_serializing_if = "Option::is_none")]
1020    pub town: Option<String>,
1021}
1022#[cfg(feature = "redact-generated-debug")]
1023impl std::fmt::Debug for CreateAccountCompanyAddressKana {
1024    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1025        f.debug_struct("CreateAccountCompanyAddressKana").finish_non_exhaustive()
1026    }
1027}
1028impl CreateAccountCompanyAddressKana {
1029    pub fn new() -> Self {
1030        Self {
1031            city: None,
1032            country: None,
1033            line1: None,
1034            line2: None,
1035            postal_code: None,
1036            state: None,
1037            town: None,
1038        }
1039    }
1040}
1041impl Default for CreateAccountCompanyAddressKana {
1042    fn default() -> Self {
1043        Self::new()
1044    }
1045}
1046/// The Kanji variation of the company's primary address (Japan only).
1047#[derive(Clone, Eq, PartialEq)]
1048#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1049#[derive(serde::Serialize)]
1050pub struct CreateAccountCompanyAddressKanji {
1051    /// City or ward.
1052    #[serde(skip_serializing_if = "Option::is_none")]
1053    pub city: Option<String>,
1054    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1055    #[serde(skip_serializing_if = "Option::is_none")]
1056    pub country: Option<String>,
1057    /// Block or building number.
1058    #[serde(skip_serializing_if = "Option::is_none")]
1059    pub line1: Option<String>,
1060    /// Building details.
1061    #[serde(skip_serializing_if = "Option::is_none")]
1062    pub line2: Option<String>,
1063    /// Postal code.
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    pub postal_code: Option<String>,
1066    /// Prefecture.
1067    #[serde(skip_serializing_if = "Option::is_none")]
1068    pub state: Option<String>,
1069    /// Town or cho-me.
1070    #[serde(skip_serializing_if = "Option::is_none")]
1071    pub town: Option<String>,
1072}
1073#[cfg(feature = "redact-generated-debug")]
1074impl std::fmt::Debug for CreateAccountCompanyAddressKanji {
1075    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1076        f.debug_struct("CreateAccountCompanyAddressKanji").finish_non_exhaustive()
1077    }
1078}
1079impl CreateAccountCompanyAddressKanji {
1080    pub fn new() -> Self {
1081        Self {
1082            city: None,
1083            country: None,
1084            line1: None,
1085            line2: None,
1086            postal_code: None,
1087            state: None,
1088            town: None,
1089        }
1090    }
1091}
1092impl Default for CreateAccountCompanyAddressKanji {
1093    fn default() -> Self {
1094        Self::new()
1095    }
1096}
1097/// This value is used to determine if a business is exempt from providing ultimate beneficial owners.
1098/// See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
1099#[derive(Clone, Eq, PartialEq)]
1100#[non_exhaustive]
1101pub enum CreateAccountCompanyOwnershipExemptionReason {
1102    QualifiedEntityExceedsOwnershipThreshold,
1103    QualifiesAsFinancialInstitution,
1104    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1105    Unknown(String),
1106}
1107impl CreateAccountCompanyOwnershipExemptionReason {
1108    pub fn as_str(&self) -> &str {
1109        use CreateAccountCompanyOwnershipExemptionReason::*;
1110        match self {
1111            QualifiedEntityExceedsOwnershipThreshold => {
1112                "qualified_entity_exceeds_ownership_threshold"
1113            }
1114            QualifiesAsFinancialInstitution => "qualifies_as_financial_institution",
1115            Unknown(v) => v,
1116        }
1117    }
1118}
1119
1120impl std::str::FromStr for CreateAccountCompanyOwnershipExemptionReason {
1121    type Err = std::convert::Infallible;
1122    fn from_str(s: &str) -> Result<Self, Self::Err> {
1123        use CreateAccountCompanyOwnershipExemptionReason::*;
1124        match s {
1125            "qualified_entity_exceeds_ownership_threshold" => {
1126                Ok(QualifiedEntityExceedsOwnershipThreshold)
1127            }
1128            "qualifies_as_financial_institution" => Ok(QualifiesAsFinancialInstitution),
1129            v => {
1130                tracing::warn!(
1131                    "Unknown value '{}' for enum '{}'",
1132                    v,
1133                    "CreateAccountCompanyOwnershipExemptionReason"
1134                );
1135                Ok(Unknown(v.to_owned()))
1136            }
1137        }
1138    }
1139}
1140impl std::fmt::Display for CreateAccountCompanyOwnershipExemptionReason {
1141    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1142        f.write_str(self.as_str())
1143    }
1144}
1145
1146#[cfg(not(feature = "redact-generated-debug"))]
1147impl std::fmt::Debug for CreateAccountCompanyOwnershipExemptionReason {
1148    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1149        f.write_str(self.as_str())
1150    }
1151}
1152#[cfg(feature = "redact-generated-debug")]
1153impl std::fmt::Debug for CreateAccountCompanyOwnershipExemptionReason {
1154    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1155        f.debug_struct(stringify!(CreateAccountCompanyOwnershipExemptionReason))
1156            .finish_non_exhaustive()
1157    }
1158}
1159impl serde::Serialize for CreateAccountCompanyOwnershipExemptionReason {
1160    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1161    where
1162        S: serde::Serializer,
1163    {
1164        serializer.serialize_str(self.as_str())
1165    }
1166}
1167#[cfg(feature = "deserialize")]
1168impl<'de> serde::Deserialize<'de> for CreateAccountCompanyOwnershipExemptionReason {
1169    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1170        use std::str::FromStr;
1171        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1172        Ok(Self::from_str(&s).expect("infallible"))
1173    }
1174}
1175/// The category identifying the legal structure of the company or legal entity.
1176/// See [Business structure](/connect/identity-verification#business-structure) for more details.
1177/// Pass an empty string to unset this value.
1178#[derive(Clone, Eq, PartialEq)]
1179#[non_exhaustive]
1180pub enum CreateAccountCompanyStructure {
1181    FreeZoneEstablishment,
1182    FreeZoneLlc,
1183    GovernmentInstrumentality,
1184    GovernmentalUnit,
1185    IncorporatedNonProfit,
1186    IncorporatedPartnership,
1187    LimitedLiabilityPartnership,
1188    Llc,
1189    MultiMemberLlc,
1190    PrivateCompany,
1191    PrivateCorporation,
1192    PrivatePartnership,
1193    PublicCompany,
1194    PublicCorporation,
1195    PublicPartnership,
1196    RegisteredCharity,
1197    SingleMemberLlc,
1198    SoleEstablishment,
1199    SoleProprietorship,
1200    TaxExemptGovernmentInstrumentality,
1201    UnincorporatedAssociation,
1202    UnincorporatedNonProfit,
1203    UnincorporatedPartnership,
1204    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1205    Unknown(String),
1206}
1207impl CreateAccountCompanyStructure {
1208    pub fn as_str(&self) -> &str {
1209        use CreateAccountCompanyStructure::*;
1210        match self {
1211            FreeZoneEstablishment => "free_zone_establishment",
1212            FreeZoneLlc => "free_zone_llc",
1213            GovernmentInstrumentality => "government_instrumentality",
1214            GovernmentalUnit => "governmental_unit",
1215            IncorporatedNonProfit => "incorporated_non_profit",
1216            IncorporatedPartnership => "incorporated_partnership",
1217            LimitedLiabilityPartnership => "limited_liability_partnership",
1218            Llc => "llc",
1219            MultiMemberLlc => "multi_member_llc",
1220            PrivateCompany => "private_company",
1221            PrivateCorporation => "private_corporation",
1222            PrivatePartnership => "private_partnership",
1223            PublicCompany => "public_company",
1224            PublicCorporation => "public_corporation",
1225            PublicPartnership => "public_partnership",
1226            RegisteredCharity => "registered_charity",
1227            SingleMemberLlc => "single_member_llc",
1228            SoleEstablishment => "sole_establishment",
1229            SoleProprietorship => "sole_proprietorship",
1230            TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality",
1231            UnincorporatedAssociation => "unincorporated_association",
1232            UnincorporatedNonProfit => "unincorporated_non_profit",
1233            UnincorporatedPartnership => "unincorporated_partnership",
1234            Unknown(v) => v,
1235        }
1236    }
1237}
1238
1239impl std::str::FromStr for CreateAccountCompanyStructure {
1240    type Err = std::convert::Infallible;
1241    fn from_str(s: &str) -> Result<Self, Self::Err> {
1242        use CreateAccountCompanyStructure::*;
1243        match s {
1244            "free_zone_establishment" => Ok(FreeZoneEstablishment),
1245            "free_zone_llc" => Ok(FreeZoneLlc),
1246            "government_instrumentality" => Ok(GovernmentInstrumentality),
1247            "governmental_unit" => Ok(GovernmentalUnit),
1248            "incorporated_non_profit" => Ok(IncorporatedNonProfit),
1249            "incorporated_partnership" => Ok(IncorporatedPartnership),
1250            "limited_liability_partnership" => Ok(LimitedLiabilityPartnership),
1251            "llc" => Ok(Llc),
1252            "multi_member_llc" => Ok(MultiMemberLlc),
1253            "private_company" => Ok(PrivateCompany),
1254            "private_corporation" => Ok(PrivateCorporation),
1255            "private_partnership" => Ok(PrivatePartnership),
1256            "public_company" => Ok(PublicCompany),
1257            "public_corporation" => Ok(PublicCorporation),
1258            "public_partnership" => Ok(PublicPartnership),
1259            "registered_charity" => Ok(RegisteredCharity),
1260            "single_member_llc" => Ok(SingleMemberLlc),
1261            "sole_establishment" => Ok(SoleEstablishment),
1262            "sole_proprietorship" => Ok(SoleProprietorship),
1263            "tax_exempt_government_instrumentality" => Ok(TaxExemptGovernmentInstrumentality),
1264            "unincorporated_association" => Ok(UnincorporatedAssociation),
1265            "unincorporated_non_profit" => Ok(UnincorporatedNonProfit),
1266            "unincorporated_partnership" => Ok(UnincorporatedPartnership),
1267            v => {
1268                tracing::warn!(
1269                    "Unknown value '{}' for enum '{}'",
1270                    v,
1271                    "CreateAccountCompanyStructure"
1272                );
1273                Ok(Unknown(v.to_owned()))
1274            }
1275        }
1276    }
1277}
1278impl std::fmt::Display for CreateAccountCompanyStructure {
1279    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1280        f.write_str(self.as_str())
1281    }
1282}
1283
1284#[cfg(not(feature = "redact-generated-debug"))]
1285impl std::fmt::Debug for CreateAccountCompanyStructure {
1286    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1287        f.write_str(self.as_str())
1288    }
1289}
1290#[cfg(feature = "redact-generated-debug")]
1291impl std::fmt::Debug for CreateAccountCompanyStructure {
1292    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1293        f.debug_struct(stringify!(CreateAccountCompanyStructure)).finish_non_exhaustive()
1294    }
1295}
1296impl serde::Serialize for CreateAccountCompanyStructure {
1297    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1298    where
1299        S: serde::Serializer,
1300    {
1301        serializer.serialize_str(self.as_str())
1302    }
1303}
1304#[cfg(feature = "deserialize")]
1305impl<'de> serde::Deserialize<'de> for CreateAccountCompanyStructure {
1306    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1307        use std::str::FromStr;
1308        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1309        Ok(Self::from_str(&s).expect("infallible"))
1310    }
1311}
1312/// A hash of configuration describing the account controller's attributes.
1313#[derive(Clone, Eq, PartialEq)]
1314#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1315#[derive(serde::Serialize)]
1316pub struct CreateAccountController {
1317    /// A hash of configuration for who pays Stripe fees for product usage on this account.
1318    #[serde(skip_serializing_if = "Option::is_none")]
1319    pub fees: Option<CreateAccountControllerFees>,
1320    /// A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
1321    #[serde(skip_serializing_if = "Option::is_none")]
1322    pub losses: Option<CreateAccountControllerLosses>,
1323    /// A value indicating responsibility for collecting updated information when requirements on the account are due or change.
1324    /// Defaults to `stripe`.
1325    #[serde(skip_serializing_if = "Option::is_none")]
1326    pub requirement_collection: Option<CreateAccountControllerRequirementCollection>,
1327    /// A hash of configuration for Stripe-hosted dashboards.
1328    #[serde(skip_serializing_if = "Option::is_none")]
1329    pub stripe_dashboard: Option<CreateAccountControllerStripeDashboard>,
1330}
1331#[cfg(feature = "redact-generated-debug")]
1332impl std::fmt::Debug for CreateAccountController {
1333    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1334        f.debug_struct("CreateAccountController").finish_non_exhaustive()
1335    }
1336}
1337impl CreateAccountController {
1338    pub fn new() -> Self {
1339        Self { fees: None, losses: None, requirement_collection: None, stripe_dashboard: None }
1340    }
1341}
1342impl Default for CreateAccountController {
1343    fn default() -> Self {
1344        Self::new()
1345    }
1346}
1347/// A hash of configuration for who pays Stripe fees for product usage on this account.
1348#[derive(Clone, Eq, PartialEq)]
1349#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1350#[derive(serde::Serialize)]
1351pub struct CreateAccountControllerFees {
1352    /// A value indicating the responsible payer of Stripe fees on this account.
1353    /// Defaults to `account`.
1354    /// Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
1355    #[serde(skip_serializing_if = "Option::is_none")]
1356    pub payer: Option<CreateAccountControllerFeesPayer>,
1357}
1358#[cfg(feature = "redact-generated-debug")]
1359impl std::fmt::Debug for CreateAccountControllerFees {
1360    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1361        f.debug_struct("CreateAccountControllerFees").finish_non_exhaustive()
1362    }
1363}
1364impl CreateAccountControllerFees {
1365    pub fn new() -> Self {
1366        Self { payer: None }
1367    }
1368}
1369impl Default for CreateAccountControllerFees {
1370    fn default() -> Self {
1371        Self::new()
1372    }
1373}
1374/// A value indicating the responsible payer of Stripe fees on this account.
1375/// Defaults to `account`.
1376/// Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
1377#[derive(Clone, Eq, PartialEq)]
1378#[non_exhaustive]
1379pub enum CreateAccountControllerFeesPayer {
1380    Account,
1381    Application,
1382    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1383    Unknown(String),
1384}
1385impl CreateAccountControllerFeesPayer {
1386    pub fn as_str(&self) -> &str {
1387        use CreateAccountControllerFeesPayer::*;
1388        match self {
1389            Account => "account",
1390            Application => "application",
1391            Unknown(v) => v,
1392        }
1393    }
1394}
1395
1396impl std::str::FromStr for CreateAccountControllerFeesPayer {
1397    type Err = std::convert::Infallible;
1398    fn from_str(s: &str) -> Result<Self, Self::Err> {
1399        use CreateAccountControllerFeesPayer::*;
1400        match s {
1401            "account" => Ok(Account),
1402            "application" => Ok(Application),
1403            v => {
1404                tracing::warn!(
1405                    "Unknown value '{}' for enum '{}'",
1406                    v,
1407                    "CreateAccountControllerFeesPayer"
1408                );
1409                Ok(Unknown(v.to_owned()))
1410            }
1411        }
1412    }
1413}
1414impl std::fmt::Display for CreateAccountControllerFeesPayer {
1415    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1416        f.write_str(self.as_str())
1417    }
1418}
1419
1420#[cfg(not(feature = "redact-generated-debug"))]
1421impl std::fmt::Debug for CreateAccountControllerFeesPayer {
1422    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1423        f.write_str(self.as_str())
1424    }
1425}
1426#[cfg(feature = "redact-generated-debug")]
1427impl std::fmt::Debug for CreateAccountControllerFeesPayer {
1428    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1429        f.debug_struct(stringify!(CreateAccountControllerFeesPayer)).finish_non_exhaustive()
1430    }
1431}
1432impl serde::Serialize for CreateAccountControllerFeesPayer {
1433    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1434    where
1435        S: serde::Serializer,
1436    {
1437        serializer.serialize_str(self.as_str())
1438    }
1439}
1440#[cfg(feature = "deserialize")]
1441impl<'de> serde::Deserialize<'de> for CreateAccountControllerFeesPayer {
1442    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1443        use std::str::FromStr;
1444        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1445        Ok(Self::from_str(&s).expect("infallible"))
1446    }
1447}
1448/// A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
1449#[derive(Clone, Eq, PartialEq)]
1450#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1451#[derive(serde::Serialize)]
1452pub struct CreateAccountControllerLosses {
1453    /// A value indicating who is liable when this account can't pay back negative balances resulting from payments.
1454    /// Defaults to `stripe`.
1455    #[serde(skip_serializing_if = "Option::is_none")]
1456    pub payments: Option<CreateAccountControllerLossesPayments>,
1457}
1458#[cfg(feature = "redact-generated-debug")]
1459impl std::fmt::Debug for CreateAccountControllerLosses {
1460    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1461        f.debug_struct("CreateAccountControllerLosses").finish_non_exhaustive()
1462    }
1463}
1464impl CreateAccountControllerLosses {
1465    pub fn new() -> Self {
1466        Self { payments: None }
1467    }
1468}
1469impl Default for CreateAccountControllerLosses {
1470    fn default() -> Self {
1471        Self::new()
1472    }
1473}
1474/// A value indicating who is liable when this account can't pay back negative balances resulting from payments.
1475/// Defaults to `stripe`.
1476#[derive(Clone, Eq, PartialEq)]
1477#[non_exhaustive]
1478pub enum CreateAccountControllerLossesPayments {
1479    Application,
1480    Stripe,
1481    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1482    Unknown(String),
1483}
1484impl CreateAccountControllerLossesPayments {
1485    pub fn as_str(&self) -> &str {
1486        use CreateAccountControllerLossesPayments::*;
1487        match self {
1488            Application => "application",
1489            Stripe => "stripe",
1490            Unknown(v) => v,
1491        }
1492    }
1493}
1494
1495impl std::str::FromStr for CreateAccountControllerLossesPayments {
1496    type Err = std::convert::Infallible;
1497    fn from_str(s: &str) -> Result<Self, Self::Err> {
1498        use CreateAccountControllerLossesPayments::*;
1499        match s {
1500            "application" => Ok(Application),
1501            "stripe" => Ok(Stripe),
1502            v => {
1503                tracing::warn!(
1504                    "Unknown value '{}' for enum '{}'",
1505                    v,
1506                    "CreateAccountControllerLossesPayments"
1507                );
1508                Ok(Unknown(v.to_owned()))
1509            }
1510        }
1511    }
1512}
1513impl std::fmt::Display for CreateAccountControllerLossesPayments {
1514    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1515        f.write_str(self.as_str())
1516    }
1517}
1518
1519#[cfg(not(feature = "redact-generated-debug"))]
1520impl std::fmt::Debug for CreateAccountControllerLossesPayments {
1521    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1522        f.write_str(self.as_str())
1523    }
1524}
1525#[cfg(feature = "redact-generated-debug")]
1526impl std::fmt::Debug for CreateAccountControllerLossesPayments {
1527    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1528        f.debug_struct(stringify!(CreateAccountControllerLossesPayments)).finish_non_exhaustive()
1529    }
1530}
1531impl serde::Serialize for CreateAccountControllerLossesPayments {
1532    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1533    where
1534        S: serde::Serializer,
1535    {
1536        serializer.serialize_str(self.as_str())
1537    }
1538}
1539#[cfg(feature = "deserialize")]
1540impl<'de> serde::Deserialize<'de> for CreateAccountControllerLossesPayments {
1541    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1542        use std::str::FromStr;
1543        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1544        Ok(Self::from_str(&s).expect("infallible"))
1545    }
1546}
1547/// A value indicating responsibility for collecting updated information when requirements on the account are due or change.
1548/// Defaults to `stripe`.
1549#[derive(Clone, Eq, PartialEq)]
1550#[non_exhaustive]
1551pub enum CreateAccountControllerRequirementCollection {
1552    Application,
1553    Stripe,
1554    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1555    Unknown(String),
1556}
1557impl CreateAccountControllerRequirementCollection {
1558    pub fn as_str(&self) -> &str {
1559        use CreateAccountControllerRequirementCollection::*;
1560        match self {
1561            Application => "application",
1562            Stripe => "stripe",
1563            Unknown(v) => v,
1564        }
1565    }
1566}
1567
1568impl std::str::FromStr for CreateAccountControllerRequirementCollection {
1569    type Err = std::convert::Infallible;
1570    fn from_str(s: &str) -> Result<Self, Self::Err> {
1571        use CreateAccountControllerRequirementCollection::*;
1572        match s {
1573            "application" => Ok(Application),
1574            "stripe" => Ok(Stripe),
1575            v => {
1576                tracing::warn!(
1577                    "Unknown value '{}' for enum '{}'",
1578                    v,
1579                    "CreateAccountControllerRequirementCollection"
1580                );
1581                Ok(Unknown(v.to_owned()))
1582            }
1583        }
1584    }
1585}
1586impl std::fmt::Display for CreateAccountControllerRequirementCollection {
1587    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1588        f.write_str(self.as_str())
1589    }
1590}
1591
1592#[cfg(not(feature = "redact-generated-debug"))]
1593impl std::fmt::Debug for CreateAccountControllerRequirementCollection {
1594    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1595        f.write_str(self.as_str())
1596    }
1597}
1598#[cfg(feature = "redact-generated-debug")]
1599impl std::fmt::Debug for CreateAccountControllerRequirementCollection {
1600    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1601        f.debug_struct(stringify!(CreateAccountControllerRequirementCollection))
1602            .finish_non_exhaustive()
1603    }
1604}
1605impl serde::Serialize for CreateAccountControllerRequirementCollection {
1606    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1607    where
1608        S: serde::Serializer,
1609    {
1610        serializer.serialize_str(self.as_str())
1611    }
1612}
1613#[cfg(feature = "deserialize")]
1614impl<'de> serde::Deserialize<'de> for CreateAccountControllerRequirementCollection {
1615    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1616        use std::str::FromStr;
1617        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1618        Ok(Self::from_str(&s).expect("infallible"))
1619    }
1620}
1621/// A hash of configuration for Stripe-hosted dashboards.
1622#[derive(Clone, Eq, PartialEq)]
1623#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1624#[derive(serde::Serialize)]
1625pub struct CreateAccountControllerStripeDashboard {
1626    /// Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`).
1627    /// Defaults to `full`.
1628    #[serde(rename = "type")]
1629    #[serde(skip_serializing_if = "Option::is_none")]
1630    pub type_: Option<CreateAccountControllerStripeDashboardType>,
1631}
1632#[cfg(feature = "redact-generated-debug")]
1633impl std::fmt::Debug for CreateAccountControllerStripeDashboard {
1634    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1635        f.debug_struct("CreateAccountControllerStripeDashboard").finish_non_exhaustive()
1636    }
1637}
1638impl CreateAccountControllerStripeDashboard {
1639    pub fn new() -> Self {
1640        Self { type_: None }
1641    }
1642}
1643impl Default for CreateAccountControllerStripeDashboard {
1644    fn default() -> Self {
1645        Self::new()
1646    }
1647}
1648/// Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`).
1649/// Defaults to `full`.
1650#[derive(Clone, Eq, PartialEq)]
1651#[non_exhaustive]
1652pub enum CreateAccountControllerStripeDashboardType {
1653    Express,
1654    Full,
1655    None,
1656    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1657    Unknown(String),
1658}
1659impl CreateAccountControllerStripeDashboardType {
1660    pub fn as_str(&self) -> &str {
1661        use CreateAccountControllerStripeDashboardType::*;
1662        match self {
1663            Express => "express",
1664            Full => "full",
1665            None => "none",
1666            Unknown(v) => v,
1667        }
1668    }
1669}
1670
1671impl std::str::FromStr for CreateAccountControllerStripeDashboardType {
1672    type Err = std::convert::Infallible;
1673    fn from_str(s: &str) -> Result<Self, Self::Err> {
1674        use CreateAccountControllerStripeDashboardType::*;
1675        match s {
1676            "express" => Ok(Express),
1677            "full" => Ok(Full),
1678            "none" => Ok(None),
1679            v => {
1680                tracing::warn!(
1681                    "Unknown value '{}' for enum '{}'",
1682                    v,
1683                    "CreateAccountControllerStripeDashboardType"
1684                );
1685                Ok(Unknown(v.to_owned()))
1686            }
1687        }
1688    }
1689}
1690impl std::fmt::Display for CreateAccountControllerStripeDashboardType {
1691    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1692        f.write_str(self.as_str())
1693    }
1694}
1695
1696#[cfg(not(feature = "redact-generated-debug"))]
1697impl std::fmt::Debug for CreateAccountControllerStripeDashboardType {
1698    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1699        f.write_str(self.as_str())
1700    }
1701}
1702#[cfg(feature = "redact-generated-debug")]
1703impl std::fmt::Debug for CreateAccountControllerStripeDashboardType {
1704    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1705        f.debug_struct(stringify!(CreateAccountControllerStripeDashboardType))
1706            .finish_non_exhaustive()
1707    }
1708}
1709impl serde::Serialize for CreateAccountControllerStripeDashboardType {
1710    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1711    where
1712        S: serde::Serializer,
1713    {
1714        serializer.serialize_str(self.as_str())
1715    }
1716}
1717#[cfg(feature = "deserialize")]
1718impl<'de> serde::Deserialize<'de> for CreateAccountControllerStripeDashboardType {
1719    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1720        use std::str::FromStr;
1721        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1722        Ok(Self::from_str(&s).expect("infallible"))
1723    }
1724}
1725/// Information about the person represented by the account.
1726/// This field is null unless `business_type` is set to `individual`.
1727/// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
1728#[derive(Clone)]
1729#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1730#[derive(serde::Serialize)]
1731pub struct CreateAccountIndividual {
1732    /// The individual's primary address.
1733    #[serde(skip_serializing_if = "Option::is_none")]
1734    pub address: Option<CreateAccountIndividualAddress>,
1735    /// The Kana variation of the individual's primary address (Japan only).
1736    #[serde(skip_serializing_if = "Option::is_none")]
1737    pub address_kana: Option<CreateAccountIndividualAddressKana>,
1738    /// The Kanji variation of the individual's primary address (Japan only).
1739    #[serde(skip_serializing_if = "Option::is_none")]
1740    pub address_kanji: Option<CreateAccountIndividualAddressKanji>,
1741    /// The individual's date of birth.
1742    #[serde(skip_serializing_if = "Option::is_none")]
1743    pub dob: Option<DateOfBirthSpecs>,
1744    /// The individual's email address.
1745    #[serde(skip_serializing_if = "Option::is_none")]
1746    pub email: Option<String>,
1747    /// The individual's first name.
1748    #[serde(skip_serializing_if = "Option::is_none")]
1749    pub first_name: Option<String>,
1750    /// The Kana variation of the individual's first name (Japan only).
1751    #[serde(skip_serializing_if = "Option::is_none")]
1752    pub first_name_kana: Option<String>,
1753    /// The Kanji variation of the individual's first name (Japan only).
1754    #[serde(skip_serializing_if = "Option::is_none")]
1755    pub first_name_kanji: Option<String>,
1756    /// A list of alternate names or aliases that the individual is known by.
1757    #[serde(skip_serializing_if = "Option::is_none")]
1758    pub full_name_aliases: Option<Vec<String>>,
1759    /// The individual's gender
1760    #[serde(skip_serializing_if = "Option::is_none")]
1761    pub gender: Option<String>,
1762    /// The government-issued ID number of the individual, as appropriate for the representative's country.
1763    /// (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada).
1764    /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
1765    #[serde(skip_serializing_if = "Option::is_none")]
1766    pub id_number: Option<String>,
1767    /// The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks.
1768    /// In Thailand, this would be the laser code found on the back of an ID card.
1769    /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
1770    #[serde(skip_serializing_if = "Option::is_none")]
1771    pub id_number_secondary: Option<String>,
1772    /// The individual's last name.
1773    #[serde(skip_serializing_if = "Option::is_none")]
1774    pub last_name: Option<String>,
1775    /// The Kana variation of the individual's last name (Japan only).
1776    #[serde(skip_serializing_if = "Option::is_none")]
1777    pub last_name_kana: Option<String>,
1778    /// The Kanji variation of the individual's last name (Japan only).
1779    #[serde(skip_serializing_if = "Option::is_none")]
1780    pub last_name_kanji: Option<String>,
1781    /// The individual's maiden name.
1782    #[serde(skip_serializing_if = "Option::is_none")]
1783    pub maiden_name: Option<String>,
1784    /// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
1785    /// This can be useful for storing additional information about the object in a structured format.
1786    /// Individual keys can be unset by posting an empty value to them.
1787    /// All keys can be unset by posting an empty value to `metadata`.
1788    #[serde(skip_serializing_if = "Option::is_none")]
1789    pub metadata: Option<std::collections::HashMap<String, String>>,
1790    /// The individual's phone number.
1791    #[serde(skip_serializing_if = "Option::is_none")]
1792    pub phone: Option<String>,
1793    /// Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
1794    #[serde(skip_serializing_if = "Option::is_none")]
1795    pub political_exposure: Option<CreateAccountIndividualPoliticalExposure>,
1796    /// The individual's registered address.
1797    #[serde(skip_serializing_if = "Option::is_none")]
1798    pub registered_address: Option<CreateAccountIndividualRegisteredAddress>,
1799    /// Describes the person’s relationship to the account.
1800    #[serde(skip_serializing_if = "Option::is_none")]
1801    pub relationship: Option<IndividualRelationshipSpecs>,
1802    /// The last four digits of the individual's Social Security Number (U.S. only).
1803    #[serde(skip_serializing_if = "Option::is_none")]
1804    pub ssn_last_4: Option<String>,
1805    /// The individual's verification document information.
1806    #[serde(skip_serializing_if = "Option::is_none")]
1807    pub verification: Option<PersonVerificationSpecs>,
1808}
1809#[cfg(feature = "redact-generated-debug")]
1810impl std::fmt::Debug for CreateAccountIndividual {
1811    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1812        f.debug_struct("CreateAccountIndividual").finish_non_exhaustive()
1813    }
1814}
1815impl CreateAccountIndividual {
1816    pub fn new() -> Self {
1817        Self {
1818            address: None,
1819            address_kana: None,
1820            address_kanji: None,
1821            dob: None,
1822            email: None,
1823            first_name: None,
1824            first_name_kana: None,
1825            first_name_kanji: None,
1826            full_name_aliases: None,
1827            gender: None,
1828            id_number: None,
1829            id_number_secondary: None,
1830            last_name: None,
1831            last_name_kana: None,
1832            last_name_kanji: None,
1833            maiden_name: None,
1834            metadata: None,
1835            phone: None,
1836            political_exposure: None,
1837            registered_address: None,
1838            relationship: None,
1839            ssn_last_4: None,
1840            verification: None,
1841        }
1842    }
1843}
1844impl Default for CreateAccountIndividual {
1845    fn default() -> Self {
1846        Self::new()
1847    }
1848}
1849/// The individual's primary address.
1850#[derive(Clone, Eq, PartialEq)]
1851#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1852#[derive(serde::Serialize)]
1853pub struct CreateAccountIndividualAddress {
1854    /// City, district, suburb, town, or village.
1855    #[serde(skip_serializing_if = "Option::is_none")]
1856    pub city: Option<String>,
1857    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1858    #[serde(skip_serializing_if = "Option::is_none")]
1859    pub country: Option<String>,
1860    /// Address line 1, such as the street, PO Box, or company name.
1861    #[serde(skip_serializing_if = "Option::is_none")]
1862    pub line1: Option<String>,
1863    /// Address line 2, such as the apartment, suite, unit, or building.
1864    #[serde(skip_serializing_if = "Option::is_none")]
1865    pub line2: Option<String>,
1866    /// ZIP or postal code.
1867    #[serde(skip_serializing_if = "Option::is_none")]
1868    pub postal_code: Option<String>,
1869    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
1870    #[serde(skip_serializing_if = "Option::is_none")]
1871    pub state: Option<String>,
1872}
1873#[cfg(feature = "redact-generated-debug")]
1874impl std::fmt::Debug for CreateAccountIndividualAddress {
1875    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1876        f.debug_struct("CreateAccountIndividualAddress").finish_non_exhaustive()
1877    }
1878}
1879impl CreateAccountIndividualAddress {
1880    pub fn new() -> Self {
1881        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
1882    }
1883}
1884impl Default for CreateAccountIndividualAddress {
1885    fn default() -> Self {
1886        Self::new()
1887    }
1888}
1889/// The Kana variation of the individual's primary address (Japan only).
1890#[derive(Clone, Eq, PartialEq)]
1891#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1892#[derive(serde::Serialize)]
1893pub struct CreateAccountIndividualAddressKana {
1894    /// City or ward.
1895    #[serde(skip_serializing_if = "Option::is_none")]
1896    pub city: Option<String>,
1897    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1898    #[serde(skip_serializing_if = "Option::is_none")]
1899    pub country: Option<String>,
1900    /// Block or building number.
1901    #[serde(skip_serializing_if = "Option::is_none")]
1902    pub line1: Option<String>,
1903    /// Building details.
1904    #[serde(skip_serializing_if = "Option::is_none")]
1905    pub line2: Option<String>,
1906    /// Postal code.
1907    #[serde(skip_serializing_if = "Option::is_none")]
1908    pub postal_code: Option<String>,
1909    /// Prefecture.
1910    #[serde(skip_serializing_if = "Option::is_none")]
1911    pub state: Option<String>,
1912    /// Town or cho-me.
1913    #[serde(skip_serializing_if = "Option::is_none")]
1914    pub town: Option<String>,
1915}
1916#[cfg(feature = "redact-generated-debug")]
1917impl std::fmt::Debug for CreateAccountIndividualAddressKana {
1918    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1919        f.debug_struct("CreateAccountIndividualAddressKana").finish_non_exhaustive()
1920    }
1921}
1922impl CreateAccountIndividualAddressKana {
1923    pub fn new() -> Self {
1924        Self {
1925            city: None,
1926            country: None,
1927            line1: None,
1928            line2: None,
1929            postal_code: None,
1930            state: None,
1931            town: None,
1932        }
1933    }
1934}
1935impl Default for CreateAccountIndividualAddressKana {
1936    fn default() -> Self {
1937        Self::new()
1938    }
1939}
1940/// The Kanji variation of the individual's primary address (Japan only).
1941#[derive(Clone, Eq, PartialEq)]
1942#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
1943#[derive(serde::Serialize)]
1944pub struct CreateAccountIndividualAddressKanji {
1945    /// City or ward.
1946    #[serde(skip_serializing_if = "Option::is_none")]
1947    pub city: Option<String>,
1948    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1949    #[serde(skip_serializing_if = "Option::is_none")]
1950    pub country: Option<String>,
1951    /// Block or building number.
1952    #[serde(skip_serializing_if = "Option::is_none")]
1953    pub line1: Option<String>,
1954    /// Building details.
1955    #[serde(skip_serializing_if = "Option::is_none")]
1956    pub line2: Option<String>,
1957    /// Postal code.
1958    #[serde(skip_serializing_if = "Option::is_none")]
1959    pub postal_code: Option<String>,
1960    /// Prefecture.
1961    #[serde(skip_serializing_if = "Option::is_none")]
1962    pub state: Option<String>,
1963    /// Town or cho-me.
1964    #[serde(skip_serializing_if = "Option::is_none")]
1965    pub town: Option<String>,
1966}
1967#[cfg(feature = "redact-generated-debug")]
1968impl std::fmt::Debug for CreateAccountIndividualAddressKanji {
1969    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1970        f.debug_struct("CreateAccountIndividualAddressKanji").finish_non_exhaustive()
1971    }
1972}
1973impl CreateAccountIndividualAddressKanji {
1974    pub fn new() -> Self {
1975        Self {
1976            city: None,
1977            country: None,
1978            line1: None,
1979            line2: None,
1980            postal_code: None,
1981            state: None,
1982            town: None,
1983        }
1984    }
1985}
1986impl Default for CreateAccountIndividualAddressKanji {
1987    fn default() -> Self {
1988        Self::new()
1989    }
1990}
1991/// Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
1992#[derive(Clone, Eq, PartialEq)]
1993#[non_exhaustive]
1994pub enum CreateAccountIndividualPoliticalExposure {
1995    Existing,
1996    None,
1997    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1998    Unknown(String),
1999}
2000impl CreateAccountIndividualPoliticalExposure {
2001    pub fn as_str(&self) -> &str {
2002        use CreateAccountIndividualPoliticalExposure::*;
2003        match self {
2004            Existing => "existing",
2005            None => "none",
2006            Unknown(v) => v,
2007        }
2008    }
2009}
2010
2011impl std::str::FromStr for CreateAccountIndividualPoliticalExposure {
2012    type Err = std::convert::Infallible;
2013    fn from_str(s: &str) -> Result<Self, Self::Err> {
2014        use CreateAccountIndividualPoliticalExposure::*;
2015        match s {
2016            "existing" => Ok(Existing),
2017            "none" => Ok(None),
2018            v => {
2019                tracing::warn!(
2020                    "Unknown value '{}' for enum '{}'",
2021                    v,
2022                    "CreateAccountIndividualPoliticalExposure"
2023                );
2024                Ok(Unknown(v.to_owned()))
2025            }
2026        }
2027    }
2028}
2029impl std::fmt::Display for CreateAccountIndividualPoliticalExposure {
2030    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2031        f.write_str(self.as_str())
2032    }
2033}
2034
2035#[cfg(not(feature = "redact-generated-debug"))]
2036impl std::fmt::Debug for CreateAccountIndividualPoliticalExposure {
2037    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2038        f.write_str(self.as_str())
2039    }
2040}
2041#[cfg(feature = "redact-generated-debug")]
2042impl std::fmt::Debug for CreateAccountIndividualPoliticalExposure {
2043    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2044        f.debug_struct(stringify!(CreateAccountIndividualPoliticalExposure)).finish_non_exhaustive()
2045    }
2046}
2047impl serde::Serialize for CreateAccountIndividualPoliticalExposure {
2048    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2049    where
2050        S: serde::Serializer,
2051    {
2052        serializer.serialize_str(self.as_str())
2053    }
2054}
2055#[cfg(feature = "deserialize")]
2056impl<'de> serde::Deserialize<'de> for CreateAccountIndividualPoliticalExposure {
2057    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2058        use std::str::FromStr;
2059        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2060        Ok(Self::from_str(&s).expect("infallible"))
2061    }
2062}
2063/// The individual's registered address.
2064#[derive(Clone, Eq, PartialEq)]
2065#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2066#[derive(serde::Serialize)]
2067pub struct CreateAccountIndividualRegisteredAddress {
2068    /// City, district, suburb, town, or village.
2069    #[serde(skip_serializing_if = "Option::is_none")]
2070    pub city: Option<String>,
2071    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2072    #[serde(skip_serializing_if = "Option::is_none")]
2073    pub country: Option<String>,
2074    /// Address line 1, such as the street, PO Box, or company name.
2075    #[serde(skip_serializing_if = "Option::is_none")]
2076    pub line1: Option<String>,
2077    /// Address line 2, such as the apartment, suite, unit, or building.
2078    #[serde(skip_serializing_if = "Option::is_none")]
2079    pub line2: Option<String>,
2080    /// ZIP or postal code.
2081    #[serde(skip_serializing_if = "Option::is_none")]
2082    pub postal_code: Option<String>,
2083    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
2084    #[serde(skip_serializing_if = "Option::is_none")]
2085    pub state: Option<String>,
2086}
2087#[cfg(feature = "redact-generated-debug")]
2088impl std::fmt::Debug for CreateAccountIndividualRegisteredAddress {
2089    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2090        f.debug_struct("CreateAccountIndividualRegisteredAddress").finish_non_exhaustive()
2091    }
2092}
2093impl CreateAccountIndividualRegisteredAddress {
2094    pub fn new() -> Self {
2095        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
2096    }
2097}
2098impl Default for CreateAccountIndividualRegisteredAddress {
2099    fn default() -> Self {
2100        Self::new()
2101    }
2102}
2103/// Options for customizing how the account functions within Stripe.
2104#[derive(Clone, Eq, PartialEq)]
2105#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2106#[derive(serde::Serialize)]
2107pub struct CreateAccountSettings {
2108    /// Settings specific to Bacs Direct Debit.
2109    #[serde(skip_serializing_if = "Option::is_none")]
2110    pub bacs_debit_payments: Option<BacsDebitPaymentsSpecs>,
2111    /// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
2112    #[serde(skip_serializing_if = "Option::is_none")]
2113    pub branding: Option<BrandingSettingsSpecs>,
2114    /// Settings specific to the account's use of the Card Issuing product.
2115    #[serde(skip_serializing_if = "Option::is_none")]
2116    pub card_issuing: Option<CardIssuingSettingsSpecs>,
2117    /// Settings specific to card charging on the account.
2118    #[serde(skip_serializing_if = "Option::is_none")]
2119    pub card_payments: Option<CardPaymentsSettingsSpecs>,
2120    /// Settings specific to the account’s use of Invoices.
2121    #[serde(skip_serializing_if = "Option::is_none")]
2122    pub invoices: Option<CreateAccountSettingsInvoices>,
2123    /// Settings that apply across payment methods for charging on the account.
2124    #[serde(skip_serializing_if = "Option::is_none")]
2125    pub payments: Option<PaymentsSettingsSpecs>,
2126    /// Settings specific to the account's payouts.
2127    #[serde(skip_serializing_if = "Option::is_none")]
2128    pub payouts: Option<CreateAccountSettingsPayouts>,
2129    /// Settings specific to the account's Treasury FinancialAccounts.
2130    #[serde(skip_serializing_if = "Option::is_none")]
2131    pub treasury: Option<TreasurySettingsSpecs>,
2132}
2133#[cfg(feature = "redact-generated-debug")]
2134impl std::fmt::Debug for CreateAccountSettings {
2135    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2136        f.debug_struct("CreateAccountSettings").finish_non_exhaustive()
2137    }
2138}
2139impl CreateAccountSettings {
2140    pub fn new() -> Self {
2141        Self {
2142            bacs_debit_payments: None,
2143            branding: None,
2144            card_issuing: None,
2145            card_payments: None,
2146            invoices: None,
2147            payments: None,
2148            payouts: None,
2149            treasury: None,
2150        }
2151    }
2152}
2153impl Default for CreateAccountSettings {
2154    fn default() -> Self {
2155        Self::new()
2156    }
2157}
2158/// Settings specific to the account’s use of Invoices.
2159#[derive(Clone, Eq, PartialEq)]
2160#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2161#[derive(serde::Serialize)]
2162pub struct CreateAccountSettingsInvoices {
2163    /// Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.
2164    #[serde(skip_serializing_if = "Option::is_none")]
2165    pub hosted_payment_method_save: Option<CreateAccountSettingsInvoicesHostedPaymentMethodSave>,
2166}
2167#[cfg(feature = "redact-generated-debug")]
2168impl std::fmt::Debug for CreateAccountSettingsInvoices {
2169    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2170        f.debug_struct("CreateAccountSettingsInvoices").finish_non_exhaustive()
2171    }
2172}
2173impl CreateAccountSettingsInvoices {
2174    pub fn new() -> Self {
2175        Self { hosted_payment_method_save: None }
2176    }
2177}
2178impl Default for CreateAccountSettingsInvoices {
2179    fn default() -> Self {
2180        Self::new()
2181    }
2182}
2183/// Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.
2184#[derive(Clone, Eq, PartialEq)]
2185#[non_exhaustive]
2186pub enum CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2187    Always,
2188    Never,
2189    Offer,
2190    /// An unrecognized value from Stripe. Should not be used as a request parameter.
2191    Unknown(String),
2192}
2193impl CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2194    pub fn as_str(&self) -> &str {
2195        use CreateAccountSettingsInvoicesHostedPaymentMethodSave::*;
2196        match self {
2197            Always => "always",
2198            Never => "never",
2199            Offer => "offer",
2200            Unknown(v) => v,
2201        }
2202    }
2203}
2204
2205impl std::str::FromStr for CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2206    type Err = std::convert::Infallible;
2207    fn from_str(s: &str) -> Result<Self, Self::Err> {
2208        use CreateAccountSettingsInvoicesHostedPaymentMethodSave::*;
2209        match s {
2210            "always" => Ok(Always),
2211            "never" => Ok(Never),
2212            "offer" => Ok(Offer),
2213            v => {
2214                tracing::warn!(
2215                    "Unknown value '{}' for enum '{}'",
2216                    v,
2217                    "CreateAccountSettingsInvoicesHostedPaymentMethodSave"
2218                );
2219                Ok(Unknown(v.to_owned()))
2220            }
2221        }
2222    }
2223}
2224impl std::fmt::Display for CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2225    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2226        f.write_str(self.as_str())
2227    }
2228}
2229
2230#[cfg(not(feature = "redact-generated-debug"))]
2231impl std::fmt::Debug for CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2232    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2233        f.write_str(self.as_str())
2234    }
2235}
2236#[cfg(feature = "redact-generated-debug")]
2237impl std::fmt::Debug for CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2238    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2239        f.debug_struct(stringify!(CreateAccountSettingsInvoicesHostedPaymentMethodSave))
2240            .finish_non_exhaustive()
2241    }
2242}
2243impl serde::Serialize for CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2244    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2245    where
2246        S: serde::Serializer,
2247    {
2248        serializer.serialize_str(self.as_str())
2249    }
2250}
2251#[cfg(feature = "deserialize")]
2252impl<'de> serde::Deserialize<'de> for CreateAccountSettingsInvoicesHostedPaymentMethodSave {
2253    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2254        use std::str::FromStr;
2255        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2256        Ok(Self::from_str(&s).expect("infallible"))
2257    }
2258}
2259/// Settings specific to the account's payouts.
2260#[derive(Clone, Eq, PartialEq)]
2261#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2262#[derive(serde::Serialize)]
2263pub struct CreateAccountSettingsPayouts {
2264    /// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account.
2265    /// For details, see [Understanding Connect Account Balances](/connect/account-balances).
2266    #[serde(skip_serializing_if = "Option::is_none")]
2267    pub debit_negative_balances: Option<bool>,
2268    /// Details on when funds from charges are available, and when they are paid out to an external account.
2269    /// For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
2270    #[serde(skip_serializing_if = "Option::is_none")]
2271    pub schedule: Option<CreateAccountSettingsPayoutsSchedule>,
2272    /// The text that appears on the bank account statement for payouts.
2273    /// If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
2274    #[serde(skip_serializing_if = "Option::is_none")]
2275    pub statement_descriptor: Option<String>,
2276}
2277#[cfg(feature = "redact-generated-debug")]
2278impl std::fmt::Debug for CreateAccountSettingsPayouts {
2279    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2280        f.debug_struct("CreateAccountSettingsPayouts").finish_non_exhaustive()
2281    }
2282}
2283impl CreateAccountSettingsPayouts {
2284    pub fn new() -> Self {
2285        Self { debit_negative_balances: None, schedule: None, statement_descriptor: None }
2286    }
2287}
2288impl Default for CreateAccountSettingsPayouts {
2289    fn default() -> Self {
2290        Self::new()
2291    }
2292}
2293/// Details on when funds from charges are available, and when they are paid out to an external account.
2294/// For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
2295#[derive(Clone, Eq, PartialEq)]
2296#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2297#[derive(serde::Serialize)]
2298pub struct CreateAccountSettingsPayoutsSchedule {
2299    /// The number of days charge funds are held before being paid out.
2300    /// May also be set to `minimum`, representing the lowest available value for the account country.
2301    /// Default is `minimum`.
2302    /// The `delay_days` parameter remains at the last configured value if `interval` is `manual`.
2303    /// [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
2304    #[serde(skip_serializing_if = "Option::is_none")]
2305    pub delay_days: Option<CreateAccountSettingsPayoutsScheduleDelayDays>,
2306    /// How frequently available funds are paid out.
2307    /// One of: `daily`, `manual`, `weekly`, or `monthly`.
2308    /// Default is `daily`.
2309    #[serde(skip_serializing_if = "Option::is_none")]
2310    pub interval: Option<CreateAccountSettingsPayoutsScheduleInterval>,
2311    /// The day of the month when available funds are paid out, specified as a number between 1--31.
2312    /// Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month.
2313    /// Required and applicable only if `interval` is `monthly`.
2314    #[serde(skip_serializing_if = "Option::is_none")]
2315    pub monthly_anchor: Option<u8>,
2316    /// The days of the month when available funds are paid out, specified as an array of numbers between 1--31.
2317    /// Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month.
2318    /// Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set.
2319    #[serde(skip_serializing_if = "Option::is_none")]
2320    pub monthly_payout_days: Option<Vec<u32>>,
2321    /// The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc.
2322    /// Required and applicable only if `interval` is `weekly`.
2323    #[serde(skip_serializing_if = "Option::is_none")]
2324    pub weekly_anchor: Option<CreateAccountSettingsPayoutsScheduleWeeklyAnchor>,
2325    /// The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`].
2326    /// Required and applicable only if `interval` is `weekly`.
2327    #[serde(skip_serializing_if = "Option::is_none")]
2328    pub weekly_payout_days: Option<Vec<CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays>>,
2329}
2330#[cfg(feature = "redact-generated-debug")]
2331impl std::fmt::Debug for CreateAccountSettingsPayoutsSchedule {
2332    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2333        f.debug_struct("CreateAccountSettingsPayoutsSchedule").finish_non_exhaustive()
2334    }
2335}
2336impl CreateAccountSettingsPayoutsSchedule {
2337    pub fn new() -> Self {
2338        Self {
2339            delay_days: None,
2340            interval: None,
2341            monthly_anchor: None,
2342            monthly_payout_days: None,
2343            weekly_anchor: None,
2344            weekly_payout_days: None,
2345        }
2346    }
2347}
2348impl Default for CreateAccountSettingsPayoutsSchedule {
2349    fn default() -> Self {
2350        Self::new()
2351    }
2352}
2353/// The number of days charge funds are held before being paid out.
2354/// May also be set to `minimum`, representing the lowest available value for the account country.
2355/// Default is `minimum`.
2356/// The `delay_days` parameter remains at the last configured value if `interval` is `manual`.
2357/// [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
2358#[derive(Copy, Clone, Eq, PartialEq)]
2359#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2360#[derive(serde::Serialize)]
2361#[serde(rename_all = "snake_case")]
2362pub enum CreateAccountSettingsPayoutsScheduleDelayDays {
2363    Minimum,
2364    #[serde(untagged)]
2365    U32(u32),
2366}
2367#[cfg(feature = "redact-generated-debug")]
2368impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleDelayDays {
2369    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2370        f.debug_struct("CreateAccountSettingsPayoutsScheduleDelayDays").finish_non_exhaustive()
2371    }
2372}
2373/// How frequently available funds are paid out.
2374/// One of: `daily`, `manual`, `weekly`, or `monthly`.
2375/// Default is `daily`.
2376#[derive(Clone, Eq, PartialEq)]
2377#[non_exhaustive]
2378pub enum CreateAccountSettingsPayoutsScheduleInterval {
2379    Daily,
2380    Manual,
2381    Monthly,
2382    Weekly,
2383    /// An unrecognized value from Stripe. Should not be used as a request parameter.
2384    Unknown(String),
2385}
2386impl CreateAccountSettingsPayoutsScheduleInterval {
2387    pub fn as_str(&self) -> &str {
2388        use CreateAccountSettingsPayoutsScheduleInterval::*;
2389        match self {
2390            Daily => "daily",
2391            Manual => "manual",
2392            Monthly => "monthly",
2393            Weekly => "weekly",
2394            Unknown(v) => v,
2395        }
2396    }
2397}
2398
2399impl std::str::FromStr for CreateAccountSettingsPayoutsScheduleInterval {
2400    type Err = std::convert::Infallible;
2401    fn from_str(s: &str) -> Result<Self, Self::Err> {
2402        use CreateAccountSettingsPayoutsScheduleInterval::*;
2403        match s {
2404            "daily" => Ok(Daily),
2405            "manual" => Ok(Manual),
2406            "monthly" => Ok(Monthly),
2407            "weekly" => Ok(Weekly),
2408            v => {
2409                tracing::warn!(
2410                    "Unknown value '{}' for enum '{}'",
2411                    v,
2412                    "CreateAccountSettingsPayoutsScheduleInterval"
2413                );
2414                Ok(Unknown(v.to_owned()))
2415            }
2416        }
2417    }
2418}
2419impl std::fmt::Display for CreateAccountSettingsPayoutsScheduleInterval {
2420    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2421        f.write_str(self.as_str())
2422    }
2423}
2424
2425#[cfg(not(feature = "redact-generated-debug"))]
2426impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleInterval {
2427    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2428        f.write_str(self.as_str())
2429    }
2430}
2431#[cfg(feature = "redact-generated-debug")]
2432impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleInterval {
2433    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2434        f.debug_struct(stringify!(CreateAccountSettingsPayoutsScheduleInterval))
2435            .finish_non_exhaustive()
2436    }
2437}
2438impl serde::Serialize for CreateAccountSettingsPayoutsScheduleInterval {
2439    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2440    where
2441        S: serde::Serializer,
2442    {
2443        serializer.serialize_str(self.as_str())
2444    }
2445}
2446#[cfg(feature = "deserialize")]
2447impl<'de> serde::Deserialize<'de> for CreateAccountSettingsPayoutsScheduleInterval {
2448    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2449        use std::str::FromStr;
2450        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2451        Ok(Self::from_str(&s).expect("infallible"))
2452    }
2453}
2454/// The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc.
2455/// Required and applicable only if `interval` is `weekly`.
2456#[derive(Clone, Eq, PartialEq)]
2457#[non_exhaustive]
2458pub enum CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2459    Friday,
2460    Monday,
2461    Saturday,
2462    Sunday,
2463    Thursday,
2464    Tuesday,
2465    Wednesday,
2466    /// An unrecognized value from Stripe. Should not be used as a request parameter.
2467    Unknown(String),
2468}
2469impl CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2470    pub fn as_str(&self) -> &str {
2471        use CreateAccountSettingsPayoutsScheduleWeeklyAnchor::*;
2472        match self {
2473            Friday => "friday",
2474            Monday => "monday",
2475            Saturday => "saturday",
2476            Sunday => "sunday",
2477            Thursday => "thursday",
2478            Tuesday => "tuesday",
2479            Wednesday => "wednesday",
2480            Unknown(v) => v,
2481        }
2482    }
2483}
2484
2485impl std::str::FromStr for CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2486    type Err = std::convert::Infallible;
2487    fn from_str(s: &str) -> Result<Self, Self::Err> {
2488        use CreateAccountSettingsPayoutsScheduleWeeklyAnchor::*;
2489        match s {
2490            "friday" => Ok(Friday),
2491            "monday" => Ok(Monday),
2492            "saturday" => Ok(Saturday),
2493            "sunday" => Ok(Sunday),
2494            "thursday" => Ok(Thursday),
2495            "tuesday" => Ok(Tuesday),
2496            "wednesday" => Ok(Wednesday),
2497            v => {
2498                tracing::warn!(
2499                    "Unknown value '{}' for enum '{}'",
2500                    v,
2501                    "CreateAccountSettingsPayoutsScheduleWeeklyAnchor"
2502                );
2503                Ok(Unknown(v.to_owned()))
2504            }
2505        }
2506    }
2507}
2508impl std::fmt::Display for CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2509    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2510        f.write_str(self.as_str())
2511    }
2512}
2513
2514#[cfg(not(feature = "redact-generated-debug"))]
2515impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2516    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2517        f.write_str(self.as_str())
2518    }
2519}
2520#[cfg(feature = "redact-generated-debug")]
2521impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2522    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2523        f.debug_struct(stringify!(CreateAccountSettingsPayoutsScheduleWeeklyAnchor))
2524            .finish_non_exhaustive()
2525    }
2526}
2527impl serde::Serialize for CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2528    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2529    where
2530        S: serde::Serializer,
2531    {
2532        serializer.serialize_str(self.as_str())
2533    }
2534}
2535#[cfg(feature = "deserialize")]
2536impl<'de> serde::Deserialize<'de> for CreateAccountSettingsPayoutsScheduleWeeklyAnchor {
2537    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2538        use std::str::FromStr;
2539        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2540        Ok(Self::from_str(&s).expect("infallible"))
2541    }
2542}
2543/// The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`].
2544/// Required and applicable only if `interval` is `weekly`.
2545#[derive(Clone, Eq, PartialEq)]
2546#[non_exhaustive]
2547pub enum CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2548    Friday,
2549    Monday,
2550    Thursday,
2551    Tuesday,
2552    Wednesday,
2553    /// An unrecognized value from Stripe. Should not be used as a request parameter.
2554    Unknown(String),
2555}
2556impl CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2557    pub fn as_str(&self) -> &str {
2558        use CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays::*;
2559        match self {
2560            Friday => "friday",
2561            Monday => "monday",
2562            Thursday => "thursday",
2563            Tuesday => "tuesday",
2564            Wednesday => "wednesday",
2565            Unknown(v) => v,
2566        }
2567    }
2568}
2569
2570impl std::str::FromStr for CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2571    type Err = std::convert::Infallible;
2572    fn from_str(s: &str) -> Result<Self, Self::Err> {
2573        use CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays::*;
2574        match s {
2575            "friday" => Ok(Friday),
2576            "monday" => Ok(Monday),
2577            "thursday" => Ok(Thursday),
2578            "tuesday" => Ok(Tuesday),
2579            "wednesday" => Ok(Wednesday),
2580            v => {
2581                tracing::warn!(
2582                    "Unknown value '{}' for enum '{}'",
2583                    v,
2584                    "CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays"
2585                );
2586                Ok(Unknown(v.to_owned()))
2587            }
2588        }
2589    }
2590}
2591impl std::fmt::Display for CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2592    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2593        f.write_str(self.as_str())
2594    }
2595}
2596
2597#[cfg(not(feature = "redact-generated-debug"))]
2598impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2599    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2600        f.write_str(self.as_str())
2601    }
2602}
2603#[cfg(feature = "redact-generated-debug")]
2604impl std::fmt::Debug for CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2605    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2606        f.debug_struct(stringify!(CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays))
2607            .finish_non_exhaustive()
2608    }
2609}
2610impl serde::Serialize for CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2611    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2612    where
2613        S: serde::Serializer,
2614    {
2615        serializer.serialize_str(self.as_str())
2616    }
2617}
2618#[cfg(feature = "deserialize")]
2619impl<'de> serde::Deserialize<'de> for CreateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
2620    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2621        use std::str::FromStr;
2622        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2623        Ok(Self::from_str(&s).expect("infallible"))
2624    }
2625}
2626/// The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
2627#[derive(Clone, Eq, PartialEq)]
2628#[non_exhaustive]
2629pub enum CreateAccountType {
2630    Custom,
2631    Express,
2632    Standard,
2633    /// An unrecognized value from Stripe. Should not be used as a request parameter.
2634    Unknown(String),
2635}
2636impl CreateAccountType {
2637    pub fn as_str(&self) -> &str {
2638        use CreateAccountType::*;
2639        match self {
2640            Custom => "custom",
2641            Express => "express",
2642            Standard => "standard",
2643            Unknown(v) => v,
2644        }
2645    }
2646}
2647
2648impl std::str::FromStr for CreateAccountType {
2649    type Err = std::convert::Infallible;
2650    fn from_str(s: &str) -> Result<Self, Self::Err> {
2651        use CreateAccountType::*;
2652        match s {
2653            "custom" => Ok(Custom),
2654            "express" => Ok(Express),
2655            "standard" => Ok(Standard),
2656            v => {
2657                tracing::warn!("Unknown value '{}' for enum '{}'", v, "CreateAccountType");
2658                Ok(Unknown(v.to_owned()))
2659            }
2660        }
2661    }
2662}
2663impl std::fmt::Display for CreateAccountType {
2664    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2665        f.write_str(self.as_str())
2666    }
2667}
2668
2669#[cfg(not(feature = "redact-generated-debug"))]
2670impl std::fmt::Debug for CreateAccountType {
2671    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2672        f.write_str(self.as_str())
2673    }
2674}
2675#[cfg(feature = "redact-generated-debug")]
2676impl std::fmt::Debug for CreateAccountType {
2677    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2678        f.debug_struct(stringify!(CreateAccountType)).finish_non_exhaustive()
2679    }
2680}
2681impl serde::Serialize for CreateAccountType {
2682    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2683    where
2684        S: serde::Serializer,
2685    {
2686        serializer.serialize_str(self.as_str())
2687    }
2688}
2689#[cfg(feature = "deserialize")]
2690impl<'de> serde::Deserialize<'de> for CreateAccountType {
2691    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2692        use std::str::FromStr;
2693        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2694        Ok(Self::from_str(&s).expect("infallible"))
2695    }
2696}
2697/// With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
2698/// To do this, you’ll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
2699///
2700/// If you’ve already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when.
2701/// creating the account.
2702/// Connect Onboarding won’t ask for the prefilled information during account onboarding.
2703/// You can prefill any information on the account.
2704#[derive(Clone)]
2705#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2706#[derive(serde::Serialize)]
2707pub struct CreateAccount {
2708    inner: CreateAccountBuilder,
2709}
2710#[cfg(feature = "redact-generated-debug")]
2711impl std::fmt::Debug for CreateAccount {
2712    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2713        f.debug_struct("CreateAccount").finish_non_exhaustive()
2714    }
2715}
2716impl CreateAccount {
2717    /// Construct a new `CreateAccount`.
2718    pub fn new() -> Self {
2719        Self { inner: CreateAccountBuilder::new() }
2720    }
2721    /// An [account token](https://api.stripe.com#create_account_token), used to securely provide details to the account.
2722    pub fn account_token(mut self, account_token: impl Into<String>) -> Self {
2723        self.inner.account_token = Some(account_token.into());
2724        self
2725    }
2726    /// Business information about the account.
2727    pub fn business_profile(
2728        mut self,
2729        business_profile: impl Into<CreateAccountBusinessProfile>,
2730    ) -> Self {
2731        self.inner.business_profile = Some(business_profile.into());
2732        self
2733    }
2734    /// The business type.
2735    /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
2736    pub fn business_type(
2737        mut self,
2738        business_type: impl Into<stripe_shared::AccountBusinessType>,
2739    ) -> Self {
2740        self.inner.business_type = Some(business_type.into());
2741        self
2742    }
2743    /// Each key of the dictionary represents a capability, and each capability
2744    /// maps to its settings (for example, whether it has been requested or not). Each
2745    /// capability is inactive until you have provided its specific
2746    /// requirements and Stripe has verified them. An account might have some
2747    /// of its requested capabilities be active and some be inactive.
2748    ///
2749    /// Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type).
2750    /// is `none`, which includes Custom accounts.
2751    pub fn capabilities(mut self, capabilities: impl Into<CapabilitiesParam>) -> Self {
2752        self.inner.capabilities = Some(capabilities.into());
2753        self
2754    }
2755    /// Information about the company or business.
2756    /// This field is available for any `business_type`.
2757    /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
2758    pub fn company(mut self, company: impl Into<CreateAccountCompany>) -> Self {
2759        self.inner.company = Some(company.into());
2760        self
2761    }
2762    /// A hash of configuration describing the account controller's attributes.
2763    pub fn controller(mut self, controller: impl Into<CreateAccountController>) -> Self {
2764        self.inner.controller = Some(controller.into());
2765        self
2766    }
2767    /// The country in which the account holder resides, or in which the business is legally established.
2768    /// This should be an ISO 3166-1 alpha-2 country code.
2769    /// For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created.
2770    /// Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
2771    pub fn country(mut self, country: impl Into<String>) -> Self {
2772        self.inner.country = Some(country.into());
2773        self
2774    }
2775    /// Three-letter ISO currency code representing the default currency for the account.
2776    /// This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
2777    pub fn default_currency(mut self, default_currency: impl Into<stripe_types::Currency>) -> Self {
2778        self.inner.default_currency = Some(default_currency.into());
2779        self
2780    }
2781    /// Documents that may be submitted to satisfy various informational requests.
2782    pub fn documents(mut self, documents: impl Into<DocumentsSpecs>) -> Self {
2783        self.inner.documents = Some(documents.into());
2784        self
2785    }
2786    /// The email address of the account holder.
2787    /// This is only to make the account easier to identify to you.
2788    /// If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
2789    pub fn email(mut self, email: impl Into<String>) -> Self {
2790        self.inner.email = Some(email.into());
2791        self
2792    }
2793    /// Specifies which fields in the response should be expanded.
2794    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
2795        self.inner.expand = Some(expand.into());
2796        self
2797    }
2798    /// A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups).
2799    /// You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
2800    ///
2801    ///
2802    /// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists.
2803    /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs.
2804    /// After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
2805    pub fn external_account(mut self, external_account: impl Into<String>) -> Self {
2806        self.inner.external_account = Some(external_account.into());
2807        self
2808    }
2809    /// A hash of account group type to tokens. These are account groups this account should be added to.
2810    pub fn groups(mut self, groups: impl Into<AccountGroupsSpecs>) -> Self {
2811        self.inner.groups = Some(groups.into());
2812        self
2813    }
2814    /// Information about the person represented by the account.
2815    /// This field is null unless `business_type` is set to `individual`.
2816    /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
2817    pub fn individual(mut self, individual: impl Into<CreateAccountIndividual>) -> Self {
2818        self.inner.individual = Some(individual.into());
2819        self
2820    }
2821    /// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
2822    /// This can be useful for storing additional information about the object in a structured format.
2823    /// Individual keys can be unset by posting an empty value to them.
2824    /// All keys can be unset by posting an empty value to `metadata`.
2825    pub fn metadata(
2826        mut self,
2827        metadata: impl Into<std::collections::HashMap<String, String>>,
2828    ) -> Self {
2829        self.inner.metadata = Some(metadata.into());
2830        self
2831    }
2832    /// Options for customizing how the account functions within Stripe.
2833    pub fn settings(mut self, settings: impl Into<CreateAccountSettings>) -> Self {
2834        self.inner.settings = Some(settings.into());
2835        self
2836    }
2837    /// Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance).
2838    /// This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
2839    /// This property defaults to a `full` service agreement when empty.
2840    pub fn tos_acceptance(mut self, tos_acceptance: impl Into<TosAcceptanceSpecs>) -> Self {
2841        self.inner.tos_acceptance = Some(tos_acceptance.into());
2842        self
2843    }
2844    /// The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
2845    pub fn type_(mut self, type_: impl Into<CreateAccountType>) -> Self {
2846        self.inner.type_ = Some(type_.into());
2847        self
2848    }
2849}
2850impl Default for CreateAccount {
2851    fn default() -> Self {
2852        Self::new()
2853    }
2854}
2855impl CreateAccount {
2856    /// Send the request and return the deserialized response.
2857    pub async fn send<C: StripeClient>(
2858        &self,
2859        client: &C,
2860    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
2861        self.customize().send(client).await
2862    }
2863
2864    /// Send the request and return the deserialized response, blocking until completion.
2865    pub fn send_blocking<C: StripeBlockingClient>(
2866        &self,
2867        client: &C,
2868    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
2869        self.customize().send_blocking(client)
2870    }
2871}
2872
2873impl StripeRequest for CreateAccount {
2874    type Output = stripe_shared::Account;
2875
2876    fn build(&self) -> RequestBuilder {
2877        RequestBuilder::new(StripeMethod::Post, "/accounts").form(&self.inner)
2878    }
2879}
2880#[derive(Clone)]
2881#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2882#[derive(serde::Serialize)]
2883struct UpdateAccountBuilder {
2884    #[serde(skip_serializing_if = "Option::is_none")]
2885    account_token: Option<String>,
2886    #[serde(skip_serializing_if = "Option::is_none")]
2887    business_profile: Option<UpdateAccountBusinessProfile>,
2888    #[serde(skip_serializing_if = "Option::is_none")]
2889    business_type: Option<stripe_shared::AccountBusinessType>,
2890    #[serde(skip_serializing_if = "Option::is_none")]
2891    capabilities: Option<CapabilitiesParam>,
2892    #[serde(skip_serializing_if = "Option::is_none")]
2893    company: Option<UpdateAccountCompany>,
2894    #[serde(skip_serializing_if = "Option::is_none")]
2895    default_currency: Option<stripe_types::Currency>,
2896    #[serde(skip_serializing_if = "Option::is_none")]
2897    documents: Option<DocumentsSpecs>,
2898    #[serde(skip_serializing_if = "Option::is_none")]
2899    email: Option<String>,
2900    #[serde(skip_serializing_if = "Option::is_none")]
2901    expand: Option<Vec<String>>,
2902    #[serde(skip_serializing_if = "Option::is_none")]
2903    external_account: Option<String>,
2904    #[serde(skip_serializing_if = "Option::is_none")]
2905    groups: Option<AccountGroupsSpecs>,
2906    #[serde(skip_serializing_if = "Option::is_none")]
2907    individual: Option<UpdateAccountIndividual>,
2908    #[serde(skip_serializing_if = "Option::is_none")]
2909    metadata: Option<std::collections::HashMap<String, String>>,
2910    #[serde(skip_serializing_if = "Option::is_none")]
2911    settings: Option<UpdateAccountSettings>,
2912    #[serde(skip_serializing_if = "Option::is_none")]
2913    tos_acceptance: Option<TosAcceptanceSpecs>,
2914}
2915#[cfg(feature = "redact-generated-debug")]
2916impl std::fmt::Debug for UpdateAccountBuilder {
2917    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2918        f.debug_struct("UpdateAccountBuilder").finish_non_exhaustive()
2919    }
2920}
2921impl UpdateAccountBuilder {
2922    fn new() -> Self {
2923        Self {
2924            account_token: None,
2925            business_profile: None,
2926            business_type: None,
2927            capabilities: None,
2928            company: None,
2929            default_currency: None,
2930            documents: None,
2931            email: None,
2932            expand: None,
2933            external_account: None,
2934            groups: None,
2935            individual: None,
2936            metadata: None,
2937            settings: None,
2938            tos_acceptance: None,
2939        }
2940    }
2941}
2942/// Business information about the account.
2943#[derive(Clone, Eq, PartialEq)]
2944#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
2945#[derive(serde::Serialize)]
2946pub struct UpdateAccountBusinessProfile {
2947    /// The applicant's gross annual revenue for its preceding fiscal year.
2948    #[serde(skip_serializing_if = "Option::is_none")]
2949    pub annual_revenue: Option<AnnualRevenueSpecs>,
2950    /// An estimated upper bound of employees, contractors, vendors, etc.
2951    /// currently working for the business.
2952    #[serde(skip_serializing_if = "Option::is_none")]
2953    pub estimated_worker_count: Option<u64>,
2954    /// [The merchant category code for the account](/connect/setting-mcc).
2955    /// MCCs are used to classify businesses based on the goods or services they provide.
2956    #[serde(skip_serializing_if = "Option::is_none")]
2957    pub mcc: Option<String>,
2958    /// Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
2959    #[serde(skip_serializing_if = "Option::is_none")]
2960    pub minority_owned_business_designation:
2961        Option<Vec<UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation>>,
2962    /// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
2963    #[serde(skip_serializing_if = "Option::is_none")]
2964    pub monthly_estimated_revenue: Option<MonthlyEstimatedRevenueSpecs>,
2965    /// The customer-facing business name.
2966    #[serde(skip_serializing_if = "Option::is_none")]
2967    pub name: Option<String>,
2968    /// Internal-only description of the product sold by, or service provided by, the business.
2969    /// Used by Stripe for risk and underwriting purposes.
2970    #[serde(skip_serializing_if = "Option::is_none")]
2971    pub product_description: Option<String>,
2972    /// A publicly available mailing address for sending support issues to.
2973    #[serde(skip_serializing_if = "Option::is_none")]
2974    pub support_address: Option<UpdateAccountBusinessProfileSupportAddress>,
2975    /// A publicly available email address for sending support issues to.
2976    #[serde(skip_serializing_if = "Option::is_none")]
2977    pub support_email: Option<String>,
2978    /// A publicly available phone number to call with support issues.
2979    #[serde(skip_serializing_if = "Option::is_none")]
2980    pub support_phone: Option<String>,
2981    /// A publicly available website for handling support issues.
2982    #[serde(skip_serializing_if = "Option::is_none")]
2983    pub support_url: Option<String>,
2984    /// The business's publicly available website.
2985    #[serde(skip_serializing_if = "Option::is_none")]
2986    pub url: Option<String>,
2987}
2988#[cfg(feature = "redact-generated-debug")]
2989impl std::fmt::Debug for UpdateAccountBusinessProfile {
2990    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2991        f.debug_struct("UpdateAccountBusinessProfile").finish_non_exhaustive()
2992    }
2993}
2994impl UpdateAccountBusinessProfile {
2995    pub fn new() -> Self {
2996        Self {
2997            annual_revenue: None,
2998            estimated_worker_count: None,
2999            mcc: None,
3000            minority_owned_business_designation: None,
3001            monthly_estimated_revenue: None,
3002            name: None,
3003            product_description: None,
3004            support_address: None,
3005            support_email: None,
3006            support_phone: None,
3007            support_url: None,
3008            url: None,
3009        }
3010    }
3011}
3012impl Default for UpdateAccountBusinessProfile {
3013    fn default() -> Self {
3014        Self::new()
3015    }
3016}
3017/// Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
3018#[derive(Clone, Eq, PartialEq)]
3019#[non_exhaustive]
3020pub enum UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3021    LgbtqiOwnedBusiness,
3022    MinorityOwnedBusiness,
3023    NoneOfTheseApply,
3024    PreferNotToAnswer,
3025    WomenOwnedBusiness,
3026    /// An unrecognized value from Stripe. Should not be used as a request parameter.
3027    Unknown(String),
3028}
3029impl UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3030    pub fn as_str(&self) -> &str {
3031        use UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation::*;
3032        match self {
3033            LgbtqiOwnedBusiness => "lgbtqi_owned_business",
3034            MinorityOwnedBusiness => "minority_owned_business",
3035            NoneOfTheseApply => "none_of_these_apply",
3036            PreferNotToAnswer => "prefer_not_to_answer",
3037            WomenOwnedBusiness => "women_owned_business",
3038            Unknown(v) => v,
3039        }
3040    }
3041}
3042
3043impl std::str::FromStr for UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3044    type Err = std::convert::Infallible;
3045    fn from_str(s: &str) -> Result<Self, Self::Err> {
3046        use UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation::*;
3047        match s {
3048            "lgbtqi_owned_business" => Ok(LgbtqiOwnedBusiness),
3049            "minority_owned_business" => Ok(MinorityOwnedBusiness),
3050            "none_of_these_apply" => Ok(NoneOfTheseApply),
3051            "prefer_not_to_answer" => Ok(PreferNotToAnswer),
3052            "women_owned_business" => Ok(WomenOwnedBusiness),
3053            v => {
3054                tracing::warn!(
3055                    "Unknown value '{}' for enum '{}'",
3056                    v,
3057                    "UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation"
3058                );
3059                Ok(Unknown(v.to_owned()))
3060            }
3061        }
3062    }
3063}
3064impl std::fmt::Display for UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3065    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3066        f.write_str(self.as_str())
3067    }
3068}
3069
3070#[cfg(not(feature = "redact-generated-debug"))]
3071impl std::fmt::Debug for UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3072    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3073        f.write_str(self.as_str())
3074    }
3075}
3076#[cfg(feature = "redact-generated-debug")]
3077impl std::fmt::Debug for UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3078    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3079        f.debug_struct(stringify!(UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation))
3080            .finish_non_exhaustive()
3081    }
3082}
3083impl serde::Serialize for UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3084    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3085    where
3086        S: serde::Serializer,
3087    {
3088        serializer.serialize_str(self.as_str())
3089    }
3090}
3091#[cfg(feature = "deserialize")]
3092impl<'de> serde::Deserialize<'de> for UpdateAccountBusinessProfileMinorityOwnedBusinessDesignation {
3093    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3094        use std::str::FromStr;
3095        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3096        Ok(Self::from_str(&s).expect("infallible"))
3097    }
3098}
3099/// A publicly available mailing address for sending support issues to.
3100#[derive(Clone, Eq, PartialEq)]
3101#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3102#[derive(serde::Serialize)]
3103pub struct UpdateAccountBusinessProfileSupportAddress {
3104    /// City, district, suburb, town, or village.
3105    #[serde(skip_serializing_if = "Option::is_none")]
3106    pub city: Option<String>,
3107    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3108    #[serde(skip_serializing_if = "Option::is_none")]
3109    pub country: Option<String>,
3110    /// Address line 1, such as the street, PO Box, or company name.
3111    #[serde(skip_serializing_if = "Option::is_none")]
3112    pub line1: Option<String>,
3113    /// Address line 2, such as the apartment, suite, unit, or building.
3114    #[serde(skip_serializing_if = "Option::is_none")]
3115    pub line2: Option<String>,
3116    /// ZIP or postal code.
3117    #[serde(skip_serializing_if = "Option::is_none")]
3118    pub postal_code: Option<String>,
3119    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
3120    #[serde(skip_serializing_if = "Option::is_none")]
3121    pub state: Option<String>,
3122}
3123#[cfg(feature = "redact-generated-debug")]
3124impl std::fmt::Debug for UpdateAccountBusinessProfileSupportAddress {
3125    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3126        f.debug_struct("UpdateAccountBusinessProfileSupportAddress").finish_non_exhaustive()
3127    }
3128}
3129impl UpdateAccountBusinessProfileSupportAddress {
3130    pub fn new() -> Self {
3131        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
3132    }
3133}
3134impl Default for UpdateAccountBusinessProfileSupportAddress {
3135    fn default() -> Self {
3136        Self::new()
3137    }
3138}
3139/// Information about the company or business.
3140/// This field is available for any `business_type`.
3141/// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
3142#[derive(Clone, Eq, PartialEq)]
3143#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3144#[derive(serde::Serialize)]
3145pub struct UpdateAccountCompany {
3146    /// The company's primary address.
3147    #[serde(skip_serializing_if = "Option::is_none")]
3148    pub address: Option<UpdateAccountCompanyAddress>,
3149    /// The Kana variation of the company's primary address (Japan only).
3150    #[serde(skip_serializing_if = "Option::is_none")]
3151    pub address_kana: Option<UpdateAccountCompanyAddressKana>,
3152    /// The Kanji variation of the company's primary address (Japan only).
3153    #[serde(skip_serializing_if = "Option::is_none")]
3154    pub address_kanji: Option<UpdateAccountCompanyAddressKanji>,
3155    /// Whether the company's directors have been provided.
3156    /// Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement.
3157    /// This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
3158    #[serde(skip_serializing_if = "Option::is_none")]
3159    pub directors_provided: Option<bool>,
3160    /// This hash is used to attest that the directors information provided to Stripe is both current and correct.
3161    #[serde(skip_serializing_if = "Option::is_none")]
3162    pub directorship_declaration: Option<CompanyDirectorshipDeclaration>,
3163    /// Whether the company's executives have been provided.
3164    /// Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
3165    #[serde(skip_serializing_if = "Option::is_none")]
3166    pub executives_provided: Option<bool>,
3167    /// The export license ID number of the company, also referred as Import Export Code (India only).
3168    #[serde(skip_serializing_if = "Option::is_none")]
3169    pub export_license_id: Option<String>,
3170    /// The purpose code to use for export transactions (India only).
3171    #[serde(skip_serializing_if = "Option::is_none")]
3172    pub export_purpose_code: Option<String>,
3173    /// The company's legal name.
3174    #[serde(skip_serializing_if = "Option::is_none")]
3175    pub name: Option<String>,
3176    /// The Kana variation of the company's legal name (Japan only).
3177    #[serde(skip_serializing_if = "Option::is_none")]
3178    pub name_kana: Option<String>,
3179    /// The Kanji variation of the company's legal name (Japan only).
3180    #[serde(skip_serializing_if = "Option::is_none")]
3181    pub name_kanji: Option<String>,
3182    /// Whether the company's owners have been provided.
3183    /// Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
3184    #[serde(skip_serializing_if = "Option::is_none")]
3185    pub owners_provided: Option<bool>,
3186    /// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
3187    #[serde(skip_serializing_if = "Option::is_none")]
3188    pub ownership_declaration: Option<CompanyOwnershipDeclaration>,
3189    /// This value is used to determine if a business is exempt from providing ultimate beneficial owners.
3190    /// See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
3191    #[serde(skip_serializing_if = "Option::is_none")]
3192    pub ownership_exemption_reason: Option<UpdateAccountCompanyOwnershipExemptionReason>,
3193    /// The company's phone number (used for verification).
3194    #[serde(skip_serializing_if = "Option::is_none")]
3195    pub phone: Option<String>,
3196    #[serde(skip_serializing_if = "Option::is_none")]
3197    pub registration_date: Option<RegistrationDateSpecs>,
3198    /// The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes.
3199    /// (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
3200    #[serde(skip_serializing_if = "Option::is_none")]
3201    pub registration_number: Option<String>,
3202    /// This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
3203    #[serde(skip_serializing_if = "Option::is_none")]
3204    pub representative_declaration: Option<CompanyRepresentativeDeclaration>,
3205    /// The category identifying the legal structure of the company or legal entity.
3206    /// See [Business structure](/connect/identity-verification#business-structure) for more details.
3207    /// Pass an empty string to unset this value.
3208    #[serde(skip_serializing_if = "Option::is_none")]
3209    pub structure: Option<UpdateAccountCompanyStructure>,
3210    /// The business ID number of the company, as appropriate for the company’s country.
3211    /// (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.).
3212    #[serde(skip_serializing_if = "Option::is_none")]
3213    pub tax_id: Option<String>,
3214    /// The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
3215    #[serde(skip_serializing_if = "Option::is_none")]
3216    pub tax_id_registrar: Option<String>,
3217    /// The VAT number of the company.
3218    #[serde(skip_serializing_if = "Option::is_none")]
3219    pub vat_id: Option<String>,
3220    /// Information on the verification state of the company.
3221    #[serde(skip_serializing_if = "Option::is_none")]
3222    pub verification: Option<VerificationSpecs>,
3223}
3224#[cfg(feature = "redact-generated-debug")]
3225impl std::fmt::Debug for UpdateAccountCompany {
3226    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3227        f.debug_struct("UpdateAccountCompany").finish_non_exhaustive()
3228    }
3229}
3230impl UpdateAccountCompany {
3231    pub fn new() -> Self {
3232        Self {
3233            address: None,
3234            address_kana: None,
3235            address_kanji: None,
3236            directors_provided: None,
3237            directorship_declaration: None,
3238            executives_provided: None,
3239            export_license_id: None,
3240            export_purpose_code: None,
3241            name: None,
3242            name_kana: None,
3243            name_kanji: None,
3244            owners_provided: None,
3245            ownership_declaration: None,
3246            ownership_exemption_reason: None,
3247            phone: None,
3248            registration_date: None,
3249            registration_number: None,
3250            representative_declaration: None,
3251            structure: None,
3252            tax_id: None,
3253            tax_id_registrar: None,
3254            vat_id: None,
3255            verification: None,
3256        }
3257    }
3258}
3259impl Default for UpdateAccountCompany {
3260    fn default() -> Self {
3261        Self::new()
3262    }
3263}
3264/// The company's primary address.
3265#[derive(Clone, Eq, PartialEq)]
3266#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3267#[derive(serde::Serialize)]
3268pub struct UpdateAccountCompanyAddress {
3269    /// City, district, suburb, town, or village.
3270    #[serde(skip_serializing_if = "Option::is_none")]
3271    pub city: Option<String>,
3272    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3273    #[serde(skip_serializing_if = "Option::is_none")]
3274    pub country: Option<String>,
3275    /// Address line 1, such as the street, PO Box, or company name.
3276    #[serde(skip_serializing_if = "Option::is_none")]
3277    pub line1: Option<String>,
3278    /// Address line 2, such as the apartment, suite, unit, or building.
3279    #[serde(skip_serializing_if = "Option::is_none")]
3280    pub line2: Option<String>,
3281    /// ZIP or postal code.
3282    #[serde(skip_serializing_if = "Option::is_none")]
3283    pub postal_code: Option<String>,
3284    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
3285    #[serde(skip_serializing_if = "Option::is_none")]
3286    pub state: Option<String>,
3287}
3288#[cfg(feature = "redact-generated-debug")]
3289impl std::fmt::Debug for UpdateAccountCompanyAddress {
3290    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3291        f.debug_struct("UpdateAccountCompanyAddress").finish_non_exhaustive()
3292    }
3293}
3294impl UpdateAccountCompanyAddress {
3295    pub fn new() -> Self {
3296        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
3297    }
3298}
3299impl Default for UpdateAccountCompanyAddress {
3300    fn default() -> Self {
3301        Self::new()
3302    }
3303}
3304/// The Kana variation of the company's primary address (Japan only).
3305#[derive(Clone, Eq, PartialEq)]
3306#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3307#[derive(serde::Serialize)]
3308pub struct UpdateAccountCompanyAddressKana {
3309    /// City or ward.
3310    #[serde(skip_serializing_if = "Option::is_none")]
3311    pub city: Option<String>,
3312    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3313    #[serde(skip_serializing_if = "Option::is_none")]
3314    pub country: Option<String>,
3315    /// Block or building number.
3316    #[serde(skip_serializing_if = "Option::is_none")]
3317    pub line1: Option<String>,
3318    /// Building details.
3319    #[serde(skip_serializing_if = "Option::is_none")]
3320    pub line2: Option<String>,
3321    /// Postal code.
3322    #[serde(skip_serializing_if = "Option::is_none")]
3323    pub postal_code: Option<String>,
3324    /// Prefecture.
3325    #[serde(skip_serializing_if = "Option::is_none")]
3326    pub state: Option<String>,
3327    /// Town or cho-me.
3328    #[serde(skip_serializing_if = "Option::is_none")]
3329    pub town: Option<String>,
3330}
3331#[cfg(feature = "redact-generated-debug")]
3332impl std::fmt::Debug for UpdateAccountCompanyAddressKana {
3333    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3334        f.debug_struct("UpdateAccountCompanyAddressKana").finish_non_exhaustive()
3335    }
3336}
3337impl UpdateAccountCompanyAddressKana {
3338    pub fn new() -> Self {
3339        Self {
3340            city: None,
3341            country: None,
3342            line1: None,
3343            line2: None,
3344            postal_code: None,
3345            state: None,
3346            town: None,
3347        }
3348    }
3349}
3350impl Default for UpdateAccountCompanyAddressKana {
3351    fn default() -> Self {
3352        Self::new()
3353    }
3354}
3355/// The Kanji variation of the company's primary address (Japan only).
3356#[derive(Clone, Eq, PartialEq)]
3357#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3358#[derive(serde::Serialize)]
3359pub struct UpdateAccountCompanyAddressKanji {
3360    /// City or ward.
3361    #[serde(skip_serializing_if = "Option::is_none")]
3362    pub city: Option<String>,
3363    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3364    #[serde(skip_serializing_if = "Option::is_none")]
3365    pub country: Option<String>,
3366    /// Block or building number.
3367    #[serde(skip_serializing_if = "Option::is_none")]
3368    pub line1: Option<String>,
3369    /// Building details.
3370    #[serde(skip_serializing_if = "Option::is_none")]
3371    pub line2: Option<String>,
3372    /// Postal code.
3373    #[serde(skip_serializing_if = "Option::is_none")]
3374    pub postal_code: Option<String>,
3375    /// Prefecture.
3376    #[serde(skip_serializing_if = "Option::is_none")]
3377    pub state: Option<String>,
3378    /// Town or cho-me.
3379    #[serde(skip_serializing_if = "Option::is_none")]
3380    pub town: Option<String>,
3381}
3382#[cfg(feature = "redact-generated-debug")]
3383impl std::fmt::Debug for UpdateAccountCompanyAddressKanji {
3384    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3385        f.debug_struct("UpdateAccountCompanyAddressKanji").finish_non_exhaustive()
3386    }
3387}
3388impl UpdateAccountCompanyAddressKanji {
3389    pub fn new() -> Self {
3390        Self {
3391            city: None,
3392            country: None,
3393            line1: None,
3394            line2: None,
3395            postal_code: None,
3396            state: None,
3397            town: None,
3398        }
3399    }
3400}
3401impl Default for UpdateAccountCompanyAddressKanji {
3402    fn default() -> Self {
3403        Self::new()
3404    }
3405}
3406/// This value is used to determine if a business is exempt from providing ultimate beneficial owners.
3407/// See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
3408#[derive(Clone, Eq, PartialEq)]
3409#[non_exhaustive]
3410pub enum UpdateAccountCompanyOwnershipExemptionReason {
3411    QualifiedEntityExceedsOwnershipThreshold,
3412    QualifiesAsFinancialInstitution,
3413    /// An unrecognized value from Stripe. Should not be used as a request parameter.
3414    Unknown(String),
3415}
3416impl UpdateAccountCompanyOwnershipExemptionReason {
3417    pub fn as_str(&self) -> &str {
3418        use UpdateAccountCompanyOwnershipExemptionReason::*;
3419        match self {
3420            QualifiedEntityExceedsOwnershipThreshold => {
3421                "qualified_entity_exceeds_ownership_threshold"
3422            }
3423            QualifiesAsFinancialInstitution => "qualifies_as_financial_institution",
3424            Unknown(v) => v,
3425        }
3426    }
3427}
3428
3429impl std::str::FromStr for UpdateAccountCompanyOwnershipExemptionReason {
3430    type Err = std::convert::Infallible;
3431    fn from_str(s: &str) -> Result<Self, Self::Err> {
3432        use UpdateAccountCompanyOwnershipExemptionReason::*;
3433        match s {
3434            "qualified_entity_exceeds_ownership_threshold" => {
3435                Ok(QualifiedEntityExceedsOwnershipThreshold)
3436            }
3437            "qualifies_as_financial_institution" => Ok(QualifiesAsFinancialInstitution),
3438            v => {
3439                tracing::warn!(
3440                    "Unknown value '{}' for enum '{}'",
3441                    v,
3442                    "UpdateAccountCompanyOwnershipExemptionReason"
3443                );
3444                Ok(Unknown(v.to_owned()))
3445            }
3446        }
3447    }
3448}
3449impl std::fmt::Display for UpdateAccountCompanyOwnershipExemptionReason {
3450    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3451        f.write_str(self.as_str())
3452    }
3453}
3454
3455#[cfg(not(feature = "redact-generated-debug"))]
3456impl std::fmt::Debug for UpdateAccountCompanyOwnershipExemptionReason {
3457    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3458        f.write_str(self.as_str())
3459    }
3460}
3461#[cfg(feature = "redact-generated-debug")]
3462impl std::fmt::Debug for UpdateAccountCompanyOwnershipExemptionReason {
3463    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3464        f.debug_struct(stringify!(UpdateAccountCompanyOwnershipExemptionReason))
3465            .finish_non_exhaustive()
3466    }
3467}
3468impl serde::Serialize for UpdateAccountCompanyOwnershipExemptionReason {
3469    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3470    where
3471        S: serde::Serializer,
3472    {
3473        serializer.serialize_str(self.as_str())
3474    }
3475}
3476#[cfg(feature = "deserialize")]
3477impl<'de> serde::Deserialize<'de> for UpdateAccountCompanyOwnershipExemptionReason {
3478    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3479        use std::str::FromStr;
3480        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3481        Ok(Self::from_str(&s).expect("infallible"))
3482    }
3483}
3484/// The category identifying the legal structure of the company or legal entity.
3485/// See [Business structure](/connect/identity-verification#business-structure) for more details.
3486/// Pass an empty string to unset this value.
3487#[derive(Clone, Eq, PartialEq)]
3488#[non_exhaustive]
3489pub enum UpdateAccountCompanyStructure {
3490    FreeZoneEstablishment,
3491    FreeZoneLlc,
3492    GovernmentInstrumentality,
3493    GovernmentalUnit,
3494    IncorporatedNonProfit,
3495    IncorporatedPartnership,
3496    LimitedLiabilityPartnership,
3497    Llc,
3498    MultiMemberLlc,
3499    PrivateCompany,
3500    PrivateCorporation,
3501    PrivatePartnership,
3502    PublicCompany,
3503    PublicCorporation,
3504    PublicPartnership,
3505    RegisteredCharity,
3506    SingleMemberLlc,
3507    SoleEstablishment,
3508    SoleProprietorship,
3509    TaxExemptGovernmentInstrumentality,
3510    UnincorporatedAssociation,
3511    UnincorporatedNonProfit,
3512    UnincorporatedPartnership,
3513    /// An unrecognized value from Stripe. Should not be used as a request parameter.
3514    Unknown(String),
3515}
3516impl UpdateAccountCompanyStructure {
3517    pub fn as_str(&self) -> &str {
3518        use UpdateAccountCompanyStructure::*;
3519        match self {
3520            FreeZoneEstablishment => "free_zone_establishment",
3521            FreeZoneLlc => "free_zone_llc",
3522            GovernmentInstrumentality => "government_instrumentality",
3523            GovernmentalUnit => "governmental_unit",
3524            IncorporatedNonProfit => "incorporated_non_profit",
3525            IncorporatedPartnership => "incorporated_partnership",
3526            LimitedLiabilityPartnership => "limited_liability_partnership",
3527            Llc => "llc",
3528            MultiMemberLlc => "multi_member_llc",
3529            PrivateCompany => "private_company",
3530            PrivateCorporation => "private_corporation",
3531            PrivatePartnership => "private_partnership",
3532            PublicCompany => "public_company",
3533            PublicCorporation => "public_corporation",
3534            PublicPartnership => "public_partnership",
3535            RegisteredCharity => "registered_charity",
3536            SingleMemberLlc => "single_member_llc",
3537            SoleEstablishment => "sole_establishment",
3538            SoleProprietorship => "sole_proprietorship",
3539            TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality",
3540            UnincorporatedAssociation => "unincorporated_association",
3541            UnincorporatedNonProfit => "unincorporated_non_profit",
3542            UnincorporatedPartnership => "unincorporated_partnership",
3543            Unknown(v) => v,
3544        }
3545    }
3546}
3547
3548impl std::str::FromStr for UpdateAccountCompanyStructure {
3549    type Err = std::convert::Infallible;
3550    fn from_str(s: &str) -> Result<Self, Self::Err> {
3551        use UpdateAccountCompanyStructure::*;
3552        match s {
3553            "free_zone_establishment" => Ok(FreeZoneEstablishment),
3554            "free_zone_llc" => Ok(FreeZoneLlc),
3555            "government_instrumentality" => Ok(GovernmentInstrumentality),
3556            "governmental_unit" => Ok(GovernmentalUnit),
3557            "incorporated_non_profit" => Ok(IncorporatedNonProfit),
3558            "incorporated_partnership" => Ok(IncorporatedPartnership),
3559            "limited_liability_partnership" => Ok(LimitedLiabilityPartnership),
3560            "llc" => Ok(Llc),
3561            "multi_member_llc" => Ok(MultiMemberLlc),
3562            "private_company" => Ok(PrivateCompany),
3563            "private_corporation" => Ok(PrivateCorporation),
3564            "private_partnership" => Ok(PrivatePartnership),
3565            "public_company" => Ok(PublicCompany),
3566            "public_corporation" => Ok(PublicCorporation),
3567            "public_partnership" => Ok(PublicPartnership),
3568            "registered_charity" => Ok(RegisteredCharity),
3569            "single_member_llc" => Ok(SingleMemberLlc),
3570            "sole_establishment" => Ok(SoleEstablishment),
3571            "sole_proprietorship" => Ok(SoleProprietorship),
3572            "tax_exempt_government_instrumentality" => Ok(TaxExemptGovernmentInstrumentality),
3573            "unincorporated_association" => Ok(UnincorporatedAssociation),
3574            "unincorporated_non_profit" => Ok(UnincorporatedNonProfit),
3575            "unincorporated_partnership" => Ok(UnincorporatedPartnership),
3576            v => {
3577                tracing::warn!(
3578                    "Unknown value '{}' for enum '{}'",
3579                    v,
3580                    "UpdateAccountCompanyStructure"
3581                );
3582                Ok(Unknown(v.to_owned()))
3583            }
3584        }
3585    }
3586}
3587impl std::fmt::Display for UpdateAccountCompanyStructure {
3588    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3589        f.write_str(self.as_str())
3590    }
3591}
3592
3593#[cfg(not(feature = "redact-generated-debug"))]
3594impl std::fmt::Debug for UpdateAccountCompanyStructure {
3595    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3596        f.write_str(self.as_str())
3597    }
3598}
3599#[cfg(feature = "redact-generated-debug")]
3600impl std::fmt::Debug for UpdateAccountCompanyStructure {
3601    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3602        f.debug_struct(stringify!(UpdateAccountCompanyStructure)).finish_non_exhaustive()
3603    }
3604}
3605impl serde::Serialize for UpdateAccountCompanyStructure {
3606    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3607    where
3608        S: serde::Serializer,
3609    {
3610        serializer.serialize_str(self.as_str())
3611    }
3612}
3613#[cfg(feature = "deserialize")]
3614impl<'de> serde::Deserialize<'de> for UpdateAccountCompanyStructure {
3615    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3616        use std::str::FromStr;
3617        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3618        Ok(Self::from_str(&s).expect("infallible"))
3619    }
3620}
3621/// Information about the person represented by the account.
3622/// This field is null unless `business_type` is set to `individual`.
3623/// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
3624#[derive(Clone)]
3625#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3626#[derive(serde::Serialize)]
3627pub struct UpdateAccountIndividual {
3628    /// The individual's primary address.
3629    #[serde(skip_serializing_if = "Option::is_none")]
3630    pub address: Option<UpdateAccountIndividualAddress>,
3631    /// The Kana variation of the individual's primary address (Japan only).
3632    #[serde(skip_serializing_if = "Option::is_none")]
3633    pub address_kana: Option<UpdateAccountIndividualAddressKana>,
3634    /// The Kanji variation of the individual's primary address (Japan only).
3635    #[serde(skip_serializing_if = "Option::is_none")]
3636    pub address_kanji: Option<UpdateAccountIndividualAddressKanji>,
3637    /// The individual's date of birth.
3638    #[serde(skip_serializing_if = "Option::is_none")]
3639    pub dob: Option<DateOfBirthSpecs>,
3640    /// The individual's email address.
3641    #[serde(skip_serializing_if = "Option::is_none")]
3642    pub email: Option<String>,
3643    /// The individual's first name.
3644    #[serde(skip_serializing_if = "Option::is_none")]
3645    pub first_name: Option<String>,
3646    /// The Kana variation of the individual's first name (Japan only).
3647    #[serde(skip_serializing_if = "Option::is_none")]
3648    pub first_name_kana: Option<String>,
3649    /// The Kanji variation of the individual's first name (Japan only).
3650    #[serde(skip_serializing_if = "Option::is_none")]
3651    pub first_name_kanji: Option<String>,
3652    /// A list of alternate names or aliases that the individual is known by.
3653    #[serde(skip_serializing_if = "Option::is_none")]
3654    pub full_name_aliases: Option<Vec<String>>,
3655    /// The individual's gender
3656    #[serde(skip_serializing_if = "Option::is_none")]
3657    pub gender: Option<String>,
3658    /// The government-issued ID number of the individual, as appropriate for the representative's country.
3659    /// (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada).
3660    /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
3661    #[serde(skip_serializing_if = "Option::is_none")]
3662    pub id_number: Option<String>,
3663    /// The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks.
3664    /// In Thailand, this would be the laser code found on the back of an ID card.
3665    /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
3666    #[serde(skip_serializing_if = "Option::is_none")]
3667    pub id_number_secondary: Option<String>,
3668    /// The individual's last name.
3669    #[serde(skip_serializing_if = "Option::is_none")]
3670    pub last_name: Option<String>,
3671    /// The Kana variation of the individual's last name (Japan only).
3672    #[serde(skip_serializing_if = "Option::is_none")]
3673    pub last_name_kana: Option<String>,
3674    /// The Kanji variation of the individual's last name (Japan only).
3675    #[serde(skip_serializing_if = "Option::is_none")]
3676    pub last_name_kanji: Option<String>,
3677    /// The individual's maiden name.
3678    #[serde(skip_serializing_if = "Option::is_none")]
3679    pub maiden_name: Option<String>,
3680    /// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
3681    /// This can be useful for storing additional information about the object in a structured format.
3682    /// Individual keys can be unset by posting an empty value to them.
3683    /// All keys can be unset by posting an empty value to `metadata`.
3684    #[serde(skip_serializing_if = "Option::is_none")]
3685    pub metadata: Option<std::collections::HashMap<String, String>>,
3686    /// The individual's phone number.
3687    #[serde(skip_serializing_if = "Option::is_none")]
3688    pub phone: Option<String>,
3689    /// Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
3690    #[serde(skip_serializing_if = "Option::is_none")]
3691    pub political_exposure: Option<UpdateAccountIndividualPoliticalExposure>,
3692    /// The individual's registered address.
3693    #[serde(skip_serializing_if = "Option::is_none")]
3694    pub registered_address: Option<UpdateAccountIndividualRegisteredAddress>,
3695    /// Describes the person’s relationship to the account.
3696    #[serde(skip_serializing_if = "Option::is_none")]
3697    pub relationship: Option<IndividualRelationshipSpecs>,
3698    /// The last four digits of the individual's Social Security Number (U.S. only).
3699    #[serde(skip_serializing_if = "Option::is_none")]
3700    pub ssn_last_4: Option<String>,
3701    /// The individual's verification document information.
3702    #[serde(skip_serializing_if = "Option::is_none")]
3703    pub verification: Option<PersonVerificationSpecs>,
3704}
3705#[cfg(feature = "redact-generated-debug")]
3706impl std::fmt::Debug for UpdateAccountIndividual {
3707    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3708        f.debug_struct("UpdateAccountIndividual").finish_non_exhaustive()
3709    }
3710}
3711impl UpdateAccountIndividual {
3712    pub fn new() -> Self {
3713        Self {
3714            address: None,
3715            address_kana: None,
3716            address_kanji: None,
3717            dob: None,
3718            email: None,
3719            first_name: None,
3720            first_name_kana: None,
3721            first_name_kanji: None,
3722            full_name_aliases: None,
3723            gender: None,
3724            id_number: None,
3725            id_number_secondary: None,
3726            last_name: None,
3727            last_name_kana: None,
3728            last_name_kanji: None,
3729            maiden_name: None,
3730            metadata: None,
3731            phone: None,
3732            political_exposure: None,
3733            registered_address: None,
3734            relationship: None,
3735            ssn_last_4: None,
3736            verification: None,
3737        }
3738    }
3739}
3740impl Default for UpdateAccountIndividual {
3741    fn default() -> Self {
3742        Self::new()
3743    }
3744}
3745/// The individual's primary address.
3746#[derive(Clone, Eq, PartialEq)]
3747#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3748#[derive(serde::Serialize)]
3749pub struct UpdateAccountIndividualAddress {
3750    /// City, district, suburb, town, or village.
3751    #[serde(skip_serializing_if = "Option::is_none")]
3752    pub city: Option<String>,
3753    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3754    #[serde(skip_serializing_if = "Option::is_none")]
3755    pub country: Option<String>,
3756    /// Address line 1, such as the street, PO Box, or company name.
3757    #[serde(skip_serializing_if = "Option::is_none")]
3758    pub line1: Option<String>,
3759    /// Address line 2, such as the apartment, suite, unit, or building.
3760    #[serde(skip_serializing_if = "Option::is_none")]
3761    pub line2: Option<String>,
3762    /// ZIP or postal code.
3763    #[serde(skip_serializing_if = "Option::is_none")]
3764    pub postal_code: Option<String>,
3765    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
3766    #[serde(skip_serializing_if = "Option::is_none")]
3767    pub state: Option<String>,
3768}
3769#[cfg(feature = "redact-generated-debug")]
3770impl std::fmt::Debug for UpdateAccountIndividualAddress {
3771    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3772        f.debug_struct("UpdateAccountIndividualAddress").finish_non_exhaustive()
3773    }
3774}
3775impl UpdateAccountIndividualAddress {
3776    pub fn new() -> Self {
3777        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
3778    }
3779}
3780impl Default for UpdateAccountIndividualAddress {
3781    fn default() -> Self {
3782        Self::new()
3783    }
3784}
3785/// The Kana variation of the individual's primary address (Japan only).
3786#[derive(Clone, Eq, PartialEq)]
3787#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3788#[derive(serde::Serialize)]
3789pub struct UpdateAccountIndividualAddressKana {
3790    /// City or ward.
3791    #[serde(skip_serializing_if = "Option::is_none")]
3792    pub city: Option<String>,
3793    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3794    #[serde(skip_serializing_if = "Option::is_none")]
3795    pub country: Option<String>,
3796    /// Block or building number.
3797    #[serde(skip_serializing_if = "Option::is_none")]
3798    pub line1: Option<String>,
3799    /// Building details.
3800    #[serde(skip_serializing_if = "Option::is_none")]
3801    pub line2: Option<String>,
3802    /// Postal code.
3803    #[serde(skip_serializing_if = "Option::is_none")]
3804    pub postal_code: Option<String>,
3805    /// Prefecture.
3806    #[serde(skip_serializing_if = "Option::is_none")]
3807    pub state: Option<String>,
3808    /// Town or cho-me.
3809    #[serde(skip_serializing_if = "Option::is_none")]
3810    pub town: Option<String>,
3811}
3812#[cfg(feature = "redact-generated-debug")]
3813impl std::fmt::Debug for UpdateAccountIndividualAddressKana {
3814    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3815        f.debug_struct("UpdateAccountIndividualAddressKana").finish_non_exhaustive()
3816    }
3817}
3818impl UpdateAccountIndividualAddressKana {
3819    pub fn new() -> Self {
3820        Self {
3821            city: None,
3822            country: None,
3823            line1: None,
3824            line2: None,
3825            postal_code: None,
3826            state: None,
3827            town: None,
3828        }
3829    }
3830}
3831impl Default for UpdateAccountIndividualAddressKana {
3832    fn default() -> Self {
3833        Self::new()
3834    }
3835}
3836/// The Kanji variation of the individual's primary address (Japan only).
3837#[derive(Clone, Eq, PartialEq)]
3838#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3839#[derive(serde::Serialize)]
3840pub struct UpdateAccountIndividualAddressKanji {
3841    /// City or ward.
3842    #[serde(skip_serializing_if = "Option::is_none")]
3843    pub city: Option<String>,
3844    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3845    #[serde(skip_serializing_if = "Option::is_none")]
3846    pub country: Option<String>,
3847    /// Block or building number.
3848    #[serde(skip_serializing_if = "Option::is_none")]
3849    pub line1: Option<String>,
3850    /// Building details.
3851    #[serde(skip_serializing_if = "Option::is_none")]
3852    pub line2: Option<String>,
3853    /// Postal code.
3854    #[serde(skip_serializing_if = "Option::is_none")]
3855    pub postal_code: Option<String>,
3856    /// Prefecture.
3857    #[serde(skip_serializing_if = "Option::is_none")]
3858    pub state: Option<String>,
3859    /// Town or cho-me.
3860    #[serde(skip_serializing_if = "Option::is_none")]
3861    pub town: Option<String>,
3862}
3863#[cfg(feature = "redact-generated-debug")]
3864impl std::fmt::Debug for UpdateAccountIndividualAddressKanji {
3865    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3866        f.debug_struct("UpdateAccountIndividualAddressKanji").finish_non_exhaustive()
3867    }
3868}
3869impl UpdateAccountIndividualAddressKanji {
3870    pub fn new() -> Self {
3871        Self {
3872            city: None,
3873            country: None,
3874            line1: None,
3875            line2: None,
3876            postal_code: None,
3877            state: None,
3878            town: None,
3879        }
3880    }
3881}
3882impl Default for UpdateAccountIndividualAddressKanji {
3883    fn default() -> Self {
3884        Self::new()
3885    }
3886}
3887/// Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
3888#[derive(Clone, Eq, PartialEq)]
3889#[non_exhaustive]
3890pub enum UpdateAccountIndividualPoliticalExposure {
3891    Existing,
3892    None,
3893    /// An unrecognized value from Stripe. Should not be used as a request parameter.
3894    Unknown(String),
3895}
3896impl UpdateAccountIndividualPoliticalExposure {
3897    pub fn as_str(&self) -> &str {
3898        use UpdateAccountIndividualPoliticalExposure::*;
3899        match self {
3900            Existing => "existing",
3901            None => "none",
3902            Unknown(v) => v,
3903        }
3904    }
3905}
3906
3907impl std::str::FromStr for UpdateAccountIndividualPoliticalExposure {
3908    type Err = std::convert::Infallible;
3909    fn from_str(s: &str) -> Result<Self, Self::Err> {
3910        use UpdateAccountIndividualPoliticalExposure::*;
3911        match s {
3912            "existing" => Ok(Existing),
3913            "none" => Ok(None),
3914            v => {
3915                tracing::warn!(
3916                    "Unknown value '{}' for enum '{}'",
3917                    v,
3918                    "UpdateAccountIndividualPoliticalExposure"
3919                );
3920                Ok(Unknown(v.to_owned()))
3921            }
3922        }
3923    }
3924}
3925impl std::fmt::Display for UpdateAccountIndividualPoliticalExposure {
3926    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3927        f.write_str(self.as_str())
3928    }
3929}
3930
3931#[cfg(not(feature = "redact-generated-debug"))]
3932impl std::fmt::Debug for UpdateAccountIndividualPoliticalExposure {
3933    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3934        f.write_str(self.as_str())
3935    }
3936}
3937#[cfg(feature = "redact-generated-debug")]
3938impl std::fmt::Debug for UpdateAccountIndividualPoliticalExposure {
3939    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3940        f.debug_struct(stringify!(UpdateAccountIndividualPoliticalExposure)).finish_non_exhaustive()
3941    }
3942}
3943impl serde::Serialize for UpdateAccountIndividualPoliticalExposure {
3944    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3945    where
3946        S: serde::Serializer,
3947    {
3948        serializer.serialize_str(self.as_str())
3949    }
3950}
3951#[cfg(feature = "deserialize")]
3952impl<'de> serde::Deserialize<'de> for UpdateAccountIndividualPoliticalExposure {
3953    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3954        use std::str::FromStr;
3955        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3956        Ok(Self::from_str(&s).expect("infallible"))
3957    }
3958}
3959/// The individual's registered address.
3960#[derive(Clone, Eq, PartialEq)]
3961#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3962#[derive(serde::Serialize)]
3963pub struct UpdateAccountIndividualRegisteredAddress {
3964    /// City, district, suburb, town, or village.
3965    #[serde(skip_serializing_if = "Option::is_none")]
3966    pub city: Option<String>,
3967    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3968    #[serde(skip_serializing_if = "Option::is_none")]
3969    pub country: Option<String>,
3970    /// Address line 1, such as the street, PO Box, or company name.
3971    #[serde(skip_serializing_if = "Option::is_none")]
3972    pub line1: Option<String>,
3973    /// Address line 2, such as the apartment, suite, unit, or building.
3974    #[serde(skip_serializing_if = "Option::is_none")]
3975    pub line2: Option<String>,
3976    /// ZIP or postal code.
3977    #[serde(skip_serializing_if = "Option::is_none")]
3978    pub postal_code: Option<String>,
3979    /// State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
3980    #[serde(skip_serializing_if = "Option::is_none")]
3981    pub state: Option<String>,
3982}
3983#[cfg(feature = "redact-generated-debug")]
3984impl std::fmt::Debug for UpdateAccountIndividualRegisteredAddress {
3985    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3986        f.debug_struct("UpdateAccountIndividualRegisteredAddress").finish_non_exhaustive()
3987    }
3988}
3989impl UpdateAccountIndividualRegisteredAddress {
3990    pub fn new() -> Self {
3991        Self { city: None, country: None, line1: None, line2: None, postal_code: None, state: None }
3992    }
3993}
3994impl Default for UpdateAccountIndividualRegisteredAddress {
3995    fn default() -> Self {
3996        Self::new()
3997    }
3998}
3999/// Options for customizing how the account functions within Stripe.
4000#[derive(Clone, Eq, PartialEq)]
4001#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4002#[derive(serde::Serialize)]
4003pub struct UpdateAccountSettings {
4004    /// Settings specific to Bacs Direct Debit payments.
4005    #[serde(skip_serializing_if = "Option::is_none")]
4006    pub bacs_debit_payments: Option<BacsDebitPaymentsSpecs>,
4007    /// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
4008    #[serde(skip_serializing_if = "Option::is_none")]
4009    pub branding: Option<BrandingSettingsSpecs>,
4010    /// Settings specific to the account's use of the Card Issuing product.
4011    #[serde(skip_serializing_if = "Option::is_none")]
4012    pub card_issuing: Option<CardIssuingSettingsSpecs>,
4013    /// Settings specific to card charging on the account.
4014    #[serde(skip_serializing_if = "Option::is_none")]
4015    pub card_payments: Option<CardPaymentsSettingsSpecs>,
4016    /// Settings specific to the account's use of Invoices.
4017    #[serde(skip_serializing_if = "Option::is_none")]
4018    pub invoices: Option<UpdateAccountSettingsInvoices>,
4019    /// Settings that apply across payment methods for charging on the account.
4020    #[serde(skip_serializing_if = "Option::is_none")]
4021    pub payments: Option<PaymentsSettingsSpecs>,
4022    /// Settings specific to the account's payouts.
4023    #[serde(skip_serializing_if = "Option::is_none")]
4024    pub payouts: Option<UpdateAccountSettingsPayouts>,
4025    /// Settings specific to the account's Treasury FinancialAccounts.
4026    #[serde(skip_serializing_if = "Option::is_none")]
4027    pub treasury: Option<TreasurySettingsSpecs>,
4028}
4029#[cfg(feature = "redact-generated-debug")]
4030impl std::fmt::Debug for UpdateAccountSettings {
4031    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4032        f.debug_struct("UpdateAccountSettings").finish_non_exhaustive()
4033    }
4034}
4035impl UpdateAccountSettings {
4036    pub fn new() -> Self {
4037        Self {
4038            bacs_debit_payments: None,
4039            branding: None,
4040            card_issuing: None,
4041            card_payments: None,
4042            invoices: None,
4043            payments: None,
4044            payouts: None,
4045            treasury: None,
4046        }
4047    }
4048}
4049impl Default for UpdateAccountSettings {
4050    fn default() -> Self {
4051        Self::new()
4052    }
4053}
4054/// Settings specific to the account's use of Invoices.
4055#[derive(Clone, Eq, PartialEq)]
4056#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4057#[derive(serde::Serialize)]
4058pub struct UpdateAccountSettingsInvoices {
4059    /// The list of default Account Tax IDs to automatically include on invoices.
4060    /// Account Tax IDs get added when an invoice is finalized.
4061    #[serde(skip_serializing_if = "Option::is_none")]
4062    pub default_account_tax_ids: Option<Vec<String>>,
4063    /// Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.
4064    #[serde(skip_serializing_if = "Option::is_none")]
4065    pub hosted_payment_method_save: Option<UpdateAccountSettingsInvoicesHostedPaymentMethodSave>,
4066}
4067#[cfg(feature = "redact-generated-debug")]
4068impl std::fmt::Debug for UpdateAccountSettingsInvoices {
4069    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4070        f.debug_struct("UpdateAccountSettingsInvoices").finish_non_exhaustive()
4071    }
4072}
4073impl UpdateAccountSettingsInvoices {
4074    pub fn new() -> Self {
4075        Self { default_account_tax_ids: None, hosted_payment_method_save: None }
4076    }
4077}
4078impl Default for UpdateAccountSettingsInvoices {
4079    fn default() -> Self {
4080        Self::new()
4081    }
4082}
4083/// Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.
4084#[derive(Clone, Eq, PartialEq)]
4085#[non_exhaustive]
4086pub enum UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4087    Always,
4088    Never,
4089    Offer,
4090    /// An unrecognized value from Stripe. Should not be used as a request parameter.
4091    Unknown(String),
4092}
4093impl UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4094    pub fn as_str(&self) -> &str {
4095        use UpdateAccountSettingsInvoicesHostedPaymentMethodSave::*;
4096        match self {
4097            Always => "always",
4098            Never => "never",
4099            Offer => "offer",
4100            Unknown(v) => v,
4101        }
4102    }
4103}
4104
4105impl std::str::FromStr for UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4106    type Err = std::convert::Infallible;
4107    fn from_str(s: &str) -> Result<Self, Self::Err> {
4108        use UpdateAccountSettingsInvoicesHostedPaymentMethodSave::*;
4109        match s {
4110            "always" => Ok(Always),
4111            "never" => Ok(Never),
4112            "offer" => Ok(Offer),
4113            v => {
4114                tracing::warn!(
4115                    "Unknown value '{}' for enum '{}'",
4116                    v,
4117                    "UpdateAccountSettingsInvoicesHostedPaymentMethodSave"
4118                );
4119                Ok(Unknown(v.to_owned()))
4120            }
4121        }
4122    }
4123}
4124impl std::fmt::Display for UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4125    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4126        f.write_str(self.as_str())
4127    }
4128}
4129
4130#[cfg(not(feature = "redact-generated-debug"))]
4131impl std::fmt::Debug for UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4132    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4133        f.write_str(self.as_str())
4134    }
4135}
4136#[cfg(feature = "redact-generated-debug")]
4137impl std::fmt::Debug for UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4138    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4139        f.debug_struct(stringify!(UpdateAccountSettingsInvoicesHostedPaymentMethodSave))
4140            .finish_non_exhaustive()
4141    }
4142}
4143impl serde::Serialize for UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4144    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4145    where
4146        S: serde::Serializer,
4147    {
4148        serializer.serialize_str(self.as_str())
4149    }
4150}
4151#[cfg(feature = "deserialize")]
4152impl<'de> serde::Deserialize<'de> for UpdateAccountSettingsInvoicesHostedPaymentMethodSave {
4153    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4154        use std::str::FromStr;
4155        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4156        Ok(Self::from_str(&s).expect("infallible"))
4157    }
4158}
4159/// Settings specific to the account's payouts.
4160#[derive(Clone, Eq, PartialEq)]
4161#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4162#[derive(serde::Serialize)]
4163pub struct UpdateAccountSettingsPayouts {
4164    /// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account.
4165    /// For details, see [Understanding Connect Account Balances](/connect/account-balances).
4166    #[serde(skip_serializing_if = "Option::is_none")]
4167    pub debit_negative_balances: Option<bool>,
4168    /// Details on when funds from charges are available, and when they are paid out to an external account.
4169    /// For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
4170    #[serde(skip_serializing_if = "Option::is_none")]
4171    pub schedule: Option<UpdateAccountSettingsPayoutsSchedule>,
4172    /// The text that appears on the bank account statement for payouts.
4173    /// If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
4174    #[serde(skip_serializing_if = "Option::is_none")]
4175    pub statement_descriptor: Option<String>,
4176}
4177#[cfg(feature = "redact-generated-debug")]
4178impl std::fmt::Debug for UpdateAccountSettingsPayouts {
4179    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4180        f.debug_struct("UpdateAccountSettingsPayouts").finish_non_exhaustive()
4181    }
4182}
4183impl UpdateAccountSettingsPayouts {
4184    pub fn new() -> Self {
4185        Self { debit_negative_balances: None, schedule: None, statement_descriptor: None }
4186    }
4187}
4188impl Default for UpdateAccountSettingsPayouts {
4189    fn default() -> Self {
4190        Self::new()
4191    }
4192}
4193/// Details on when funds from charges are available, and when they are paid out to an external account.
4194/// For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
4195#[derive(Clone, Eq, PartialEq)]
4196#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4197#[derive(serde::Serialize)]
4198pub struct UpdateAccountSettingsPayoutsSchedule {
4199    /// The number of days charge funds are held before being paid out.
4200    /// May also be set to `minimum`, representing the lowest available value for the account country.
4201    /// Default is `minimum`.
4202    /// The `delay_days` parameter remains at the last configured value if `interval` is `manual`.
4203    /// [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
4204    #[serde(skip_serializing_if = "Option::is_none")]
4205    pub delay_days: Option<UpdateAccountSettingsPayoutsScheduleDelayDays>,
4206    /// How frequently available funds are paid out.
4207    /// One of: `daily`, `manual`, `weekly`, or `monthly`.
4208    /// Default is `daily`.
4209    #[serde(skip_serializing_if = "Option::is_none")]
4210    pub interval: Option<UpdateAccountSettingsPayoutsScheduleInterval>,
4211    /// The day of the month when available funds are paid out, specified as a number between 1--31.
4212    /// Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month.
4213    /// Required and applicable only if `interval` is `monthly`.
4214    #[serde(skip_serializing_if = "Option::is_none")]
4215    pub monthly_anchor: Option<u8>,
4216    /// The days of the month when available funds are paid out, specified as an array of numbers between 1--31.
4217    /// Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month.
4218    /// Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set.
4219    #[serde(skip_serializing_if = "Option::is_none")]
4220    pub monthly_payout_days: Option<Vec<u32>>,
4221    /// The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc.
4222    /// Required and applicable only if `interval` is `weekly`.
4223    #[serde(skip_serializing_if = "Option::is_none")]
4224    pub weekly_anchor: Option<UpdateAccountSettingsPayoutsScheduleWeeklyAnchor>,
4225    /// The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`].
4226    /// Required and applicable only if `interval` is `weekly`.
4227    #[serde(skip_serializing_if = "Option::is_none")]
4228    pub weekly_payout_days: Option<Vec<UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays>>,
4229}
4230#[cfg(feature = "redact-generated-debug")]
4231impl std::fmt::Debug for UpdateAccountSettingsPayoutsSchedule {
4232    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4233        f.debug_struct("UpdateAccountSettingsPayoutsSchedule").finish_non_exhaustive()
4234    }
4235}
4236impl UpdateAccountSettingsPayoutsSchedule {
4237    pub fn new() -> Self {
4238        Self {
4239            delay_days: None,
4240            interval: None,
4241            monthly_anchor: None,
4242            monthly_payout_days: None,
4243            weekly_anchor: None,
4244            weekly_payout_days: None,
4245        }
4246    }
4247}
4248impl Default for UpdateAccountSettingsPayoutsSchedule {
4249    fn default() -> Self {
4250        Self::new()
4251    }
4252}
4253/// The number of days charge funds are held before being paid out.
4254/// May also be set to `minimum`, representing the lowest available value for the account country.
4255/// Default is `minimum`.
4256/// The `delay_days` parameter remains at the last configured value if `interval` is `manual`.
4257/// [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
4258#[derive(Copy, Clone, Eq, PartialEq)]
4259#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4260#[derive(serde::Serialize)]
4261#[serde(rename_all = "snake_case")]
4262pub enum UpdateAccountSettingsPayoutsScheduleDelayDays {
4263    Minimum,
4264    #[serde(untagged)]
4265    U32(u32),
4266}
4267#[cfg(feature = "redact-generated-debug")]
4268impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleDelayDays {
4269    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4270        f.debug_struct("UpdateAccountSettingsPayoutsScheduleDelayDays").finish_non_exhaustive()
4271    }
4272}
4273/// How frequently available funds are paid out.
4274/// One of: `daily`, `manual`, `weekly`, or `monthly`.
4275/// Default is `daily`.
4276#[derive(Clone, Eq, PartialEq)]
4277#[non_exhaustive]
4278pub enum UpdateAccountSettingsPayoutsScheduleInterval {
4279    Daily,
4280    Manual,
4281    Monthly,
4282    Weekly,
4283    /// An unrecognized value from Stripe. Should not be used as a request parameter.
4284    Unknown(String),
4285}
4286impl UpdateAccountSettingsPayoutsScheduleInterval {
4287    pub fn as_str(&self) -> &str {
4288        use UpdateAccountSettingsPayoutsScheduleInterval::*;
4289        match self {
4290            Daily => "daily",
4291            Manual => "manual",
4292            Monthly => "monthly",
4293            Weekly => "weekly",
4294            Unknown(v) => v,
4295        }
4296    }
4297}
4298
4299impl std::str::FromStr for UpdateAccountSettingsPayoutsScheduleInterval {
4300    type Err = std::convert::Infallible;
4301    fn from_str(s: &str) -> Result<Self, Self::Err> {
4302        use UpdateAccountSettingsPayoutsScheduleInterval::*;
4303        match s {
4304            "daily" => Ok(Daily),
4305            "manual" => Ok(Manual),
4306            "monthly" => Ok(Monthly),
4307            "weekly" => Ok(Weekly),
4308            v => {
4309                tracing::warn!(
4310                    "Unknown value '{}' for enum '{}'",
4311                    v,
4312                    "UpdateAccountSettingsPayoutsScheduleInterval"
4313                );
4314                Ok(Unknown(v.to_owned()))
4315            }
4316        }
4317    }
4318}
4319impl std::fmt::Display for UpdateAccountSettingsPayoutsScheduleInterval {
4320    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4321        f.write_str(self.as_str())
4322    }
4323}
4324
4325#[cfg(not(feature = "redact-generated-debug"))]
4326impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleInterval {
4327    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4328        f.write_str(self.as_str())
4329    }
4330}
4331#[cfg(feature = "redact-generated-debug")]
4332impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleInterval {
4333    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4334        f.debug_struct(stringify!(UpdateAccountSettingsPayoutsScheduleInterval))
4335            .finish_non_exhaustive()
4336    }
4337}
4338impl serde::Serialize for UpdateAccountSettingsPayoutsScheduleInterval {
4339    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4340    where
4341        S: serde::Serializer,
4342    {
4343        serializer.serialize_str(self.as_str())
4344    }
4345}
4346#[cfg(feature = "deserialize")]
4347impl<'de> serde::Deserialize<'de> for UpdateAccountSettingsPayoutsScheduleInterval {
4348    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4349        use std::str::FromStr;
4350        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4351        Ok(Self::from_str(&s).expect("infallible"))
4352    }
4353}
4354/// The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc.
4355/// Required and applicable only if `interval` is `weekly`.
4356#[derive(Clone, Eq, PartialEq)]
4357#[non_exhaustive]
4358pub enum UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4359    Friday,
4360    Monday,
4361    Saturday,
4362    Sunday,
4363    Thursday,
4364    Tuesday,
4365    Wednesday,
4366    /// An unrecognized value from Stripe. Should not be used as a request parameter.
4367    Unknown(String),
4368}
4369impl UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4370    pub fn as_str(&self) -> &str {
4371        use UpdateAccountSettingsPayoutsScheduleWeeklyAnchor::*;
4372        match self {
4373            Friday => "friday",
4374            Monday => "monday",
4375            Saturday => "saturday",
4376            Sunday => "sunday",
4377            Thursday => "thursday",
4378            Tuesday => "tuesday",
4379            Wednesday => "wednesday",
4380            Unknown(v) => v,
4381        }
4382    }
4383}
4384
4385impl std::str::FromStr for UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4386    type Err = std::convert::Infallible;
4387    fn from_str(s: &str) -> Result<Self, Self::Err> {
4388        use UpdateAccountSettingsPayoutsScheduleWeeklyAnchor::*;
4389        match s {
4390            "friday" => Ok(Friday),
4391            "monday" => Ok(Monday),
4392            "saturday" => Ok(Saturday),
4393            "sunday" => Ok(Sunday),
4394            "thursday" => Ok(Thursday),
4395            "tuesday" => Ok(Tuesday),
4396            "wednesday" => Ok(Wednesday),
4397            v => {
4398                tracing::warn!(
4399                    "Unknown value '{}' for enum '{}'",
4400                    v,
4401                    "UpdateAccountSettingsPayoutsScheduleWeeklyAnchor"
4402                );
4403                Ok(Unknown(v.to_owned()))
4404            }
4405        }
4406    }
4407}
4408impl std::fmt::Display for UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4409    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4410        f.write_str(self.as_str())
4411    }
4412}
4413
4414#[cfg(not(feature = "redact-generated-debug"))]
4415impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4416    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4417        f.write_str(self.as_str())
4418    }
4419}
4420#[cfg(feature = "redact-generated-debug")]
4421impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4422    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4423        f.debug_struct(stringify!(UpdateAccountSettingsPayoutsScheduleWeeklyAnchor))
4424            .finish_non_exhaustive()
4425    }
4426}
4427impl serde::Serialize for UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4428    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4429    where
4430        S: serde::Serializer,
4431    {
4432        serializer.serialize_str(self.as_str())
4433    }
4434}
4435#[cfg(feature = "deserialize")]
4436impl<'de> serde::Deserialize<'de> for UpdateAccountSettingsPayoutsScheduleWeeklyAnchor {
4437    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4438        use std::str::FromStr;
4439        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4440        Ok(Self::from_str(&s).expect("infallible"))
4441    }
4442}
4443/// The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`].
4444/// Required and applicable only if `interval` is `weekly`.
4445#[derive(Clone, Eq, PartialEq)]
4446#[non_exhaustive]
4447pub enum UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4448    Friday,
4449    Monday,
4450    Thursday,
4451    Tuesday,
4452    Wednesday,
4453    /// An unrecognized value from Stripe. Should not be used as a request parameter.
4454    Unknown(String),
4455}
4456impl UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4457    pub fn as_str(&self) -> &str {
4458        use UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays::*;
4459        match self {
4460            Friday => "friday",
4461            Monday => "monday",
4462            Thursday => "thursday",
4463            Tuesday => "tuesday",
4464            Wednesday => "wednesday",
4465            Unknown(v) => v,
4466        }
4467    }
4468}
4469
4470impl std::str::FromStr for UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4471    type Err = std::convert::Infallible;
4472    fn from_str(s: &str) -> Result<Self, Self::Err> {
4473        use UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays::*;
4474        match s {
4475            "friday" => Ok(Friday),
4476            "monday" => Ok(Monday),
4477            "thursday" => Ok(Thursday),
4478            "tuesday" => Ok(Tuesday),
4479            "wednesday" => Ok(Wednesday),
4480            v => {
4481                tracing::warn!(
4482                    "Unknown value '{}' for enum '{}'",
4483                    v,
4484                    "UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays"
4485                );
4486                Ok(Unknown(v.to_owned()))
4487            }
4488        }
4489    }
4490}
4491impl std::fmt::Display for UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4492    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4493        f.write_str(self.as_str())
4494    }
4495}
4496
4497#[cfg(not(feature = "redact-generated-debug"))]
4498impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4499    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4500        f.write_str(self.as_str())
4501    }
4502}
4503#[cfg(feature = "redact-generated-debug")]
4504impl std::fmt::Debug for UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4505    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4506        f.debug_struct(stringify!(UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays))
4507            .finish_non_exhaustive()
4508    }
4509}
4510impl serde::Serialize for UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4511    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4512    where
4513        S: serde::Serializer,
4514    {
4515        serializer.serialize_str(self.as_str())
4516    }
4517}
4518#[cfg(feature = "deserialize")]
4519impl<'de> serde::Deserialize<'de> for UpdateAccountSettingsPayoutsScheduleWeeklyPayoutDays {
4520    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4521        use std::str::FromStr;
4522        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4523        Ok(Self::from_str(&s).expect("infallible"))
4524    }
4525}
4526/// Updates a <a href="/connect/accounts">connected account</a> by setting the values of the parameters passed.
4527/// Any parameters not provided are.
4528/// left unchanged.
4529///
4530/// For accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>.
4531/// is `application`, which includes Custom accounts, you can update any information on the account.
4532///
4533/// For accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>.
4534/// is `stripe`, which includes Standard and Express accounts, you can update all information until you create.
4535/// an <a href="/api/account_links">Account Link</a> or <a href="/api/account_sessions">Account Session</a> to start Connect onboarding,.
4536/// after which some properties can no longer be updated.
4537///
4538/// To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account).
4539/// Refer to our.
4540/// [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
4541#[derive(Clone)]
4542#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4543#[derive(serde::Serialize)]
4544pub struct UpdateAccount {
4545    inner: UpdateAccountBuilder,
4546    account: stripe_shared::AccountId,
4547}
4548#[cfg(feature = "redact-generated-debug")]
4549impl std::fmt::Debug for UpdateAccount {
4550    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4551        f.debug_struct("UpdateAccount").finish_non_exhaustive()
4552    }
4553}
4554impl UpdateAccount {
4555    /// Construct a new `UpdateAccount`.
4556    pub fn new(account: impl Into<stripe_shared::AccountId>) -> Self {
4557        Self { account: account.into(), inner: UpdateAccountBuilder::new() }
4558    }
4559    /// An [account token](https://api.stripe.com#create_account_token), used to securely provide details to the account.
4560    pub fn account_token(mut self, account_token: impl Into<String>) -> Self {
4561        self.inner.account_token = Some(account_token.into());
4562        self
4563    }
4564    /// Business information about the account.
4565    pub fn business_profile(
4566        mut self,
4567        business_profile: impl Into<UpdateAccountBusinessProfile>,
4568    ) -> Self {
4569        self.inner.business_profile = Some(business_profile.into());
4570        self
4571    }
4572    /// The business type.
4573    /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
4574    pub fn business_type(
4575        mut self,
4576        business_type: impl Into<stripe_shared::AccountBusinessType>,
4577    ) -> Self {
4578        self.inner.business_type = Some(business_type.into());
4579        self
4580    }
4581    /// Each key of the dictionary represents a capability, and each capability
4582    /// maps to its settings (for example, whether it has been requested or not). Each
4583    /// capability is inactive until you have provided its specific
4584    /// requirements and Stripe has verified them. An account might have some
4585    /// of its requested capabilities be active and some be inactive.
4586    ///
4587    /// Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type).
4588    /// is `none`, which includes Custom accounts.
4589    pub fn capabilities(mut self, capabilities: impl Into<CapabilitiesParam>) -> Self {
4590        self.inner.capabilities = Some(capabilities.into());
4591        self
4592    }
4593    /// Information about the company or business.
4594    /// This field is available for any `business_type`.
4595    /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
4596    pub fn company(mut self, company: impl Into<UpdateAccountCompany>) -> Self {
4597        self.inner.company = Some(company.into());
4598        self
4599    }
4600    /// Three-letter ISO currency code representing the default currency for the account.
4601    /// This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
4602    pub fn default_currency(mut self, default_currency: impl Into<stripe_types::Currency>) -> Self {
4603        self.inner.default_currency = Some(default_currency.into());
4604        self
4605    }
4606    /// Documents that may be submitted to satisfy various informational requests.
4607    pub fn documents(mut self, documents: impl Into<DocumentsSpecs>) -> Self {
4608        self.inner.documents = Some(documents.into());
4609        self
4610    }
4611    /// The email address of the account holder.
4612    /// This is only to make the account easier to identify to you.
4613    /// If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
4614    pub fn email(mut self, email: impl Into<String>) -> Self {
4615        self.inner.email = Some(email.into());
4616        self
4617    }
4618    /// Specifies which fields in the response should be expanded.
4619    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
4620        self.inner.expand = Some(expand.into());
4621        self
4622    }
4623    /// A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups).
4624    /// You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
4625    ///
4626    ///
4627    /// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists.
4628    /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs.
4629    /// After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
4630    pub fn external_account(mut self, external_account: impl Into<String>) -> Self {
4631        self.inner.external_account = Some(external_account.into());
4632        self
4633    }
4634    /// A hash of account group type to tokens. These are account groups this account should be added to.
4635    pub fn groups(mut self, groups: impl Into<AccountGroupsSpecs>) -> Self {
4636        self.inner.groups = Some(groups.into());
4637        self
4638    }
4639    /// Information about the person represented by the account.
4640    /// This field is null unless `business_type` is set to `individual`.
4641    /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
4642    pub fn individual(mut self, individual: impl Into<UpdateAccountIndividual>) -> Self {
4643        self.inner.individual = Some(individual.into());
4644        self
4645    }
4646    /// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
4647    /// This can be useful for storing additional information about the object in a structured format.
4648    /// Individual keys can be unset by posting an empty value to them.
4649    /// All keys can be unset by posting an empty value to `metadata`.
4650    pub fn metadata(
4651        mut self,
4652        metadata: impl Into<std::collections::HashMap<String, String>>,
4653    ) -> Self {
4654        self.inner.metadata = Some(metadata.into());
4655        self
4656    }
4657    /// Options for customizing how the account functions within Stripe.
4658    pub fn settings(mut self, settings: impl Into<UpdateAccountSettings>) -> Self {
4659        self.inner.settings = Some(settings.into());
4660        self
4661    }
4662    /// Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance).
4663    /// This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
4664    /// This property defaults to a `full` service agreement when empty.
4665    pub fn tos_acceptance(mut self, tos_acceptance: impl Into<TosAcceptanceSpecs>) -> Self {
4666        self.inner.tos_acceptance = Some(tos_acceptance.into());
4667        self
4668    }
4669}
4670impl UpdateAccount {
4671    /// Send the request and return the deserialized response.
4672    pub async fn send<C: StripeClient>(
4673        &self,
4674        client: &C,
4675    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
4676        self.customize().send(client).await
4677    }
4678
4679    /// Send the request and return the deserialized response, blocking until completion.
4680    pub fn send_blocking<C: StripeBlockingClient>(
4681        &self,
4682        client: &C,
4683    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
4684        self.customize().send_blocking(client)
4685    }
4686}
4687
4688impl StripeRequest for UpdateAccount {
4689    type Output = stripe_shared::Account;
4690
4691    fn build(&self) -> RequestBuilder {
4692        let account = &self.account;
4693        RequestBuilder::new(StripeMethod::Post, format!("/accounts/{account}")).form(&self.inner)
4694    }
4695}
4696#[derive(Clone, Eq, PartialEq)]
4697#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4698#[derive(serde::Serialize)]
4699struct RejectAccountBuilder {
4700    #[serde(skip_serializing_if = "Option::is_none")]
4701    expand: Option<Vec<String>>,
4702    reason: String,
4703}
4704#[cfg(feature = "redact-generated-debug")]
4705impl std::fmt::Debug for RejectAccountBuilder {
4706    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4707        f.debug_struct("RejectAccountBuilder").finish_non_exhaustive()
4708    }
4709}
4710impl RejectAccountBuilder {
4711    fn new(reason: impl Into<String>) -> Self {
4712        Self { expand: None, reason: reason.into() }
4713    }
4714}
4715/// With <a href="/connect">Connect</a>, you can reject accounts that you have flagged as suspicious.
4716///
4717/// Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected.
4718/// Test-mode accounts can be rejected at any time.
4719/// Live-mode accounts can only be rejected after all balances are zero.
4720#[derive(Clone)]
4721#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4722#[derive(serde::Serialize)]
4723pub struct RejectAccount {
4724    inner: RejectAccountBuilder,
4725    account: stripe_shared::AccountId,
4726}
4727#[cfg(feature = "redact-generated-debug")]
4728impl std::fmt::Debug for RejectAccount {
4729    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4730        f.debug_struct("RejectAccount").finish_non_exhaustive()
4731    }
4732}
4733impl RejectAccount {
4734    /// Construct a new `RejectAccount`.
4735    pub fn new(account: impl Into<stripe_shared::AccountId>, reason: impl Into<String>) -> Self {
4736        Self { account: account.into(), inner: RejectAccountBuilder::new(reason.into()) }
4737    }
4738    /// Specifies which fields in the response should be expanded.
4739    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
4740        self.inner.expand = Some(expand.into());
4741        self
4742    }
4743}
4744impl RejectAccount {
4745    /// Send the request and return the deserialized response.
4746    pub async fn send<C: StripeClient>(
4747        &self,
4748        client: &C,
4749    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
4750        self.customize().send(client).await
4751    }
4752
4753    /// Send the request and return the deserialized response, blocking until completion.
4754    pub fn send_blocking<C: StripeBlockingClient>(
4755        &self,
4756        client: &C,
4757    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
4758        self.customize().send_blocking(client)
4759    }
4760}
4761
4762impl StripeRequest for RejectAccount {
4763    type Output = stripe_shared::Account;
4764
4765    fn build(&self) -> RequestBuilder {
4766        let account = &self.account;
4767        RequestBuilder::new(StripeMethod::Post, format!("/accounts/{account}/reject"))
4768            .form(&self.inner)
4769    }
4770}
4771
4772#[derive(Clone, Eq, PartialEq)]
4773#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4774#[derive(serde::Serialize)]
4775pub struct AnnualRevenueSpecs {
4776    /// A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
4777    pub amount: i64,
4778    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
4779    /// Must be a [supported currency](https://stripe.com/docs/currencies).
4780    pub currency: stripe_types::Currency,
4781    /// The close-out date of the preceding fiscal year in ISO 8601 format.
4782    /// E.g.
4783    /// 2023-12-31 for the 31st of December, 2023.
4784    pub fiscal_year_end: String,
4785}
4786#[cfg(feature = "redact-generated-debug")]
4787impl std::fmt::Debug for AnnualRevenueSpecs {
4788    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4789        f.debug_struct("AnnualRevenueSpecs").finish_non_exhaustive()
4790    }
4791}
4792impl AnnualRevenueSpecs {
4793    pub fn new(
4794        amount: impl Into<i64>,
4795        currency: impl Into<stripe_types::Currency>,
4796        fiscal_year_end: impl Into<String>,
4797    ) -> Self {
4798        Self {
4799            amount: amount.into(),
4800            currency: currency.into(),
4801            fiscal_year_end: fiscal_year_end.into(),
4802        }
4803    }
4804}
4805#[derive(Clone, Eq, PartialEq)]
4806#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4807#[derive(serde::Serialize)]
4808pub struct MonthlyEstimatedRevenueSpecs {
4809    /// A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
4810    pub amount: i64,
4811    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
4812    /// Must be a [supported currency](https://stripe.com/docs/currencies).
4813    pub currency: stripe_types::Currency,
4814}
4815#[cfg(feature = "redact-generated-debug")]
4816impl std::fmt::Debug for MonthlyEstimatedRevenueSpecs {
4817    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4818        f.debug_struct("MonthlyEstimatedRevenueSpecs").finish_non_exhaustive()
4819    }
4820}
4821impl MonthlyEstimatedRevenueSpecs {
4822    pub fn new(amount: impl Into<i64>, currency: impl Into<stripe_types::Currency>) -> Self {
4823        Self { amount: amount.into(), currency: currency.into() }
4824    }
4825}
4826#[derive(Copy, Clone, Eq, PartialEq)]
4827#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4828#[derive(serde::Serialize)]
4829pub struct CapabilityParam {
4830    /// Passing true requests the capability for the account, if it is not already requested.
4831    /// A requested capability may not immediately become active.
4832    /// Any requirements to activate the capability are returned in the `requirements` arrays.
4833    #[serde(skip_serializing_if = "Option::is_none")]
4834    pub requested: Option<bool>,
4835}
4836#[cfg(feature = "redact-generated-debug")]
4837impl std::fmt::Debug for CapabilityParam {
4838    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4839        f.debug_struct("CapabilityParam").finish_non_exhaustive()
4840    }
4841}
4842impl CapabilityParam {
4843    pub fn new() -> Self {
4844        Self { requested: None }
4845    }
4846}
4847impl Default for CapabilityParam {
4848    fn default() -> Self {
4849        Self::new()
4850    }
4851}
4852#[derive(Clone, Eq, PartialEq)]
4853#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4854#[derive(serde::Serialize)]
4855pub struct CompanyDirectorshipDeclaration {
4856    /// The Unix timestamp marking when the directorship declaration attestation was made.
4857    #[serde(skip_serializing_if = "Option::is_none")]
4858    pub date: Option<stripe_types::Timestamp>,
4859    /// The IP address from which the directorship declaration attestation was made.
4860    #[serde(skip_serializing_if = "Option::is_none")]
4861    pub ip: Option<String>,
4862    /// The user agent of the browser from which the directorship declaration attestation was made.
4863    #[serde(skip_serializing_if = "Option::is_none")]
4864    pub user_agent: Option<String>,
4865}
4866#[cfg(feature = "redact-generated-debug")]
4867impl std::fmt::Debug for CompanyDirectorshipDeclaration {
4868    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4869        f.debug_struct("CompanyDirectorshipDeclaration").finish_non_exhaustive()
4870    }
4871}
4872impl CompanyDirectorshipDeclaration {
4873    pub fn new() -> Self {
4874        Self { date: None, ip: None, user_agent: None }
4875    }
4876}
4877impl Default for CompanyDirectorshipDeclaration {
4878    fn default() -> Self {
4879        Self::new()
4880    }
4881}
4882#[derive(Clone, Eq, PartialEq)]
4883#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4884#[derive(serde::Serialize)]
4885pub struct CompanyOwnershipDeclaration {
4886    /// The Unix timestamp marking when the beneficial owner attestation was made.
4887    #[serde(skip_serializing_if = "Option::is_none")]
4888    pub date: Option<stripe_types::Timestamp>,
4889    /// The IP address from which the beneficial owner attestation was made.
4890    #[serde(skip_serializing_if = "Option::is_none")]
4891    pub ip: Option<String>,
4892    /// The user agent of the browser from which the beneficial owner attestation was made.
4893    #[serde(skip_serializing_if = "Option::is_none")]
4894    pub user_agent: Option<String>,
4895}
4896#[cfg(feature = "redact-generated-debug")]
4897impl std::fmt::Debug for CompanyOwnershipDeclaration {
4898    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4899        f.debug_struct("CompanyOwnershipDeclaration").finish_non_exhaustive()
4900    }
4901}
4902impl CompanyOwnershipDeclaration {
4903    pub fn new() -> Self {
4904        Self { date: None, ip: None, user_agent: None }
4905    }
4906}
4907impl Default for CompanyOwnershipDeclaration {
4908    fn default() -> Self {
4909        Self::new()
4910    }
4911}
4912#[derive(Copy, Clone, Eq, PartialEq)]
4913#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4914#[derive(serde::Serialize)]
4915pub struct RegistrationDateSpecs {
4916    /// The day of registration, between 1 and 31.
4917    pub day: i64,
4918    /// The month of registration, between 1 and 12.
4919    pub month: i64,
4920    /// The four-digit year of registration.
4921    pub year: i64,
4922}
4923#[cfg(feature = "redact-generated-debug")]
4924impl std::fmt::Debug for RegistrationDateSpecs {
4925    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4926        f.debug_struct("RegistrationDateSpecs").finish_non_exhaustive()
4927    }
4928}
4929impl RegistrationDateSpecs {
4930    pub fn new(day: impl Into<i64>, month: impl Into<i64>, year: impl Into<i64>) -> Self {
4931        Self { day: day.into(), month: month.into(), year: year.into() }
4932    }
4933}
4934#[derive(Clone, Eq, PartialEq)]
4935#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4936#[derive(serde::Serialize)]
4937pub struct CompanyRepresentativeDeclaration {
4938    /// The Unix timestamp marking when the representative declaration attestation was made.
4939    #[serde(skip_serializing_if = "Option::is_none")]
4940    pub date: Option<stripe_types::Timestamp>,
4941    /// The IP address from which the representative declaration attestation was made.
4942    #[serde(skip_serializing_if = "Option::is_none")]
4943    pub ip: Option<String>,
4944    /// The user agent of the browser from which the representative declaration attestation was made.
4945    #[serde(skip_serializing_if = "Option::is_none")]
4946    pub user_agent: Option<String>,
4947}
4948#[cfg(feature = "redact-generated-debug")]
4949impl std::fmt::Debug for CompanyRepresentativeDeclaration {
4950    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4951        f.debug_struct("CompanyRepresentativeDeclaration").finish_non_exhaustive()
4952    }
4953}
4954impl CompanyRepresentativeDeclaration {
4955    pub fn new() -> Self {
4956        Self { date: None, ip: None, user_agent: None }
4957    }
4958}
4959impl Default for CompanyRepresentativeDeclaration {
4960    fn default() -> Self {
4961        Self::new()
4962    }
4963}
4964#[derive(Clone, Eq, PartialEq)]
4965#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4966#[derive(serde::Serialize)]
4967pub struct VerificationDocumentSpecs {
4968    /// The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`.
4969    /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
4970    #[serde(skip_serializing_if = "Option::is_none")]
4971    pub back: Option<String>,
4972    /// The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`.
4973    /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
4974    #[serde(skip_serializing_if = "Option::is_none")]
4975    pub front: Option<String>,
4976}
4977#[cfg(feature = "redact-generated-debug")]
4978impl std::fmt::Debug for VerificationDocumentSpecs {
4979    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4980        f.debug_struct("VerificationDocumentSpecs").finish_non_exhaustive()
4981    }
4982}
4983impl VerificationDocumentSpecs {
4984    pub fn new() -> Self {
4985        Self { back: None, front: None }
4986    }
4987}
4988impl Default for VerificationDocumentSpecs {
4989    fn default() -> Self {
4990        Self::new()
4991    }
4992}
4993#[derive(Clone, Eq, PartialEq)]
4994#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
4995#[derive(serde::Serialize)]
4996pub struct DocumentsParam {
4997    /// One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`.
4998    #[serde(skip_serializing_if = "Option::is_none")]
4999    pub files: Option<Vec<String>>,
5000}
5001#[cfg(feature = "redact-generated-debug")]
5002impl std::fmt::Debug for DocumentsParam {
5003    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5004        f.debug_struct("DocumentsParam").finish_non_exhaustive()
5005    }
5006}
5007impl DocumentsParam {
5008    pub fn new() -> Self {
5009        Self { files: None }
5010    }
5011}
5012impl Default for DocumentsParam {
5013    fn default() -> Self {
5014        Self::new()
5015    }
5016}
5017#[derive(Clone, Eq, PartialEq)]
5018#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5019#[derive(serde::Serialize)]
5020pub struct SignerNameParam {
5021    /// The token of the person signing the document, if applicable.
5022    #[serde(skip_serializing_if = "Option::is_none")]
5023    pub person: Option<String>,
5024}
5025#[cfg(feature = "redact-generated-debug")]
5026impl std::fmt::Debug for SignerNameParam {
5027    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5028        f.debug_struct("SignerNameParam").finish_non_exhaustive()
5029    }
5030}
5031impl SignerNameParam {
5032    pub fn new() -> Self {
5033        Self { person: None }
5034    }
5035}
5036impl Default for SignerNameParam {
5037    fn default() -> Self {
5038        Self::new()
5039    }
5040}
5041#[derive(Clone, Eq, PartialEq)]
5042#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5043#[derive(serde::Serialize)]
5044pub struct AccountGroupsSpecs {
5045    /// The group the account is in to determine their payments pricing, and null if the account is on customized pricing.
5046    /// [See the Platform pricing tool documentation](https://docs.stripe.com/connect/platform-pricing-tools) for details.
5047    #[serde(skip_serializing_if = "Option::is_none")]
5048    pub payments_pricing: Option<String>,
5049}
5050#[cfg(feature = "redact-generated-debug")]
5051impl std::fmt::Debug for AccountGroupsSpecs {
5052    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5053        f.debug_struct("AccountGroupsSpecs").finish_non_exhaustive()
5054    }
5055}
5056impl AccountGroupsSpecs {
5057    pub fn new() -> Self {
5058        Self { payments_pricing: None }
5059    }
5060}
5061impl Default for AccountGroupsSpecs {
5062    fn default() -> Self {
5063        Self::new()
5064    }
5065}
5066#[derive(Copy, Clone, Eq, PartialEq)]
5067#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5068#[derive(serde::Serialize)]
5069pub struct DateOfBirthSpecs {
5070    /// The day of birth, between 1 and 31.
5071    pub day: i64,
5072    /// The month of birth, between 1 and 12.
5073    pub month: i64,
5074    /// The four-digit year of birth.
5075    pub year: i64,
5076}
5077#[cfg(feature = "redact-generated-debug")]
5078impl std::fmt::Debug for DateOfBirthSpecs {
5079    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5080        f.debug_struct("DateOfBirthSpecs").finish_non_exhaustive()
5081    }
5082}
5083impl DateOfBirthSpecs {
5084    pub fn new(day: impl Into<i64>, month: impl Into<i64>, year: impl Into<i64>) -> Self {
5085        Self { day: day.into(), month: month.into(), year: year.into() }
5086    }
5087}
5088#[derive(Clone)]
5089#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5090#[derive(serde::Serialize)]
5091pub struct IndividualRelationshipSpecs {
5092    /// Whether the person is a director of the account's legal entity.
5093    /// Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
5094    #[serde(skip_serializing_if = "Option::is_none")]
5095    pub director: Option<bool>,
5096    /// Whether the person has significant responsibility to control, manage, or direct the organization.
5097    #[serde(skip_serializing_if = "Option::is_none")]
5098    pub executive: Option<bool>,
5099    /// Whether the person is an owner of the account’s legal entity.
5100    #[serde(skip_serializing_if = "Option::is_none")]
5101    pub owner: Option<bool>,
5102    /// The percent owned by the person of the account's legal entity.
5103    #[serde(skip_serializing_if = "Option::is_none")]
5104    pub percent_ownership: Option<f64>,
5105    /// The person's title (e.g., CEO, Support Engineer).
5106    #[serde(skip_serializing_if = "Option::is_none")]
5107    pub title: Option<String>,
5108}
5109#[cfg(feature = "redact-generated-debug")]
5110impl std::fmt::Debug for IndividualRelationshipSpecs {
5111    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5112        f.debug_struct("IndividualRelationshipSpecs").finish_non_exhaustive()
5113    }
5114}
5115impl IndividualRelationshipSpecs {
5116    pub fn new() -> Self {
5117        Self { director: None, executive: None, owner: None, percent_ownership: None, title: None }
5118    }
5119}
5120impl Default for IndividualRelationshipSpecs {
5121    fn default() -> Self {
5122        Self::new()
5123    }
5124}
5125#[derive(Clone, Eq, PartialEq)]
5126#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5127#[derive(serde::Serialize)]
5128pub struct PersonVerificationDocumentSpecs {
5129    /// The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.
5130    /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
5131    #[serde(skip_serializing_if = "Option::is_none")]
5132    pub back: Option<String>,
5133    /// The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.
5134    /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
5135    #[serde(skip_serializing_if = "Option::is_none")]
5136    pub front: Option<String>,
5137}
5138#[cfg(feature = "redact-generated-debug")]
5139impl std::fmt::Debug for PersonVerificationDocumentSpecs {
5140    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5141        f.debug_struct("PersonVerificationDocumentSpecs").finish_non_exhaustive()
5142    }
5143}
5144impl PersonVerificationDocumentSpecs {
5145    pub fn new() -> Self {
5146        Self { back: None, front: None }
5147    }
5148}
5149impl Default for PersonVerificationDocumentSpecs {
5150    fn default() -> Self {
5151        Self::new()
5152    }
5153}
5154#[derive(Clone, Eq, PartialEq)]
5155#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5156#[derive(serde::Serialize)]
5157pub struct BacsDebitPaymentsSpecs {
5158    /// The Bacs Direct Debit Display Name for this account.
5159    /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor.
5160    /// Mobile banking apps display it as the name of the business.
5161    /// To use custom branding, set the Bacs Direct Debit Display Name during or right after creation.
5162    /// Custom branding incurs an additional monthly fee for the platform.
5163    /// If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
5164    #[serde(skip_serializing_if = "Option::is_none")]
5165    pub display_name: Option<String>,
5166}
5167#[cfg(feature = "redact-generated-debug")]
5168impl std::fmt::Debug for BacsDebitPaymentsSpecs {
5169    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5170        f.debug_struct("BacsDebitPaymentsSpecs").finish_non_exhaustive()
5171    }
5172}
5173impl BacsDebitPaymentsSpecs {
5174    pub fn new() -> Self {
5175        Self { display_name: None }
5176    }
5177}
5178impl Default for BacsDebitPaymentsSpecs {
5179    fn default() -> Self {
5180        Self::new()
5181    }
5182}
5183#[derive(Clone, Eq, PartialEq)]
5184#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5185#[derive(serde::Serialize)]
5186pub struct BrandingSettingsSpecs {
5187    /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account.
5188    /// Must be square and at least 128px x 128px.
5189    #[serde(skip_serializing_if = "Option::is_none")]
5190    pub icon: Option<String>,
5191    /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided.
5192    /// Must be at least 128px x 128px.
5193    #[serde(skip_serializing_if = "Option::is_none")]
5194    pub logo: Option<String>,
5195    /// A CSS hex color value representing the primary branding color for this account.
5196    #[serde(skip_serializing_if = "Option::is_none")]
5197    pub primary_color: Option<String>,
5198    /// A CSS hex color value representing the secondary branding color for this account.
5199    #[serde(skip_serializing_if = "Option::is_none")]
5200    pub secondary_color: Option<String>,
5201}
5202#[cfg(feature = "redact-generated-debug")]
5203impl std::fmt::Debug for BrandingSettingsSpecs {
5204    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5205        f.debug_struct("BrandingSettingsSpecs").finish_non_exhaustive()
5206    }
5207}
5208impl BrandingSettingsSpecs {
5209    pub fn new() -> Self {
5210        Self { icon: None, logo: None, primary_color: None, secondary_color: None }
5211    }
5212}
5213impl Default for BrandingSettingsSpecs {
5214    fn default() -> Self {
5215        Self::new()
5216    }
5217}
5218#[derive(Clone, Eq, PartialEq)]
5219#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5220#[derive(serde::Serialize)]
5221pub struct SettingsTermsOfServiceSpecs {
5222    /// The Unix timestamp marking when the account representative accepted the service agreement.
5223    #[serde(skip_serializing_if = "Option::is_none")]
5224    pub date: Option<stripe_types::Timestamp>,
5225    /// The IP address from which the account representative accepted the service agreement.
5226    #[serde(skip_serializing_if = "Option::is_none")]
5227    pub ip: Option<String>,
5228    /// The user agent of the browser from which the account representative accepted the service agreement.
5229    #[serde(skip_serializing_if = "Option::is_none")]
5230    pub user_agent: Option<String>,
5231}
5232#[cfg(feature = "redact-generated-debug")]
5233impl std::fmt::Debug for SettingsTermsOfServiceSpecs {
5234    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5235        f.debug_struct("SettingsTermsOfServiceSpecs").finish_non_exhaustive()
5236    }
5237}
5238impl SettingsTermsOfServiceSpecs {
5239    pub fn new() -> Self {
5240        Self { date: None, ip: None, user_agent: None }
5241    }
5242}
5243impl Default for SettingsTermsOfServiceSpecs {
5244    fn default() -> Self {
5245        Self::new()
5246    }
5247}
5248#[derive(Copy, Clone, Eq, PartialEq)]
5249#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5250#[derive(serde::Serialize)]
5251pub struct DeclineChargeOnSpecs {
5252    /// Whether Stripe automatically declines charges with an incorrect ZIP or postal code.
5253    /// This setting only applies when a ZIP or postal code is provided and they fail bank verification.
5254    #[serde(skip_serializing_if = "Option::is_none")]
5255    pub avs_failure: Option<bool>,
5256    /// Whether Stripe automatically declines charges with an incorrect CVC.
5257    /// This setting only applies when a CVC is provided and it fails bank verification.
5258    #[serde(skip_serializing_if = "Option::is_none")]
5259    pub cvc_failure: Option<bool>,
5260}
5261#[cfg(feature = "redact-generated-debug")]
5262impl std::fmt::Debug for DeclineChargeOnSpecs {
5263    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5264        f.debug_struct("DeclineChargeOnSpecs").finish_non_exhaustive()
5265    }
5266}
5267impl DeclineChargeOnSpecs {
5268    pub fn new() -> Self {
5269        Self { avs_failure: None, cvc_failure: None }
5270    }
5271}
5272impl Default for DeclineChargeOnSpecs {
5273    fn default() -> Self {
5274        Self::new()
5275    }
5276}
5277#[derive(Clone, Eq, PartialEq)]
5278#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5279#[derive(serde::Serialize)]
5280pub struct PaymentsSettingsSpecs {
5281    /// The default text that appears on statements for non-card charges outside of Japan.
5282    /// For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix.
5283    /// In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters.
5284    /// For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
5285    #[serde(skip_serializing_if = "Option::is_none")]
5286    pub statement_descriptor: Option<String>,
5287    /// The Kana variation of `statement_descriptor` used for charges in Japan.
5288    /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
5289    #[serde(skip_serializing_if = "Option::is_none")]
5290    pub statement_descriptor_kana: Option<String>,
5291    /// The Kanji variation of `statement_descriptor` used for charges in Japan.
5292    /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
5293    #[serde(skip_serializing_if = "Option::is_none")]
5294    pub statement_descriptor_kanji: Option<String>,
5295}
5296#[cfg(feature = "redact-generated-debug")]
5297impl std::fmt::Debug for PaymentsSettingsSpecs {
5298    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5299        f.debug_struct("PaymentsSettingsSpecs").finish_non_exhaustive()
5300    }
5301}
5302impl PaymentsSettingsSpecs {
5303    pub fn new() -> Self {
5304        Self {
5305            statement_descriptor: None,
5306            statement_descriptor_kana: None,
5307            statement_descriptor_kanji: None,
5308        }
5309    }
5310}
5311impl Default for PaymentsSettingsSpecs {
5312    fn default() -> Self {
5313        Self::new()
5314    }
5315}
5316#[derive(Clone, Eq, PartialEq)]
5317#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5318#[derive(serde::Serialize)]
5319pub struct TosAcceptanceSpecs {
5320    /// The Unix timestamp marking when the account representative accepted their service agreement.
5321    #[serde(skip_serializing_if = "Option::is_none")]
5322    pub date: Option<stripe_types::Timestamp>,
5323    /// The IP address from which the account representative accepted their service agreement.
5324    #[serde(skip_serializing_if = "Option::is_none")]
5325    pub ip: Option<String>,
5326    /// The user's service agreement type.
5327    #[serde(skip_serializing_if = "Option::is_none")]
5328    pub service_agreement: Option<String>,
5329    /// The user agent of the browser from which the account representative accepted their service agreement.
5330    #[serde(skip_serializing_if = "Option::is_none")]
5331    pub user_agent: Option<String>,
5332}
5333#[cfg(feature = "redact-generated-debug")]
5334impl std::fmt::Debug for TosAcceptanceSpecs {
5335    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5336        f.debug_struct("TosAcceptanceSpecs").finish_non_exhaustive()
5337    }
5338}
5339impl TosAcceptanceSpecs {
5340    pub fn new() -> Self {
5341        Self { date: None, ip: None, service_agreement: None, user_agent: None }
5342    }
5343}
5344impl Default for TosAcceptanceSpecs {
5345    fn default() -> Self {
5346        Self::new()
5347    }
5348}
5349#[derive(Copy, Clone, Eq, PartialEq)]
5350#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5351#[derive(serde::Serialize)]
5352pub struct CapabilitiesParam {
5353    /// The acss_debit_payments capability.
5354    #[serde(skip_serializing_if = "Option::is_none")]
5355    pub acss_debit_payments: Option<CapabilityParam>,
5356    /// The affirm_payments capability.
5357    #[serde(skip_serializing_if = "Option::is_none")]
5358    pub affirm_payments: Option<CapabilityParam>,
5359    /// The afterpay_clearpay_payments capability.
5360    #[serde(skip_serializing_if = "Option::is_none")]
5361    pub afterpay_clearpay_payments: Option<CapabilityParam>,
5362    /// The alma_payments capability.
5363    #[serde(skip_serializing_if = "Option::is_none")]
5364    pub alma_payments: Option<CapabilityParam>,
5365    /// The amazon_pay_payments capability.
5366    #[serde(skip_serializing_if = "Option::is_none")]
5367    pub amazon_pay_payments: Option<CapabilityParam>,
5368    /// The au_becs_debit_payments capability.
5369    #[serde(skip_serializing_if = "Option::is_none")]
5370    pub au_becs_debit_payments: Option<CapabilityParam>,
5371    /// The bacs_debit_payments capability.
5372    #[serde(skip_serializing_if = "Option::is_none")]
5373    pub bacs_debit_payments: Option<CapabilityParam>,
5374    /// The bancontact_payments capability.
5375    #[serde(skip_serializing_if = "Option::is_none")]
5376    pub bancontact_payments: Option<CapabilityParam>,
5377    /// The bank_transfer_payments capability.
5378    #[serde(skip_serializing_if = "Option::is_none")]
5379    pub bank_transfer_payments: Option<CapabilityParam>,
5380    /// The billie_payments capability.
5381    #[serde(skip_serializing_if = "Option::is_none")]
5382    pub billie_payments: Option<CapabilityParam>,
5383    /// The blik_payments capability.
5384    #[serde(skip_serializing_if = "Option::is_none")]
5385    pub blik_payments: Option<CapabilityParam>,
5386    /// The boleto_payments capability.
5387    #[serde(skip_serializing_if = "Option::is_none")]
5388    pub boleto_payments: Option<CapabilityParam>,
5389    /// The card_issuing capability.
5390    #[serde(skip_serializing_if = "Option::is_none")]
5391    pub card_issuing: Option<CapabilityParam>,
5392    /// The card_payments capability.
5393    #[serde(skip_serializing_if = "Option::is_none")]
5394    pub card_payments: Option<CapabilityParam>,
5395    /// The cartes_bancaires_payments capability.
5396    #[serde(skip_serializing_if = "Option::is_none")]
5397    pub cartes_bancaires_payments: Option<CapabilityParam>,
5398    /// The cashapp_payments capability.
5399    #[serde(skip_serializing_if = "Option::is_none")]
5400    pub cashapp_payments: Option<CapabilityParam>,
5401    /// The crypto_payments capability.
5402    #[serde(skip_serializing_if = "Option::is_none")]
5403    pub crypto_payments: Option<CapabilityParam>,
5404    /// The eps_payments capability.
5405    #[serde(skip_serializing_if = "Option::is_none")]
5406    pub eps_payments: Option<CapabilityParam>,
5407    /// The fpx_payments capability.
5408    #[serde(skip_serializing_if = "Option::is_none")]
5409    pub fpx_payments: Option<CapabilityParam>,
5410    /// The gb_bank_transfer_payments capability.
5411    #[serde(skip_serializing_if = "Option::is_none")]
5412    pub gb_bank_transfer_payments: Option<CapabilityParam>,
5413    /// The giropay_payments capability.
5414    #[serde(skip_serializing_if = "Option::is_none")]
5415    pub giropay_payments: Option<CapabilityParam>,
5416    /// The grabpay_payments capability.
5417    #[serde(skip_serializing_if = "Option::is_none")]
5418    pub grabpay_payments: Option<CapabilityParam>,
5419    /// The ideal_payments capability.
5420    #[serde(skip_serializing_if = "Option::is_none")]
5421    pub ideal_payments: Option<CapabilityParam>,
5422    /// The india_international_payments capability.
5423    #[serde(skip_serializing_if = "Option::is_none")]
5424    pub india_international_payments: Option<CapabilityParam>,
5425    /// The jcb_payments capability.
5426    #[serde(skip_serializing_if = "Option::is_none")]
5427    pub jcb_payments: Option<CapabilityParam>,
5428    /// The jp_bank_transfer_payments capability.
5429    #[serde(skip_serializing_if = "Option::is_none")]
5430    pub jp_bank_transfer_payments: Option<CapabilityParam>,
5431    /// The kakao_pay_payments capability.
5432    #[serde(skip_serializing_if = "Option::is_none")]
5433    pub kakao_pay_payments: Option<CapabilityParam>,
5434    /// The klarna_payments capability.
5435    #[serde(skip_serializing_if = "Option::is_none")]
5436    pub klarna_payments: Option<CapabilityParam>,
5437    /// The konbini_payments capability.
5438    #[serde(skip_serializing_if = "Option::is_none")]
5439    pub konbini_payments: Option<CapabilityParam>,
5440    /// The kr_card_payments capability.
5441    #[serde(skip_serializing_if = "Option::is_none")]
5442    pub kr_card_payments: Option<CapabilityParam>,
5443    /// The legacy_payments capability.
5444    #[serde(skip_serializing_if = "Option::is_none")]
5445    pub legacy_payments: Option<CapabilityParam>,
5446    /// The link_payments capability.
5447    #[serde(skip_serializing_if = "Option::is_none")]
5448    pub link_payments: Option<CapabilityParam>,
5449    /// The mb_way_payments capability.
5450    #[serde(skip_serializing_if = "Option::is_none")]
5451    pub mb_way_payments: Option<CapabilityParam>,
5452    /// The mobilepay_payments capability.
5453    #[serde(skip_serializing_if = "Option::is_none")]
5454    pub mobilepay_payments: Option<CapabilityParam>,
5455    /// The multibanco_payments capability.
5456    #[serde(skip_serializing_if = "Option::is_none")]
5457    pub multibanco_payments: Option<CapabilityParam>,
5458    /// The mx_bank_transfer_payments capability.
5459    #[serde(skip_serializing_if = "Option::is_none")]
5460    pub mx_bank_transfer_payments: Option<CapabilityParam>,
5461    /// The naver_pay_payments capability.
5462    #[serde(skip_serializing_if = "Option::is_none")]
5463    pub naver_pay_payments: Option<CapabilityParam>,
5464    /// The nz_bank_account_becs_debit_payments capability.
5465    #[serde(skip_serializing_if = "Option::is_none")]
5466    pub nz_bank_account_becs_debit_payments: Option<CapabilityParam>,
5467    /// The oxxo_payments capability.
5468    #[serde(skip_serializing_if = "Option::is_none")]
5469    pub oxxo_payments: Option<CapabilityParam>,
5470    /// The p24_payments capability.
5471    #[serde(skip_serializing_if = "Option::is_none")]
5472    pub p24_payments: Option<CapabilityParam>,
5473    /// The pay_by_bank_payments capability.
5474    #[serde(skip_serializing_if = "Option::is_none")]
5475    pub pay_by_bank_payments: Option<CapabilityParam>,
5476    /// The payco_payments capability.
5477    #[serde(skip_serializing_if = "Option::is_none")]
5478    pub payco_payments: Option<CapabilityParam>,
5479    /// The paynow_payments capability.
5480    #[serde(skip_serializing_if = "Option::is_none")]
5481    pub paynow_payments: Option<CapabilityParam>,
5482    /// The payto_payments capability.
5483    #[serde(skip_serializing_if = "Option::is_none")]
5484    pub payto_payments: Option<CapabilityParam>,
5485    /// The pix_payments capability.
5486    #[serde(skip_serializing_if = "Option::is_none")]
5487    pub pix_payments: Option<CapabilityParam>,
5488    /// The promptpay_payments capability.
5489    #[serde(skip_serializing_if = "Option::is_none")]
5490    pub promptpay_payments: Option<CapabilityParam>,
5491    /// The revolut_pay_payments capability.
5492    #[serde(skip_serializing_if = "Option::is_none")]
5493    pub revolut_pay_payments: Option<CapabilityParam>,
5494    /// The samsung_pay_payments capability.
5495    #[serde(skip_serializing_if = "Option::is_none")]
5496    pub samsung_pay_payments: Option<CapabilityParam>,
5497    /// The satispay_payments capability.
5498    #[serde(skip_serializing_if = "Option::is_none")]
5499    pub satispay_payments: Option<CapabilityParam>,
5500    /// The sepa_bank_transfer_payments capability.
5501    #[serde(skip_serializing_if = "Option::is_none")]
5502    pub sepa_bank_transfer_payments: Option<CapabilityParam>,
5503    /// The sepa_debit_payments capability.
5504    #[serde(skip_serializing_if = "Option::is_none")]
5505    pub sepa_debit_payments: Option<CapabilityParam>,
5506    /// The sofort_payments capability.
5507    #[serde(skip_serializing_if = "Option::is_none")]
5508    pub sofort_payments: Option<CapabilityParam>,
5509    /// The swish_payments capability.
5510    #[serde(skip_serializing_if = "Option::is_none")]
5511    pub swish_payments: Option<CapabilityParam>,
5512    /// The tax_reporting_us_1099_k capability.
5513    #[serde(skip_serializing_if = "Option::is_none")]
5514    pub tax_reporting_us_1099_k: Option<CapabilityParam>,
5515    /// The tax_reporting_us_1099_misc capability.
5516    #[serde(skip_serializing_if = "Option::is_none")]
5517    pub tax_reporting_us_1099_misc: Option<CapabilityParam>,
5518    /// The transfers capability.
5519    #[serde(skip_serializing_if = "Option::is_none")]
5520    pub transfers: Option<CapabilityParam>,
5521    /// The treasury capability.
5522    #[serde(skip_serializing_if = "Option::is_none")]
5523    pub treasury: Option<CapabilityParam>,
5524    /// The twint_payments capability.
5525    #[serde(skip_serializing_if = "Option::is_none")]
5526    pub twint_payments: Option<CapabilityParam>,
5527    /// The upi_payments capability.
5528    #[serde(skip_serializing_if = "Option::is_none")]
5529    pub upi_payments: Option<CapabilityParam>,
5530    /// The us_bank_account_ach_payments capability.
5531    #[serde(skip_serializing_if = "Option::is_none")]
5532    pub us_bank_account_ach_payments: Option<CapabilityParam>,
5533    /// The us_bank_transfer_payments capability.
5534    #[serde(skip_serializing_if = "Option::is_none")]
5535    pub us_bank_transfer_payments: Option<CapabilityParam>,
5536    /// The zip_payments capability.
5537    #[serde(skip_serializing_if = "Option::is_none")]
5538    pub zip_payments: Option<CapabilityParam>,
5539}
5540#[cfg(feature = "redact-generated-debug")]
5541impl std::fmt::Debug for CapabilitiesParam {
5542    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5543        f.debug_struct("CapabilitiesParam").finish_non_exhaustive()
5544    }
5545}
5546impl CapabilitiesParam {
5547    pub fn new() -> Self {
5548        Self {
5549            acss_debit_payments: None,
5550            affirm_payments: None,
5551            afterpay_clearpay_payments: None,
5552            alma_payments: None,
5553            amazon_pay_payments: None,
5554            au_becs_debit_payments: None,
5555            bacs_debit_payments: None,
5556            bancontact_payments: None,
5557            bank_transfer_payments: None,
5558            billie_payments: None,
5559            blik_payments: None,
5560            boleto_payments: None,
5561            card_issuing: None,
5562            card_payments: None,
5563            cartes_bancaires_payments: None,
5564            cashapp_payments: None,
5565            crypto_payments: None,
5566            eps_payments: None,
5567            fpx_payments: None,
5568            gb_bank_transfer_payments: None,
5569            giropay_payments: None,
5570            grabpay_payments: None,
5571            ideal_payments: None,
5572            india_international_payments: None,
5573            jcb_payments: None,
5574            jp_bank_transfer_payments: None,
5575            kakao_pay_payments: None,
5576            klarna_payments: None,
5577            konbini_payments: None,
5578            kr_card_payments: None,
5579            legacy_payments: None,
5580            link_payments: None,
5581            mb_way_payments: None,
5582            mobilepay_payments: None,
5583            multibanco_payments: None,
5584            mx_bank_transfer_payments: None,
5585            naver_pay_payments: None,
5586            nz_bank_account_becs_debit_payments: None,
5587            oxxo_payments: None,
5588            p24_payments: None,
5589            pay_by_bank_payments: None,
5590            payco_payments: None,
5591            paynow_payments: None,
5592            payto_payments: None,
5593            pix_payments: None,
5594            promptpay_payments: None,
5595            revolut_pay_payments: None,
5596            samsung_pay_payments: None,
5597            satispay_payments: None,
5598            sepa_bank_transfer_payments: None,
5599            sepa_debit_payments: None,
5600            sofort_payments: None,
5601            swish_payments: None,
5602            tax_reporting_us_1099_k: None,
5603            tax_reporting_us_1099_misc: None,
5604            transfers: None,
5605            treasury: None,
5606            twint_payments: None,
5607            upi_payments: None,
5608            us_bank_account_ach_payments: None,
5609            us_bank_transfer_payments: None,
5610            zip_payments: None,
5611        }
5612    }
5613}
5614impl Default for CapabilitiesParam {
5615    fn default() -> Self {
5616        Self::new()
5617    }
5618}
5619#[derive(Clone, Eq, PartialEq)]
5620#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5621#[derive(serde::Serialize)]
5622pub struct VerificationSpecs {
5623    /// A document verifying the business.
5624    #[serde(skip_serializing_if = "Option::is_none")]
5625    pub document: Option<VerificationDocumentSpecs>,
5626}
5627#[cfg(feature = "redact-generated-debug")]
5628impl std::fmt::Debug for VerificationSpecs {
5629    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5630        f.debug_struct("VerificationSpecs").finish_non_exhaustive()
5631    }
5632}
5633impl VerificationSpecs {
5634    pub fn new() -> Self {
5635        Self { document: None }
5636    }
5637}
5638impl Default for VerificationSpecs {
5639    fn default() -> Self {
5640        Self::new()
5641    }
5642}
5643#[derive(Clone, Eq, PartialEq)]
5644#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5645#[derive(serde::Serialize)]
5646pub struct SignerParam {
5647    /// One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`.
5648    #[serde(skip_serializing_if = "Option::is_none")]
5649    pub files: Option<Vec<String>>,
5650    /// Information regarding the person signing the document if applicable.
5651    #[serde(skip_serializing_if = "Option::is_none")]
5652    pub signer: Option<SignerNameParam>,
5653}
5654#[cfg(feature = "redact-generated-debug")]
5655impl std::fmt::Debug for SignerParam {
5656    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5657        f.debug_struct("SignerParam").finish_non_exhaustive()
5658    }
5659}
5660impl SignerParam {
5661    pub fn new() -> Self {
5662        Self { files: None, signer: None }
5663    }
5664}
5665impl Default for SignerParam {
5666    fn default() -> Self {
5667        Self::new()
5668    }
5669}
5670#[derive(Clone, Eq, PartialEq)]
5671#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5672#[derive(serde::Serialize)]
5673pub struct PersonVerificationSpecs {
5674    /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
5675    #[serde(skip_serializing_if = "Option::is_none")]
5676    pub additional_document: Option<PersonVerificationDocumentSpecs>,
5677    /// An identifying document, either a passport or local ID card.
5678    #[serde(skip_serializing_if = "Option::is_none")]
5679    pub document: Option<PersonVerificationDocumentSpecs>,
5680}
5681#[cfg(feature = "redact-generated-debug")]
5682impl std::fmt::Debug for PersonVerificationSpecs {
5683    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5684        f.debug_struct("PersonVerificationSpecs").finish_non_exhaustive()
5685    }
5686}
5687impl PersonVerificationSpecs {
5688    pub fn new() -> Self {
5689        Self { additional_document: None, document: None }
5690    }
5691}
5692impl Default for PersonVerificationSpecs {
5693    fn default() -> Self {
5694        Self::new()
5695    }
5696}
5697#[derive(Clone, Eq, PartialEq)]
5698#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5699#[derive(serde::Serialize)]
5700pub struct CardIssuingSettingsSpecs {
5701    /// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
5702    #[serde(skip_serializing_if = "Option::is_none")]
5703    pub tos_acceptance: Option<SettingsTermsOfServiceSpecs>,
5704}
5705#[cfg(feature = "redact-generated-debug")]
5706impl std::fmt::Debug for CardIssuingSettingsSpecs {
5707    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5708        f.debug_struct("CardIssuingSettingsSpecs").finish_non_exhaustive()
5709    }
5710}
5711impl CardIssuingSettingsSpecs {
5712    pub fn new() -> Self {
5713        Self { tos_acceptance: None }
5714    }
5715}
5716impl Default for CardIssuingSettingsSpecs {
5717    fn default() -> Self {
5718        Self::new()
5719    }
5720}
5721#[derive(Clone, Eq, PartialEq)]
5722#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5723#[derive(serde::Serialize)]
5724pub struct CardPaymentsSettingsSpecs {
5725    /// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
5726    #[serde(skip_serializing_if = "Option::is_none")]
5727    pub decline_on: Option<DeclineChargeOnSpecs>,
5728    /// The default text that appears on credit card statements when a charge is made.
5729    /// This field prefixes any dynamic `statement_descriptor` specified on the charge.
5730    /// `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
5731    #[serde(skip_serializing_if = "Option::is_none")]
5732    pub statement_descriptor_prefix: Option<String>,
5733    /// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only).
5734    /// This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge.
5735    /// `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
5736    #[serde(skip_serializing_if = "Option::is_none")]
5737    pub statement_descriptor_prefix_kana: Option<String>,
5738    /// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only).
5739    /// This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge.
5740    /// `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
5741    #[serde(skip_serializing_if = "Option::is_none")]
5742    pub statement_descriptor_prefix_kanji: Option<String>,
5743}
5744#[cfg(feature = "redact-generated-debug")]
5745impl std::fmt::Debug for CardPaymentsSettingsSpecs {
5746    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5747        f.debug_struct("CardPaymentsSettingsSpecs").finish_non_exhaustive()
5748    }
5749}
5750impl CardPaymentsSettingsSpecs {
5751    pub fn new() -> Self {
5752        Self {
5753            decline_on: None,
5754            statement_descriptor_prefix: None,
5755            statement_descriptor_prefix_kana: None,
5756            statement_descriptor_prefix_kanji: None,
5757        }
5758    }
5759}
5760impl Default for CardPaymentsSettingsSpecs {
5761    fn default() -> Self {
5762        Self::new()
5763    }
5764}
5765#[derive(Clone, Eq, PartialEq)]
5766#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5767#[derive(serde::Serialize)]
5768pub struct TreasurySettingsSpecs {
5769    /// Details on the account's acceptance of the Stripe Treasury Services Agreement.
5770    #[serde(skip_serializing_if = "Option::is_none")]
5771    pub tos_acceptance: Option<SettingsTermsOfServiceSpecs>,
5772}
5773#[cfg(feature = "redact-generated-debug")]
5774impl std::fmt::Debug for TreasurySettingsSpecs {
5775    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5776        f.debug_struct("TreasurySettingsSpecs").finish_non_exhaustive()
5777    }
5778}
5779impl TreasurySettingsSpecs {
5780    pub fn new() -> Self {
5781        Self { tos_acceptance: None }
5782    }
5783}
5784impl Default for TreasurySettingsSpecs {
5785    fn default() -> Self {
5786        Self::new()
5787    }
5788}
5789#[derive(Clone, Eq, PartialEq)]
5790#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
5791#[derive(serde::Serialize)]
5792pub struct DocumentsSpecs {
5793    /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement.
5794    /// Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
5795    #[serde(skip_serializing_if = "Option::is_none")]
5796    pub bank_account_ownership_verification: Option<DocumentsParam>,
5797    /// One or more documents that demonstrate proof of a company's license to operate.
5798    #[serde(skip_serializing_if = "Option::is_none")]
5799    pub company_license: Option<DocumentsParam>,
5800    /// One or more documents showing the company's Memorandum of Association.
5801    #[serde(skip_serializing_if = "Option::is_none")]
5802    pub company_memorandum_of_association: Option<DocumentsParam>,
5803    /// (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
5804    #[serde(skip_serializing_if = "Option::is_none")]
5805    pub company_ministerial_decree: Option<DocumentsParam>,
5806    /// One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
5807    #[serde(skip_serializing_if = "Option::is_none")]
5808    pub company_registration_verification: Option<DocumentsParam>,
5809    /// One or more documents that demonstrate proof of a company's tax ID.
5810    #[serde(skip_serializing_if = "Option::is_none")]
5811    pub company_tax_id_verification: Option<DocumentsParam>,
5812    /// One or more documents that demonstrate proof of address.
5813    #[serde(skip_serializing_if = "Option::is_none")]
5814    pub proof_of_address: Option<DocumentsParam>,
5815    /// One or more documents showing the company’s proof of registration with the national business registry.
5816    #[serde(skip_serializing_if = "Option::is_none")]
5817    pub proof_of_registration: Option<SignerParam>,
5818    /// One or more documents that demonstrate proof of ultimate beneficial ownership.
5819    #[serde(skip_serializing_if = "Option::is_none")]
5820    pub proof_of_ultimate_beneficial_ownership: Option<SignerParam>,
5821}
5822#[cfg(feature = "redact-generated-debug")]
5823impl std::fmt::Debug for DocumentsSpecs {
5824    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5825        f.debug_struct("DocumentsSpecs").finish_non_exhaustive()
5826    }
5827}
5828impl DocumentsSpecs {
5829    pub fn new() -> Self {
5830        Self {
5831            bank_account_ownership_verification: None,
5832            company_license: None,
5833            company_memorandum_of_association: None,
5834            company_ministerial_decree: None,
5835            company_registration_verification: None,
5836            company_tax_id_verification: None,
5837            proof_of_address: None,
5838            proof_of_registration: None,
5839            proof_of_ultimate_beneficial_ownership: None,
5840        }
5841    }
5842}
5843impl Default for DocumentsSpecs {
5844    fn default() -> Self {
5845        Self::new()
5846    }
5847}