stripe_shared/
legal_entity_company.rs

1#[derive(Clone, Debug)]
2#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
3#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
4pub struct LegalEntityCompany {
5    pub address: Option<stripe_shared::Address>,
6    /// The Kana variation of the company's primary address (Japan only).
7    pub address_kana: Option<stripe_shared::LegalEntityJapanAddress>,
8    /// The Kanji variation of the company's primary address (Japan only).
9    pub address_kanji: Option<stripe_shared::LegalEntityJapanAddress>,
10    /// Whether the company's directors have been provided.
11    /// This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).
12    pub directors_provided: Option<bool>,
13    /// This hash is used to attest that the director information provided to Stripe is both current and correct.
14    pub directorship_declaration: Option<stripe_shared::LegalEntityDirectorshipDeclaration>,
15    /// Whether the company's executives have been provided.
16    /// This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.
17    pub executives_provided: Option<bool>,
18    /// The export license ID number of the company, also referred as Import Export Code (India only).
19    pub export_license_id: Option<String>,
20    /// The purpose code to use for export transactions (India only).
21    pub export_purpose_code: Option<String>,
22    /// The company's legal name.
23    /// Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
24    pub name: Option<String>,
25    /// The Kana variation of the company's legal name (Japan only).
26    /// Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
27    pub name_kana: Option<String>,
28    /// The Kanji variation of the company's legal name (Japan only).
29    /// Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
30    pub name_kanji: Option<String>,
31    /// Whether the company's owners have been provided.
32    /// This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided.
33    /// Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).
34    pub owners_provided: Option<bool>,
35    /// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
36    pub ownership_declaration: Option<stripe_shared::LegalEntityUboDeclaration>,
37    /// This value is used to determine if a business is exempt from providing ultimate beneficial owners.
38    /// 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.
39    pub ownership_exemption_reason: Option<LegalEntityCompanyOwnershipExemptionReason>,
40    /// The company's phone number (used for verification).
41    pub phone: Option<String>,
42    pub registration_date: Option<stripe_shared::LegalEntityRegistrationDate>,
43    /// This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
44    pub representative_declaration: Option<stripe_shared::LegalEntityRepresentativeDeclaration>,
45    /// The category identifying the legal structure of the company or legal entity.
46    /// Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
47    /// See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
48    pub structure: Option<LegalEntityCompanyStructure>,
49    /// Whether the company's business ID number was provided.
50    pub tax_id_provided: Option<bool>,
51    /// The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
52    pub tax_id_registrar: Option<String>,
53    /// Whether the company's business VAT number was provided.
54    pub vat_id_provided: Option<bool>,
55    /// Information on the verification state of the company.
56    pub verification: Option<stripe_shared::LegalEntityCompanyVerification>,
57}
58#[doc(hidden)]
59pub struct LegalEntityCompanyBuilder {
60    address: Option<Option<stripe_shared::Address>>,
61    address_kana: Option<Option<stripe_shared::LegalEntityJapanAddress>>,
62    address_kanji: Option<Option<stripe_shared::LegalEntityJapanAddress>>,
63    directors_provided: Option<Option<bool>>,
64    directorship_declaration: Option<Option<stripe_shared::LegalEntityDirectorshipDeclaration>>,
65    executives_provided: Option<Option<bool>>,
66    export_license_id: Option<Option<String>>,
67    export_purpose_code: Option<Option<String>>,
68    name: Option<Option<String>>,
69    name_kana: Option<Option<String>>,
70    name_kanji: Option<Option<String>>,
71    owners_provided: Option<Option<bool>>,
72    ownership_declaration: Option<Option<stripe_shared::LegalEntityUboDeclaration>>,
73    ownership_exemption_reason: Option<Option<LegalEntityCompanyOwnershipExemptionReason>>,
74    phone: Option<Option<String>>,
75    registration_date: Option<Option<stripe_shared::LegalEntityRegistrationDate>>,
76    representative_declaration: Option<Option<stripe_shared::LegalEntityRepresentativeDeclaration>>,
77    structure: Option<Option<LegalEntityCompanyStructure>>,
78    tax_id_provided: Option<Option<bool>>,
79    tax_id_registrar: Option<Option<String>>,
80    vat_id_provided: Option<Option<bool>>,
81    verification: Option<Option<stripe_shared::LegalEntityCompanyVerification>>,
82}
83
84#[allow(
85    unused_variables,
86    irrefutable_let_patterns,
87    clippy::let_unit_value,
88    clippy::match_single_binding,
89    clippy::single_match
90)]
91const _: () = {
92    use miniserde::de::{Map, Visitor};
93    use miniserde::json::Value;
94    use miniserde::{Deserialize, Result, make_place};
95    use stripe_types::miniserde_helpers::FromValueOpt;
96    use stripe_types::{MapBuilder, ObjectDeser};
97
98    make_place!(Place);
99
100    impl Deserialize for LegalEntityCompany {
101        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
102            Place::new(out)
103        }
104    }
105
106    struct Builder<'a> {
107        out: &'a mut Option<LegalEntityCompany>,
108        builder: LegalEntityCompanyBuilder,
109    }
110
111    impl Visitor for Place<LegalEntityCompany> {
112        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
113            Ok(Box::new(Builder {
114                out: &mut self.out,
115                builder: LegalEntityCompanyBuilder::deser_default(),
116            }))
117        }
118    }
119
120    impl MapBuilder for LegalEntityCompanyBuilder {
121        type Out = LegalEntityCompany;
122        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
123            Ok(match k {
124                "address" => Deserialize::begin(&mut self.address),
125                "address_kana" => Deserialize::begin(&mut self.address_kana),
126                "address_kanji" => Deserialize::begin(&mut self.address_kanji),
127                "directors_provided" => Deserialize::begin(&mut self.directors_provided),
128                "directorship_declaration" => {
129                    Deserialize::begin(&mut self.directorship_declaration)
130                }
131                "executives_provided" => Deserialize::begin(&mut self.executives_provided),
132                "export_license_id" => Deserialize::begin(&mut self.export_license_id),
133                "export_purpose_code" => Deserialize::begin(&mut self.export_purpose_code),
134                "name" => Deserialize::begin(&mut self.name),
135                "name_kana" => Deserialize::begin(&mut self.name_kana),
136                "name_kanji" => Deserialize::begin(&mut self.name_kanji),
137                "owners_provided" => Deserialize::begin(&mut self.owners_provided),
138                "ownership_declaration" => Deserialize::begin(&mut self.ownership_declaration),
139                "ownership_exemption_reason" => {
140                    Deserialize::begin(&mut self.ownership_exemption_reason)
141                }
142                "phone" => Deserialize::begin(&mut self.phone),
143                "registration_date" => Deserialize::begin(&mut self.registration_date),
144                "representative_declaration" => {
145                    Deserialize::begin(&mut self.representative_declaration)
146                }
147                "structure" => Deserialize::begin(&mut self.structure),
148                "tax_id_provided" => Deserialize::begin(&mut self.tax_id_provided),
149                "tax_id_registrar" => Deserialize::begin(&mut self.tax_id_registrar),
150                "vat_id_provided" => Deserialize::begin(&mut self.vat_id_provided),
151                "verification" => Deserialize::begin(&mut self.verification),
152                _ => <dyn Visitor>::ignore(),
153            })
154        }
155
156        fn deser_default() -> Self {
157            Self {
158                address: Deserialize::default(),
159                address_kana: Deserialize::default(),
160                address_kanji: Deserialize::default(),
161                directors_provided: Deserialize::default(),
162                directorship_declaration: Deserialize::default(),
163                executives_provided: Deserialize::default(),
164                export_license_id: Deserialize::default(),
165                export_purpose_code: Deserialize::default(),
166                name: Deserialize::default(),
167                name_kana: Deserialize::default(),
168                name_kanji: Deserialize::default(),
169                owners_provided: Deserialize::default(),
170                ownership_declaration: Deserialize::default(),
171                ownership_exemption_reason: Deserialize::default(),
172                phone: Deserialize::default(),
173                registration_date: Deserialize::default(),
174                representative_declaration: Deserialize::default(),
175                structure: Deserialize::default(),
176                tax_id_provided: Deserialize::default(),
177                tax_id_registrar: Deserialize::default(),
178                vat_id_provided: Deserialize::default(),
179                verification: Deserialize::default(),
180            }
181        }
182
183        fn take_out(&mut self) -> Option<Self::Out> {
184            let (
185                Some(address),
186                Some(address_kana),
187                Some(address_kanji),
188                Some(directors_provided),
189                Some(directorship_declaration),
190                Some(executives_provided),
191                Some(export_license_id),
192                Some(export_purpose_code),
193                Some(name),
194                Some(name_kana),
195                Some(name_kanji),
196                Some(owners_provided),
197                Some(ownership_declaration),
198                Some(ownership_exemption_reason),
199                Some(phone),
200                Some(registration_date),
201                Some(representative_declaration),
202                Some(structure),
203                Some(tax_id_provided),
204                Some(tax_id_registrar),
205                Some(vat_id_provided),
206                Some(verification),
207            ) = (
208                self.address.take(),
209                self.address_kana.take(),
210                self.address_kanji.take(),
211                self.directors_provided,
212                self.directorship_declaration.take(),
213                self.executives_provided,
214                self.export_license_id.take(),
215                self.export_purpose_code.take(),
216                self.name.take(),
217                self.name_kana.take(),
218                self.name_kanji.take(),
219                self.owners_provided,
220                self.ownership_declaration.take(),
221                self.ownership_exemption_reason.take(),
222                self.phone.take(),
223                self.registration_date,
224                self.representative_declaration.take(),
225                self.structure.take(),
226                self.tax_id_provided,
227                self.tax_id_registrar.take(),
228                self.vat_id_provided,
229                self.verification.take(),
230            )
231            else {
232                return None;
233            };
234            Some(Self::Out {
235                address,
236                address_kana,
237                address_kanji,
238                directors_provided,
239                directorship_declaration,
240                executives_provided,
241                export_license_id,
242                export_purpose_code,
243                name,
244                name_kana,
245                name_kanji,
246                owners_provided,
247                ownership_declaration,
248                ownership_exemption_reason,
249                phone,
250                registration_date,
251                representative_declaration,
252                structure,
253                tax_id_provided,
254                tax_id_registrar,
255                vat_id_provided,
256                verification,
257            })
258        }
259    }
260
261    impl Map for Builder<'_> {
262        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
263            self.builder.key(k)
264        }
265
266        fn finish(&mut self) -> Result<()> {
267            *self.out = self.builder.take_out();
268            Ok(())
269        }
270    }
271
272    impl ObjectDeser for LegalEntityCompany {
273        type Builder = LegalEntityCompanyBuilder;
274    }
275
276    impl FromValueOpt for LegalEntityCompany {
277        fn from_value(v: Value) -> Option<Self> {
278            let Value::Object(obj) = v else {
279                return None;
280            };
281            let mut b = LegalEntityCompanyBuilder::deser_default();
282            for (k, v) in obj {
283                match k.as_str() {
284                    "address" => b.address = FromValueOpt::from_value(v),
285                    "address_kana" => b.address_kana = FromValueOpt::from_value(v),
286                    "address_kanji" => b.address_kanji = FromValueOpt::from_value(v),
287                    "directors_provided" => b.directors_provided = FromValueOpt::from_value(v),
288                    "directorship_declaration" => {
289                        b.directorship_declaration = FromValueOpt::from_value(v)
290                    }
291                    "executives_provided" => b.executives_provided = FromValueOpt::from_value(v),
292                    "export_license_id" => b.export_license_id = FromValueOpt::from_value(v),
293                    "export_purpose_code" => b.export_purpose_code = FromValueOpt::from_value(v),
294                    "name" => b.name = FromValueOpt::from_value(v),
295                    "name_kana" => b.name_kana = FromValueOpt::from_value(v),
296                    "name_kanji" => b.name_kanji = FromValueOpt::from_value(v),
297                    "owners_provided" => b.owners_provided = FromValueOpt::from_value(v),
298                    "ownership_declaration" => {
299                        b.ownership_declaration = FromValueOpt::from_value(v)
300                    }
301                    "ownership_exemption_reason" => {
302                        b.ownership_exemption_reason = FromValueOpt::from_value(v)
303                    }
304                    "phone" => b.phone = FromValueOpt::from_value(v),
305                    "registration_date" => b.registration_date = FromValueOpt::from_value(v),
306                    "representative_declaration" => {
307                        b.representative_declaration = FromValueOpt::from_value(v)
308                    }
309                    "structure" => b.structure = FromValueOpt::from_value(v),
310                    "tax_id_provided" => b.tax_id_provided = FromValueOpt::from_value(v),
311                    "tax_id_registrar" => b.tax_id_registrar = FromValueOpt::from_value(v),
312                    "vat_id_provided" => b.vat_id_provided = FromValueOpt::from_value(v),
313                    "verification" => b.verification = FromValueOpt::from_value(v),
314                    _ => {}
315                }
316            }
317            b.take_out()
318        }
319    }
320};
321/// This value is used to determine if a business is exempt from providing ultimate beneficial owners.
322/// 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.
323#[derive(Clone, Eq, PartialEq)]
324#[non_exhaustive]
325pub enum LegalEntityCompanyOwnershipExemptionReason {
326    QualifiedEntityExceedsOwnershipThreshold,
327    QualifiesAsFinancialInstitution,
328    /// An unrecognized value from Stripe. Should not be used as a request parameter.
329    Unknown(String),
330}
331impl LegalEntityCompanyOwnershipExemptionReason {
332    pub fn as_str(&self) -> &str {
333        use LegalEntityCompanyOwnershipExemptionReason::*;
334        match self {
335            QualifiedEntityExceedsOwnershipThreshold => {
336                "qualified_entity_exceeds_ownership_threshold"
337            }
338            QualifiesAsFinancialInstitution => "qualifies_as_financial_institution",
339            Unknown(v) => v,
340        }
341    }
342}
343
344impl std::str::FromStr for LegalEntityCompanyOwnershipExemptionReason {
345    type Err = std::convert::Infallible;
346    fn from_str(s: &str) -> Result<Self, Self::Err> {
347        use LegalEntityCompanyOwnershipExemptionReason::*;
348        match s {
349            "qualified_entity_exceeds_ownership_threshold" => {
350                Ok(QualifiedEntityExceedsOwnershipThreshold)
351            }
352            "qualifies_as_financial_institution" => Ok(QualifiesAsFinancialInstitution),
353            v => {
354                tracing::warn!(
355                    "Unknown value '{}' for enum '{}'",
356                    v,
357                    "LegalEntityCompanyOwnershipExemptionReason"
358                );
359                Ok(Unknown(v.to_owned()))
360            }
361        }
362    }
363}
364impl std::fmt::Display for LegalEntityCompanyOwnershipExemptionReason {
365    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
366        f.write_str(self.as_str())
367    }
368}
369
370impl std::fmt::Debug for LegalEntityCompanyOwnershipExemptionReason {
371    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
372        f.write_str(self.as_str())
373    }
374}
375#[cfg(feature = "serialize")]
376impl serde::Serialize for LegalEntityCompanyOwnershipExemptionReason {
377    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
378    where
379        S: serde::Serializer,
380    {
381        serializer.serialize_str(self.as_str())
382    }
383}
384impl miniserde::Deserialize for LegalEntityCompanyOwnershipExemptionReason {
385    fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
386        crate::Place::new(out)
387    }
388}
389
390impl miniserde::de::Visitor for crate::Place<LegalEntityCompanyOwnershipExemptionReason> {
391    fn string(&mut self, s: &str) -> miniserde::Result<()> {
392        use std::str::FromStr;
393        self.out =
394            Some(LegalEntityCompanyOwnershipExemptionReason::from_str(s).expect("infallible"));
395        Ok(())
396    }
397}
398
399stripe_types::impl_from_val_with_from_str!(LegalEntityCompanyOwnershipExemptionReason);
400#[cfg(feature = "deserialize")]
401impl<'de> serde::Deserialize<'de> for LegalEntityCompanyOwnershipExemptionReason {
402    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
403        use std::str::FromStr;
404        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
405        Ok(Self::from_str(&s).expect("infallible"))
406    }
407}
408/// The category identifying the legal structure of the company or legal entity.
409/// Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
410/// See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
411#[derive(Clone, Eq, PartialEq)]
412#[non_exhaustive]
413pub enum LegalEntityCompanyStructure {
414    FreeZoneEstablishment,
415    FreeZoneLlc,
416    GovernmentInstrumentality,
417    GovernmentalUnit,
418    IncorporatedNonProfit,
419    IncorporatedPartnership,
420    LimitedLiabilityPartnership,
421    Llc,
422    MultiMemberLlc,
423    PrivateCompany,
424    PrivateCorporation,
425    PrivatePartnership,
426    PublicCompany,
427    PublicCorporation,
428    PublicPartnership,
429    RegisteredCharity,
430    SingleMemberLlc,
431    SoleEstablishment,
432    SoleProprietorship,
433    TaxExemptGovernmentInstrumentality,
434    UnincorporatedAssociation,
435    UnincorporatedNonProfit,
436    UnincorporatedPartnership,
437    /// An unrecognized value from Stripe. Should not be used as a request parameter.
438    Unknown(String),
439}
440impl LegalEntityCompanyStructure {
441    pub fn as_str(&self) -> &str {
442        use LegalEntityCompanyStructure::*;
443        match self {
444            FreeZoneEstablishment => "free_zone_establishment",
445            FreeZoneLlc => "free_zone_llc",
446            GovernmentInstrumentality => "government_instrumentality",
447            GovernmentalUnit => "governmental_unit",
448            IncorporatedNonProfit => "incorporated_non_profit",
449            IncorporatedPartnership => "incorporated_partnership",
450            LimitedLiabilityPartnership => "limited_liability_partnership",
451            Llc => "llc",
452            MultiMemberLlc => "multi_member_llc",
453            PrivateCompany => "private_company",
454            PrivateCorporation => "private_corporation",
455            PrivatePartnership => "private_partnership",
456            PublicCompany => "public_company",
457            PublicCorporation => "public_corporation",
458            PublicPartnership => "public_partnership",
459            RegisteredCharity => "registered_charity",
460            SingleMemberLlc => "single_member_llc",
461            SoleEstablishment => "sole_establishment",
462            SoleProprietorship => "sole_proprietorship",
463            TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality",
464            UnincorporatedAssociation => "unincorporated_association",
465            UnincorporatedNonProfit => "unincorporated_non_profit",
466            UnincorporatedPartnership => "unincorporated_partnership",
467            Unknown(v) => v,
468        }
469    }
470}
471
472impl std::str::FromStr for LegalEntityCompanyStructure {
473    type Err = std::convert::Infallible;
474    fn from_str(s: &str) -> Result<Self, Self::Err> {
475        use LegalEntityCompanyStructure::*;
476        match s {
477            "free_zone_establishment" => Ok(FreeZoneEstablishment),
478            "free_zone_llc" => Ok(FreeZoneLlc),
479            "government_instrumentality" => Ok(GovernmentInstrumentality),
480            "governmental_unit" => Ok(GovernmentalUnit),
481            "incorporated_non_profit" => Ok(IncorporatedNonProfit),
482            "incorporated_partnership" => Ok(IncorporatedPartnership),
483            "limited_liability_partnership" => Ok(LimitedLiabilityPartnership),
484            "llc" => Ok(Llc),
485            "multi_member_llc" => Ok(MultiMemberLlc),
486            "private_company" => Ok(PrivateCompany),
487            "private_corporation" => Ok(PrivateCorporation),
488            "private_partnership" => Ok(PrivatePartnership),
489            "public_company" => Ok(PublicCompany),
490            "public_corporation" => Ok(PublicCorporation),
491            "public_partnership" => Ok(PublicPartnership),
492            "registered_charity" => Ok(RegisteredCharity),
493            "single_member_llc" => Ok(SingleMemberLlc),
494            "sole_establishment" => Ok(SoleEstablishment),
495            "sole_proprietorship" => Ok(SoleProprietorship),
496            "tax_exempt_government_instrumentality" => Ok(TaxExemptGovernmentInstrumentality),
497            "unincorporated_association" => Ok(UnincorporatedAssociation),
498            "unincorporated_non_profit" => Ok(UnincorporatedNonProfit),
499            "unincorporated_partnership" => Ok(UnincorporatedPartnership),
500            v => {
501                tracing::warn!(
502                    "Unknown value '{}' for enum '{}'",
503                    v,
504                    "LegalEntityCompanyStructure"
505                );
506                Ok(Unknown(v.to_owned()))
507            }
508        }
509    }
510}
511impl std::fmt::Display for LegalEntityCompanyStructure {
512    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
513        f.write_str(self.as_str())
514    }
515}
516
517impl std::fmt::Debug for LegalEntityCompanyStructure {
518    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
519        f.write_str(self.as_str())
520    }
521}
522#[cfg(feature = "serialize")]
523impl serde::Serialize for LegalEntityCompanyStructure {
524    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
525    where
526        S: serde::Serializer,
527    {
528        serializer.serialize_str(self.as_str())
529    }
530}
531impl miniserde::Deserialize for LegalEntityCompanyStructure {
532    fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
533        crate::Place::new(out)
534    }
535}
536
537impl miniserde::de::Visitor for crate::Place<LegalEntityCompanyStructure> {
538    fn string(&mut self, s: &str) -> miniserde::Result<()> {
539        use std::str::FromStr;
540        self.out = Some(LegalEntityCompanyStructure::from_str(s).expect("infallible"));
541        Ok(())
542    }
543}
544
545stripe_types::impl_from_val_with_from_str!(LegalEntityCompanyStructure);
546#[cfg(feature = "deserialize")]
547impl<'de> serde::Deserialize<'de> for LegalEntityCompanyStructure {
548    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
549        use std::str::FromStr;
550        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
551        Ok(Self::from_str(&s).expect("infallible"))
552    }
553}