1use stripe_client_core::{
2 RequestBuilder, StripeBlockingClient, StripeClient, StripeMethod, StripeRequest,
3};
4
5#[derive(Clone, Debug, serde::Serialize)]
6struct ListTaxRegistrationBuilder {
7 #[serde(skip_serializing_if = "Option::is_none")]
8 ending_before: Option<String>,
9 #[serde(skip_serializing_if = "Option::is_none")]
10 expand: Option<Vec<String>>,
11 #[serde(skip_serializing_if = "Option::is_none")]
12 limit: Option<i64>,
13 #[serde(skip_serializing_if = "Option::is_none")]
14 starting_after: Option<String>,
15 #[serde(skip_serializing_if = "Option::is_none")]
16 status: Option<ListTaxRegistrationStatus>,
17}
18impl ListTaxRegistrationBuilder {
19 fn new() -> Self {
20 Self { ending_before: None, expand: None, limit: None, starting_after: None, status: None }
21 }
22}
23#[derive(Copy, Clone, Eq, PartialEq)]
25pub enum ListTaxRegistrationStatus {
26 Active,
27 All,
28 Expired,
29 Scheduled,
30}
31impl ListTaxRegistrationStatus {
32 pub fn as_str(self) -> &'static str {
33 use ListTaxRegistrationStatus::*;
34 match self {
35 Active => "active",
36 All => "all",
37 Expired => "expired",
38 Scheduled => "scheduled",
39 }
40 }
41}
42
43impl std::str::FromStr for ListTaxRegistrationStatus {
44 type Err = stripe_types::StripeParseError;
45 fn from_str(s: &str) -> Result<Self, Self::Err> {
46 use ListTaxRegistrationStatus::*;
47 match s {
48 "active" => Ok(Active),
49 "all" => Ok(All),
50 "expired" => Ok(Expired),
51 "scheduled" => Ok(Scheduled),
52 _ => Err(stripe_types::StripeParseError),
53 }
54 }
55}
56impl std::fmt::Display for ListTaxRegistrationStatus {
57 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
58 f.write_str(self.as_str())
59 }
60}
61
62impl std::fmt::Debug for ListTaxRegistrationStatus {
63 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
64 f.write_str(self.as_str())
65 }
66}
67impl serde::Serialize for ListTaxRegistrationStatus {
68 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
69 where
70 S: serde::Serializer,
71 {
72 serializer.serialize_str(self.as_str())
73 }
74}
75#[cfg(feature = "deserialize")]
76impl<'de> serde::Deserialize<'de> for ListTaxRegistrationStatus {
77 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
78 use std::str::FromStr;
79 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
80 Self::from_str(&s)
81 .map_err(|_| serde::de::Error::custom("Unknown value for ListTaxRegistrationStatus"))
82 }
83}
84#[derive(Clone, Debug, serde::Serialize)]
86pub struct ListTaxRegistration {
87 inner: ListTaxRegistrationBuilder,
88}
89impl ListTaxRegistration {
90 pub fn new() -> Self {
92 Self { inner: ListTaxRegistrationBuilder::new() }
93 }
94 pub fn ending_before(mut self, ending_before: impl Into<String>) -> Self {
98 self.inner.ending_before = Some(ending_before.into());
99 self
100 }
101 pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
103 self.inner.expand = Some(expand.into());
104 self
105 }
106 pub fn limit(mut self, limit: impl Into<i64>) -> Self {
109 self.inner.limit = Some(limit.into());
110 self
111 }
112 pub fn starting_after(mut self, starting_after: impl Into<String>) -> Self {
116 self.inner.starting_after = Some(starting_after.into());
117 self
118 }
119 pub fn status(mut self, status: impl Into<ListTaxRegistrationStatus>) -> Self {
121 self.inner.status = Some(status.into());
122 self
123 }
124}
125impl Default for ListTaxRegistration {
126 fn default() -> Self {
127 Self::new()
128 }
129}
130impl ListTaxRegistration {
131 pub async fn send<C: StripeClient>(
133 &self,
134 client: &C,
135 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
136 self.customize().send(client).await
137 }
138
139 pub fn send_blocking<C: StripeBlockingClient>(
141 &self,
142 client: &C,
143 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
144 self.customize().send_blocking(client)
145 }
146
147 pub fn paginate(
148 &self,
149 ) -> stripe_client_core::ListPaginator<stripe_types::List<stripe_misc::TaxRegistration>> {
150 stripe_client_core::ListPaginator::new_list("/tax/registrations", &self.inner)
151 }
152}
153
154impl StripeRequest for ListTaxRegistration {
155 type Output = stripe_types::List<stripe_misc::TaxRegistration>;
156
157 fn build(&self) -> RequestBuilder {
158 RequestBuilder::new(StripeMethod::Get, "/tax/registrations").query(&self.inner)
159 }
160}
161#[derive(Clone, Debug, serde::Serialize)]
162struct RetrieveTaxRegistrationBuilder {
163 #[serde(skip_serializing_if = "Option::is_none")]
164 expand: Option<Vec<String>>,
165}
166impl RetrieveTaxRegistrationBuilder {
167 fn new() -> Self {
168 Self { expand: None }
169 }
170}
171#[derive(Clone, Debug, serde::Serialize)]
173pub struct RetrieveTaxRegistration {
174 inner: RetrieveTaxRegistrationBuilder,
175 id: stripe_misc::TaxRegistrationId,
176}
177impl RetrieveTaxRegistration {
178 pub fn new(id: impl Into<stripe_misc::TaxRegistrationId>) -> Self {
180 Self { id: id.into(), inner: RetrieveTaxRegistrationBuilder::new() }
181 }
182 pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
184 self.inner.expand = Some(expand.into());
185 self
186 }
187}
188impl RetrieveTaxRegistration {
189 pub async fn send<C: StripeClient>(
191 &self,
192 client: &C,
193 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
194 self.customize().send(client).await
195 }
196
197 pub fn send_blocking<C: StripeBlockingClient>(
199 &self,
200 client: &C,
201 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
202 self.customize().send_blocking(client)
203 }
204}
205
206impl StripeRequest for RetrieveTaxRegistration {
207 type Output = stripe_misc::TaxRegistration;
208
209 fn build(&self) -> RequestBuilder {
210 let id = &self.id;
211 RequestBuilder::new(StripeMethod::Get, format!("/tax/registrations/{id}"))
212 .query(&self.inner)
213 }
214}
215#[derive(Clone, Debug, serde::Serialize)]
216struct CreateTaxRegistrationBuilder {
217 active_from: CreateTaxRegistrationActiveFrom,
218 country: String,
219 country_options: CreateTaxRegistrationCountryOptions,
220 #[serde(skip_serializing_if = "Option::is_none")]
221 expand: Option<Vec<String>>,
222 #[serde(skip_serializing_if = "Option::is_none")]
223 expires_at: Option<stripe_types::Timestamp>,
224}
225impl CreateTaxRegistrationBuilder {
226 fn new(
227 active_from: impl Into<CreateTaxRegistrationActiveFrom>,
228 country: impl Into<String>,
229 country_options: impl Into<CreateTaxRegistrationCountryOptions>,
230 ) -> Self {
231 Self {
232 active_from: active_from.into(),
233 country: country.into(),
234 country_options: country_options.into(),
235 expand: None,
236 expires_at: None,
237 }
238 }
239}
240#[derive(Copy, Clone, Debug, serde::Serialize)]
243#[serde(rename_all = "snake_case")]
244pub enum CreateTaxRegistrationActiveFrom {
245 Now,
246 #[serde(untagged)]
247 Timestamp(stripe_types::Timestamp),
248}
249#[derive(Clone, Debug, serde::Serialize)]
251pub struct CreateTaxRegistrationCountryOptions {
252 #[serde(skip_serializing_if = "Option::is_none")]
254 pub ae: Option<CreateTaxRegistrationCountryOptionsAe>,
255 #[serde(skip_serializing_if = "Option::is_none")]
257 pub al: Option<CreateTaxRegistrationCountryOptionsAl>,
258 #[serde(skip_serializing_if = "Option::is_none")]
260 pub am: Option<CreateTaxRegistrationCountryOptionsAm>,
261 #[serde(skip_serializing_if = "Option::is_none")]
263 pub ao: Option<CreateTaxRegistrationCountryOptionsAo>,
264 #[serde(skip_serializing_if = "Option::is_none")]
266 pub at: Option<CreateTaxRegistrationCountryOptionsAt>,
267 #[serde(skip_serializing_if = "Option::is_none")]
269 pub au: Option<CreateTaxRegistrationCountryOptionsAu>,
270 #[serde(skip_serializing_if = "Option::is_none")]
272 pub aw: Option<CreateTaxRegistrationCountryOptionsAw>,
273 #[serde(skip_serializing_if = "Option::is_none")]
275 pub az: Option<CreateTaxRegistrationCountryOptionsAz>,
276 #[serde(skip_serializing_if = "Option::is_none")]
278 pub ba: Option<CreateTaxRegistrationCountryOptionsBa>,
279 #[serde(skip_serializing_if = "Option::is_none")]
281 pub bb: Option<CreateTaxRegistrationCountryOptionsBb>,
282 #[serde(skip_serializing_if = "Option::is_none")]
284 pub bd: Option<CreateTaxRegistrationCountryOptionsBd>,
285 #[serde(skip_serializing_if = "Option::is_none")]
287 pub be: Option<CreateTaxRegistrationCountryOptionsBe>,
288 #[serde(skip_serializing_if = "Option::is_none")]
290 pub bf: Option<CreateTaxRegistrationCountryOptionsBf>,
291 #[serde(skip_serializing_if = "Option::is_none")]
293 pub bg: Option<CreateTaxRegistrationCountryOptionsBg>,
294 #[serde(skip_serializing_if = "Option::is_none")]
296 pub bh: Option<CreateTaxRegistrationCountryOptionsBh>,
297 #[serde(skip_serializing_if = "Option::is_none")]
299 pub bj: Option<CreateTaxRegistrationCountryOptionsBj>,
300 #[serde(skip_serializing_if = "Option::is_none")]
302 pub bs: Option<CreateTaxRegistrationCountryOptionsBs>,
303 #[serde(skip_serializing_if = "Option::is_none")]
305 pub by: Option<CreateTaxRegistrationCountryOptionsBy>,
306 #[serde(skip_serializing_if = "Option::is_none")]
308 pub ca: Option<CreateTaxRegistrationCountryOptionsCa>,
309 #[serde(skip_serializing_if = "Option::is_none")]
311 pub cd: Option<CreateTaxRegistrationCountryOptionsCd>,
312 #[serde(skip_serializing_if = "Option::is_none")]
314 pub ch: Option<CreateTaxRegistrationCountryOptionsCh>,
315 #[serde(skip_serializing_if = "Option::is_none")]
317 pub cl: Option<CreateTaxRegistrationCountryOptionsCl>,
318 #[serde(skip_serializing_if = "Option::is_none")]
320 pub cm: Option<CreateTaxRegistrationCountryOptionsCm>,
321 #[serde(skip_serializing_if = "Option::is_none")]
323 pub co: Option<CreateTaxRegistrationCountryOptionsCo>,
324 #[serde(skip_serializing_if = "Option::is_none")]
326 pub cr: Option<CreateTaxRegistrationCountryOptionsCr>,
327 #[serde(skip_serializing_if = "Option::is_none")]
329 pub cv: Option<CreateTaxRegistrationCountryOptionsCv>,
330 #[serde(skip_serializing_if = "Option::is_none")]
332 pub cy: Option<CreateTaxRegistrationCountryOptionsCy>,
333 #[serde(skip_serializing_if = "Option::is_none")]
335 pub cz: Option<CreateTaxRegistrationCountryOptionsCz>,
336 #[serde(skip_serializing_if = "Option::is_none")]
338 pub de: Option<CreateTaxRegistrationCountryOptionsDe>,
339 #[serde(skip_serializing_if = "Option::is_none")]
341 pub dk: Option<CreateTaxRegistrationCountryOptionsDk>,
342 #[serde(skip_serializing_if = "Option::is_none")]
344 pub ec: Option<CreateTaxRegistrationCountryOptionsEc>,
345 #[serde(skip_serializing_if = "Option::is_none")]
347 pub ee: Option<CreateTaxRegistrationCountryOptionsEe>,
348 #[serde(skip_serializing_if = "Option::is_none")]
350 pub eg: Option<CreateTaxRegistrationCountryOptionsEg>,
351 #[serde(skip_serializing_if = "Option::is_none")]
353 pub es: Option<CreateTaxRegistrationCountryOptionsEs>,
354 #[serde(skip_serializing_if = "Option::is_none")]
356 pub et: Option<CreateTaxRegistrationCountryOptionsEt>,
357 #[serde(skip_serializing_if = "Option::is_none")]
359 pub fi: Option<CreateTaxRegistrationCountryOptionsFi>,
360 #[serde(skip_serializing_if = "Option::is_none")]
362 pub fr: Option<CreateTaxRegistrationCountryOptionsFr>,
363 #[serde(skip_serializing_if = "Option::is_none")]
365 pub gb: Option<CreateTaxRegistrationCountryOptionsGb>,
366 #[serde(skip_serializing_if = "Option::is_none")]
368 pub ge: Option<CreateTaxRegistrationCountryOptionsGe>,
369 #[serde(skip_serializing_if = "Option::is_none")]
371 pub gn: Option<CreateTaxRegistrationCountryOptionsGn>,
372 #[serde(skip_serializing_if = "Option::is_none")]
374 pub gr: Option<CreateTaxRegistrationCountryOptionsGr>,
375 #[serde(skip_serializing_if = "Option::is_none")]
377 pub hr: Option<CreateTaxRegistrationCountryOptionsHr>,
378 #[serde(skip_serializing_if = "Option::is_none")]
380 pub hu: Option<CreateTaxRegistrationCountryOptionsHu>,
381 #[serde(skip_serializing_if = "Option::is_none")]
383 pub id: Option<CreateTaxRegistrationCountryOptionsId>,
384 #[serde(skip_serializing_if = "Option::is_none")]
386 pub ie: Option<CreateTaxRegistrationCountryOptionsIe>,
387 #[serde(rename = "in")]
389 #[serde(skip_serializing_if = "Option::is_none")]
390 pub in_: Option<CreateTaxRegistrationCountryOptionsIn>,
391 #[serde(skip_serializing_if = "Option::is_none")]
393 pub is: Option<CreateTaxRegistrationCountryOptionsIs>,
394 #[serde(skip_serializing_if = "Option::is_none")]
396 pub it: Option<CreateTaxRegistrationCountryOptionsIt>,
397 #[serde(skip_serializing_if = "Option::is_none")]
399 pub jp: Option<CreateTaxRegistrationCountryOptionsJp>,
400 #[serde(skip_serializing_if = "Option::is_none")]
402 pub ke: Option<CreateTaxRegistrationCountryOptionsKe>,
403 #[serde(skip_serializing_if = "Option::is_none")]
405 pub kg: Option<CreateTaxRegistrationCountryOptionsKg>,
406 #[serde(skip_serializing_if = "Option::is_none")]
408 pub kh: Option<CreateTaxRegistrationCountryOptionsKh>,
409 #[serde(skip_serializing_if = "Option::is_none")]
411 pub kr: Option<CreateTaxRegistrationCountryOptionsKr>,
412 #[serde(skip_serializing_if = "Option::is_none")]
414 pub kz: Option<CreateTaxRegistrationCountryOptionsKz>,
415 #[serde(skip_serializing_if = "Option::is_none")]
417 pub la: Option<CreateTaxRegistrationCountryOptionsLa>,
418 #[serde(skip_serializing_if = "Option::is_none")]
420 pub lt: Option<CreateTaxRegistrationCountryOptionsLt>,
421 #[serde(skip_serializing_if = "Option::is_none")]
423 pub lu: Option<CreateTaxRegistrationCountryOptionsLu>,
424 #[serde(skip_serializing_if = "Option::is_none")]
426 pub lv: Option<CreateTaxRegistrationCountryOptionsLv>,
427 #[serde(skip_serializing_if = "Option::is_none")]
429 pub ma: Option<CreateTaxRegistrationCountryOptionsMa>,
430 #[serde(skip_serializing_if = "Option::is_none")]
432 pub md: Option<CreateTaxRegistrationCountryOptionsMd>,
433 #[serde(skip_serializing_if = "Option::is_none")]
435 pub me: Option<CreateTaxRegistrationCountryOptionsMe>,
436 #[serde(skip_serializing_if = "Option::is_none")]
438 pub mk: Option<CreateTaxRegistrationCountryOptionsMk>,
439 #[serde(skip_serializing_if = "Option::is_none")]
441 pub mr: Option<CreateTaxRegistrationCountryOptionsMr>,
442 #[serde(skip_serializing_if = "Option::is_none")]
444 pub mt: Option<CreateTaxRegistrationCountryOptionsMt>,
445 #[serde(skip_serializing_if = "Option::is_none")]
447 pub mx: Option<CreateTaxRegistrationCountryOptionsMx>,
448 #[serde(skip_serializing_if = "Option::is_none")]
450 pub my: Option<CreateTaxRegistrationCountryOptionsMy>,
451 #[serde(skip_serializing_if = "Option::is_none")]
453 pub ng: Option<CreateTaxRegistrationCountryOptionsNg>,
454 #[serde(skip_serializing_if = "Option::is_none")]
456 pub nl: Option<CreateTaxRegistrationCountryOptionsNl>,
457 #[serde(skip_serializing_if = "Option::is_none")]
459 pub no: Option<CreateTaxRegistrationCountryOptionsNo>,
460 #[serde(skip_serializing_if = "Option::is_none")]
462 pub np: Option<CreateTaxRegistrationCountryOptionsNp>,
463 #[serde(skip_serializing_if = "Option::is_none")]
465 pub nz: Option<CreateTaxRegistrationCountryOptionsNz>,
466 #[serde(skip_serializing_if = "Option::is_none")]
468 pub om: Option<CreateTaxRegistrationCountryOptionsOm>,
469 #[serde(skip_serializing_if = "Option::is_none")]
471 pub pe: Option<CreateTaxRegistrationCountryOptionsPe>,
472 #[serde(skip_serializing_if = "Option::is_none")]
474 pub ph: Option<CreateTaxRegistrationCountryOptionsPh>,
475 #[serde(skip_serializing_if = "Option::is_none")]
477 pub pl: Option<CreateTaxRegistrationCountryOptionsPl>,
478 #[serde(skip_serializing_if = "Option::is_none")]
480 pub pt: Option<CreateTaxRegistrationCountryOptionsPt>,
481 #[serde(skip_serializing_if = "Option::is_none")]
483 pub ro: Option<CreateTaxRegistrationCountryOptionsRo>,
484 #[serde(skip_serializing_if = "Option::is_none")]
486 pub rs: Option<CreateTaxRegistrationCountryOptionsRs>,
487 #[serde(skip_serializing_if = "Option::is_none")]
489 pub ru: Option<CreateTaxRegistrationCountryOptionsRu>,
490 #[serde(skip_serializing_if = "Option::is_none")]
492 pub sa: Option<CreateTaxRegistrationCountryOptionsSa>,
493 #[serde(skip_serializing_if = "Option::is_none")]
495 pub se: Option<CreateTaxRegistrationCountryOptionsSe>,
496 #[serde(skip_serializing_if = "Option::is_none")]
498 pub sg: Option<CreateTaxRegistrationCountryOptionsSg>,
499 #[serde(skip_serializing_if = "Option::is_none")]
501 pub si: Option<CreateTaxRegistrationCountryOptionsSi>,
502 #[serde(skip_serializing_if = "Option::is_none")]
504 pub sk: Option<CreateTaxRegistrationCountryOptionsSk>,
505 #[serde(skip_serializing_if = "Option::is_none")]
507 pub sn: Option<CreateTaxRegistrationCountryOptionsSn>,
508 #[serde(skip_serializing_if = "Option::is_none")]
510 pub sr: Option<CreateTaxRegistrationCountryOptionsSr>,
511 #[serde(skip_serializing_if = "Option::is_none")]
513 pub th: Option<CreateTaxRegistrationCountryOptionsTh>,
514 #[serde(skip_serializing_if = "Option::is_none")]
516 pub tj: Option<CreateTaxRegistrationCountryOptionsTj>,
517 #[serde(skip_serializing_if = "Option::is_none")]
519 pub tr: Option<CreateTaxRegistrationCountryOptionsTr>,
520 #[serde(skip_serializing_if = "Option::is_none")]
522 pub tw: Option<CreateTaxRegistrationCountryOptionsTw>,
523 #[serde(skip_serializing_if = "Option::is_none")]
525 pub tz: Option<CreateTaxRegistrationCountryOptionsTz>,
526 #[serde(skip_serializing_if = "Option::is_none")]
528 pub ua: Option<CreateTaxRegistrationCountryOptionsUa>,
529 #[serde(skip_serializing_if = "Option::is_none")]
531 pub ug: Option<CreateTaxRegistrationCountryOptionsUg>,
532 #[serde(skip_serializing_if = "Option::is_none")]
534 pub us: Option<CreateTaxRegistrationCountryOptionsUs>,
535 #[serde(skip_serializing_if = "Option::is_none")]
537 pub uy: Option<CreateTaxRegistrationCountryOptionsUy>,
538 #[serde(skip_serializing_if = "Option::is_none")]
540 pub uz: Option<CreateTaxRegistrationCountryOptionsUz>,
541 #[serde(skip_serializing_if = "Option::is_none")]
543 pub vn: Option<CreateTaxRegistrationCountryOptionsVn>,
544 #[serde(skip_serializing_if = "Option::is_none")]
546 pub za: Option<CreateTaxRegistrationCountryOptionsZa>,
547 #[serde(skip_serializing_if = "Option::is_none")]
549 pub zm: Option<CreateTaxRegistrationCountryOptionsZm>,
550 #[serde(skip_serializing_if = "Option::is_none")]
552 pub zw: Option<CreateTaxRegistrationCountryOptionsZw>,
553}
554impl CreateTaxRegistrationCountryOptions {
555 pub fn new() -> Self {
556 Self {
557 ae: None,
558 al: None,
559 am: None,
560 ao: None,
561 at: None,
562 au: None,
563 aw: None,
564 az: None,
565 ba: None,
566 bb: None,
567 bd: None,
568 be: None,
569 bf: None,
570 bg: None,
571 bh: None,
572 bj: None,
573 bs: None,
574 by: None,
575 ca: None,
576 cd: None,
577 ch: None,
578 cl: None,
579 cm: None,
580 co: None,
581 cr: None,
582 cv: None,
583 cy: None,
584 cz: None,
585 de: None,
586 dk: None,
587 ec: None,
588 ee: None,
589 eg: None,
590 es: None,
591 et: None,
592 fi: None,
593 fr: None,
594 gb: None,
595 ge: None,
596 gn: None,
597 gr: None,
598 hr: None,
599 hu: None,
600 id: None,
601 ie: None,
602 in_: None,
603 is: None,
604 it: None,
605 jp: None,
606 ke: None,
607 kg: None,
608 kh: None,
609 kr: None,
610 kz: None,
611 la: None,
612 lt: None,
613 lu: None,
614 lv: None,
615 ma: None,
616 md: None,
617 me: None,
618 mk: None,
619 mr: None,
620 mt: None,
621 mx: None,
622 my: None,
623 ng: None,
624 nl: None,
625 no: None,
626 np: None,
627 nz: None,
628 om: None,
629 pe: None,
630 ph: None,
631 pl: None,
632 pt: None,
633 ro: None,
634 rs: None,
635 ru: None,
636 sa: None,
637 se: None,
638 sg: None,
639 si: None,
640 sk: None,
641 sn: None,
642 sr: None,
643 th: None,
644 tj: None,
645 tr: None,
646 tw: None,
647 tz: None,
648 ua: None,
649 ug: None,
650 us: None,
651 uy: None,
652 uz: None,
653 vn: None,
654 za: None,
655 zm: None,
656 zw: None,
657 }
658 }
659}
660impl Default for CreateTaxRegistrationCountryOptions {
661 fn default() -> Self {
662 Self::new()
663 }
664}
665#[derive(Copy, Clone, Debug, serde::Serialize)]
667pub struct CreateTaxRegistrationCountryOptionsAe {
668 #[serde(skip_serializing_if = "Option::is_none")]
670 pub standard: Option<CreateTaxRegistrationCountryOptionsAeStandard>,
671 #[serde(rename = "type")]
673 pub type_: CreateTaxRegistrationCountryOptionsAeType,
674}
675impl CreateTaxRegistrationCountryOptionsAe {
676 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAeType>) -> Self {
677 Self { standard: None, type_: type_.into() }
678 }
679}
680#[derive(Copy, Clone, Debug, serde::Serialize)]
682pub struct CreateTaxRegistrationCountryOptionsAeStandard {
683 #[serde(skip_serializing_if = "Option::is_none")]
685 pub place_of_supply_scheme:
686 Option<CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme>,
687}
688impl CreateTaxRegistrationCountryOptionsAeStandard {
689 pub fn new() -> Self {
690 Self { place_of_supply_scheme: None }
691 }
692}
693impl Default for CreateTaxRegistrationCountryOptionsAeStandard {
694 fn default() -> Self {
695 Self::new()
696 }
697}
698#[derive(Copy, Clone, Eq, PartialEq)]
700pub enum CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme {
701 InboundGoods,
702 Standard,
703}
704impl CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme {
705 pub fn as_str(self) -> &'static str {
706 use CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme::*;
707 match self {
708 InboundGoods => "inbound_goods",
709 Standard => "standard",
710 }
711 }
712}
713
714impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme {
715 type Err = stripe_types::StripeParseError;
716 fn from_str(s: &str) -> Result<Self, Self::Err> {
717 use CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme::*;
718 match s {
719 "inbound_goods" => Ok(InboundGoods),
720 "standard" => Ok(Standard),
721 _ => Err(stripe_types::StripeParseError),
722 }
723 }
724}
725impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme {
726 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
727 f.write_str(self.as_str())
728 }
729}
730
731impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme {
732 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
733 f.write_str(self.as_str())
734 }
735}
736impl serde::Serialize for CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme {
737 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
738 where
739 S: serde::Serializer,
740 {
741 serializer.serialize_str(self.as_str())
742 }
743}
744#[cfg(feature = "deserialize")]
745impl<'de> serde::Deserialize<'de>
746 for CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme
747{
748 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
749 use std::str::FromStr;
750 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
751 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAeStandardPlaceOfSupplyScheme"))
752 }
753}
754#[derive(Copy, Clone, Eq, PartialEq)]
756pub enum CreateTaxRegistrationCountryOptionsAeType {
757 Standard,
758}
759impl CreateTaxRegistrationCountryOptionsAeType {
760 pub fn as_str(self) -> &'static str {
761 use CreateTaxRegistrationCountryOptionsAeType::*;
762 match self {
763 Standard => "standard",
764 }
765 }
766}
767
768impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAeType {
769 type Err = stripe_types::StripeParseError;
770 fn from_str(s: &str) -> Result<Self, Self::Err> {
771 use CreateTaxRegistrationCountryOptionsAeType::*;
772 match s {
773 "standard" => Ok(Standard),
774 _ => Err(stripe_types::StripeParseError),
775 }
776 }
777}
778impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAeType {
779 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
780 f.write_str(self.as_str())
781 }
782}
783
784impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAeType {
785 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
786 f.write_str(self.as_str())
787 }
788}
789impl serde::Serialize for CreateTaxRegistrationCountryOptionsAeType {
790 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
791 where
792 S: serde::Serializer,
793 {
794 serializer.serialize_str(self.as_str())
795 }
796}
797#[cfg(feature = "deserialize")]
798impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAeType {
799 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
800 use std::str::FromStr;
801 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
802 Self::from_str(&s).map_err(|_| {
803 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAeType")
804 })
805 }
806}
807#[derive(Copy, Clone, Debug, serde::Serialize)]
809pub struct CreateTaxRegistrationCountryOptionsAl {
810 #[serde(skip_serializing_if = "Option::is_none")]
812 pub standard: Option<CreateTaxRegistrationCountryOptionsAlStandard>,
813 #[serde(rename = "type")]
815 pub type_: CreateTaxRegistrationCountryOptionsAlType,
816}
817impl CreateTaxRegistrationCountryOptionsAl {
818 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAlType>) -> Self {
819 Self { standard: None, type_: type_.into() }
820 }
821}
822#[derive(Copy, Clone, Debug, serde::Serialize)]
824pub struct CreateTaxRegistrationCountryOptionsAlStandard {
825 #[serde(skip_serializing_if = "Option::is_none")]
827 pub place_of_supply_scheme:
828 Option<CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme>,
829}
830impl CreateTaxRegistrationCountryOptionsAlStandard {
831 pub fn new() -> Self {
832 Self { place_of_supply_scheme: None }
833 }
834}
835impl Default for CreateTaxRegistrationCountryOptionsAlStandard {
836 fn default() -> Self {
837 Self::new()
838 }
839}
840#[derive(Copy, Clone, Eq, PartialEq)]
842pub enum CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme {
843 InboundGoods,
844 Standard,
845}
846impl CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme {
847 pub fn as_str(self) -> &'static str {
848 use CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme::*;
849 match self {
850 InboundGoods => "inbound_goods",
851 Standard => "standard",
852 }
853 }
854}
855
856impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme {
857 type Err = stripe_types::StripeParseError;
858 fn from_str(s: &str) -> Result<Self, Self::Err> {
859 use CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme::*;
860 match s {
861 "inbound_goods" => Ok(InboundGoods),
862 "standard" => Ok(Standard),
863 _ => Err(stripe_types::StripeParseError),
864 }
865 }
866}
867impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme {
868 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
869 f.write_str(self.as_str())
870 }
871}
872
873impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme {
874 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
875 f.write_str(self.as_str())
876 }
877}
878impl serde::Serialize for CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme {
879 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
880 where
881 S: serde::Serializer,
882 {
883 serializer.serialize_str(self.as_str())
884 }
885}
886#[cfg(feature = "deserialize")]
887impl<'de> serde::Deserialize<'de>
888 for CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme
889{
890 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
891 use std::str::FromStr;
892 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
893 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAlStandardPlaceOfSupplyScheme"))
894 }
895}
896#[derive(Copy, Clone, Eq, PartialEq)]
898pub enum CreateTaxRegistrationCountryOptionsAlType {
899 Standard,
900}
901impl CreateTaxRegistrationCountryOptionsAlType {
902 pub fn as_str(self) -> &'static str {
903 use CreateTaxRegistrationCountryOptionsAlType::*;
904 match self {
905 Standard => "standard",
906 }
907 }
908}
909
910impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAlType {
911 type Err = stripe_types::StripeParseError;
912 fn from_str(s: &str) -> Result<Self, Self::Err> {
913 use CreateTaxRegistrationCountryOptionsAlType::*;
914 match s {
915 "standard" => Ok(Standard),
916 _ => Err(stripe_types::StripeParseError),
917 }
918 }
919}
920impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAlType {
921 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
922 f.write_str(self.as_str())
923 }
924}
925
926impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAlType {
927 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
928 f.write_str(self.as_str())
929 }
930}
931impl serde::Serialize for CreateTaxRegistrationCountryOptionsAlType {
932 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
933 where
934 S: serde::Serializer,
935 {
936 serializer.serialize_str(self.as_str())
937 }
938}
939#[cfg(feature = "deserialize")]
940impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAlType {
941 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
942 use std::str::FromStr;
943 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
944 Self::from_str(&s).map_err(|_| {
945 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAlType")
946 })
947 }
948}
949#[derive(Copy, Clone, Debug, serde::Serialize)]
951pub struct CreateTaxRegistrationCountryOptionsAm {
952 #[serde(rename = "type")]
954 pub type_: CreateTaxRegistrationCountryOptionsAmType,
955}
956impl CreateTaxRegistrationCountryOptionsAm {
957 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAmType>) -> Self {
958 Self { type_: type_.into() }
959 }
960}
961#[derive(Copy, Clone, Eq, PartialEq)]
963pub enum CreateTaxRegistrationCountryOptionsAmType {
964 Simplified,
965}
966impl CreateTaxRegistrationCountryOptionsAmType {
967 pub fn as_str(self) -> &'static str {
968 use CreateTaxRegistrationCountryOptionsAmType::*;
969 match self {
970 Simplified => "simplified",
971 }
972 }
973}
974
975impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAmType {
976 type Err = stripe_types::StripeParseError;
977 fn from_str(s: &str) -> Result<Self, Self::Err> {
978 use CreateTaxRegistrationCountryOptionsAmType::*;
979 match s {
980 "simplified" => Ok(Simplified),
981 _ => Err(stripe_types::StripeParseError),
982 }
983 }
984}
985impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAmType {
986 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
987 f.write_str(self.as_str())
988 }
989}
990
991impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAmType {
992 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
993 f.write_str(self.as_str())
994 }
995}
996impl serde::Serialize for CreateTaxRegistrationCountryOptionsAmType {
997 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
998 where
999 S: serde::Serializer,
1000 {
1001 serializer.serialize_str(self.as_str())
1002 }
1003}
1004#[cfg(feature = "deserialize")]
1005impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAmType {
1006 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1007 use std::str::FromStr;
1008 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1009 Self::from_str(&s).map_err(|_| {
1010 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAmType")
1011 })
1012 }
1013}
1014#[derive(Copy, Clone, Debug, serde::Serialize)]
1016pub struct CreateTaxRegistrationCountryOptionsAo {
1017 #[serde(skip_serializing_if = "Option::is_none")]
1019 pub standard: Option<CreateTaxRegistrationCountryOptionsAoStandard>,
1020 #[serde(rename = "type")]
1022 pub type_: CreateTaxRegistrationCountryOptionsAoType,
1023}
1024impl CreateTaxRegistrationCountryOptionsAo {
1025 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAoType>) -> Self {
1026 Self { standard: None, type_: type_.into() }
1027 }
1028}
1029#[derive(Copy, Clone, Debug, serde::Serialize)]
1031pub struct CreateTaxRegistrationCountryOptionsAoStandard {
1032 #[serde(skip_serializing_if = "Option::is_none")]
1034 pub place_of_supply_scheme:
1035 Option<CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme>,
1036}
1037impl CreateTaxRegistrationCountryOptionsAoStandard {
1038 pub fn new() -> Self {
1039 Self { place_of_supply_scheme: None }
1040 }
1041}
1042impl Default for CreateTaxRegistrationCountryOptionsAoStandard {
1043 fn default() -> Self {
1044 Self::new()
1045 }
1046}
1047#[derive(Copy, Clone, Eq, PartialEq)]
1049pub enum CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme {
1050 InboundGoods,
1051 Standard,
1052}
1053impl CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme {
1054 pub fn as_str(self) -> &'static str {
1055 use CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme::*;
1056 match self {
1057 InboundGoods => "inbound_goods",
1058 Standard => "standard",
1059 }
1060 }
1061}
1062
1063impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme {
1064 type Err = stripe_types::StripeParseError;
1065 fn from_str(s: &str) -> Result<Self, Self::Err> {
1066 use CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme::*;
1067 match s {
1068 "inbound_goods" => Ok(InboundGoods),
1069 "standard" => Ok(Standard),
1070 _ => Err(stripe_types::StripeParseError),
1071 }
1072 }
1073}
1074impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme {
1075 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1076 f.write_str(self.as_str())
1077 }
1078}
1079
1080impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme {
1081 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1082 f.write_str(self.as_str())
1083 }
1084}
1085impl serde::Serialize for CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme {
1086 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1087 where
1088 S: serde::Serializer,
1089 {
1090 serializer.serialize_str(self.as_str())
1091 }
1092}
1093#[cfg(feature = "deserialize")]
1094impl<'de> serde::Deserialize<'de>
1095 for CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme
1096{
1097 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1098 use std::str::FromStr;
1099 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1100 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAoStandardPlaceOfSupplyScheme"))
1101 }
1102}
1103#[derive(Copy, Clone, Eq, PartialEq)]
1105pub enum CreateTaxRegistrationCountryOptionsAoType {
1106 Standard,
1107}
1108impl CreateTaxRegistrationCountryOptionsAoType {
1109 pub fn as_str(self) -> &'static str {
1110 use CreateTaxRegistrationCountryOptionsAoType::*;
1111 match self {
1112 Standard => "standard",
1113 }
1114 }
1115}
1116
1117impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAoType {
1118 type Err = stripe_types::StripeParseError;
1119 fn from_str(s: &str) -> Result<Self, Self::Err> {
1120 use CreateTaxRegistrationCountryOptionsAoType::*;
1121 match s {
1122 "standard" => Ok(Standard),
1123 _ => Err(stripe_types::StripeParseError),
1124 }
1125 }
1126}
1127impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAoType {
1128 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1129 f.write_str(self.as_str())
1130 }
1131}
1132
1133impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAoType {
1134 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1135 f.write_str(self.as_str())
1136 }
1137}
1138impl serde::Serialize for CreateTaxRegistrationCountryOptionsAoType {
1139 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1140 where
1141 S: serde::Serializer,
1142 {
1143 serializer.serialize_str(self.as_str())
1144 }
1145}
1146#[cfg(feature = "deserialize")]
1147impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAoType {
1148 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1149 use std::str::FromStr;
1150 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1151 Self::from_str(&s).map_err(|_| {
1152 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAoType")
1153 })
1154 }
1155}
1156#[derive(Copy, Clone, Debug, serde::Serialize)]
1158pub struct CreateTaxRegistrationCountryOptionsAt {
1159 #[serde(skip_serializing_if = "Option::is_none")]
1161 pub standard: Option<CreateTaxRegistrationCountryOptionsAtStandard>,
1162 #[serde(rename = "type")]
1164 pub type_: CreateTaxRegistrationCountryOptionsAtType,
1165}
1166impl CreateTaxRegistrationCountryOptionsAt {
1167 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAtType>) -> Self {
1168 Self { standard: None, type_: type_.into() }
1169 }
1170}
1171#[derive(Copy, Clone, Debug, serde::Serialize)]
1173pub struct CreateTaxRegistrationCountryOptionsAtStandard {
1174 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme,
1176}
1177impl CreateTaxRegistrationCountryOptionsAtStandard {
1178 pub fn new(
1179 place_of_supply_scheme: impl Into<
1180 CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme,
1181 >,
1182 ) -> Self {
1183 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
1184 }
1185}
1186#[derive(Copy, Clone, Eq, PartialEq)]
1188pub enum CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme {
1189 InboundGoods,
1190 SmallSeller,
1191 Standard,
1192}
1193impl CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme {
1194 pub fn as_str(self) -> &'static str {
1195 use CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme::*;
1196 match self {
1197 InboundGoods => "inbound_goods",
1198 SmallSeller => "small_seller",
1199 Standard => "standard",
1200 }
1201 }
1202}
1203
1204impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme {
1205 type Err = stripe_types::StripeParseError;
1206 fn from_str(s: &str) -> Result<Self, Self::Err> {
1207 use CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme::*;
1208 match s {
1209 "inbound_goods" => Ok(InboundGoods),
1210 "small_seller" => Ok(SmallSeller),
1211 "standard" => Ok(Standard),
1212 _ => Err(stripe_types::StripeParseError),
1213 }
1214 }
1215}
1216impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme {
1217 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1218 f.write_str(self.as_str())
1219 }
1220}
1221
1222impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme {
1223 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1224 f.write_str(self.as_str())
1225 }
1226}
1227impl serde::Serialize for CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme {
1228 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1229 where
1230 S: serde::Serializer,
1231 {
1232 serializer.serialize_str(self.as_str())
1233 }
1234}
1235#[cfg(feature = "deserialize")]
1236impl<'de> serde::Deserialize<'de>
1237 for CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme
1238{
1239 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1240 use std::str::FromStr;
1241 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1242 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme"))
1243 }
1244}
1245#[derive(Copy, Clone, Eq, PartialEq)]
1247pub enum CreateTaxRegistrationCountryOptionsAtType {
1248 Ioss,
1249 OssNonUnion,
1250 OssUnion,
1251 Standard,
1252}
1253impl CreateTaxRegistrationCountryOptionsAtType {
1254 pub fn as_str(self) -> &'static str {
1255 use CreateTaxRegistrationCountryOptionsAtType::*;
1256 match self {
1257 Ioss => "ioss",
1258 OssNonUnion => "oss_non_union",
1259 OssUnion => "oss_union",
1260 Standard => "standard",
1261 }
1262 }
1263}
1264
1265impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAtType {
1266 type Err = stripe_types::StripeParseError;
1267 fn from_str(s: &str) -> Result<Self, Self::Err> {
1268 use CreateTaxRegistrationCountryOptionsAtType::*;
1269 match s {
1270 "ioss" => Ok(Ioss),
1271 "oss_non_union" => Ok(OssNonUnion),
1272 "oss_union" => Ok(OssUnion),
1273 "standard" => Ok(Standard),
1274 _ => Err(stripe_types::StripeParseError),
1275 }
1276 }
1277}
1278impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAtType {
1279 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1280 f.write_str(self.as_str())
1281 }
1282}
1283
1284impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAtType {
1285 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1286 f.write_str(self.as_str())
1287 }
1288}
1289impl serde::Serialize for CreateTaxRegistrationCountryOptionsAtType {
1290 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1291 where
1292 S: serde::Serializer,
1293 {
1294 serializer.serialize_str(self.as_str())
1295 }
1296}
1297#[cfg(feature = "deserialize")]
1298impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAtType {
1299 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1300 use std::str::FromStr;
1301 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1302 Self::from_str(&s).map_err(|_| {
1303 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAtType")
1304 })
1305 }
1306}
1307#[derive(Copy, Clone, Debug, serde::Serialize)]
1309pub struct CreateTaxRegistrationCountryOptionsAu {
1310 #[serde(skip_serializing_if = "Option::is_none")]
1312 pub standard: Option<CreateTaxRegistrationCountryOptionsAuStandard>,
1313 #[serde(rename = "type")]
1315 pub type_: CreateTaxRegistrationCountryOptionsAuType,
1316}
1317impl CreateTaxRegistrationCountryOptionsAu {
1318 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAuType>) -> Self {
1319 Self { standard: None, type_: type_.into() }
1320 }
1321}
1322#[derive(Copy, Clone, Debug, serde::Serialize)]
1324pub struct CreateTaxRegistrationCountryOptionsAuStandard {
1325 #[serde(skip_serializing_if = "Option::is_none")]
1327 pub place_of_supply_scheme:
1328 Option<CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme>,
1329}
1330impl CreateTaxRegistrationCountryOptionsAuStandard {
1331 pub fn new() -> Self {
1332 Self { place_of_supply_scheme: None }
1333 }
1334}
1335impl Default for CreateTaxRegistrationCountryOptionsAuStandard {
1336 fn default() -> Self {
1337 Self::new()
1338 }
1339}
1340#[derive(Copy, Clone, Eq, PartialEq)]
1342pub enum CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme {
1343 InboundGoods,
1344 Standard,
1345}
1346impl CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme {
1347 pub fn as_str(self) -> &'static str {
1348 use CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme::*;
1349 match self {
1350 InboundGoods => "inbound_goods",
1351 Standard => "standard",
1352 }
1353 }
1354}
1355
1356impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme {
1357 type Err = stripe_types::StripeParseError;
1358 fn from_str(s: &str) -> Result<Self, Self::Err> {
1359 use CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme::*;
1360 match s {
1361 "inbound_goods" => Ok(InboundGoods),
1362 "standard" => Ok(Standard),
1363 _ => Err(stripe_types::StripeParseError),
1364 }
1365 }
1366}
1367impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme {
1368 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1369 f.write_str(self.as_str())
1370 }
1371}
1372
1373impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme {
1374 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1375 f.write_str(self.as_str())
1376 }
1377}
1378impl serde::Serialize for CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme {
1379 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1380 where
1381 S: serde::Serializer,
1382 {
1383 serializer.serialize_str(self.as_str())
1384 }
1385}
1386#[cfg(feature = "deserialize")]
1387impl<'de> serde::Deserialize<'de>
1388 for CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme
1389{
1390 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1391 use std::str::FromStr;
1392 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1393 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAuStandardPlaceOfSupplyScheme"))
1394 }
1395}
1396#[derive(Copy, Clone, Eq, PartialEq)]
1398pub enum CreateTaxRegistrationCountryOptionsAuType {
1399 Standard,
1400}
1401impl CreateTaxRegistrationCountryOptionsAuType {
1402 pub fn as_str(self) -> &'static str {
1403 use CreateTaxRegistrationCountryOptionsAuType::*;
1404 match self {
1405 Standard => "standard",
1406 }
1407 }
1408}
1409
1410impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAuType {
1411 type Err = stripe_types::StripeParseError;
1412 fn from_str(s: &str) -> Result<Self, Self::Err> {
1413 use CreateTaxRegistrationCountryOptionsAuType::*;
1414 match s {
1415 "standard" => Ok(Standard),
1416 _ => Err(stripe_types::StripeParseError),
1417 }
1418 }
1419}
1420impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAuType {
1421 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1422 f.write_str(self.as_str())
1423 }
1424}
1425
1426impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAuType {
1427 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1428 f.write_str(self.as_str())
1429 }
1430}
1431impl serde::Serialize for CreateTaxRegistrationCountryOptionsAuType {
1432 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1433 where
1434 S: serde::Serializer,
1435 {
1436 serializer.serialize_str(self.as_str())
1437 }
1438}
1439#[cfg(feature = "deserialize")]
1440impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAuType {
1441 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1442 use std::str::FromStr;
1443 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1444 Self::from_str(&s).map_err(|_| {
1445 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAuType")
1446 })
1447 }
1448}
1449#[derive(Copy, Clone, Debug, serde::Serialize)]
1451pub struct CreateTaxRegistrationCountryOptionsAw {
1452 #[serde(skip_serializing_if = "Option::is_none")]
1454 pub standard: Option<CreateTaxRegistrationCountryOptionsAwStandard>,
1455 #[serde(rename = "type")]
1457 pub type_: CreateTaxRegistrationCountryOptionsAwType,
1458}
1459impl CreateTaxRegistrationCountryOptionsAw {
1460 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAwType>) -> Self {
1461 Self { standard: None, type_: type_.into() }
1462 }
1463}
1464#[derive(Copy, Clone, Debug, serde::Serialize)]
1466pub struct CreateTaxRegistrationCountryOptionsAwStandard {
1467 #[serde(skip_serializing_if = "Option::is_none")]
1469 pub place_of_supply_scheme:
1470 Option<CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme>,
1471}
1472impl CreateTaxRegistrationCountryOptionsAwStandard {
1473 pub fn new() -> Self {
1474 Self { place_of_supply_scheme: None }
1475 }
1476}
1477impl Default for CreateTaxRegistrationCountryOptionsAwStandard {
1478 fn default() -> Self {
1479 Self::new()
1480 }
1481}
1482#[derive(Copy, Clone, Eq, PartialEq)]
1484pub enum CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme {
1485 InboundGoods,
1486 Standard,
1487}
1488impl CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme {
1489 pub fn as_str(self) -> &'static str {
1490 use CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme::*;
1491 match self {
1492 InboundGoods => "inbound_goods",
1493 Standard => "standard",
1494 }
1495 }
1496}
1497
1498impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme {
1499 type Err = stripe_types::StripeParseError;
1500 fn from_str(s: &str) -> Result<Self, Self::Err> {
1501 use CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme::*;
1502 match s {
1503 "inbound_goods" => Ok(InboundGoods),
1504 "standard" => Ok(Standard),
1505 _ => Err(stripe_types::StripeParseError),
1506 }
1507 }
1508}
1509impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme {
1510 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1511 f.write_str(self.as_str())
1512 }
1513}
1514
1515impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme {
1516 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1517 f.write_str(self.as_str())
1518 }
1519}
1520impl serde::Serialize for CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme {
1521 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1522 where
1523 S: serde::Serializer,
1524 {
1525 serializer.serialize_str(self.as_str())
1526 }
1527}
1528#[cfg(feature = "deserialize")]
1529impl<'de> serde::Deserialize<'de>
1530 for CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme
1531{
1532 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1533 use std::str::FromStr;
1534 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1535 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAwStandardPlaceOfSupplyScheme"))
1536 }
1537}
1538#[derive(Copy, Clone, Eq, PartialEq)]
1540pub enum CreateTaxRegistrationCountryOptionsAwType {
1541 Standard,
1542}
1543impl CreateTaxRegistrationCountryOptionsAwType {
1544 pub fn as_str(self) -> &'static str {
1545 use CreateTaxRegistrationCountryOptionsAwType::*;
1546 match self {
1547 Standard => "standard",
1548 }
1549 }
1550}
1551
1552impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAwType {
1553 type Err = stripe_types::StripeParseError;
1554 fn from_str(s: &str) -> Result<Self, Self::Err> {
1555 use CreateTaxRegistrationCountryOptionsAwType::*;
1556 match s {
1557 "standard" => Ok(Standard),
1558 _ => Err(stripe_types::StripeParseError),
1559 }
1560 }
1561}
1562impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAwType {
1563 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1564 f.write_str(self.as_str())
1565 }
1566}
1567
1568impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAwType {
1569 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1570 f.write_str(self.as_str())
1571 }
1572}
1573impl serde::Serialize for CreateTaxRegistrationCountryOptionsAwType {
1574 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1575 where
1576 S: serde::Serializer,
1577 {
1578 serializer.serialize_str(self.as_str())
1579 }
1580}
1581#[cfg(feature = "deserialize")]
1582impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAwType {
1583 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1584 use std::str::FromStr;
1585 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1586 Self::from_str(&s).map_err(|_| {
1587 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAwType")
1588 })
1589 }
1590}
1591#[derive(Copy, Clone, Debug, serde::Serialize)]
1593pub struct CreateTaxRegistrationCountryOptionsAz {
1594 #[serde(rename = "type")]
1596 pub type_: CreateTaxRegistrationCountryOptionsAzType,
1597}
1598impl CreateTaxRegistrationCountryOptionsAz {
1599 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsAzType>) -> Self {
1600 Self { type_: type_.into() }
1601 }
1602}
1603#[derive(Copy, Clone, Eq, PartialEq)]
1605pub enum CreateTaxRegistrationCountryOptionsAzType {
1606 Simplified,
1607}
1608impl CreateTaxRegistrationCountryOptionsAzType {
1609 pub fn as_str(self) -> &'static str {
1610 use CreateTaxRegistrationCountryOptionsAzType::*;
1611 match self {
1612 Simplified => "simplified",
1613 }
1614 }
1615}
1616
1617impl std::str::FromStr for CreateTaxRegistrationCountryOptionsAzType {
1618 type Err = stripe_types::StripeParseError;
1619 fn from_str(s: &str) -> Result<Self, Self::Err> {
1620 use CreateTaxRegistrationCountryOptionsAzType::*;
1621 match s {
1622 "simplified" => Ok(Simplified),
1623 _ => Err(stripe_types::StripeParseError),
1624 }
1625 }
1626}
1627impl std::fmt::Display for CreateTaxRegistrationCountryOptionsAzType {
1628 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1629 f.write_str(self.as_str())
1630 }
1631}
1632
1633impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsAzType {
1634 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1635 f.write_str(self.as_str())
1636 }
1637}
1638impl serde::Serialize for CreateTaxRegistrationCountryOptionsAzType {
1639 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1640 where
1641 S: serde::Serializer,
1642 {
1643 serializer.serialize_str(self.as_str())
1644 }
1645}
1646#[cfg(feature = "deserialize")]
1647impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAzType {
1648 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1649 use std::str::FromStr;
1650 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1651 Self::from_str(&s).map_err(|_| {
1652 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsAzType")
1653 })
1654 }
1655}
1656#[derive(Copy, Clone, Debug, serde::Serialize)]
1658pub struct CreateTaxRegistrationCountryOptionsBa {
1659 #[serde(skip_serializing_if = "Option::is_none")]
1661 pub standard: Option<CreateTaxRegistrationCountryOptionsBaStandard>,
1662 #[serde(rename = "type")]
1664 pub type_: CreateTaxRegistrationCountryOptionsBaType,
1665}
1666impl CreateTaxRegistrationCountryOptionsBa {
1667 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBaType>) -> Self {
1668 Self { standard: None, type_: type_.into() }
1669 }
1670}
1671#[derive(Copy, Clone, Debug, serde::Serialize)]
1673pub struct CreateTaxRegistrationCountryOptionsBaStandard {
1674 #[serde(skip_serializing_if = "Option::is_none")]
1676 pub place_of_supply_scheme:
1677 Option<CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme>,
1678}
1679impl CreateTaxRegistrationCountryOptionsBaStandard {
1680 pub fn new() -> Self {
1681 Self { place_of_supply_scheme: None }
1682 }
1683}
1684impl Default for CreateTaxRegistrationCountryOptionsBaStandard {
1685 fn default() -> Self {
1686 Self::new()
1687 }
1688}
1689#[derive(Copy, Clone, Eq, PartialEq)]
1691pub enum CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme {
1692 InboundGoods,
1693 Standard,
1694}
1695impl CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme {
1696 pub fn as_str(self) -> &'static str {
1697 use CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme::*;
1698 match self {
1699 InboundGoods => "inbound_goods",
1700 Standard => "standard",
1701 }
1702 }
1703}
1704
1705impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme {
1706 type Err = stripe_types::StripeParseError;
1707 fn from_str(s: &str) -> Result<Self, Self::Err> {
1708 use CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme::*;
1709 match s {
1710 "inbound_goods" => Ok(InboundGoods),
1711 "standard" => Ok(Standard),
1712 _ => Err(stripe_types::StripeParseError),
1713 }
1714 }
1715}
1716impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme {
1717 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1718 f.write_str(self.as_str())
1719 }
1720}
1721
1722impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme {
1723 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1724 f.write_str(self.as_str())
1725 }
1726}
1727impl serde::Serialize for CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme {
1728 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1729 where
1730 S: serde::Serializer,
1731 {
1732 serializer.serialize_str(self.as_str())
1733 }
1734}
1735#[cfg(feature = "deserialize")]
1736impl<'de> serde::Deserialize<'de>
1737 for CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme
1738{
1739 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1740 use std::str::FromStr;
1741 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1742 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBaStandardPlaceOfSupplyScheme"))
1743 }
1744}
1745#[derive(Copy, Clone, Eq, PartialEq)]
1747pub enum CreateTaxRegistrationCountryOptionsBaType {
1748 Standard,
1749}
1750impl CreateTaxRegistrationCountryOptionsBaType {
1751 pub fn as_str(self) -> &'static str {
1752 use CreateTaxRegistrationCountryOptionsBaType::*;
1753 match self {
1754 Standard => "standard",
1755 }
1756 }
1757}
1758
1759impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBaType {
1760 type Err = stripe_types::StripeParseError;
1761 fn from_str(s: &str) -> Result<Self, Self::Err> {
1762 use CreateTaxRegistrationCountryOptionsBaType::*;
1763 match s {
1764 "standard" => Ok(Standard),
1765 _ => Err(stripe_types::StripeParseError),
1766 }
1767 }
1768}
1769impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBaType {
1770 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1771 f.write_str(self.as_str())
1772 }
1773}
1774
1775impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBaType {
1776 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1777 f.write_str(self.as_str())
1778 }
1779}
1780impl serde::Serialize for CreateTaxRegistrationCountryOptionsBaType {
1781 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1782 where
1783 S: serde::Serializer,
1784 {
1785 serializer.serialize_str(self.as_str())
1786 }
1787}
1788#[cfg(feature = "deserialize")]
1789impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBaType {
1790 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1791 use std::str::FromStr;
1792 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1793 Self::from_str(&s).map_err(|_| {
1794 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBaType")
1795 })
1796 }
1797}
1798#[derive(Copy, Clone, Debug, serde::Serialize)]
1800pub struct CreateTaxRegistrationCountryOptionsBb {
1801 #[serde(skip_serializing_if = "Option::is_none")]
1803 pub standard: Option<CreateTaxRegistrationCountryOptionsBbStandard>,
1804 #[serde(rename = "type")]
1806 pub type_: CreateTaxRegistrationCountryOptionsBbType,
1807}
1808impl CreateTaxRegistrationCountryOptionsBb {
1809 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBbType>) -> Self {
1810 Self { standard: None, type_: type_.into() }
1811 }
1812}
1813#[derive(Copy, Clone, Debug, serde::Serialize)]
1815pub struct CreateTaxRegistrationCountryOptionsBbStandard {
1816 #[serde(skip_serializing_if = "Option::is_none")]
1818 pub place_of_supply_scheme:
1819 Option<CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme>,
1820}
1821impl CreateTaxRegistrationCountryOptionsBbStandard {
1822 pub fn new() -> Self {
1823 Self { place_of_supply_scheme: None }
1824 }
1825}
1826impl Default for CreateTaxRegistrationCountryOptionsBbStandard {
1827 fn default() -> Self {
1828 Self::new()
1829 }
1830}
1831#[derive(Copy, Clone, Eq, PartialEq)]
1833pub enum CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme {
1834 InboundGoods,
1835 Standard,
1836}
1837impl CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme {
1838 pub fn as_str(self) -> &'static str {
1839 use CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme::*;
1840 match self {
1841 InboundGoods => "inbound_goods",
1842 Standard => "standard",
1843 }
1844 }
1845}
1846
1847impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme {
1848 type Err = stripe_types::StripeParseError;
1849 fn from_str(s: &str) -> Result<Self, Self::Err> {
1850 use CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme::*;
1851 match s {
1852 "inbound_goods" => Ok(InboundGoods),
1853 "standard" => Ok(Standard),
1854 _ => Err(stripe_types::StripeParseError),
1855 }
1856 }
1857}
1858impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme {
1859 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1860 f.write_str(self.as_str())
1861 }
1862}
1863
1864impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme {
1865 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1866 f.write_str(self.as_str())
1867 }
1868}
1869impl serde::Serialize for CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme {
1870 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1871 where
1872 S: serde::Serializer,
1873 {
1874 serializer.serialize_str(self.as_str())
1875 }
1876}
1877#[cfg(feature = "deserialize")]
1878impl<'de> serde::Deserialize<'de>
1879 for CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme
1880{
1881 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1882 use std::str::FromStr;
1883 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1884 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBbStandardPlaceOfSupplyScheme"))
1885 }
1886}
1887#[derive(Copy, Clone, Eq, PartialEq)]
1889pub enum CreateTaxRegistrationCountryOptionsBbType {
1890 Standard,
1891}
1892impl CreateTaxRegistrationCountryOptionsBbType {
1893 pub fn as_str(self) -> &'static str {
1894 use CreateTaxRegistrationCountryOptionsBbType::*;
1895 match self {
1896 Standard => "standard",
1897 }
1898 }
1899}
1900
1901impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBbType {
1902 type Err = stripe_types::StripeParseError;
1903 fn from_str(s: &str) -> Result<Self, Self::Err> {
1904 use CreateTaxRegistrationCountryOptionsBbType::*;
1905 match s {
1906 "standard" => Ok(Standard),
1907 _ => Err(stripe_types::StripeParseError),
1908 }
1909 }
1910}
1911impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBbType {
1912 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1913 f.write_str(self.as_str())
1914 }
1915}
1916
1917impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBbType {
1918 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1919 f.write_str(self.as_str())
1920 }
1921}
1922impl serde::Serialize for CreateTaxRegistrationCountryOptionsBbType {
1923 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1924 where
1925 S: serde::Serializer,
1926 {
1927 serializer.serialize_str(self.as_str())
1928 }
1929}
1930#[cfg(feature = "deserialize")]
1931impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBbType {
1932 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1933 use std::str::FromStr;
1934 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1935 Self::from_str(&s).map_err(|_| {
1936 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBbType")
1937 })
1938 }
1939}
1940#[derive(Copy, Clone, Debug, serde::Serialize)]
1942pub struct CreateTaxRegistrationCountryOptionsBd {
1943 #[serde(skip_serializing_if = "Option::is_none")]
1945 pub standard: Option<CreateTaxRegistrationCountryOptionsBdStandard>,
1946 #[serde(rename = "type")]
1948 pub type_: CreateTaxRegistrationCountryOptionsBdType,
1949}
1950impl CreateTaxRegistrationCountryOptionsBd {
1951 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBdType>) -> Self {
1952 Self { standard: None, type_: type_.into() }
1953 }
1954}
1955#[derive(Copy, Clone, Debug, serde::Serialize)]
1957pub struct CreateTaxRegistrationCountryOptionsBdStandard {
1958 #[serde(skip_serializing_if = "Option::is_none")]
1960 pub place_of_supply_scheme:
1961 Option<CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme>,
1962}
1963impl CreateTaxRegistrationCountryOptionsBdStandard {
1964 pub fn new() -> Self {
1965 Self { place_of_supply_scheme: None }
1966 }
1967}
1968impl Default for CreateTaxRegistrationCountryOptionsBdStandard {
1969 fn default() -> Self {
1970 Self::new()
1971 }
1972}
1973#[derive(Copy, Clone, Eq, PartialEq)]
1975pub enum CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme {
1976 InboundGoods,
1977 Standard,
1978}
1979impl CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme {
1980 pub fn as_str(self) -> &'static str {
1981 use CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme::*;
1982 match self {
1983 InboundGoods => "inbound_goods",
1984 Standard => "standard",
1985 }
1986 }
1987}
1988
1989impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme {
1990 type Err = stripe_types::StripeParseError;
1991 fn from_str(s: &str) -> Result<Self, Self::Err> {
1992 use CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme::*;
1993 match s {
1994 "inbound_goods" => Ok(InboundGoods),
1995 "standard" => Ok(Standard),
1996 _ => Err(stripe_types::StripeParseError),
1997 }
1998 }
1999}
2000impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme {
2001 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2002 f.write_str(self.as_str())
2003 }
2004}
2005
2006impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme {
2007 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2008 f.write_str(self.as_str())
2009 }
2010}
2011impl serde::Serialize for CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme {
2012 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2013 where
2014 S: serde::Serializer,
2015 {
2016 serializer.serialize_str(self.as_str())
2017 }
2018}
2019#[cfg(feature = "deserialize")]
2020impl<'de> serde::Deserialize<'de>
2021 for CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme
2022{
2023 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2024 use std::str::FromStr;
2025 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2026 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBdStandardPlaceOfSupplyScheme"))
2027 }
2028}
2029#[derive(Copy, Clone, Eq, PartialEq)]
2031pub enum CreateTaxRegistrationCountryOptionsBdType {
2032 Standard,
2033}
2034impl CreateTaxRegistrationCountryOptionsBdType {
2035 pub fn as_str(self) -> &'static str {
2036 use CreateTaxRegistrationCountryOptionsBdType::*;
2037 match self {
2038 Standard => "standard",
2039 }
2040 }
2041}
2042
2043impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBdType {
2044 type Err = stripe_types::StripeParseError;
2045 fn from_str(s: &str) -> Result<Self, Self::Err> {
2046 use CreateTaxRegistrationCountryOptionsBdType::*;
2047 match s {
2048 "standard" => Ok(Standard),
2049 _ => Err(stripe_types::StripeParseError),
2050 }
2051 }
2052}
2053impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBdType {
2054 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2055 f.write_str(self.as_str())
2056 }
2057}
2058
2059impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBdType {
2060 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2061 f.write_str(self.as_str())
2062 }
2063}
2064impl serde::Serialize for CreateTaxRegistrationCountryOptionsBdType {
2065 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2066 where
2067 S: serde::Serializer,
2068 {
2069 serializer.serialize_str(self.as_str())
2070 }
2071}
2072#[cfg(feature = "deserialize")]
2073impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBdType {
2074 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2075 use std::str::FromStr;
2076 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2077 Self::from_str(&s).map_err(|_| {
2078 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBdType")
2079 })
2080 }
2081}
2082#[derive(Copy, Clone, Debug, serde::Serialize)]
2084pub struct CreateTaxRegistrationCountryOptionsBe {
2085 #[serde(skip_serializing_if = "Option::is_none")]
2087 pub standard: Option<CreateTaxRegistrationCountryOptionsBeStandard>,
2088 #[serde(rename = "type")]
2090 pub type_: CreateTaxRegistrationCountryOptionsBeType,
2091}
2092impl CreateTaxRegistrationCountryOptionsBe {
2093 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBeType>) -> Self {
2094 Self { standard: None, type_: type_.into() }
2095 }
2096}
2097#[derive(Copy, Clone, Debug, serde::Serialize)]
2099pub struct CreateTaxRegistrationCountryOptionsBeStandard {
2100 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme,
2102}
2103impl CreateTaxRegistrationCountryOptionsBeStandard {
2104 pub fn new(
2105 place_of_supply_scheme: impl Into<
2106 CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme,
2107 >,
2108 ) -> Self {
2109 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
2110 }
2111}
2112#[derive(Copy, Clone, Eq, PartialEq)]
2114pub enum CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme {
2115 InboundGoods,
2116 SmallSeller,
2117 Standard,
2118}
2119impl CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme {
2120 pub fn as_str(self) -> &'static str {
2121 use CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme::*;
2122 match self {
2123 InboundGoods => "inbound_goods",
2124 SmallSeller => "small_seller",
2125 Standard => "standard",
2126 }
2127 }
2128}
2129
2130impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme {
2131 type Err = stripe_types::StripeParseError;
2132 fn from_str(s: &str) -> Result<Self, Self::Err> {
2133 use CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme::*;
2134 match s {
2135 "inbound_goods" => Ok(InboundGoods),
2136 "small_seller" => Ok(SmallSeller),
2137 "standard" => Ok(Standard),
2138 _ => Err(stripe_types::StripeParseError),
2139 }
2140 }
2141}
2142impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme {
2143 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2144 f.write_str(self.as_str())
2145 }
2146}
2147
2148impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme {
2149 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2150 f.write_str(self.as_str())
2151 }
2152}
2153impl serde::Serialize for CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme {
2154 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2155 where
2156 S: serde::Serializer,
2157 {
2158 serializer.serialize_str(self.as_str())
2159 }
2160}
2161#[cfg(feature = "deserialize")]
2162impl<'de> serde::Deserialize<'de>
2163 for CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme
2164{
2165 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2166 use std::str::FromStr;
2167 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2168 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme"))
2169 }
2170}
2171#[derive(Copy, Clone, Eq, PartialEq)]
2173pub enum CreateTaxRegistrationCountryOptionsBeType {
2174 Ioss,
2175 OssNonUnion,
2176 OssUnion,
2177 Standard,
2178}
2179impl CreateTaxRegistrationCountryOptionsBeType {
2180 pub fn as_str(self) -> &'static str {
2181 use CreateTaxRegistrationCountryOptionsBeType::*;
2182 match self {
2183 Ioss => "ioss",
2184 OssNonUnion => "oss_non_union",
2185 OssUnion => "oss_union",
2186 Standard => "standard",
2187 }
2188 }
2189}
2190
2191impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBeType {
2192 type Err = stripe_types::StripeParseError;
2193 fn from_str(s: &str) -> Result<Self, Self::Err> {
2194 use CreateTaxRegistrationCountryOptionsBeType::*;
2195 match s {
2196 "ioss" => Ok(Ioss),
2197 "oss_non_union" => Ok(OssNonUnion),
2198 "oss_union" => Ok(OssUnion),
2199 "standard" => Ok(Standard),
2200 _ => Err(stripe_types::StripeParseError),
2201 }
2202 }
2203}
2204impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBeType {
2205 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2206 f.write_str(self.as_str())
2207 }
2208}
2209
2210impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBeType {
2211 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2212 f.write_str(self.as_str())
2213 }
2214}
2215impl serde::Serialize for CreateTaxRegistrationCountryOptionsBeType {
2216 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2217 where
2218 S: serde::Serializer,
2219 {
2220 serializer.serialize_str(self.as_str())
2221 }
2222}
2223#[cfg(feature = "deserialize")]
2224impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBeType {
2225 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2226 use std::str::FromStr;
2227 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2228 Self::from_str(&s).map_err(|_| {
2229 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBeType")
2230 })
2231 }
2232}
2233#[derive(Copy, Clone, Debug, serde::Serialize)]
2235pub struct CreateTaxRegistrationCountryOptionsBf {
2236 #[serde(skip_serializing_if = "Option::is_none")]
2238 pub standard: Option<CreateTaxRegistrationCountryOptionsBfStandard>,
2239 #[serde(rename = "type")]
2241 pub type_: CreateTaxRegistrationCountryOptionsBfType,
2242}
2243impl CreateTaxRegistrationCountryOptionsBf {
2244 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBfType>) -> Self {
2245 Self { standard: None, type_: type_.into() }
2246 }
2247}
2248#[derive(Copy, Clone, Debug, serde::Serialize)]
2250pub struct CreateTaxRegistrationCountryOptionsBfStandard {
2251 #[serde(skip_serializing_if = "Option::is_none")]
2253 pub place_of_supply_scheme:
2254 Option<CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme>,
2255}
2256impl CreateTaxRegistrationCountryOptionsBfStandard {
2257 pub fn new() -> Self {
2258 Self { place_of_supply_scheme: None }
2259 }
2260}
2261impl Default for CreateTaxRegistrationCountryOptionsBfStandard {
2262 fn default() -> Self {
2263 Self::new()
2264 }
2265}
2266#[derive(Copy, Clone, Eq, PartialEq)]
2268pub enum CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme {
2269 InboundGoods,
2270 Standard,
2271}
2272impl CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme {
2273 pub fn as_str(self) -> &'static str {
2274 use CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme::*;
2275 match self {
2276 InboundGoods => "inbound_goods",
2277 Standard => "standard",
2278 }
2279 }
2280}
2281
2282impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme {
2283 type Err = stripe_types::StripeParseError;
2284 fn from_str(s: &str) -> Result<Self, Self::Err> {
2285 use CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme::*;
2286 match s {
2287 "inbound_goods" => Ok(InboundGoods),
2288 "standard" => Ok(Standard),
2289 _ => Err(stripe_types::StripeParseError),
2290 }
2291 }
2292}
2293impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme {
2294 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2295 f.write_str(self.as_str())
2296 }
2297}
2298
2299impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme {
2300 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2301 f.write_str(self.as_str())
2302 }
2303}
2304impl serde::Serialize for CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme {
2305 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2306 where
2307 S: serde::Serializer,
2308 {
2309 serializer.serialize_str(self.as_str())
2310 }
2311}
2312#[cfg(feature = "deserialize")]
2313impl<'de> serde::Deserialize<'de>
2314 for CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme
2315{
2316 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2317 use std::str::FromStr;
2318 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2319 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBfStandardPlaceOfSupplyScheme"))
2320 }
2321}
2322#[derive(Copy, Clone, Eq, PartialEq)]
2324pub enum CreateTaxRegistrationCountryOptionsBfType {
2325 Standard,
2326}
2327impl CreateTaxRegistrationCountryOptionsBfType {
2328 pub fn as_str(self) -> &'static str {
2329 use CreateTaxRegistrationCountryOptionsBfType::*;
2330 match self {
2331 Standard => "standard",
2332 }
2333 }
2334}
2335
2336impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBfType {
2337 type Err = stripe_types::StripeParseError;
2338 fn from_str(s: &str) -> Result<Self, Self::Err> {
2339 use CreateTaxRegistrationCountryOptionsBfType::*;
2340 match s {
2341 "standard" => Ok(Standard),
2342 _ => Err(stripe_types::StripeParseError),
2343 }
2344 }
2345}
2346impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBfType {
2347 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2348 f.write_str(self.as_str())
2349 }
2350}
2351
2352impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBfType {
2353 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2354 f.write_str(self.as_str())
2355 }
2356}
2357impl serde::Serialize for CreateTaxRegistrationCountryOptionsBfType {
2358 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2359 where
2360 S: serde::Serializer,
2361 {
2362 serializer.serialize_str(self.as_str())
2363 }
2364}
2365#[cfg(feature = "deserialize")]
2366impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBfType {
2367 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2368 use std::str::FromStr;
2369 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2370 Self::from_str(&s).map_err(|_| {
2371 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBfType")
2372 })
2373 }
2374}
2375#[derive(Copy, Clone, Debug, serde::Serialize)]
2377pub struct CreateTaxRegistrationCountryOptionsBg {
2378 #[serde(skip_serializing_if = "Option::is_none")]
2380 pub standard: Option<CreateTaxRegistrationCountryOptionsBgStandard>,
2381 #[serde(rename = "type")]
2383 pub type_: CreateTaxRegistrationCountryOptionsBgType,
2384}
2385impl CreateTaxRegistrationCountryOptionsBg {
2386 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBgType>) -> Self {
2387 Self { standard: None, type_: type_.into() }
2388 }
2389}
2390#[derive(Copy, Clone, Debug, serde::Serialize)]
2392pub struct CreateTaxRegistrationCountryOptionsBgStandard {
2393 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme,
2395}
2396impl CreateTaxRegistrationCountryOptionsBgStandard {
2397 pub fn new(
2398 place_of_supply_scheme: impl Into<
2399 CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme,
2400 >,
2401 ) -> Self {
2402 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
2403 }
2404}
2405#[derive(Copy, Clone, Eq, PartialEq)]
2407pub enum CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme {
2408 InboundGoods,
2409 SmallSeller,
2410 Standard,
2411}
2412impl CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme {
2413 pub fn as_str(self) -> &'static str {
2414 use CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme::*;
2415 match self {
2416 InboundGoods => "inbound_goods",
2417 SmallSeller => "small_seller",
2418 Standard => "standard",
2419 }
2420 }
2421}
2422
2423impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme {
2424 type Err = stripe_types::StripeParseError;
2425 fn from_str(s: &str) -> Result<Self, Self::Err> {
2426 use CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme::*;
2427 match s {
2428 "inbound_goods" => Ok(InboundGoods),
2429 "small_seller" => Ok(SmallSeller),
2430 "standard" => Ok(Standard),
2431 _ => Err(stripe_types::StripeParseError),
2432 }
2433 }
2434}
2435impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme {
2436 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2437 f.write_str(self.as_str())
2438 }
2439}
2440
2441impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme {
2442 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2443 f.write_str(self.as_str())
2444 }
2445}
2446impl serde::Serialize for CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme {
2447 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2448 where
2449 S: serde::Serializer,
2450 {
2451 serializer.serialize_str(self.as_str())
2452 }
2453}
2454#[cfg(feature = "deserialize")]
2455impl<'de> serde::Deserialize<'de>
2456 for CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme
2457{
2458 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2459 use std::str::FromStr;
2460 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2461 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme"))
2462 }
2463}
2464#[derive(Copy, Clone, Eq, PartialEq)]
2466pub enum CreateTaxRegistrationCountryOptionsBgType {
2467 Ioss,
2468 OssNonUnion,
2469 OssUnion,
2470 Standard,
2471}
2472impl CreateTaxRegistrationCountryOptionsBgType {
2473 pub fn as_str(self) -> &'static str {
2474 use CreateTaxRegistrationCountryOptionsBgType::*;
2475 match self {
2476 Ioss => "ioss",
2477 OssNonUnion => "oss_non_union",
2478 OssUnion => "oss_union",
2479 Standard => "standard",
2480 }
2481 }
2482}
2483
2484impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBgType {
2485 type Err = stripe_types::StripeParseError;
2486 fn from_str(s: &str) -> Result<Self, Self::Err> {
2487 use CreateTaxRegistrationCountryOptionsBgType::*;
2488 match s {
2489 "ioss" => Ok(Ioss),
2490 "oss_non_union" => Ok(OssNonUnion),
2491 "oss_union" => Ok(OssUnion),
2492 "standard" => Ok(Standard),
2493 _ => Err(stripe_types::StripeParseError),
2494 }
2495 }
2496}
2497impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBgType {
2498 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2499 f.write_str(self.as_str())
2500 }
2501}
2502
2503impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBgType {
2504 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2505 f.write_str(self.as_str())
2506 }
2507}
2508impl serde::Serialize for CreateTaxRegistrationCountryOptionsBgType {
2509 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2510 where
2511 S: serde::Serializer,
2512 {
2513 serializer.serialize_str(self.as_str())
2514 }
2515}
2516#[cfg(feature = "deserialize")]
2517impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBgType {
2518 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2519 use std::str::FromStr;
2520 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2521 Self::from_str(&s).map_err(|_| {
2522 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBgType")
2523 })
2524 }
2525}
2526#[derive(Copy, Clone, Debug, serde::Serialize)]
2528pub struct CreateTaxRegistrationCountryOptionsBh {
2529 #[serde(skip_serializing_if = "Option::is_none")]
2531 pub standard: Option<CreateTaxRegistrationCountryOptionsBhStandard>,
2532 #[serde(rename = "type")]
2534 pub type_: CreateTaxRegistrationCountryOptionsBhType,
2535}
2536impl CreateTaxRegistrationCountryOptionsBh {
2537 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBhType>) -> Self {
2538 Self { standard: None, type_: type_.into() }
2539 }
2540}
2541#[derive(Copy, Clone, Debug, serde::Serialize)]
2543pub struct CreateTaxRegistrationCountryOptionsBhStandard {
2544 #[serde(skip_serializing_if = "Option::is_none")]
2546 pub place_of_supply_scheme:
2547 Option<CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme>,
2548}
2549impl CreateTaxRegistrationCountryOptionsBhStandard {
2550 pub fn new() -> Self {
2551 Self { place_of_supply_scheme: None }
2552 }
2553}
2554impl Default for CreateTaxRegistrationCountryOptionsBhStandard {
2555 fn default() -> Self {
2556 Self::new()
2557 }
2558}
2559#[derive(Copy, Clone, Eq, PartialEq)]
2561pub enum CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme {
2562 InboundGoods,
2563 Standard,
2564}
2565impl CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme {
2566 pub fn as_str(self) -> &'static str {
2567 use CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme::*;
2568 match self {
2569 InboundGoods => "inbound_goods",
2570 Standard => "standard",
2571 }
2572 }
2573}
2574
2575impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme {
2576 type Err = stripe_types::StripeParseError;
2577 fn from_str(s: &str) -> Result<Self, Self::Err> {
2578 use CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme::*;
2579 match s {
2580 "inbound_goods" => Ok(InboundGoods),
2581 "standard" => Ok(Standard),
2582 _ => Err(stripe_types::StripeParseError),
2583 }
2584 }
2585}
2586impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme {
2587 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2588 f.write_str(self.as_str())
2589 }
2590}
2591
2592impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme {
2593 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2594 f.write_str(self.as_str())
2595 }
2596}
2597impl serde::Serialize for CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme {
2598 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2599 where
2600 S: serde::Serializer,
2601 {
2602 serializer.serialize_str(self.as_str())
2603 }
2604}
2605#[cfg(feature = "deserialize")]
2606impl<'de> serde::Deserialize<'de>
2607 for CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme
2608{
2609 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2610 use std::str::FromStr;
2611 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2612 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBhStandardPlaceOfSupplyScheme"))
2613 }
2614}
2615#[derive(Copy, Clone, Eq, PartialEq)]
2617pub enum CreateTaxRegistrationCountryOptionsBhType {
2618 Standard,
2619}
2620impl CreateTaxRegistrationCountryOptionsBhType {
2621 pub fn as_str(self) -> &'static str {
2622 use CreateTaxRegistrationCountryOptionsBhType::*;
2623 match self {
2624 Standard => "standard",
2625 }
2626 }
2627}
2628
2629impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBhType {
2630 type Err = stripe_types::StripeParseError;
2631 fn from_str(s: &str) -> Result<Self, Self::Err> {
2632 use CreateTaxRegistrationCountryOptionsBhType::*;
2633 match s {
2634 "standard" => Ok(Standard),
2635 _ => Err(stripe_types::StripeParseError),
2636 }
2637 }
2638}
2639impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBhType {
2640 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2641 f.write_str(self.as_str())
2642 }
2643}
2644
2645impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBhType {
2646 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2647 f.write_str(self.as_str())
2648 }
2649}
2650impl serde::Serialize for CreateTaxRegistrationCountryOptionsBhType {
2651 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2652 where
2653 S: serde::Serializer,
2654 {
2655 serializer.serialize_str(self.as_str())
2656 }
2657}
2658#[cfg(feature = "deserialize")]
2659impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBhType {
2660 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2661 use std::str::FromStr;
2662 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2663 Self::from_str(&s).map_err(|_| {
2664 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBhType")
2665 })
2666 }
2667}
2668#[derive(Copy, Clone, Debug, serde::Serialize)]
2670pub struct CreateTaxRegistrationCountryOptionsBj {
2671 #[serde(rename = "type")]
2673 pub type_: CreateTaxRegistrationCountryOptionsBjType,
2674}
2675impl CreateTaxRegistrationCountryOptionsBj {
2676 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBjType>) -> Self {
2677 Self { type_: type_.into() }
2678 }
2679}
2680#[derive(Copy, Clone, Eq, PartialEq)]
2682pub enum CreateTaxRegistrationCountryOptionsBjType {
2683 Simplified,
2684}
2685impl CreateTaxRegistrationCountryOptionsBjType {
2686 pub fn as_str(self) -> &'static str {
2687 use CreateTaxRegistrationCountryOptionsBjType::*;
2688 match self {
2689 Simplified => "simplified",
2690 }
2691 }
2692}
2693
2694impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBjType {
2695 type Err = stripe_types::StripeParseError;
2696 fn from_str(s: &str) -> Result<Self, Self::Err> {
2697 use CreateTaxRegistrationCountryOptionsBjType::*;
2698 match s {
2699 "simplified" => Ok(Simplified),
2700 _ => Err(stripe_types::StripeParseError),
2701 }
2702 }
2703}
2704impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBjType {
2705 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2706 f.write_str(self.as_str())
2707 }
2708}
2709
2710impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBjType {
2711 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2712 f.write_str(self.as_str())
2713 }
2714}
2715impl serde::Serialize for CreateTaxRegistrationCountryOptionsBjType {
2716 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2717 where
2718 S: serde::Serializer,
2719 {
2720 serializer.serialize_str(self.as_str())
2721 }
2722}
2723#[cfg(feature = "deserialize")]
2724impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBjType {
2725 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2726 use std::str::FromStr;
2727 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2728 Self::from_str(&s).map_err(|_| {
2729 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBjType")
2730 })
2731 }
2732}
2733#[derive(Copy, Clone, Debug, serde::Serialize)]
2735pub struct CreateTaxRegistrationCountryOptionsBs {
2736 #[serde(skip_serializing_if = "Option::is_none")]
2738 pub standard: Option<CreateTaxRegistrationCountryOptionsBsStandard>,
2739 #[serde(rename = "type")]
2741 pub type_: CreateTaxRegistrationCountryOptionsBsType,
2742}
2743impl CreateTaxRegistrationCountryOptionsBs {
2744 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsBsType>) -> Self {
2745 Self { standard: None, type_: type_.into() }
2746 }
2747}
2748#[derive(Copy, Clone, Debug, serde::Serialize)]
2750pub struct CreateTaxRegistrationCountryOptionsBsStandard {
2751 #[serde(skip_serializing_if = "Option::is_none")]
2753 pub place_of_supply_scheme:
2754 Option<CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme>,
2755}
2756impl CreateTaxRegistrationCountryOptionsBsStandard {
2757 pub fn new() -> Self {
2758 Self { place_of_supply_scheme: None }
2759 }
2760}
2761impl Default for CreateTaxRegistrationCountryOptionsBsStandard {
2762 fn default() -> Self {
2763 Self::new()
2764 }
2765}
2766#[derive(Copy, Clone, Eq, PartialEq)]
2768pub enum CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme {
2769 InboundGoods,
2770 Standard,
2771}
2772impl CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme {
2773 pub fn as_str(self) -> &'static str {
2774 use CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme::*;
2775 match self {
2776 InboundGoods => "inbound_goods",
2777 Standard => "standard",
2778 }
2779 }
2780}
2781
2782impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme {
2783 type Err = stripe_types::StripeParseError;
2784 fn from_str(s: &str) -> Result<Self, Self::Err> {
2785 use CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme::*;
2786 match s {
2787 "inbound_goods" => Ok(InboundGoods),
2788 "standard" => Ok(Standard),
2789 _ => Err(stripe_types::StripeParseError),
2790 }
2791 }
2792}
2793impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme {
2794 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2795 f.write_str(self.as_str())
2796 }
2797}
2798
2799impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme {
2800 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2801 f.write_str(self.as_str())
2802 }
2803}
2804impl serde::Serialize for CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme {
2805 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2806 where
2807 S: serde::Serializer,
2808 {
2809 serializer.serialize_str(self.as_str())
2810 }
2811}
2812#[cfg(feature = "deserialize")]
2813impl<'de> serde::Deserialize<'de>
2814 for CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme
2815{
2816 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2817 use std::str::FromStr;
2818 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2819 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBsStandardPlaceOfSupplyScheme"))
2820 }
2821}
2822#[derive(Copy, Clone, Eq, PartialEq)]
2824pub enum CreateTaxRegistrationCountryOptionsBsType {
2825 Standard,
2826}
2827impl CreateTaxRegistrationCountryOptionsBsType {
2828 pub fn as_str(self) -> &'static str {
2829 use CreateTaxRegistrationCountryOptionsBsType::*;
2830 match self {
2831 Standard => "standard",
2832 }
2833 }
2834}
2835
2836impl std::str::FromStr for CreateTaxRegistrationCountryOptionsBsType {
2837 type Err = stripe_types::StripeParseError;
2838 fn from_str(s: &str) -> Result<Self, Self::Err> {
2839 use CreateTaxRegistrationCountryOptionsBsType::*;
2840 match s {
2841 "standard" => Ok(Standard),
2842 _ => Err(stripe_types::StripeParseError),
2843 }
2844 }
2845}
2846impl std::fmt::Display for CreateTaxRegistrationCountryOptionsBsType {
2847 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2848 f.write_str(self.as_str())
2849 }
2850}
2851
2852impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsBsType {
2853 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2854 f.write_str(self.as_str())
2855 }
2856}
2857impl serde::Serialize for CreateTaxRegistrationCountryOptionsBsType {
2858 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2859 where
2860 S: serde::Serializer,
2861 {
2862 serializer.serialize_str(self.as_str())
2863 }
2864}
2865#[cfg(feature = "deserialize")]
2866impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBsType {
2867 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2868 use std::str::FromStr;
2869 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2870 Self::from_str(&s).map_err(|_| {
2871 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsBsType")
2872 })
2873 }
2874}
2875#[derive(Copy, Clone, Debug, serde::Serialize)]
2877pub struct CreateTaxRegistrationCountryOptionsBy {
2878 #[serde(rename = "type")]
2880 pub type_: CreateTaxRegistrationCountryOptionsByType,
2881}
2882impl CreateTaxRegistrationCountryOptionsBy {
2883 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsByType>) -> Self {
2884 Self { type_: type_.into() }
2885 }
2886}
2887#[derive(Copy, Clone, Eq, PartialEq)]
2889pub enum CreateTaxRegistrationCountryOptionsByType {
2890 Simplified,
2891}
2892impl CreateTaxRegistrationCountryOptionsByType {
2893 pub fn as_str(self) -> &'static str {
2894 use CreateTaxRegistrationCountryOptionsByType::*;
2895 match self {
2896 Simplified => "simplified",
2897 }
2898 }
2899}
2900
2901impl std::str::FromStr for CreateTaxRegistrationCountryOptionsByType {
2902 type Err = stripe_types::StripeParseError;
2903 fn from_str(s: &str) -> Result<Self, Self::Err> {
2904 use CreateTaxRegistrationCountryOptionsByType::*;
2905 match s {
2906 "simplified" => Ok(Simplified),
2907 _ => Err(stripe_types::StripeParseError),
2908 }
2909 }
2910}
2911impl std::fmt::Display for CreateTaxRegistrationCountryOptionsByType {
2912 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2913 f.write_str(self.as_str())
2914 }
2915}
2916
2917impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsByType {
2918 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2919 f.write_str(self.as_str())
2920 }
2921}
2922impl serde::Serialize for CreateTaxRegistrationCountryOptionsByType {
2923 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2924 where
2925 S: serde::Serializer,
2926 {
2927 serializer.serialize_str(self.as_str())
2928 }
2929}
2930#[cfg(feature = "deserialize")]
2931impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsByType {
2932 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2933 use std::str::FromStr;
2934 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
2935 Self::from_str(&s).map_err(|_| {
2936 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsByType")
2937 })
2938 }
2939}
2940#[derive(Clone, Debug, serde::Serialize)]
2942pub struct CreateTaxRegistrationCountryOptionsCa {
2943 #[serde(skip_serializing_if = "Option::is_none")]
2945 pub province_standard: Option<CreateTaxRegistrationCountryOptionsCaProvinceStandard>,
2946 #[serde(rename = "type")]
2948 pub type_: CreateTaxRegistrationCountryOptionsCaType,
2949}
2950impl CreateTaxRegistrationCountryOptionsCa {
2951 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCaType>) -> Self {
2952 Self { province_standard: None, type_: type_.into() }
2953 }
2954}
2955#[derive(Clone, Debug, serde::Serialize)]
2957pub struct CreateTaxRegistrationCountryOptionsCaProvinceStandard {
2958 pub province: String,
2960}
2961impl CreateTaxRegistrationCountryOptionsCaProvinceStandard {
2962 pub fn new(province: impl Into<String>) -> Self {
2963 Self { province: province.into() }
2964 }
2965}
2966#[derive(Copy, Clone, Eq, PartialEq)]
2968pub enum CreateTaxRegistrationCountryOptionsCaType {
2969 ProvinceStandard,
2970 Simplified,
2971 Standard,
2972}
2973impl CreateTaxRegistrationCountryOptionsCaType {
2974 pub fn as_str(self) -> &'static str {
2975 use CreateTaxRegistrationCountryOptionsCaType::*;
2976 match self {
2977 ProvinceStandard => "province_standard",
2978 Simplified => "simplified",
2979 Standard => "standard",
2980 }
2981 }
2982}
2983
2984impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCaType {
2985 type Err = stripe_types::StripeParseError;
2986 fn from_str(s: &str) -> Result<Self, Self::Err> {
2987 use CreateTaxRegistrationCountryOptionsCaType::*;
2988 match s {
2989 "province_standard" => Ok(ProvinceStandard),
2990 "simplified" => Ok(Simplified),
2991 "standard" => Ok(Standard),
2992 _ => Err(stripe_types::StripeParseError),
2993 }
2994 }
2995}
2996impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCaType {
2997 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2998 f.write_str(self.as_str())
2999 }
3000}
3001
3002impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCaType {
3003 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3004 f.write_str(self.as_str())
3005 }
3006}
3007impl serde::Serialize for CreateTaxRegistrationCountryOptionsCaType {
3008 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3009 where
3010 S: serde::Serializer,
3011 {
3012 serializer.serialize_str(self.as_str())
3013 }
3014}
3015#[cfg(feature = "deserialize")]
3016impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCaType {
3017 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3018 use std::str::FromStr;
3019 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3020 Self::from_str(&s).map_err(|_| {
3021 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCaType")
3022 })
3023 }
3024}
3025#[derive(Copy, Clone, Debug, serde::Serialize)]
3027pub struct CreateTaxRegistrationCountryOptionsCd {
3028 #[serde(skip_serializing_if = "Option::is_none")]
3030 pub standard: Option<CreateTaxRegistrationCountryOptionsCdStandard>,
3031 #[serde(rename = "type")]
3033 pub type_: CreateTaxRegistrationCountryOptionsCdType,
3034}
3035impl CreateTaxRegistrationCountryOptionsCd {
3036 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCdType>) -> Self {
3037 Self { standard: None, type_: type_.into() }
3038 }
3039}
3040#[derive(Copy, Clone, Debug, serde::Serialize)]
3042pub struct CreateTaxRegistrationCountryOptionsCdStandard {
3043 #[serde(skip_serializing_if = "Option::is_none")]
3045 pub place_of_supply_scheme:
3046 Option<CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme>,
3047}
3048impl CreateTaxRegistrationCountryOptionsCdStandard {
3049 pub fn new() -> Self {
3050 Self { place_of_supply_scheme: None }
3051 }
3052}
3053impl Default for CreateTaxRegistrationCountryOptionsCdStandard {
3054 fn default() -> Self {
3055 Self::new()
3056 }
3057}
3058#[derive(Copy, Clone, Eq, PartialEq)]
3060pub enum CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme {
3061 InboundGoods,
3062 Standard,
3063}
3064impl CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme {
3065 pub fn as_str(self) -> &'static str {
3066 use CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme::*;
3067 match self {
3068 InboundGoods => "inbound_goods",
3069 Standard => "standard",
3070 }
3071 }
3072}
3073
3074impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme {
3075 type Err = stripe_types::StripeParseError;
3076 fn from_str(s: &str) -> Result<Self, Self::Err> {
3077 use CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme::*;
3078 match s {
3079 "inbound_goods" => Ok(InboundGoods),
3080 "standard" => Ok(Standard),
3081 _ => Err(stripe_types::StripeParseError),
3082 }
3083 }
3084}
3085impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme {
3086 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3087 f.write_str(self.as_str())
3088 }
3089}
3090
3091impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme {
3092 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3093 f.write_str(self.as_str())
3094 }
3095}
3096impl serde::Serialize for CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme {
3097 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3098 where
3099 S: serde::Serializer,
3100 {
3101 serializer.serialize_str(self.as_str())
3102 }
3103}
3104#[cfg(feature = "deserialize")]
3105impl<'de> serde::Deserialize<'de>
3106 for CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme
3107{
3108 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3109 use std::str::FromStr;
3110 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3111 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCdStandardPlaceOfSupplyScheme"))
3112 }
3113}
3114#[derive(Copy, Clone, Eq, PartialEq)]
3116pub enum CreateTaxRegistrationCountryOptionsCdType {
3117 Standard,
3118}
3119impl CreateTaxRegistrationCountryOptionsCdType {
3120 pub fn as_str(self) -> &'static str {
3121 use CreateTaxRegistrationCountryOptionsCdType::*;
3122 match self {
3123 Standard => "standard",
3124 }
3125 }
3126}
3127
3128impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCdType {
3129 type Err = stripe_types::StripeParseError;
3130 fn from_str(s: &str) -> Result<Self, Self::Err> {
3131 use CreateTaxRegistrationCountryOptionsCdType::*;
3132 match s {
3133 "standard" => Ok(Standard),
3134 _ => Err(stripe_types::StripeParseError),
3135 }
3136 }
3137}
3138impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCdType {
3139 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3140 f.write_str(self.as_str())
3141 }
3142}
3143
3144impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCdType {
3145 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3146 f.write_str(self.as_str())
3147 }
3148}
3149impl serde::Serialize for CreateTaxRegistrationCountryOptionsCdType {
3150 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3151 where
3152 S: serde::Serializer,
3153 {
3154 serializer.serialize_str(self.as_str())
3155 }
3156}
3157#[cfg(feature = "deserialize")]
3158impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCdType {
3159 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3160 use std::str::FromStr;
3161 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3162 Self::from_str(&s).map_err(|_| {
3163 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCdType")
3164 })
3165 }
3166}
3167#[derive(Copy, Clone, Debug, serde::Serialize)]
3169pub struct CreateTaxRegistrationCountryOptionsCh {
3170 #[serde(skip_serializing_if = "Option::is_none")]
3172 pub standard: Option<CreateTaxRegistrationCountryOptionsChStandard>,
3173 #[serde(rename = "type")]
3175 pub type_: CreateTaxRegistrationCountryOptionsChType,
3176}
3177impl CreateTaxRegistrationCountryOptionsCh {
3178 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsChType>) -> Self {
3179 Self { standard: None, type_: type_.into() }
3180 }
3181}
3182#[derive(Copy, Clone, Debug, serde::Serialize)]
3184pub struct CreateTaxRegistrationCountryOptionsChStandard {
3185 #[serde(skip_serializing_if = "Option::is_none")]
3187 pub place_of_supply_scheme:
3188 Option<CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme>,
3189}
3190impl CreateTaxRegistrationCountryOptionsChStandard {
3191 pub fn new() -> Self {
3192 Self { place_of_supply_scheme: None }
3193 }
3194}
3195impl Default for CreateTaxRegistrationCountryOptionsChStandard {
3196 fn default() -> Self {
3197 Self::new()
3198 }
3199}
3200#[derive(Copy, Clone, Eq, PartialEq)]
3202pub enum CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme {
3203 InboundGoods,
3204 Standard,
3205}
3206impl CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme {
3207 pub fn as_str(self) -> &'static str {
3208 use CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme::*;
3209 match self {
3210 InboundGoods => "inbound_goods",
3211 Standard => "standard",
3212 }
3213 }
3214}
3215
3216impl std::str::FromStr for CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme {
3217 type Err = stripe_types::StripeParseError;
3218 fn from_str(s: &str) -> Result<Self, Self::Err> {
3219 use CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme::*;
3220 match s {
3221 "inbound_goods" => Ok(InboundGoods),
3222 "standard" => Ok(Standard),
3223 _ => Err(stripe_types::StripeParseError),
3224 }
3225 }
3226}
3227impl std::fmt::Display for CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme {
3228 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3229 f.write_str(self.as_str())
3230 }
3231}
3232
3233impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme {
3234 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3235 f.write_str(self.as_str())
3236 }
3237}
3238impl serde::Serialize for CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme {
3239 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3240 where
3241 S: serde::Serializer,
3242 {
3243 serializer.serialize_str(self.as_str())
3244 }
3245}
3246#[cfg(feature = "deserialize")]
3247impl<'de> serde::Deserialize<'de>
3248 for CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme
3249{
3250 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3251 use std::str::FromStr;
3252 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3253 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsChStandardPlaceOfSupplyScheme"))
3254 }
3255}
3256#[derive(Copy, Clone, Eq, PartialEq)]
3258pub enum CreateTaxRegistrationCountryOptionsChType {
3259 Standard,
3260}
3261impl CreateTaxRegistrationCountryOptionsChType {
3262 pub fn as_str(self) -> &'static str {
3263 use CreateTaxRegistrationCountryOptionsChType::*;
3264 match self {
3265 Standard => "standard",
3266 }
3267 }
3268}
3269
3270impl std::str::FromStr for CreateTaxRegistrationCountryOptionsChType {
3271 type Err = stripe_types::StripeParseError;
3272 fn from_str(s: &str) -> Result<Self, Self::Err> {
3273 use CreateTaxRegistrationCountryOptionsChType::*;
3274 match s {
3275 "standard" => Ok(Standard),
3276 _ => Err(stripe_types::StripeParseError),
3277 }
3278 }
3279}
3280impl std::fmt::Display for CreateTaxRegistrationCountryOptionsChType {
3281 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3282 f.write_str(self.as_str())
3283 }
3284}
3285
3286impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsChType {
3287 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3288 f.write_str(self.as_str())
3289 }
3290}
3291impl serde::Serialize for CreateTaxRegistrationCountryOptionsChType {
3292 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3293 where
3294 S: serde::Serializer,
3295 {
3296 serializer.serialize_str(self.as_str())
3297 }
3298}
3299#[cfg(feature = "deserialize")]
3300impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsChType {
3301 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3302 use std::str::FromStr;
3303 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3304 Self::from_str(&s).map_err(|_| {
3305 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsChType")
3306 })
3307 }
3308}
3309#[derive(Copy, Clone, Debug, serde::Serialize)]
3311pub struct CreateTaxRegistrationCountryOptionsCl {
3312 #[serde(rename = "type")]
3314 pub type_: CreateTaxRegistrationCountryOptionsClType,
3315}
3316impl CreateTaxRegistrationCountryOptionsCl {
3317 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsClType>) -> Self {
3318 Self { type_: type_.into() }
3319 }
3320}
3321#[derive(Copy, Clone, Eq, PartialEq)]
3323pub enum CreateTaxRegistrationCountryOptionsClType {
3324 Simplified,
3325}
3326impl CreateTaxRegistrationCountryOptionsClType {
3327 pub fn as_str(self) -> &'static str {
3328 use CreateTaxRegistrationCountryOptionsClType::*;
3329 match self {
3330 Simplified => "simplified",
3331 }
3332 }
3333}
3334
3335impl std::str::FromStr for CreateTaxRegistrationCountryOptionsClType {
3336 type Err = stripe_types::StripeParseError;
3337 fn from_str(s: &str) -> Result<Self, Self::Err> {
3338 use CreateTaxRegistrationCountryOptionsClType::*;
3339 match s {
3340 "simplified" => Ok(Simplified),
3341 _ => Err(stripe_types::StripeParseError),
3342 }
3343 }
3344}
3345impl std::fmt::Display for CreateTaxRegistrationCountryOptionsClType {
3346 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3347 f.write_str(self.as_str())
3348 }
3349}
3350
3351impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsClType {
3352 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3353 f.write_str(self.as_str())
3354 }
3355}
3356impl serde::Serialize for CreateTaxRegistrationCountryOptionsClType {
3357 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3358 where
3359 S: serde::Serializer,
3360 {
3361 serializer.serialize_str(self.as_str())
3362 }
3363}
3364#[cfg(feature = "deserialize")]
3365impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsClType {
3366 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3367 use std::str::FromStr;
3368 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3369 Self::from_str(&s).map_err(|_| {
3370 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsClType")
3371 })
3372 }
3373}
3374#[derive(Copy, Clone, Debug, serde::Serialize)]
3376pub struct CreateTaxRegistrationCountryOptionsCm {
3377 #[serde(rename = "type")]
3379 pub type_: CreateTaxRegistrationCountryOptionsCmType,
3380}
3381impl CreateTaxRegistrationCountryOptionsCm {
3382 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCmType>) -> Self {
3383 Self { type_: type_.into() }
3384 }
3385}
3386#[derive(Copy, Clone, Eq, PartialEq)]
3388pub enum CreateTaxRegistrationCountryOptionsCmType {
3389 Simplified,
3390}
3391impl CreateTaxRegistrationCountryOptionsCmType {
3392 pub fn as_str(self) -> &'static str {
3393 use CreateTaxRegistrationCountryOptionsCmType::*;
3394 match self {
3395 Simplified => "simplified",
3396 }
3397 }
3398}
3399
3400impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCmType {
3401 type Err = stripe_types::StripeParseError;
3402 fn from_str(s: &str) -> Result<Self, Self::Err> {
3403 use CreateTaxRegistrationCountryOptionsCmType::*;
3404 match s {
3405 "simplified" => Ok(Simplified),
3406 _ => Err(stripe_types::StripeParseError),
3407 }
3408 }
3409}
3410impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCmType {
3411 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3412 f.write_str(self.as_str())
3413 }
3414}
3415
3416impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCmType {
3417 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3418 f.write_str(self.as_str())
3419 }
3420}
3421impl serde::Serialize for CreateTaxRegistrationCountryOptionsCmType {
3422 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3423 where
3424 S: serde::Serializer,
3425 {
3426 serializer.serialize_str(self.as_str())
3427 }
3428}
3429#[cfg(feature = "deserialize")]
3430impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCmType {
3431 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3432 use std::str::FromStr;
3433 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3434 Self::from_str(&s).map_err(|_| {
3435 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCmType")
3436 })
3437 }
3438}
3439#[derive(Copy, Clone, Debug, serde::Serialize)]
3441pub struct CreateTaxRegistrationCountryOptionsCo {
3442 #[serde(rename = "type")]
3444 pub type_: CreateTaxRegistrationCountryOptionsCoType,
3445}
3446impl CreateTaxRegistrationCountryOptionsCo {
3447 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCoType>) -> Self {
3448 Self { type_: type_.into() }
3449 }
3450}
3451#[derive(Copy, Clone, Eq, PartialEq)]
3453pub enum CreateTaxRegistrationCountryOptionsCoType {
3454 Simplified,
3455}
3456impl CreateTaxRegistrationCountryOptionsCoType {
3457 pub fn as_str(self) -> &'static str {
3458 use CreateTaxRegistrationCountryOptionsCoType::*;
3459 match self {
3460 Simplified => "simplified",
3461 }
3462 }
3463}
3464
3465impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCoType {
3466 type Err = stripe_types::StripeParseError;
3467 fn from_str(s: &str) -> Result<Self, Self::Err> {
3468 use CreateTaxRegistrationCountryOptionsCoType::*;
3469 match s {
3470 "simplified" => Ok(Simplified),
3471 _ => Err(stripe_types::StripeParseError),
3472 }
3473 }
3474}
3475impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCoType {
3476 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3477 f.write_str(self.as_str())
3478 }
3479}
3480
3481impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCoType {
3482 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3483 f.write_str(self.as_str())
3484 }
3485}
3486impl serde::Serialize for CreateTaxRegistrationCountryOptionsCoType {
3487 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3488 where
3489 S: serde::Serializer,
3490 {
3491 serializer.serialize_str(self.as_str())
3492 }
3493}
3494#[cfg(feature = "deserialize")]
3495impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCoType {
3496 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3497 use std::str::FromStr;
3498 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3499 Self::from_str(&s).map_err(|_| {
3500 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCoType")
3501 })
3502 }
3503}
3504#[derive(Copy, Clone, Debug, serde::Serialize)]
3506pub struct CreateTaxRegistrationCountryOptionsCr {
3507 #[serde(rename = "type")]
3509 pub type_: CreateTaxRegistrationCountryOptionsCrType,
3510}
3511impl CreateTaxRegistrationCountryOptionsCr {
3512 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCrType>) -> Self {
3513 Self { type_: type_.into() }
3514 }
3515}
3516#[derive(Copy, Clone, Eq, PartialEq)]
3518pub enum CreateTaxRegistrationCountryOptionsCrType {
3519 Simplified,
3520}
3521impl CreateTaxRegistrationCountryOptionsCrType {
3522 pub fn as_str(self) -> &'static str {
3523 use CreateTaxRegistrationCountryOptionsCrType::*;
3524 match self {
3525 Simplified => "simplified",
3526 }
3527 }
3528}
3529
3530impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCrType {
3531 type Err = stripe_types::StripeParseError;
3532 fn from_str(s: &str) -> Result<Self, Self::Err> {
3533 use CreateTaxRegistrationCountryOptionsCrType::*;
3534 match s {
3535 "simplified" => Ok(Simplified),
3536 _ => Err(stripe_types::StripeParseError),
3537 }
3538 }
3539}
3540impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCrType {
3541 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3542 f.write_str(self.as_str())
3543 }
3544}
3545
3546impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCrType {
3547 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3548 f.write_str(self.as_str())
3549 }
3550}
3551impl serde::Serialize for CreateTaxRegistrationCountryOptionsCrType {
3552 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3553 where
3554 S: serde::Serializer,
3555 {
3556 serializer.serialize_str(self.as_str())
3557 }
3558}
3559#[cfg(feature = "deserialize")]
3560impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCrType {
3561 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3562 use std::str::FromStr;
3563 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3564 Self::from_str(&s).map_err(|_| {
3565 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCrType")
3566 })
3567 }
3568}
3569#[derive(Copy, Clone, Debug, serde::Serialize)]
3571pub struct CreateTaxRegistrationCountryOptionsCv {
3572 #[serde(rename = "type")]
3574 pub type_: CreateTaxRegistrationCountryOptionsCvType,
3575}
3576impl CreateTaxRegistrationCountryOptionsCv {
3577 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCvType>) -> Self {
3578 Self { type_: type_.into() }
3579 }
3580}
3581#[derive(Copy, Clone, Eq, PartialEq)]
3583pub enum CreateTaxRegistrationCountryOptionsCvType {
3584 Simplified,
3585}
3586impl CreateTaxRegistrationCountryOptionsCvType {
3587 pub fn as_str(self) -> &'static str {
3588 use CreateTaxRegistrationCountryOptionsCvType::*;
3589 match self {
3590 Simplified => "simplified",
3591 }
3592 }
3593}
3594
3595impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCvType {
3596 type Err = stripe_types::StripeParseError;
3597 fn from_str(s: &str) -> Result<Self, Self::Err> {
3598 use CreateTaxRegistrationCountryOptionsCvType::*;
3599 match s {
3600 "simplified" => Ok(Simplified),
3601 _ => Err(stripe_types::StripeParseError),
3602 }
3603 }
3604}
3605impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCvType {
3606 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3607 f.write_str(self.as_str())
3608 }
3609}
3610
3611impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCvType {
3612 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3613 f.write_str(self.as_str())
3614 }
3615}
3616impl serde::Serialize for CreateTaxRegistrationCountryOptionsCvType {
3617 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3618 where
3619 S: serde::Serializer,
3620 {
3621 serializer.serialize_str(self.as_str())
3622 }
3623}
3624#[cfg(feature = "deserialize")]
3625impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCvType {
3626 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3627 use std::str::FromStr;
3628 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3629 Self::from_str(&s).map_err(|_| {
3630 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCvType")
3631 })
3632 }
3633}
3634#[derive(Copy, Clone, Debug, serde::Serialize)]
3636pub struct CreateTaxRegistrationCountryOptionsCy {
3637 #[serde(skip_serializing_if = "Option::is_none")]
3639 pub standard: Option<CreateTaxRegistrationCountryOptionsCyStandard>,
3640 #[serde(rename = "type")]
3642 pub type_: CreateTaxRegistrationCountryOptionsCyType,
3643}
3644impl CreateTaxRegistrationCountryOptionsCy {
3645 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCyType>) -> Self {
3646 Self { standard: None, type_: type_.into() }
3647 }
3648}
3649#[derive(Copy, Clone, Debug, serde::Serialize)]
3651pub struct CreateTaxRegistrationCountryOptionsCyStandard {
3652 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme,
3654}
3655impl CreateTaxRegistrationCountryOptionsCyStandard {
3656 pub fn new(
3657 place_of_supply_scheme: impl Into<
3658 CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme,
3659 >,
3660 ) -> Self {
3661 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
3662 }
3663}
3664#[derive(Copy, Clone, Eq, PartialEq)]
3666pub enum CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme {
3667 InboundGoods,
3668 SmallSeller,
3669 Standard,
3670}
3671impl CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme {
3672 pub fn as_str(self) -> &'static str {
3673 use CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme::*;
3674 match self {
3675 InboundGoods => "inbound_goods",
3676 SmallSeller => "small_seller",
3677 Standard => "standard",
3678 }
3679 }
3680}
3681
3682impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme {
3683 type Err = stripe_types::StripeParseError;
3684 fn from_str(s: &str) -> Result<Self, Self::Err> {
3685 use CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme::*;
3686 match s {
3687 "inbound_goods" => Ok(InboundGoods),
3688 "small_seller" => Ok(SmallSeller),
3689 "standard" => Ok(Standard),
3690 _ => Err(stripe_types::StripeParseError),
3691 }
3692 }
3693}
3694impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme {
3695 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3696 f.write_str(self.as_str())
3697 }
3698}
3699
3700impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme {
3701 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3702 f.write_str(self.as_str())
3703 }
3704}
3705impl serde::Serialize for CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme {
3706 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3707 where
3708 S: serde::Serializer,
3709 {
3710 serializer.serialize_str(self.as_str())
3711 }
3712}
3713#[cfg(feature = "deserialize")]
3714impl<'de> serde::Deserialize<'de>
3715 for CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme
3716{
3717 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3718 use std::str::FromStr;
3719 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3720 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme"))
3721 }
3722}
3723#[derive(Copy, Clone, Eq, PartialEq)]
3725pub enum CreateTaxRegistrationCountryOptionsCyType {
3726 Ioss,
3727 OssNonUnion,
3728 OssUnion,
3729 Standard,
3730}
3731impl CreateTaxRegistrationCountryOptionsCyType {
3732 pub fn as_str(self) -> &'static str {
3733 use CreateTaxRegistrationCountryOptionsCyType::*;
3734 match self {
3735 Ioss => "ioss",
3736 OssNonUnion => "oss_non_union",
3737 OssUnion => "oss_union",
3738 Standard => "standard",
3739 }
3740 }
3741}
3742
3743impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCyType {
3744 type Err = stripe_types::StripeParseError;
3745 fn from_str(s: &str) -> Result<Self, Self::Err> {
3746 use CreateTaxRegistrationCountryOptionsCyType::*;
3747 match s {
3748 "ioss" => Ok(Ioss),
3749 "oss_non_union" => Ok(OssNonUnion),
3750 "oss_union" => Ok(OssUnion),
3751 "standard" => Ok(Standard),
3752 _ => Err(stripe_types::StripeParseError),
3753 }
3754 }
3755}
3756impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCyType {
3757 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3758 f.write_str(self.as_str())
3759 }
3760}
3761
3762impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCyType {
3763 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3764 f.write_str(self.as_str())
3765 }
3766}
3767impl serde::Serialize for CreateTaxRegistrationCountryOptionsCyType {
3768 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3769 where
3770 S: serde::Serializer,
3771 {
3772 serializer.serialize_str(self.as_str())
3773 }
3774}
3775#[cfg(feature = "deserialize")]
3776impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCyType {
3777 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3778 use std::str::FromStr;
3779 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3780 Self::from_str(&s).map_err(|_| {
3781 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCyType")
3782 })
3783 }
3784}
3785#[derive(Copy, Clone, Debug, serde::Serialize)]
3787pub struct CreateTaxRegistrationCountryOptionsCz {
3788 #[serde(skip_serializing_if = "Option::is_none")]
3790 pub standard: Option<CreateTaxRegistrationCountryOptionsCzStandard>,
3791 #[serde(rename = "type")]
3793 pub type_: CreateTaxRegistrationCountryOptionsCzType,
3794}
3795impl CreateTaxRegistrationCountryOptionsCz {
3796 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsCzType>) -> Self {
3797 Self { standard: None, type_: type_.into() }
3798 }
3799}
3800#[derive(Copy, Clone, Debug, serde::Serialize)]
3802pub struct CreateTaxRegistrationCountryOptionsCzStandard {
3803 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme,
3805}
3806impl CreateTaxRegistrationCountryOptionsCzStandard {
3807 pub fn new(
3808 place_of_supply_scheme: impl Into<
3809 CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme,
3810 >,
3811 ) -> Self {
3812 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
3813 }
3814}
3815#[derive(Copy, Clone, Eq, PartialEq)]
3817pub enum CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme {
3818 InboundGoods,
3819 SmallSeller,
3820 Standard,
3821}
3822impl CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme {
3823 pub fn as_str(self) -> &'static str {
3824 use CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme::*;
3825 match self {
3826 InboundGoods => "inbound_goods",
3827 SmallSeller => "small_seller",
3828 Standard => "standard",
3829 }
3830 }
3831}
3832
3833impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme {
3834 type Err = stripe_types::StripeParseError;
3835 fn from_str(s: &str) -> Result<Self, Self::Err> {
3836 use CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme::*;
3837 match s {
3838 "inbound_goods" => Ok(InboundGoods),
3839 "small_seller" => Ok(SmallSeller),
3840 "standard" => Ok(Standard),
3841 _ => Err(stripe_types::StripeParseError),
3842 }
3843 }
3844}
3845impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme {
3846 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3847 f.write_str(self.as_str())
3848 }
3849}
3850
3851impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme {
3852 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3853 f.write_str(self.as_str())
3854 }
3855}
3856impl serde::Serialize for CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme {
3857 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3858 where
3859 S: serde::Serializer,
3860 {
3861 serializer.serialize_str(self.as_str())
3862 }
3863}
3864#[cfg(feature = "deserialize")]
3865impl<'de> serde::Deserialize<'de>
3866 for CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme
3867{
3868 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3869 use std::str::FromStr;
3870 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3871 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme"))
3872 }
3873}
3874#[derive(Copy, Clone, Eq, PartialEq)]
3876pub enum CreateTaxRegistrationCountryOptionsCzType {
3877 Ioss,
3878 OssNonUnion,
3879 OssUnion,
3880 Standard,
3881}
3882impl CreateTaxRegistrationCountryOptionsCzType {
3883 pub fn as_str(self) -> &'static str {
3884 use CreateTaxRegistrationCountryOptionsCzType::*;
3885 match self {
3886 Ioss => "ioss",
3887 OssNonUnion => "oss_non_union",
3888 OssUnion => "oss_union",
3889 Standard => "standard",
3890 }
3891 }
3892}
3893
3894impl std::str::FromStr for CreateTaxRegistrationCountryOptionsCzType {
3895 type Err = stripe_types::StripeParseError;
3896 fn from_str(s: &str) -> Result<Self, Self::Err> {
3897 use CreateTaxRegistrationCountryOptionsCzType::*;
3898 match s {
3899 "ioss" => Ok(Ioss),
3900 "oss_non_union" => Ok(OssNonUnion),
3901 "oss_union" => Ok(OssUnion),
3902 "standard" => Ok(Standard),
3903 _ => Err(stripe_types::StripeParseError),
3904 }
3905 }
3906}
3907impl std::fmt::Display for CreateTaxRegistrationCountryOptionsCzType {
3908 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3909 f.write_str(self.as_str())
3910 }
3911}
3912
3913impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsCzType {
3914 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3915 f.write_str(self.as_str())
3916 }
3917}
3918impl serde::Serialize for CreateTaxRegistrationCountryOptionsCzType {
3919 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3920 where
3921 S: serde::Serializer,
3922 {
3923 serializer.serialize_str(self.as_str())
3924 }
3925}
3926#[cfg(feature = "deserialize")]
3927impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCzType {
3928 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
3929 use std::str::FromStr;
3930 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
3931 Self::from_str(&s).map_err(|_| {
3932 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsCzType")
3933 })
3934 }
3935}
3936#[derive(Copy, Clone, Debug, serde::Serialize)]
3938pub struct CreateTaxRegistrationCountryOptionsDe {
3939 #[serde(skip_serializing_if = "Option::is_none")]
3941 pub standard: Option<CreateTaxRegistrationCountryOptionsDeStandard>,
3942 #[serde(rename = "type")]
3944 pub type_: CreateTaxRegistrationCountryOptionsDeType,
3945}
3946impl CreateTaxRegistrationCountryOptionsDe {
3947 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsDeType>) -> Self {
3948 Self { standard: None, type_: type_.into() }
3949 }
3950}
3951#[derive(Copy, Clone, Debug, serde::Serialize)]
3953pub struct CreateTaxRegistrationCountryOptionsDeStandard {
3954 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme,
3956}
3957impl CreateTaxRegistrationCountryOptionsDeStandard {
3958 pub fn new(
3959 place_of_supply_scheme: impl Into<
3960 CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme,
3961 >,
3962 ) -> Self {
3963 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
3964 }
3965}
3966#[derive(Copy, Clone, Eq, PartialEq)]
3968pub enum CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme {
3969 InboundGoods,
3970 SmallSeller,
3971 Standard,
3972}
3973impl CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme {
3974 pub fn as_str(self) -> &'static str {
3975 use CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme::*;
3976 match self {
3977 InboundGoods => "inbound_goods",
3978 SmallSeller => "small_seller",
3979 Standard => "standard",
3980 }
3981 }
3982}
3983
3984impl std::str::FromStr for CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme {
3985 type Err = stripe_types::StripeParseError;
3986 fn from_str(s: &str) -> Result<Self, Self::Err> {
3987 use CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme::*;
3988 match s {
3989 "inbound_goods" => Ok(InboundGoods),
3990 "small_seller" => Ok(SmallSeller),
3991 "standard" => Ok(Standard),
3992 _ => Err(stripe_types::StripeParseError),
3993 }
3994 }
3995}
3996impl std::fmt::Display for CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme {
3997 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3998 f.write_str(self.as_str())
3999 }
4000}
4001
4002impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme {
4003 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4004 f.write_str(self.as_str())
4005 }
4006}
4007impl serde::Serialize for CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme {
4008 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4009 where
4010 S: serde::Serializer,
4011 {
4012 serializer.serialize_str(self.as_str())
4013 }
4014}
4015#[cfg(feature = "deserialize")]
4016impl<'de> serde::Deserialize<'de>
4017 for CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme
4018{
4019 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4020 use std::str::FromStr;
4021 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4022 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme"))
4023 }
4024}
4025#[derive(Copy, Clone, Eq, PartialEq)]
4027pub enum CreateTaxRegistrationCountryOptionsDeType {
4028 Ioss,
4029 OssNonUnion,
4030 OssUnion,
4031 Standard,
4032}
4033impl CreateTaxRegistrationCountryOptionsDeType {
4034 pub fn as_str(self) -> &'static str {
4035 use CreateTaxRegistrationCountryOptionsDeType::*;
4036 match self {
4037 Ioss => "ioss",
4038 OssNonUnion => "oss_non_union",
4039 OssUnion => "oss_union",
4040 Standard => "standard",
4041 }
4042 }
4043}
4044
4045impl std::str::FromStr for CreateTaxRegistrationCountryOptionsDeType {
4046 type Err = stripe_types::StripeParseError;
4047 fn from_str(s: &str) -> Result<Self, Self::Err> {
4048 use CreateTaxRegistrationCountryOptionsDeType::*;
4049 match s {
4050 "ioss" => Ok(Ioss),
4051 "oss_non_union" => Ok(OssNonUnion),
4052 "oss_union" => Ok(OssUnion),
4053 "standard" => Ok(Standard),
4054 _ => Err(stripe_types::StripeParseError),
4055 }
4056 }
4057}
4058impl std::fmt::Display for CreateTaxRegistrationCountryOptionsDeType {
4059 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4060 f.write_str(self.as_str())
4061 }
4062}
4063
4064impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsDeType {
4065 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4066 f.write_str(self.as_str())
4067 }
4068}
4069impl serde::Serialize for CreateTaxRegistrationCountryOptionsDeType {
4070 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4071 where
4072 S: serde::Serializer,
4073 {
4074 serializer.serialize_str(self.as_str())
4075 }
4076}
4077#[cfg(feature = "deserialize")]
4078impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsDeType {
4079 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4080 use std::str::FromStr;
4081 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4082 Self::from_str(&s).map_err(|_| {
4083 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsDeType")
4084 })
4085 }
4086}
4087#[derive(Copy, Clone, Debug, serde::Serialize)]
4089pub struct CreateTaxRegistrationCountryOptionsDk {
4090 #[serde(skip_serializing_if = "Option::is_none")]
4092 pub standard: Option<CreateTaxRegistrationCountryOptionsDkStandard>,
4093 #[serde(rename = "type")]
4095 pub type_: CreateTaxRegistrationCountryOptionsDkType,
4096}
4097impl CreateTaxRegistrationCountryOptionsDk {
4098 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsDkType>) -> Self {
4099 Self { standard: None, type_: type_.into() }
4100 }
4101}
4102#[derive(Copy, Clone, Debug, serde::Serialize)]
4104pub struct CreateTaxRegistrationCountryOptionsDkStandard {
4105 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme,
4107}
4108impl CreateTaxRegistrationCountryOptionsDkStandard {
4109 pub fn new(
4110 place_of_supply_scheme: impl Into<
4111 CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme,
4112 >,
4113 ) -> Self {
4114 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
4115 }
4116}
4117#[derive(Copy, Clone, Eq, PartialEq)]
4119pub enum CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme {
4120 InboundGoods,
4121 SmallSeller,
4122 Standard,
4123}
4124impl CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme {
4125 pub fn as_str(self) -> &'static str {
4126 use CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme::*;
4127 match self {
4128 InboundGoods => "inbound_goods",
4129 SmallSeller => "small_seller",
4130 Standard => "standard",
4131 }
4132 }
4133}
4134
4135impl std::str::FromStr for CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme {
4136 type Err = stripe_types::StripeParseError;
4137 fn from_str(s: &str) -> Result<Self, Self::Err> {
4138 use CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme::*;
4139 match s {
4140 "inbound_goods" => Ok(InboundGoods),
4141 "small_seller" => Ok(SmallSeller),
4142 "standard" => Ok(Standard),
4143 _ => Err(stripe_types::StripeParseError),
4144 }
4145 }
4146}
4147impl std::fmt::Display for CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme {
4148 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4149 f.write_str(self.as_str())
4150 }
4151}
4152
4153impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme {
4154 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4155 f.write_str(self.as_str())
4156 }
4157}
4158impl serde::Serialize for CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme {
4159 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4160 where
4161 S: serde::Serializer,
4162 {
4163 serializer.serialize_str(self.as_str())
4164 }
4165}
4166#[cfg(feature = "deserialize")]
4167impl<'de> serde::Deserialize<'de>
4168 for CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme
4169{
4170 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4171 use std::str::FromStr;
4172 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4173 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme"))
4174 }
4175}
4176#[derive(Copy, Clone, Eq, PartialEq)]
4178pub enum CreateTaxRegistrationCountryOptionsDkType {
4179 Ioss,
4180 OssNonUnion,
4181 OssUnion,
4182 Standard,
4183}
4184impl CreateTaxRegistrationCountryOptionsDkType {
4185 pub fn as_str(self) -> &'static str {
4186 use CreateTaxRegistrationCountryOptionsDkType::*;
4187 match self {
4188 Ioss => "ioss",
4189 OssNonUnion => "oss_non_union",
4190 OssUnion => "oss_union",
4191 Standard => "standard",
4192 }
4193 }
4194}
4195
4196impl std::str::FromStr for CreateTaxRegistrationCountryOptionsDkType {
4197 type Err = stripe_types::StripeParseError;
4198 fn from_str(s: &str) -> Result<Self, Self::Err> {
4199 use CreateTaxRegistrationCountryOptionsDkType::*;
4200 match s {
4201 "ioss" => Ok(Ioss),
4202 "oss_non_union" => Ok(OssNonUnion),
4203 "oss_union" => Ok(OssUnion),
4204 "standard" => Ok(Standard),
4205 _ => Err(stripe_types::StripeParseError),
4206 }
4207 }
4208}
4209impl std::fmt::Display for CreateTaxRegistrationCountryOptionsDkType {
4210 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4211 f.write_str(self.as_str())
4212 }
4213}
4214
4215impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsDkType {
4216 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4217 f.write_str(self.as_str())
4218 }
4219}
4220impl serde::Serialize for CreateTaxRegistrationCountryOptionsDkType {
4221 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4222 where
4223 S: serde::Serializer,
4224 {
4225 serializer.serialize_str(self.as_str())
4226 }
4227}
4228#[cfg(feature = "deserialize")]
4229impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsDkType {
4230 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4231 use std::str::FromStr;
4232 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4233 Self::from_str(&s).map_err(|_| {
4234 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsDkType")
4235 })
4236 }
4237}
4238#[derive(Copy, Clone, Debug, serde::Serialize)]
4240pub struct CreateTaxRegistrationCountryOptionsEc {
4241 #[serde(rename = "type")]
4243 pub type_: CreateTaxRegistrationCountryOptionsEcType,
4244}
4245impl CreateTaxRegistrationCountryOptionsEc {
4246 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsEcType>) -> Self {
4247 Self { type_: type_.into() }
4248 }
4249}
4250#[derive(Copy, Clone, Eq, PartialEq)]
4252pub enum CreateTaxRegistrationCountryOptionsEcType {
4253 Simplified,
4254}
4255impl CreateTaxRegistrationCountryOptionsEcType {
4256 pub fn as_str(self) -> &'static str {
4257 use CreateTaxRegistrationCountryOptionsEcType::*;
4258 match self {
4259 Simplified => "simplified",
4260 }
4261 }
4262}
4263
4264impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEcType {
4265 type Err = stripe_types::StripeParseError;
4266 fn from_str(s: &str) -> Result<Self, Self::Err> {
4267 use CreateTaxRegistrationCountryOptionsEcType::*;
4268 match s {
4269 "simplified" => Ok(Simplified),
4270 _ => Err(stripe_types::StripeParseError),
4271 }
4272 }
4273}
4274impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEcType {
4275 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4276 f.write_str(self.as_str())
4277 }
4278}
4279
4280impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEcType {
4281 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4282 f.write_str(self.as_str())
4283 }
4284}
4285impl serde::Serialize for CreateTaxRegistrationCountryOptionsEcType {
4286 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4287 where
4288 S: serde::Serializer,
4289 {
4290 serializer.serialize_str(self.as_str())
4291 }
4292}
4293#[cfg(feature = "deserialize")]
4294impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEcType {
4295 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4296 use std::str::FromStr;
4297 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4298 Self::from_str(&s).map_err(|_| {
4299 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEcType")
4300 })
4301 }
4302}
4303#[derive(Copy, Clone, Debug, serde::Serialize)]
4305pub struct CreateTaxRegistrationCountryOptionsEe {
4306 #[serde(skip_serializing_if = "Option::is_none")]
4308 pub standard: Option<CreateTaxRegistrationCountryOptionsEeStandard>,
4309 #[serde(rename = "type")]
4311 pub type_: CreateTaxRegistrationCountryOptionsEeType,
4312}
4313impl CreateTaxRegistrationCountryOptionsEe {
4314 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsEeType>) -> Self {
4315 Self { standard: None, type_: type_.into() }
4316 }
4317}
4318#[derive(Copy, Clone, Debug, serde::Serialize)]
4320pub struct CreateTaxRegistrationCountryOptionsEeStandard {
4321 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme,
4323}
4324impl CreateTaxRegistrationCountryOptionsEeStandard {
4325 pub fn new(
4326 place_of_supply_scheme: impl Into<
4327 CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme,
4328 >,
4329 ) -> Self {
4330 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
4331 }
4332}
4333#[derive(Copy, Clone, Eq, PartialEq)]
4335pub enum CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme {
4336 InboundGoods,
4337 SmallSeller,
4338 Standard,
4339}
4340impl CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme {
4341 pub fn as_str(self) -> &'static str {
4342 use CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme::*;
4343 match self {
4344 InboundGoods => "inbound_goods",
4345 SmallSeller => "small_seller",
4346 Standard => "standard",
4347 }
4348 }
4349}
4350
4351impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme {
4352 type Err = stripe_types::StripeParseError;
4353 fn from_str(s: &str) -> Result<Self, Self::Err> {
4354 use CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme::*;
4355 match s {
4356 "inbound_goods" => Ok(InboundGoods),
4357 "small_seller" => Ok(SmallSeller),
4358 "standard" => Ok(Standard),
4359 _ => Err(stripe_types::StripeParseError),
4360 }
4361 }
4362}
4363impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme {
4364 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4365 f.write_str(self.as_str())
4366 }
4367}
4368
4369impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme {
4370 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4371 f.write_str(self.as_str())
4372 }
4373}
4374impl serde::Serialize for CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme {
4375 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4376 where
4377 S: serde::Serializer,
4378 {
4379 serializer.serialize_str(self.as_str())
4380 }
4381}
4382#[cfg(feature = "deserialize")]
4383impl<'de> serde::Deserialize<'de>
4384 for CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme
4385{
4386 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4387 use std::str::FromStr;
4388 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4389 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme"))
4390 }
4391}
4392#[derive(Copy, Clone, Eq, PartialEq)]
4394pub enum CreateTaxRegistrationCountryOptionsEeType {
4395 Ioss,
4396 OssNonUnion,
4397 OssUnion,
4398 Standard,
4399}
4400impl CreateTaxRegistrationCountryOptionsEeType {
4401 pub fn as_str(self) -> &'static str {
4402 use CreateTaxRegistrationCountryOptionsEeType::*;
4403 match self {
4404 Ioss => "ioss",
4405 OssNonUnion => "oss_non_union",
4406 OssUnion => "oss_union",
4407 Standard => "standard",
4408 }
4409 }
4410}
4411
4412impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEeType {
4413 type Err = stripe_types::StripeParseError;
4414 fn from_str(s: &str) -> Result<Self, Self::Err> {
4415 use CreateTaxRegistrationCountryOptionsEeType::*;
4416 match s {
4417 "ioss" => Ok(Ioss),
4418 "oss_non_union" => Ok(OssNonUnion),
4419 "oss_union" => Ok(OssUnion),
4420 "standard" => Ok(Standard),
4421 _ => Err(stripe_types::StripeParseError),
4422 }
4423 }
4424}
4425impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEeType {
4426 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4427 f.write_str(self.as_str())
4428 }
4429}
4430
4431impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEeType {
4432 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4433 f.write_str(self.as_str())
4434 }
4435}
4436impl serde::Serialize for CreateTaxRegistrationCountryOptionsEeType {
4437 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4438 where
4439 S: serde::Serializer,
4440 {
4441 serializer.serialize_str(self.as_str())
4442 }
4443}
4444#[cfg(feature = "deserialize")]
4445impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEeType {
4446 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4447 use std::str::FromStr;
4448 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4449 Self::from_str(&s).map_err(|_| {
4450 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEeType")
4451 })
4452 }
4453}
4454#[derive(Copy, Clone, Debug, serde::Serialize)]
4456pub struct CreateTaxRegistrationCountryOptionsEg {
4457 #[serde(rename = "type")]
4459 pub type_: CreateTaxRegistrationCountryOptionsEgType,
4460}
4461impl CreateTaxRegistrationCountryOptionsEg {
4462 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsEgType>) -> Self {
4463 Self { type_: type_.into() }
4464 }
4465}
4466#[derive(Copy, Clone, Eq, PartialEq)]
4468pub enum CreateTaxRegistrationCountryOptionsEgType {
4469 Simplified,
4470}
4471impl CreateTaxRegistrationCountryOptionsEgType {
4472 pub fn as_str(self) -> &'static str {
4473 use CreateTaxRegistrationCountryOptionsEgType::*;
4474 match self {
4475 Simplified => "simplified",
4476 }
4477 }
4478}
4479
4480impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEgType {
4481 type Err = stripe_types::StripeParseError;
4482 fn from_str(s: &str) -> Result<Self, Self::Err> {
4483 use CreateTaxRegistrationCountryOptionsEgType::*;
4484 match s {
4485 "simplified" => Ok(Simplified),
4486 _ => Err(stripe_types::StripeParseError),
4487 }
4488 }
4489}
4490impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEgType {
4491 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4492 f.write_str(self.as_str())
4493 }
4494}
4495
4496impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEgType {
4497 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4498 f.write_str(self.as_str())
4499 }
4500}
4501impl serde::Serialize for CreateTaxRegistrationCountryOptionsEgType {
4502 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4503 where
4504 S: serde::Serializer,
4505 {
4506 serializer.serialize_str(self.as_str())
4507 }
4508}
4509#[cfg(feature = "deserialize")]
4510impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEgType {
4511 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4512 use std::str::FromStr;
4513 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4514 Self::from_str(&s).map_err(|_| {
4515 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEgType")
4516 })
4517 }
4518}
4519#[derive(Copy, Clone, Debug, serde::Serialize)]
4521pub struct CreateTaxRegistrationCountryOptionsEs {
4522 #[serde(skip_serializing_if = "Option::is_none")]
4524 pub standard: Option<CreateTaxRegistrationCountryOptionsEsStandard>,
4525 #[serde(rename = "type")]
4527 pub type_: CreateTaxRegistrationCountryOptionsEsType,
4528}
4529impl CreateTaxRegistrationCountryOptionsEs {
4530 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsEsType>) -> Self {
4531 Self { standard: None, type_: type_.into() }
4532 }
4533}
4534#[derive(Copy, Clone, Debug, serde::Serialize)]
4536pub struct CreateTaxRegistrationCountryOptionsEsStandard {
4537 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme,
4539}
4540impl CreateTaxRegistrationCountryOptionsEsStandard {
4541 pub fn new(
4542 place_of_supply_scheme: impl Into<
4543 CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme,
4544 >,
4545 ) -> Self {
4546 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
4547 }
4548}
4549#[derive(Copy, Clone, Eq, PartialEq)]
4551pub enum CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme {
4552 InboundGoods,
4553 SmallSeller,
4554 Standard,
4555}
4556impl CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme {
4557 pub fn as_str(self) -> &'static str {
4558 use CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme::*;
4559 match self {
4560 InboundGoods => "inbound_goods",
4561 SmallSeller => "small_seller",
4562 Standard => "standard",
4563 }
4564 }
4565}
4566
4567impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme {
4568 type Err = stripe_types::StripeParseError;
4569 fn from_str(s: &str) -> Result<Self, Self::Err> {
4570 use CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme::*;
4571 match s {
4572 "inbound_goods" => Ok(InboundGoods),
4573 "small_seller" => Ok(SmallSeller),
4574 "standard" => Ok(Standard),
4575 _ => Err(stripe_types::StripeParseError),
4576 }
4577 }
4578}
4579impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme {
4580 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4581 f.write_str(self.as_str())
4582 }
4583}
4584
4585impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme {
4586 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4587 f.write_str(self.as_str())
4588 }
4589}
4590impl serde::Serialize for CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme {
4591 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4592 where
4593 S: serde::Serializer,
4594 {
4595 serializer.serialize_str(self.as_str())
4596 }
4597}
4598#[cfg(feature = "deserialize")]
4599impl<'de> serde::Deserialize<'de>
4600 for CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme
4601{
4602 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4603 use std::str::FromStr;
4604 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4605 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme"))
4606 }
4607}
4608#[derive(Copy, Clone, Eq, PartialEq)]
4610pub enum CreateTaxRegistrationCountryOptionsEsType {
4611 Ioss,
4612 OssNonUnion,
4613 OssUnion,
4614 Standard,
4615}
4616impl CreateTaxRegistrationCountryOptionsEsType {
4617 pub fn as_str(self) -> &'static str {
4618 use CreateTaxRegistrationCountryOptionsEsType::*;
4619 match self {
4620 Ioss => "ioss",
4621 OssNonUnion => "oss_non_union",
4622 OssUnion => "oss_union",
4623 Standard => "standard",
4624 }
4625 }
4626}
4627
4628impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEsType {
4629 type Err = stripe_types::StripeParseError;
4630 fn from_str(s: &str) -> Result<Self, Self::Err> {
4631 use CreateTaxRegistrationCountryOptionsEsType::*;
4632 match s {
4633 "ioss" => Ok(Ioss),
4634 "oss_non_union" => Ok(OssNonUnion),
4635 "oss_union" => Ok(OssUnion),
4636 "standard" => Ok(Standard),
4637 _ => Err(stripe_types::StripeParseError),
4638 }
4639 }
4640}
4641impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEsType {
4642 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4643 f.write_str(self.as_str())
4644 }
4645}
4646
4647impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEsType {
4648 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4649 f.write_str(self.as_str())
4650 }
4651}
4652impl serde::Serialize for CreateTaxRegistrationCountryOptionsEsType {
4653 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4654 where
4655 S: serde::Serializer,
4656 {
4657 serializer.serialize_str(self.as_str())
4658 }
4659}
4660#[cfg(feature = "deserialize")]
4661impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEsType {
4662 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4663 use std::str::FromStr;
4664 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4665 Self::from_str(&s).map_err(|_| {
4666 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEsType")
4667 })
4668 }
4669}
4670#[derive(Copy, Clone, Debug, serde::Serialize)]
4672pub struct CreateTaxRegistrationCountryOptionsEt {
4673 #[serde(skip_serializing_if = "Option::is_none")]
4675 pub standard: Option<CreateTaxRegistrationCountryOptionsEtStandard>,
4676 #[serde(rename = "type")]
4678 pub type_: CreateTaxRegistrationCountryOptionsEtType,
4679}
4680impl CreateTaxRegistrationCountryOptionsEt {
4681 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsEtType>) -> Self {
4682 Self { standard: None, type_: type_.into() }
4683 }
4684}
4685#[derive(Copy, Clone, Debug, serde::Serialize)]
4687pub struct CreateTaxRegistrationCountryOptionsEtStandard {
4688 #[serde(skip_serializing_if = "Option::is_none")]
4690 pub place_of_supply_scheme:
4691 Option<CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme>,
4692}
4693impl CreateTaxRegistrationCountryOptionsEtStandard {
4694 pub fn new() -> Self {
4695 Self { place_of_supply_scheme: None }
4696 }
4697}
4698impl Default for CreateTaxRegistrationCountryOptionsEtStandard {
4699 fn default() -> Self {
4700 Self::new()
4701 }
4702}
4703#[derive(Copy, Clone, Eq, PartialEq)]
4705pub enum CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme {
4706 InboundGoods,
4707 Standard,
4708}
4709impl CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme {
4710 pub fn as_str(self) -> &'static str {
4711 use CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme::*;
4712 match self {
4713 InboundGoods => "inbound_goods",
4714 Standard => "standard",
4715 }
4716 }
4717}
4718
4719impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme {
4720 type Err = stripe_types::StripeParseError;
4721 fn from_str(s: &str) -> Result<Self, Self::Err> {
4722 use CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme::*;
4723 match s {
4724 "inbound_goods" => Ok(InboundGoods),
4725 "standard" => Ok(Standard),
4726 _ => Err(stripe_types::StripeParseError),
4727 }
4728 }
4729}
4730impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme {
4731 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4732 f.write_str(self.as_str())
4733 }
4734}
4735
4736impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme {
4737 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4738 f.write_str(self.as_str())
4739 }
4740}
4741impl serde::Serialize for CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme {
4742 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4743 where
4744 S: serde::Serializer,
4745 {
4746 serializer.serialize_str(self.as_str())
4747 }
4748}
4749#[cfg(feature = "deserialize")]
4750impl<'de> serde::Deserialize<'de>
4751 for CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme
4752{
4753 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4754 use std::str::FromStr;
4755 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4756 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEtStandardPlaceOfSupplyScheme"))
4757 }
4758}
4759#[derive(Copy, Clone, Eq, PartialEq)]
4761pub enum CreateTaxRegistrationCountryOptionsEtType {
4762 Standard,
4763}
4764impl CreateTaxRegistrationCountryOptionsEtType {
4765 pub fn as_str(self) -> &'static str {
4766 use CreateTaxRegistrationCountryOptionsEtType::*;
4767 match self {
4768 Standard => "standard",
4769 }
4770 }
4771}
4772
4773impl std::str::FromStr for CreateTaxRegistrationCountryOptionsEtType {
4774 type Err = stripe_types::StripeParseError;
4775 fn from_str(s: &str) -> Result<Self, Self::Err> {
4776 use CreateTaxRegistrationCountryOptionsEtType::*;
4777 match s {
4778 "standard" => Ok(Standard),
4779 _ => Err(stripe_types::StripeParseError),
4780 }
4781 }
4782}
4783impl std::fmt::Display for CreateTaxRegistrationCountryOptionsEtType {
4784 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4785 f.write_str(self.as_str())
4786 }
4787}
4788
4789impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsEtType {
4790 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4791 f.write_str(self.as_str())
4792 }
4793}
4794impl serde::Serialize for CreateTaxRegistrationCountryOptionsEtType {
4795 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4796 where
4797 S: serde::Serializer,
4798 {
4799 serializer.serialize_str(self.as_str())
4800 }
4801}
4802#[cfg(feature = "deserialize")]
4803impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEtType {
4804 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4805 use std::str::FromStr;
4806 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4807 Self::from_str(&s).map_err(|_| {
4808 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsEtType")
4809 })
4810 }
4811}
4812#[derive(Copy, Clone, Debug, serde::Serialize)]
4814pub struct CreateTaxRegistrationCountryOptionsFi {
4815 #[serde(skip_serializing_if = "Option::is_none")]
4817 pub standard: Option<CreateTaxRegistrationCountryOptionsFiStandard>,
4818 #[serde(rename = "type")]
4820 pub type_: CreateTaxRegistrationCountryOptionsFiType,
4821}
4822impl CreateTaxRegistrationCountryOptionsFi {
4823 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsFiType>) -> Self {
4824 Self { standard: None, type_: type_.into() }
4825 }
4826}
4827#[derive(Copy, Clone, Debug, serde::Serialize)]
4829pub struct CreateTaxRegistrationCountryOptionsFiStandard {
4830 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme,
4832}
4833impl CreateTaxRegistrationCountryOptionsFiStandard {
4834 pub fn new(
4835 place_of_supply_scheme: impl Into<
4836 CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme,
4837 >,
4838 ) -> Self {
4839 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
4840 }
4841}
4842#[derive(Copy, Clone, Eq, PartialEq)]
4844pub enum CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme {
4845 InboundGoods,
4846 SmallSeller,
4847 Standard,
4848}
4849impl CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme {
4850 pub fn as_str(self) -> &'static str {
4851 use CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme::*;
4852 match self {
4853 InboundGoods => "inbound_goods",
4854 SmallSeller => "small_seller",
4855 Standard => "standard",
4856 }
4857 }
4858}
4859
4860impl std::str::FromStr for CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme {
4861 type Err = stripe_types::StripeParseError;
4862 fn from_str(s: &str) -> Result<Self, Self::Err> {
4863 use CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme::*;
4864 match s {
4865 "inbound_goods" => Ok(InboundGoods),
4866 "small_seller" => Ok(SmallSeller),
4867 "standard" => Ok(Standard),
4868 _ => Err(stripe_types::StripeParseError),
4869 }
4870 }
4871}
4872impl std::fmt::Display for CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme {
4873 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4874 f.write_str(self.as_str())
4875 }
4876}
4877
4878impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme {
4879 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4880 f.write_str(self.as_str())
4881 }
4882}
4883impl serde::Serialize for CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme {
4884 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4885 where
4886 S: serde::Serializer,
4887 {
4888 serializer.serialize_str(self.as_str())
4889 }
4890}
4891#[cfg(feature = "deserialize")]
4892impl<'de> serde::Deserialize<'de>
4893 for CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme
4894{
4895 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4896 use std::str::FromStr;
4897 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4898 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme"))
4899 }
4900}
4901#[derive(Copy, Clone, Eq, PartialEq)]
4903pub enum CreateTaxRegistrationCountryOptionsFiType {
4904 Ioss,
4905 OssNonUnion,
4906 OssUnion,
4907 Standard,
4908}
4909impl CreateTaxRegistrationCountryOptionsFiType {
4910 pub fn as_str(self) -> &'static str {
4911 use CreateTaxRegistrationCountryOptionsFiType::*;
4912 match self {
4913 Ioss => "ioss",
4914 OssNonUnion => "oss_non_union",
4915 OssUnion => "oss_union",
4916 Standard => "standard",
4917 }
4918 }
4919}
4920
4921impl std::str::FromStr for CreateTaxRegistrationCountryOptionsFiType {
4922 type Err = stripe_types::StripeParseError;
4923 fn from_str(s: &str) -> Result<Self, Self::Err> {
4924 use CreateTaxRegistrationCountryOptionsFiType::*;
4925 match s {
4926 "ioss" => Ok(Ioss),
4927 "oss_non_union" => Ok(OssNonUnion),
4928 "oss_union" => Ok(OssUnion),
4929 "standard" => Ok(Standard),
4930 _ => Err(stripe_types::StripeParseError),
4931 }
4932 }
4933}
4934impl std::fmt::Display for CreateTaxRegistrationCountryOptionsFiType {
4935 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4936 f.write_str(self.as_str())
4937 }
4938}
4939
4940impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsFiType {
4941 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4942 f.write_str(self.as_str())
4943 }
4944}
4945impl serde::Serialize for CreateTaxRegistrationCountryOptionsFiType {
4946 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4947 where
4948 S: serde::Serializer,
4949 {
4950 serializer.serialize_str(self.as_str())
4951 }
4952}
4953#[cfg(feature = "deserialize")]
4954impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsFiType {
4955 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4956 use std::str::FromStr;
4957 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
4958 Self::from_str(&s).map_err(|_| {
4959 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsFiType")
4960 })
4961 }
4962}
4963#[derive(Copy, Clone, Debug, serde::Serialize)]
4965pub struct CreateTaxRegistrationCountryOptionsFr {
4966 #[serde(skip_serializing_if = "Option::is_none")]
4968 pub standard: Option<CreateTaxRegistrationCountryOptionsFrStandard>,
4969 #[serde(rename = "type")]
4971 pub type_: CreateTaxRegistrationCountryOptionsFrType,
4972}
4973impl CreateTaxRegistrationCountryOptionsFr {
4974 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsFrType>) -> Self {
4975 Self { standard: None, type_: type_.into() }
4976 }
4977}
4978#[derive(Copy, Clone, Debug, serde::Serialize)]
4980pub struct CreateTaxRegistrationCountryOptionsFrStandard {
4981 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme,
4983}
4984impl CreateTaxRegistrationCountryOptionsFrStandard {
4985 pub fn new(
4986 place_of_supply_scheme: impl Into<
4987 CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme,
4988 >,
4989 ) -> Self {
4990 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
4991 }
4992}
4993#[derive(Copy, Clone, Eq, PartialEq)]
4995pub enum CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme {
4996 InboundGoods,
4997 SmallSeller,
4998 Standard,
4999}
5000impl CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme {
5001 pub fn as_str(self) -> &'static str {
5002 use CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme::*;
5003 match self {
5004 InboundGoods => "inbound_goods",
5005 SmallSeller => "small_seller",
5006 Standard => "standard",
5007 }
5008 }
5009}
5010
5011impl std::str::FromStr for CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme {
5012 type Err = stripe_types::StripeParseError;
5013 fn from_str(s: &str) -> Result<Self, Self::Err> {
5014 use CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme::*;
5015 match s {
5016 "inbound_goods" => Ok(InboundGoods),
5017 "small_seller" => Ok(SmallSeller),
5018 "standard" => Ok(Standard),
5019 _ => Err(stripe_types::StripeParseError),
5020 }
5021 }
5022}
5023impl std::fmt::Display for CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme {
5024 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5025 f.write_str(self.as_str())
5026 }
5027}
5028
5029impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme {
5030 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5031 f.write_str(self.as_str())
5032 }
5033}
5034impl serde::Serialize for CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme {
5035 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5036 where
5037 S: serde::Serializer,
5038 {
5039 serializer.serialize_str(self.as_str())
5040 }
5041}
5042#[cfg(feature = "deserialize")]
5043impl<'de> serde::Deserialize<'de>
5044 for CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme
5045{
5046 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5047 use std::str::FromStr;
5048 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5049 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme"))
5050 }
5051}
5052#[derive(Copy, Clone, Eq, PartialEq)]
5054pub enum CreateTaxRegistrationCountryOptionsFrType {
5055 Ioss,
5056 OssNonUnion,
5057 OssUnion,
5058 Standard,
5059}
5060impl CreateTaxRegistrationCountryOptionsFrType {
5061 pub fn as_str(self) -> &'static str {
5062 use CreateTaxRegistrationCountryOptionsFrType::*;
5063 match self {
5064 Ioss => "ioss",
5065 OssNonUnion => "oss_non_union",
5066 OssUnion => "oss_union",
5067 Standard => "standard",
5068 }
5069 }
5070}
5071
5072impl std::str::FromStr for CreateTaxRegistrationCountryOptionsFrType {
5073 type Err = stripe_types::StripeParseError;
5074 fn from_str(s: &str) -> Result<Self, Self::Err> {
5075 use CreateTaxRegistrationCountryOptionsFrType::*;
5076 match s {
5077 "ioss" => Ok(Ioss),
5078 "oss_non_union" => Ok(OssNonUnion),
5079 "oss_union" => Ok(OssUnion),
5080 "standard" => Ok(Standard),
5081 _ => Err(stripe_types::StripeParseError),
5082 }
5083 }
5084}
5085impl std::fmt::Display for CreateTaxRegistrationCountryOptionsFrType {
5086 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5087 f.write_str(self.as_str())
5088 }
5089}
5090
5091impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsFrType {
5092 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5093 f.write_str(self.as_str())
5094 }
5095}
5096impl serde::Serialize for CreateTaxRegistrationCountryOptionsFrType {
5097 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5098 where
5099 S: serde::Serializer,
5100 {
5101 serializer.serialize_str(self.as_str())
5102 }
5103}
5104#[cfg(feature = "deserialize")]
5105impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsFrType {
5106 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5107 use std::str::FromStr;
5108 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5109 Self::from_str(&s).map_err(|_| {
5110 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsFrType")
5111 })
5112 }
5113}
5114#[derive(Copy, Clone, Debug, serde::Serialize)]
5116pub struct CreateTaxRegistrationCountryOptionsGb {
5117 #[serde(skip_serializing_if = "Option::is_none")]
5119 pub standard: Option<CreateTaxRegistrationCountryOptionsGbStandard>,
5120 #[serde(rename = "type")]
5122 pub type_: CreateTaxRegistrationCountryOptionsGbType,
5123}
5124impl CreateTaxRegistrationCountryOptionsGb {
5125 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsGbType>) -> Self {
5126 Self { standard: None, type_: type_.into() }
5127 }
5128}
5129#[derive(Copy, Clone, Debug, serde::Serialize)]
5131pub struct CreateTaxRegistrationCountryOptionsGbStandard {
5132 #[serde(skip_serializing_if = "Option::is_none")]
5134 pub place_of_supply_scheme:
5135 Option<CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme>,
5136}
5137impl CreateTaxRegistrationCountryOptionsGbStandard {
5138 pub fn new() -> Self {
5139 Self { place_of_supply_scheme: None }
5140 }
5141}
5142impl Default for CreateTaxRegistrationCountryOptionsGbStandard {
5143 fn default() -> Self {
5144 Self::new()
5145 }
5146}
5147#[derive(Copy, Clone, Eq, PartialEq)]
5149pub enum CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme {
5150 InboundGoods,
5151 Standard,
5152}
5153impl CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme {
5154 pub fn as_str(self) -> &'static str {
5155 use CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme::*;
5156 match self {
5157 InboundGoods => "inbound_goods",
5158 Standard => "standard",
5159 }
5160 }
5161}
5162
5163impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme {
5164 type Err = stripe_types::StripeParseError;
5165 fn from_str(s: &str) -> Result<Self, Self::Err> {
5166 use CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme::*;
5167 match s {
5168 "inbound_goods" => Ok(InboundGoods),
5169 "standard" => Ok(Standard),
5170 _ => Err(stripe_types::StripeParseError),
5171 }
5172 }
5173}
5174impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme {
5175 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5176 f.write_str(self.as_str())
5177 }
5178}
5179
5180impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme {
5181 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5182 f.write_str(self.as_str())
5183 }
5184}
5185impl serde::Serialize for CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme {
5186 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5187 where
5188 S: serde::Serializer,
5189 {
5190 serializer.serialize_str(self.as_str())
5191 }
5192}
5193#[cfg(feature = "deserialize")]
5194impl<'de> serde::Deserialize<'de>
5195 for CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme
5196{
5197 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5198 use std::str::FromStr;
5199 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5200 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGbStandardPlaceOfSupplyScheme"))
5201 }
5202}
5203#[derive(Copy, Clone, Eq, PartialEq)]
5205pub enum CreateTaxRegistrationCountryOptionsGbType {
5206 Standard,
5207}
5208impl CreateTaxRegistrationCountryOptionsGbType {
5209 pub fn as_str(self) -> &'static str {
5210 use CreateTaxRegistrationCountryOptionsGbType::*;
5211 match self {
5212 Standard => "standard",
5213 }
5214 }
5215}
5216
5217impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGbType {
5218 type Err = stripe_types::StripeParseError;
5219 fn from_str(s: &str) -> Result<Self, Self::Err> {
5220 use CreateTaxRegistrationCountryOptionsGbType::*;
5221 match s {
5222 "standard" => Ok(Standard),
5223 _ => Err(stripe_types::StripeParseError),
5224 }
5225 }
5226}
5227impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGbType {
5228 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5229 f.write_str(self.as_str())
5230 }
5231}
5232
5233impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGbType {
5234 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5235 f.write_str(self.as_str())
5236 }
5237}
5238impl serde::Serialize for CreateTaxRegistrationCountryOptionsGbType {
5239 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5240 where
5241 S: serde::Serializer,
5242 {
5243 serializer.serialize_str(self.as_str())
5244 }
5245}
5246#[cfg(feature = "deserialize")]
5247impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsGbType {
5248 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5249 use std::str::FromStr;
5250 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5251 Self::from_str(&s).map_err(|_| {
5252 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGbType")
5253 })
5254 }
5255}
5256#[derive(Copy, Clone, Debug, serde::Serialize)]
5258pub struct CreateTaxRegistrationCountryOptionsGe {
5259 #[serde(rename = "type")]
5261 pub type_: CreateTaxRegistrationCountryOptionsGeType,
5262}
5263impl CreateTaxRegistrationCountryOptionsGe {
5264 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsGeType>) -> Self {
5265 Self { type_: type_.into() }
5266 }
5267}
5268#[derive(Copy, Clone, Eq, PartialEq)]
5270pub enum CreateTaxRegistrationCountryOptionsGeType {
5271 Simplified,
5272}
5273impl CreateTaxRegistrationCountryOptionsGeType {
5274 pub fn as_str(self) -> &'static str {
5275 use CreateTaxRegistrationCountryOptionsGeType::*;
5276 match self {
5277 Simplified => "simplified",
5278 }
5279 }
5280}
5281
5282impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGeType {
5283 type Err = stripe_types::StripeParseError;
5284 fn from_str(s: &str) -> Result<Self, Self::Err> {
5285 use CreateTaxRegistrationCountryOptionsGeType::*;
5286 match s {
5287 "simplified" => Ok(Simplified),
5288 _ => Err(stripe_types::StripeParseError),
5289 }
5290 }
5291}
5292impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGeType {
5293 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5294 f.write_str(self.as_str())
5295 }
5296}
5297
5298impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGeType {
5299 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5300 f.write_str(self.as_str())
5301 }
5302}
5303impl serde::Serialize for CreateTaxRegistrationCountryOptionsGeType {
5304 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5305 where
5306 S: serde::Serializer,
5307 {
5308 serializer.serialize_str(self.as_str())
5309 }
5310}
5311#[cfg(feature = "deserialize")]
5312impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsGeType {
5313 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5314 use std::str::FromStr;
5315 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5316 Self::from_str(&s).map_err(|_| {
5317 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGeType")
5318 })
5319 }
5320}
5321#[derive(Copy, Clone, Debug, serde::Serialize)]
5323pub struct CreateTaxRegistrationCountryOptionsGn {
5324 #[serde(skip_serializing_if = "Option::is_none")]
5326 pub standard: Option<CreateTaxRegistrationCountryOptionsGnStandard>,
5327 #[serde(rename = "type")]
5329 pub type_: CreateTaxRegistrationCountryOptionsGnType,
5330}
5331impl CreateTaxRegistrationCountryOptionsGn {
5332 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsGnType>) -> Self {
5333 Self { standard: None, type_: type_.into() }
5334 }
5335}
5336#[derive(Copy, Clone, Debug, serde::Serialize)]
5338pub struct CreateTaxRegistrationCountryOptionsGnStandard {
5339 #[serde(skip_serializing_if = "Option::is_none")]
5341 pub place_of_supply_scheme:
5342 Option<CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme>,
5343}
5344impl CreateTaxRegistrationCountryOptionsGnStandard {
5345 pub fn new() -> Self {
5346 Self { place_of_supply_scheme: None }
5347 }
5348}
5349impl Default for CreateTaxRegistrationCountryOptionsGnStandard {
5350 fn default() -> Self {
5351 Self::new()
5352 }
5353}
5354#[derive(Copy, Clone, Eq, PartialEq)]
5356pub enum CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme {
5357 InboundGoods,
5358 Standard,
5359}
5360impl CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme {
5361 pub fn as_str(self) -> &'static str {
5362 use CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme::*;
5363 match self {
5364 InboundGoods => "inbound_goods",
5365 Standard => "standard",
5366 }
5367 }
5368}
5369
5370impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme {
5371 type Err = stripe_types::StripeParseError;
5372 fn from_str(s: &str) -> Result<Self, Self::Err> {
5373 use CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme::*;
5374 match s {
5375 "inbound_goods" => Ok(InboundGoods),
5376 "standard" => Ok(Standard),
5377 _ => Err(stripe_types::StripeParseError),
5378 }
5379 }
5380}
5381impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme {
5382 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5383 f.write_str(self.as_str())
5384 }
5385}
5386
5387impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme {
5388 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5389 f.write_str(self.as_str())
5390 }
5391}
5392impl serde::Serialize for CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme {
5393 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5394 where
5395 S: serde::Serializer,
5396 {
5397 serializer.serialize_str(self.as_str())
5398 }
5399}
5400#[cfg(feature = "deserialize")]
5401impl<'de> serde::Deserialize<'de>
5402 for CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme
5403{
5404 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5405 use std::str::FromStr;
5406 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5407 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGnStandardPlaceOfSupplyScheme"))
5408 }
5409}
5410#[derive(Copy, Clone, Eq, PartialEq)]
5412pub enum CreateTaxRegistrationCountryOptionsGnType {
5413 Standard,
5414}
5415impl CreateTaxRegistrationCountryOptionsGnType {
5416 pub fn as_str(self) -> &'static str {
5417 use CreateTaxRegistrationCountryOptionsGnType::*;
5418 match self {
5419 Standard => "standard",
5420 }
5421 }
5422}
5423
5424impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGnType {
5425 type Err = stripe_types::StripeParseError;
5426 fn from_str(s: &str) -> Result<Self, Self::Err> {
5427 use CreateTaxRegistrationCountryOptionsGnType::*;
5428 match s {
5429 "standard" => Ok(Standard),
5430 _ => Err(stripe_types::StripeParseError),
5431 }
5432 }
5433}
5434impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGnType {
5435 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5436 f.write_str(self.as_str())
5437 }
5438}
5439
5440impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGnType {
5441 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5442 f.write_str(self.as_str())
5443 }
5444}
5445impl serde::Serialize for CreateTaxRegistrationCountryOptionsGnType {
5446 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5447 where
5448 S: serde::Serializer,
5449 {
5450 serializer.serialize_str(self.as_str())
5451 }
5452}
5453#[cfg(feature = "deserialize")]
5454impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsGnType {
5455 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5456 use std::str::FromStr;
5457 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5458 Self::from_str(&s).map_err(|_| {
5459 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGnType")
5460 })
5461 }
5462}
5463#[derive(Copy, Clone, Debug, serde::Serialize)]
5465pub struct CreateTaxRegistrationCountryOptionsGr {
5466 #[serde(skip_serializing_if = "Option::is_none")]
5468 pub standard: Option<CreateTaxRegistrationCountryOptionsGrStandard>,
5469 #[serde(rename = "type")]
5471 pub type_: CreateTaxRegistrationCountryOptionsGrType,
5472}
5473impl CreateTaxRegistrationCountryOptionsGr {
5474 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsGrType>) -> Self {
5475 Self { standard: None, type_: type_.into() }
5476 }
5477}
5478#[derive(Copy, Clone, Debug, serde::Serialize)]
5480pub struct CreateTaxRegistrationCountryOptionsGrStandard {
5481 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme,
5483}
5484impl CreateTaxRegistrationCountryOptionsGrStandard {
5485 pub fn new(
5486 place_of_supply_scheme: impl Into<
5487 CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme,
5488 >,
5489 ) -> Self {
5490 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
5491 }
5492}
5493#[derive(Copy, Clone, Eq, PartialEq)]
5495pub enum CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme {
5496 InboundGoods,
5497 SmallSeller,
5498 Standard,
5499}
5500impl CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme {
5501 pub fn as_str(self) -> &'static str {
5502 use CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme::*;
5503 match self {
5504 InboundGoods => "inbound_goods",
5505 SmallSeller => "small_seller",
5506 Standard => "standard",
5507 }
5508 }
5509}
5510
5511impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme {
5512 type Err = stripe_types::StripeParseError;
5513 fn from_str(s: &str) -> Result<Self, Self::Err> {
5514 use CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme::*;
5515 match s {
5516 "inbound_goods" => Ok(InboundGoods),
5517 "small_seller" => Ok(SmallSeller),
5518 "standard" => Ok(Standard),
5519 _ => Err(stripe_types::StripeParseError),
5520 }
5521 }
5522}
5523impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme {
5524 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5525 f.write_str(self.as_str())
5526 }
5527}
5528
5529impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme {
5530 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5531 f.write_str(self.as_str())
5532 }
5533}
5534impl serde::Serialize for CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme {
5535 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5536 where
5537 S: serde::Serializer,
5538 {
5539 serializer.serialize_str(self.as_str())
5540 }
5541}
5542#[cfg(feature = "deserialize")]
5543impl<'de> serde::Deserialize<'de>
5544 for CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme
5545{
5546 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5547 use std::str::FromStr;
5548 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5549 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme"))
5550 }
5551}
5552#[derive(Copy, Clone, Eq, PartialEq)]
5554pub enum CreateTaxRegistrationCountryOptionsGrType {
5555 Ioss,
5556 OssNonUnion,
5557 OssUnion,
5558 Standard,
5559}
5560impl CreateTaxRegistrationCountryOptionsGrType {
5561 pub fn as_str(self) -> &'static str {
5562 use CreateTaxRegistrationCountryOptionsGrType::*;
5563 match self {
5564 Ioss => "ioss",
5565 OssNonUnion => "oss_non_union",
5566 OssUnion => "oss_union",
5567 Standard => "standard",
5568 }
5569 }
5570}
5571
5572impl std::str::FromStr for CreateTaxRegistrationCountryOptionsGrType {
5573 type Err = stripe_types::StripeParseError;
5574 fn from_str(s: &str) -> Result<Self, Self::Err> {
5575 use CreateTaxRegistrationCountryOptionsGrType::*;
5576 match s {
5577 "ioss" => Ok(Ioss),
5578 "oss_non_union" => Ok(OssNonUnion),
5579 "oss_union" => Ok(OssUnion),
5580 "standard" => Ok(Standard),
5581 _ => Err(stripe_types::StripeParseError),
5582 }
5583 }
5584}
5585impl std::fmt::Display for CreateTaxRegistrationCountryOptionsGrType {
5586 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5587 f.write_str(self.as_str())
5588 }
5589}
5590
5591impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsGrType {
5592 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5593 f.write_str(self.as_str())
5594 }
5595}
5596impl serde::Serialize for CreateTaxRegistrationCountryOptionsGrType {
5597 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5598 where
5599 S: serde::Serializer,
5600 {
5601 serializer.serialize_str(self.as_str())
5602 }
5603}
5604#[cfg(feature = "deserialize")]
5605impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsGrType {
5606 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5607 use std::str::FromStr;
5608 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5609 Self::from_str(&s).map_err(|_| {
5610 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsGrType")
5611 })
5612 }
5613}
5614#[derive(Copy, Clone, Debug, serde::Serialize)]
5616pub struct CreateTaxRegistrationCountryOptionsHr {
5617 #[serde(skip_serializing_if = "Option::is_none")]
5619 pub standard: Option<CreateTaxRegistrationCountryOptionsHrStandard>,
5620 #[serde(rename = "type")]
5622 pub type_: CreateTaxRegistrationCountryOptionsHrType,
5623}
5624impl CreateTaxRegistrationCountryOptionsHr {
5625 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsHrType>) -> Self {
5626 Self { standard: None, type_: type_.into() }
5627 }
5628}
5629#[derive(Copy, Clone, Debug, serde::Serialize)]
5631pub struct CreateTaxRegistrationCountryOptionsHrStandard {
5632 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme,
5634}
5635impl CreateTaxRegistrationCountryOptionsHrStandard {
5636 pub fn new(
5637 place_of_supply_scheme: impl Into<
5638 CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme,
5639 >,
5640 ) -> Self {
5641 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
5642 }
5643}
5644#[derive(Copy, Clone, Eq, PartialEq)]
5646pub enum CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme {
5647 InboundGoods,
5648 SmallSeller,
5649 Standard,
5650}
5651impl CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme {
5652 pub fn as_str(self) -> &'static str {
5653 use CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme::*;
5654 match self {
5655 InboundGoods => "inbound_goods",
5656 SmallSeller => "small_seller",
5657 Standard => "standard",
5658 }
5659 }
5660}
5661
5662impl std::str::FromStr for CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme {
5663 type Err = stripe_types::StripeParseError;
5664 fn from_str(s: &str) -> Result<Self, Self::Err> {
5665 use CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme::*;
5666 match s {
5667 "inbound_goods" => Ok(InboundGoods),
5668 "small_seller" => Ok(SmallSeller),
5669 "standard" => Ok(Standard),
5670 _ => Err(stripe_types::StripeParseError),
5671 }
5672 }
5673}
5674impl std::fmt::Display for CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme {
5675 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5676 f.write_str(self.as_str())
5677 }
5678}
5679
5680impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme {
5681 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5682 f.write_str(self.as_str())
5683 }
5684}
5685impl serde::Serialize for CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme {
5686 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5687 where
5688 S: serde::Serializer,
5689 {
5690 serializer.serialize_str(self.as_str())
5691 }
5692}
5693#[cfg(feature = "deserialize")]
5694impl<'de> serde::Deserialize<'de>
5695 for CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme
5696{
5697 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5698 use std::str::FromStr;
5699 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5700 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme"))
5701 }
5702}
5703#[derive(Copy, Clone, Eq, PartialEq)]
5705pub enum CreateTaxRegistrationCountryOptionsHrType {
5706 Ioss,
5707 OssNonUnion,
5708 OssUnion,
5709 Standard,
5710}
5711impl CreateTaxRegistrationCountryOptionsHrType {
5712 pub fn as_str(self) -> &'static str {
5713 use CreateTaxRegistrationCountryOptionsHrType::*;
5714 match self {
5715 Ioss => "ioss",
5716 OssNonUnion => "oss_non_union",
5717 OssUnion => "oss_union",
5718 Standard => "standard",
5719 }
5720 }
5721}
5722
5723impl std::str::FromStr for CreateTaxRegistrationCountryOptionsHrType {
5724 type Err = stripe_types::StripeParseError;
5725 fn from_str(s: &str) -> Result<Self, Self::Err> {
5726 use CreateTaxRegistrationCountryOptionsHrType::*;
5727 match s {
5728 "ioss" => Ok(Ioss),
5729 "oss_non_union" => Ok(OssNonUnion),
5730 "oss_union" => Ok(OssUnion),
5731 "standard" => Ok(Standard),
5732 _ => Err(stripe_types::StripeParseError),
5733 }
5734 }
5735}
5736impl std::fmt::Display for CreateTaxRegistrationCountryOptionsHrType {
5737 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5738 f.write_str(self.as_str())
5739 }
5740}
5741
5742impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsHrType {
5743 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5744 f.write_str(self.as_str())
5745 }
5746}
5747impl serde::Serialize for CreateTaxRegistrationCountryOptionsHrType {
5748 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5749 where
5750 S: serde::Serializer,
5751 {
5752 serializer.serialize_str(self.as_str())
5753 }
5754}
5755#[cfg(feature = "deserialize")]
5756impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsHrType {
5757 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5758 use std::str::FromStr;
5759 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5760 Self::from_str(&s).map_err(|_| {
5761 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsHrType")
5762 })
5763 }
5764}
5765#[derive(Copy, Clone, Debug, serde::Serialize)]
5767pub struct CreateTaxRegistrationCountryOptionsHu {
5768 #[serde(skip_serializing_if = "Option::is_none")]
5770 pub standard: Option<CreateTaxRegistrationCountryOptionsHuStandard>,
5771 #[serde(rename = "type")]
5773 pub type_: CreateTaxRegistrationCountryOptionsHuType,
5774}
5775impl CreateTaxRegistrationCountryOptionsHu {
5776 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsHuType>) -> Self {
5777 Self { standard: None, type_: type_.into() }
5778 }
5779}
5780#[derive(Copy, Clone, Debug, serde::Serialize)]
5782pub struct CreateTaxRegistrationCountryOptionsHuStandard {
5783 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme,
5785}
5786impl CreateTaxRegistrationCountryOptionsHuStandard {
5787 pub fn new(
5788 place_of_supply_scheme: impl Into<
5789 CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme,
5790 >,
5791 ) -> Self {
5792 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
5793 }
5794}
5795#[derive(Copy, Clone, Eq, PartialEq)]
5797pub enum CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme {
5798 InboundGoods,
5799 SmallSeller,
5800 Standard,
5801}
5802impl CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme {
5803 pub fn as_str(self) -> &'static str {
5804 use CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme::*;
5805 match self {
5806 InboundGoods => "inbound_goods",
5807 SmallSeller => "small_seller",
5808 Standard => "standard",
5809 }
5810 }
5811}
5812
5813impl std::str::FromStr for CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme {
5814 type Err = stripe_types::StripeParseError;
5815 fn from_str(s: &str) -> Result<Self, Self::Err> {
5816 use CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme::*;
5817 match s {
5818 "inbound_goods" => Ok(InboundGoods),
5819 "small_seller" => Ok(SmallSeller),
5820 "standard" => Ok(Standard),
5821 _ => Err(stripe_types::StripeParseError),
5822 }
5823 }
5824}
5825impl std::fmt::Display for CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme {
5826 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5827 f.write_str(self.as_str())
5828 }
5829}
5830
5831impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme {
5832 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5833 f.write_str(self.as_str())
5834 }
5835}
5836impl serde::Serialize for CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme {
5837 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5838 where
5839 S: serde::Serializer,
5840 {
5841 serializer.serialize_str(self.as_str())
5842 }
5843}
5844#[cfg(feature = "deserialize")]
5845impl<'de> serde::Deserialize<'de>
5846 for CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme
5847{
5848 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5849 use std::str::FromStr;
5850 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5851 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme"))
5852 }
5853}
5854#[derive(Copy, Clone, Eq, PartialEq)]
5856pub enum CreateTaxRegistrationCountryOptionsHuType {
5857 Ioss,
5858 OssNonUnion,
5859 OssUnion,
5860 Standard,
5861}
5862impl CreateTaxRegistrationCountryOptionsHuType {
5863 pub fn as_str(self) -> &'static str {
5864 use CreateTaxRegistrationCountryOptionsHuType::*;
5865 match self {
5866 Ioss => "ioss",
5867 OssNonUnion => "oss_non_union",
5868 OssUnion => "oss_union",
5869 Standard => "standard",
5870 }
5871 }
5872}
5873
5874impl std::str::FromStr for CreateTaxRegistrationCountryOptionsHuType {
5875 type Err = stripe_types::StripeParseError;
5876 fn from_str(s: &str) -> Result<Self, Self::Err> {
5877 use CreateTaxRegistrationCountryOptionsHuType::*;
5878 match s {
5879 "ioss" => Ok(Ioss),
5880 "oss_non_union" => Ok(OssNonUnion),
5881 "oss_union" => Ok(OssUnion),
5882 "standard" => Ok(Standard),
5883 _ => Err(stripe_types::StripeParseError),
5884 }
5885 }
5886}
5887impl std::fmt::Display for CreateTaxRegistrationCountryOptionsHuType {
5888 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5889 f.write_str(self.as_str())
5890 }
5891}
5892
5893impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsHuType {
5894 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5895 f.write_str(self.as_str())
5896 }
5897}
5898impl serde::Serialize for CreateTaxRegistrationCountryOptionsHuType {
5899 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5900 where
5901 S: serde::Serializer,
5902 {
5903 serializer.serialize_str(self.as_str())
5904 }
5905}
5906#[cfg(feature = "deserialize")]
5907impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsHuType {
5908 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5909 use std::str::FromStr;
5910 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5911 Self::from_str(&s).map_err(|_| {
5912 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsHuType")
5913 })
5914 }
5915}
5916#[derive(Copy, Clone, Debug, serde::Serialize)]
5918pub struct CreateTaxRegistrationCountryOptionsId {
5919 #[serde(rename = "type")]
5921 pub type_: CreateTaxRegistrationCountryOptionsIdType,
5922}
5923impl CreateTaxRegistrationCountryOptionsId {
5924 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsIdType>) -> Self {
5925 Self { type_: type_.into() }
5926 }
5927}
5928#[derive(Copy, Clone, Eq, PartialEq)]
5930pub enum CreateTaxRegistrationCountryOptionsIdType {
5931 Simplified,
5932}
5933impl CreateTaxRegistrationCountryOptionsIdType {
5934 pub fn as_str(self) -> &'static str {
5935 use CreateTaxRegistrationCountryOptionsIdType::*;
5936 match self {
5937 Simplified => "simplified",
5938 }
5939 }
5940}
5941
5942impl std::str::FromStr for CreateTaxRegistrationCountryOptionsIdType {
5943 type Err = stripe_types::StripeParseError;
5944 fn from_str(s: &str) -> Result<Self, Self::Err> {
5945 use CreateTaxRegistrationCountryOptionsIdType::*;
5946 match s {
5947 "simplified" => Ok(Simplified),
5948 _ => Err(stripe_types::StripeParseError),
5949 }
5950 }
5951}
5952impl std::fmt::Display for CreateTaxRegistrationCountryOptionsIdType {
5953 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5954 f.write_str(self.as_str())
5955 }
5956}
5957
5958impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsIdType {
5959 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5960 f.write_str(self.as_str())
5961 }
5962}
5963impl serde::Serialize for CreateTaxRegistrationCountryOptionsIdType {
5964 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5965 where
5966 S: serde::Serializer,
5967 {
5968 serializer.serialize_str(self.as_str())
5969 }
5970}
5971#[cfg(feature = "deserialize")]
5972impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsIdType {
5973 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5974 use std::str::FromStr;
5975 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
5976 Self::from_str(&s).map_err(|_| {
5977 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsIdType")
5978 })
5979 }
5980}
5981#[derive(Copy, Clone, Debug, serde::Serialize)]
5983pub struct CreateTaxRegistrationCountryOptionsIe {
5984 #[serde(skip_serializing_if = "Option::is_none")]
5986 pub standard: Option<CreateTaxRegistrationCountryOptionsIeStandard>,
5987 #[serde(rename = "type")]
5989 pub type_: CreateTaxRegistrationCountryOptionsIeType,
5990}
5991impl CreateTaxRegistrationCountryOptionsIe {
5992 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsIeType>) -> Self {
5993 Self { standard: None, type_: type_.into() }
5994 }
5995}
5996#[derive(Copy, Clone, Debug, serde::Serialize)]
5998pub struct CreateTaxRegistrationCountryOptionsIeStandard {
5999 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme,
6001}
6002impl CreateTaxRegistrationCountryOptionsIeStandard {
6003 pub fn new(
6004 place_of_supply_scheme: impl Into<
6005 CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme,
6006 >,
6007 ) -> Self {
6008 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
6009 }
6010}
6011#[derive(Copy, Clone, Eq, PartialEq)]
6013pub enum CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme {
6014 InboundGoods,
6015 SmallSeller,
6016 Standard,
6017}
6018impl CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme {
6019 pub fn as_str(self) -> &'static str {
6020 use CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme::*;
6021 match self {
6022 InboundGoods => "inbound_goods",
6023 SmallSeller => "small_seller",
6024 Standard => "standard",
6025 }
6026 }
6027}
6028
6029impl std::str::FromStr for CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme {
6030 type Err = stripe_types::StripeParseError;
6031 fn from_str(s: &str) -> Result<Self, Self::Err> {
6032 use CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme::*;
6033 match s {
6034 "inbound_goods" => Ok(InboundGoods),
6035 "small_seller" => Ok(SmallSeller),
6036 "standard" => Ok(Standard),
6037 _ => Err(stripe_types::StripeParseError),
6038 }
6039 }
6040}
6041impl std::fmt::Display for CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme {
6042 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6043 f.write_str(self.as_str())
6044 }
6045}
6046
6047impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme {
6048 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6049 f.write_str(self.as_str())
6050 }
6051}
6052impl serde::Serialize for CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme {
6053 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6054 where
6055 S: serde::Serializer,
6056 {
6057 serializer.serialize_str(self.as_str())
6058 }
6059}
6060#[cfg(feature = "deserialize")]
6061impl<'de> serde::Deserialize<'de>
6062 for CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme
6063{
6064 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6065 use std::str::FromStr;
6066 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6067 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme"))
6068 }
6069}
6070#[derive(Copy, Clone, Eq, PartialEq)]
6072pub enum CreateTaxRegistrationCountryOptionsIeType {
6073 Ioss,
6074 OssNonUnion,
6075 OssUnion,
6076 Standard,
6077}
6078impl CreateTaxRegistrationCountryOptionsIeType {
6079 pub fn as_str(self) -> &'static str {
6080 use CreateTaxRegistrationCountryOptionsIeType::*;
6081 match self {
6082 Ioss => "ioss",
6083 OssNonUnion => "oss_non_union",
6084 OssUnion => "oss_union",
6085 Standard => "standard",
6086 }
6087 }
6088}
6089
6090impl std::str::FromStr for CreateTaxRegistrationCountryOptionsIeType {
6091 type Err = stripe_types::StripeParseError;
6092 fn from_str(s: &str) -> Result<Self, Self::Err> {
6093 use CreateTaxRegistrationCountryOptionsIeType::*;
6094 match s {
6095 "ioss" => Ok(Ioss),
6096 "oss_non_union" => Ok(OssNonUnion),
6097 "oss_union" => Ok(OssUnion),
6098 "standard" => Ok(Standard),
6099 _ => Err(stripe_types::StripeParseError),
6100 }
6101 }
6102}
6103impl std::fmt::Display for CreateTaxRegistrationCountryOptionsIeType {
6104 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6105 f.write_str(self.as_str())
6106 }
6107}
6108
6109impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsIeType {
6110 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6111 f.write_str(self.as_str())
6112 }
6113}
6114impl serde::Serialize for CreateTaxRegistrationCountryOptionsIeType {
6115 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6116 where
6117 S: serde::Serializer,
6118 {
6119 serializer.serialize_str(self.as_str())
6120 }
6121}
6122#[cfg(feature = "deserialize")]
6123impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsIeType {
6124 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6125 use std::str::FromStr;
6126 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6127 Self::from_str(&s).map_err(|_| {
6128 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsIeType")
6129 })
6130 }
6131}
6132#[derive(Copy, Clone, Debug, serde::Serialize)]
6134pub struct CreateTaxRegistrationCountryOptionsIn {
6135 #[serde(rename = "type")]
6137 pub type_: CreateTaxRegistrationCountryOptionsInType,
6138}
6139impl CreateTaxRegistrationCountryOptionsIn {
6140 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsInType>) -> Self {
6141 Self { type_: type_.into() }
6142 }
6143}
6144#[derive(Copy, Clone, Eq, PartialEq)]
6146pub enum CreateTaxRegistrationCountryOptionsInType {
6147 Simplified,
6148}
6149impl CreateTaxRegistrationCountryOptionsInType {
6150 pub fn as_str(self) -> &'static str {
6151 use CreateTaxRegistrationCountryOptionsInType::*;
6152 match self {
6153 Simplified => "simplified",
6154 }
6155 }
6156}
6157
6158impl std::str::FromStr for CreateTaxRegistrationCountryOptionsInType {
6159 type Err = stripe_types::StripeParseError;
6160 fn from_str(s: &str) -> Result<Self, Self::Err> {
6161 use CreateTaxRegistrationCountryOptionsInType::*;
6162 match s {
6163 "simplified" => Ok(Simplified),
6164 _ => Err(stripe_types::StripeParseError),
6165 }
6166 }
6167}
6168impl std::fmt::Display for CreateTaxRegistrationCountryOptionsInType {
6169 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6170 f.write_str(self.as_str())
6171 }
6172}
6173
6174impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsInType {
6175 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6176 f.write_str(self.as_str())
6177 }
6178}
6179impl serde::Serialize for CreateTaxRegistrationCountryOptionsInType {
6180 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6181 where
6182 S: serde::Serializer,
6183 {
6184 serializer.serialize_str(self.as_str())
6185 }
6186}
6187#[cfg(feature = "deserialize")]
6188impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsInType {
6189 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6190 use std::str::FromStr;
6191 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6192 Self::from_str(&s).map_err(|_| {
6193 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsInType")
6194 })
6195 }
6196}
6197#[derive(Copy, Clone, Debug, serde::Serialize)]
6199pub struct CreateTaxRegistrationCountryOptionsIs {
6200 #[serde(skip_serializing_if = "Option::is_none")]
6202 pub standard: Option<CreateTaxRegistrationCountryOptionsIsStandard>,
6203 #[serde(rename = "type")]
6205 pub type_: CreateTaxRegistrationCountryOptionsIsType,
6206}
6207impl CreateTaxRegistrationCountryOptionsIs {
6208 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsIsType>) -> Self {
6209 Self { standard: None, type_: type_.into() }
6210 }
6211}
6212#[derive(Copy, Clone, Debug, serde::Serialize)]
6214pub struct CreateTaxRegistrationCountryOptionsIsStandard {
6215 #[serde(skip_serializing_if = "Option::is_none")]
6217 pub place_of_supply_scheme:
6218 Option<CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme>,
6219}
6220impl CreateTaxRegistrationCountryOptionsIsStandard {
6221 pub fn new() -> Self {
6222 Self { place_of_supply_scheme: None }
6223 }
6224}
6225impl Default for CreateTaxRegistrationCountryOptionsIsStandard {
6226 fn default() -> Self {
6227 Self::new()
6228 }
6229}
6230#[derive(Copy, Clone, Eq, PartialEq)]
6232pub enum CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme {
6233 InboundGoods,
6234 Standard,
6235}
6236impl CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme {
6237 pub fn as_str(self) -> &'static str {
6238 use CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme::*;
6239 match self {
6240 InboundGoods => "inbound_goods",
6241 Standard => "standard",
6242 }
6243 }
6244}
6245
6246impl std::str::FromStr for CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme {
6247 type Err = stripe_types::StripeParseError;
6248 fn from_str(s: &str) -> Result<Self, Self::Err> {
6249 use CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme::*;
6250 match s {
6251 "inbound_goods" => Ok(InboundGoods),
6252 "standard" => Ok(Standard),
6253 _ => Err(stripe_types::StripeParseError),
6254 }
6255 }
6256}
6257impl std::fmt::Display for CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme {
6258 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6259 f.write_str(self.as_str())
6260 }
6261}
6262
6263impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme {
6264 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6265 f.write_str(self.as_str())
6266 }
6267}
6268impl serde::Serialize for CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme {
6269 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6270 where
6271 S: serde::Serializer,
6272 {
6273 serializer.serialize_str(self.as_str())
6274 }
6275}
6276#[cfg(feature = "deserialize")]
6277impl<'de> serde::Deserialize<'de>
6278 for CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme
6279{
6280 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6281 use std::str::FromStr;
6282 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6283 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsIsStandardPlaceOfSupplyScheme"))
6284 }
6285}
6286#[derive(Copy, Clone, Eq, PartialEq)]
6288pub enum CreateTaxRegistrationCountryOptionsIsType {
6289 Standard,
6290}
6291impl CreateTaxRegistrationCountryOptionsIsType {
6292 pub fn as_str(self) -> &'static str {
6293 use CreateTaxRegistrationCountryOptionsIsType::*;
6294 match self {
6295 Standard => "standard",
6296 }
6297 }
6298}
6299
6300impl std::str::FromStr for CreateTaxRegistrationCountryOptionsIsType {
6301 type Err = stripe_types::StripeParseError;
6302 fn from_str(s: &str) -> Result<Self, Self::Err> {
6303 use CreateTaxRegistrationCountryOptionsIsType::*;
6304 match s {
6305 "standard" => Ok(Standard),
6306 _ => Err(stripe_types::StripeParseError),
6307 }
6308 }
6309}
6310impl std::fmt::Display for CreateTaxRegistrationCountryOptionsIsType {
6311 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6312 f.write_str(self.as_str())
6313 }
6314}
6315
6316impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsIsType {
6317 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6318 f.write_str(self.as_str())
6319 }
6320}
6321impl serde::Serialize for CreateTaxRegistrationCountryOptionsIsType {
6322 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6323 where
6324 S: serde::Serializer,
6325 {
6326 serializer.serialize_str(self.as_str())
6327 }
6328}
6329#[cfg(feature = "deserialize")]
6330impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsIsType {
6331 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6332 use std::str::FromStr;
6333 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6334 Self::from_str(&s).map_err(|_| {
6335 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsIsType")
6336 })
6337 }
6338}
6339#[derive(Copy, Clone, Debug, serde::Serialize)]
6341pub struct CreateTaxRegistrationCountryOptionsIt {
6342 #[serde(skip_serializing_if = "Option::is_none")]
6344 pub standard: Option<CreateTaxRegistrationCountryOptionsItStandard>,
6345 #[serde(rename = "type")]
6347 pub type_: CreateTaxRegistrationCountryOptionsItType,
6348}
6349impl CreateTaxRegistrationCountryOptionsIt {
6350 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsItType>) -> Self {
6351 Self { standard: None, type_: type_.into() }
6352 }
6353}
6354#[derive(Copy, Clone, Debug, serde::Serialize)]
6356pub struct CreateTaxRegistrationCountryOptionsItStandard {
6357 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme,
6359}
6360impl CreateTaxRegistrationCountryOptionsItStandard {
6361 pub fn new(
6362 place_of_supply_scheme: impl Into<
6363 CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme,
6364 >,
6365 ) -> Self {
6366 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
6367 }
6368}
6369#[derive(Copy, Clone, Eq, PartialEq)]
6371pub enum CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme {
6372 InboundGoods,
6373 SmallSeller,
6374 Standard,
6375}
6376impl CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme {
6377 pub fn as_str(self) -> &'static str {
6378 use CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme::*;
6379 match self {
6380 InboundGoods => "inbound_goods",
6381 SmallSeller => "small_seller",
6382 Standard => "standard",
6383 }
6384 }
6385}
6386
6387impl std::str::FromStr for CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme {
6388 type Err = stripe_types::StripeParseError;
6389 fn from_str(s: &str) -> Result<Self, Self::Err> {
6390 use CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme::*;
6391 match s {
6392 "inbound_goods" => Ok(InboundGoods),
6393 "small_seller" => Ok(SmallSeller),
6394 "standard" => Ok(Standard),
6395 _ => Err(stripe_types::StripeParseError),
6396 }
6397 }
6398}
6399impl std::fmt::Display for CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme {
6400 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6401 f.write_str(self.as_str())
6402 }
6403}
6404
6405impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme {
6406 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6407 f.write_str(self.as_str())
6408 }
6409}
6410impl serde::Serialize for CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme {
6411 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6412 where
6413 S: serde::Serializer,
6414 {
6415 serializer.serialize_str(self.as_str())
6416 }
6417}
6418#[cfg(feature = "deserialize")]
6419impl<'de> serde::Deserialize<'de>
6420 for CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme
6421{
6422 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6423 use std::str::FromStr;
6424 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6425 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme"))
6426 }
6427}
6428#[derive(Copy, Clone, Eq, PartialEq)]
6430pub enum CreateTaxRegistrationCountryOptionsItType {
6431 Ioss,
6432 OssNonUnion,
6433 OssUnion,
6434 Standard,
6435}
6436impl CreateTaxRegistrationCountryOptionsItType {
6437 pub fn as_str(self) -> &'static str {
6438 use CreateTaxRegistrationCountryOptionsItType::*;
6439 match self {
6440 Ioss => "ioss",
6441 OssNonUnion => "oss_non_union",
6442 OssUnion => "oss_union",
6443 Standard => "standard",
6444 }
6445 }
6446}
6447
6448impl std::str::FromStr for CreateTaxRegistrationCountryOptionsItType {
6449 type Err = stripe_types::StripeParseError;
6450 fn from_str(s: &str) -> Result<Self, Self::Err> {
6451 use CreateTaxRegistrationCountryOptionsItType::*;
6452 match s {
6453 "ioss" => Ok(Ioss),
6454 "oss_non_union" => Ok(OssNonUnion),
6455 "oss_union" => Ok(OssUnion),
6456 "standard" => Ok(Standard),
6457 _ => Err(stripe_types::StripeParseError),
6458 }
6459 }
6460}
6461impl std::fmt::Display for CreateTaxRegistrationCountryOptionsItType {
6462 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6463 f.write_str(self.as_str())
6464 }
6465}
6466
6467impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsItType {
6468 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6469 f.write_str(self.as_str())
6470 }
6471}
6472impl serde::Serialize for CreateTaxRegistrationCountryOptionsItType {
6473 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6474 where
6475 S: serde::Serializer,
6476 {
6477 serializer.serialize_str(self.as_str())
6478 }
6479}
6480#[cfg(feature = "deserialize")]
6481impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsItType {
6482 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6483 use std::str::FromStr;
6484 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6485 Self::from_str(&s).map_err(|_| {
6486 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsItType")
6487 })
6488 }
6489}
6490#[derive(Copy, Clone, Debug, serde::Serialize)]
6492pub struct CreateTaxRegistrationCountryOptionsJp {
6493 #[serde(skip_serializing_if = "Option::is_none")]
6495 pub standard: Option<CreateTaxRegistrationCountryOptionsJpStandard>,
6496 #[serde(rename = "type")]
6498 pub type_: CreateTaxRegistrationCountryOptionsJpType,
6499}
6500impl CreateTaxRegistrationCountryOptionsJp {
6501 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsJpType>) -> Self {
6502 Self { standard: None, type_: type_.into() }
6503 }
6504}
6505#[derive(Copy, Clone, Debug, serde::Serialize)]
6507pub struct CreateTaxRegistrationCountryOptionsJpStandard {
6508 #[serde(skip_serializing_if = "Option::is_none")]
6510 pub place_of_supply_scheme:
6511 Option<CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme>,
6512}
6513impl CreateTaxRegistrationCountryOptionsJpStandard {
6514 pub fn new() -> Self {
6515 Self { place_of_supply_scheme: None }
6516 }
6517}
6518impl Default for CreateTaxRegistrationCountryOptionsJpStandard {
6519 fn default() -> Self {
6520 Self::new()
6521 }
6522}
6523#[derive(Copy, Clone, Eq, PartialEq)]
6525pub enum CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme {
6526 InboundGoods,
6527 Standard,
6528}
6529impl CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme {
6530 pub fn as_str(self) -> &'static str {
6531 use CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme::*;
6532 match self {
6533 InboundGoods => "inbound_goods",
6534 Standard => "standard",
6535 }
6536 }
6537}
6538
6539impl std::str::FromStr for CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme {
6540 type Err = stripe_types::StripeParseError;
6541 fn from_str(s: &str) -> Result<Self, Self::Err> {
6542 use CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme::*;
6543 match s {
6544 "inbound_goods" => Ok(InboundGoods),
6545 "standard" => Ok(Standard),
6546 _ => Err(stripe_types::StripeParseError),
6547 }
6548 }
6549}
6550impl std::fmt::Display for CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme {
6551 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6552 f.write_str(self.as_str())
6553 }
6554}
6555
6556impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme {
6557 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6558 f.write_str(self.as_str())
6559 }
6560}
6561impl serde::Serialize for CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme {
6562 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6563 where
6564 S: serde::Serializer,
6565 {
6566 serializer.serialize_str(self.as_str())
6567 }
6568}
6569#[cfg(feature = "deserialize")]
6570impl<'de> serde::Deserialize<'de>
6571 for CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme
6572{
6573 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6574 use std::str::FromStr;
6575 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6576 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsJpStandardPlaceOfSupplyScheme"))
6577 }
6578}
6579#[derive(Copy, Clone, Eq, PartialEq)]
6581pub enum CreateTaxRegistrationCountryOptionsJpType {
6582 Standard,
6583}
6584impl CreateTaxRegistrationCountryOptionsJpType {
6585 pub fn as_str(self) -> &'static str {
6586 use CreateTaxRegistrationCountryOptionsJpType::*;
6587 match self {
6588 Standard => "standard",
6589 }
6590 }
6591}
6592
6593impl std::str::FromStr for CreateTaxRegistrationCountryOptionsJpType {
6594 type Err = stripe_types::StripeParseError;
6595 fn from_str(s: &str) -> Result<Self, Self::Err> {
6596 use CreateTaxRegistrationCountryOptionsJpType::*;
6597 match s {
6598 "standard" => Ok(Standard),
6599 _ => Err(stripe_types::StripeParseError),
6600 }
6601 }
6602}
6603impl std::fmt::Display for CreateTaxRegistrationCountryOptionsJpType {
6604 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6605 f.write_str(self.as_str())
6606 }
6607}
6608
6609impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsJpType {
6610 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6611 f.write_str(self.as_str())
6612 }
6613}
6614impl serde::Serialize for CreateTaxRegistrationCountryOptionsJpType {
6615 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6616 where
6617 S: serde::Serializer,
6618 {
6619 serializer.serialize_str(self.as_str())
6620 }
6621}
6622#[cfg(feature = "deserialize")]
6623impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsJpType {
6624 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6625 use std::str::FromStr;
6626 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6627 Self::from_str(&s).map_err(|_| {
6628 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsJpType")
6629 })
6630 }
6631}
6632#[derive(Copy, Clone, Debug, serde::Serialize)]
6634pub struct CreateTaxRegistrationCountryOptionsKe {
6635 #[serde(rename = "type")]
6637 pub type_: CreateTaxRegistrationCountryOptionsKeType,
6638}
6639impl CreateTaxRegistrationCountryOptionsKe {
6640 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsKeType>) -> Self {
6641 Self { type_: type_.into() }
6642 }
6643}
6644#[derive(Copy, Clone, Eq, PartialEq)]
6646pub enum CreateTaxRegistrationCountryOptionsKeType {
6647 Simplified,
6648}
6649impl CreateTaxRegistrationCountryOptionsKeType {
6650 pub fn as_str(self) -> &'static str {
6651 use CreateTaxRegistrationCountryOptionsKeType::*;
6652 match self {
6653 Simplified => "simplified",
6654 }
6655 }
6656}
6657
6658impl std::str::FromStr for CreateTaxRegistrationCountryOptionsKeType {
6659 type Err = stripe_types::StripeParseError;
6660 fn from_str(s: &str) -> Result<Self, Self::Err> {
6661 use CreateTaxRegistrationCountryOptionsKeType::*;
6662 match s {
6663 "simplified" => Ok(Simplified),
6664 _ => Err(stripe_types::StripeParseError),
6665 }
6666 }
6667}
6668impl std::fmt::Display for CreateTaxRegistrationCountryOptionsKeType {
6669 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6670 f.write_str(self.as_str())
6671 }
6672}
6673
6674impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsKeType {
6675 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6676 f.write_str(self.as_str())
6677 }
6678}
6679impl serde::Serialize for CreateTaxRegistrationCountryOptionsKeType {
6680 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6681 where
6682 S: serde::Serializer,
6683 {
6684 serializer.serialize_str(self.as_str())
6685 }
6686}
6687#[cfg(feature = "deserialize")]
6688impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsKeType {
6689 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6690 use std::str::FromStr;
6691 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6692 Self::from_str(&s).map_err(|_| {
6693 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsKeType")
6694 })
6695 }
6696}
6697#[derive(Copy, Clone, Debug, serde::Serialize)]
6699pub struct CreateTaxRegistrationCountryOptionsKg {
6700 #[serde(rename = "type")]
6702 pub type_: CreateTaxRegistrationCountryOptionsKgType,
6703}
6704impl CreateTaxRegistrationCountryOptionsKg {
6705 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsKgType>) -> Self {
6706 Self { type_: type_.into() }
6707 }
6708}
6709#[derive(Copy, Clone, Eq, PartialEq)]
6711pub enum CreateTaxRegistrationCountryOptionsKgType {
6712 Simplified,
6713}
6714impl CreateTaxRegistrationCountryOptionsKgType {
6715 pub fn as_str(self) -> &'static str {
6716 use CreateTaxRegistrationCountryOptionsKgType::*;
6717 match self {
6718 Simplified => "simplified",
6719 }
6720 }
6721}
6722
6723impl std::str::FromStr for CreateTaxRegistrationCountryOptionsKgType {
6724 type Err = stripe_types::StripeParseError;
6725 fn from_str(s: &str) -> Result<Self, Self::Err> {
6726 use CreateTaxRegistrationCountryOptionsKgType::*;
6727 match s {
6728 "simplified" => Ok(Simplified),
6729 _ => Err(stripe_types::StripeParseError),
6730 }
6731 }
6732}
6733impl std::fmt::Display for CreateTaxRegistrationCountryOptionsKgType {
6734 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6735 f.write_str(self.as_str())
6736 }
6737}
6738
6739impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsKgType {
6740 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6741 f.write_str(self.as_str())
6742 }
6743}
6744impl serde::Serialize for CreateTaxRegistrationCountryOptionsKgType {
6745 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6746 where
6747 S: serde::Serializer,
6748 {
6749 serializer.serialize_str(self.as_str())
6750 }
6751}
6752#[cfg(feature = "deserialize")]
6753impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsKgType {
6754 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6755 use std::str::FromStr;
6756 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6757 Self::from_str(&s).map_err(|_| {
6758 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsKgType")
6759 })
6760 }
6761}
6762#[derive(Copy, Clone, Debug, serde::Serialize)]
6764pub struct CreateTaxRegistrationCountryOptionsKh {
6765 #[serde(rename = "type")]
6767 pub type_: CreateTaxRegistrationCountryOptionsKhType,
6768}
6769impl CreateTaxRegistrationCountryOptionsKh {
6770 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsKhType>) -> Self {
6771 Self { type_: type_.into() }
6772 }
6773}
6774#[derive(Copy, Clone, Eq, PartialEq)]
6776pub enum CreateTaxRegistrationCountryOptionsKhType {
6777 Simplified,
6778}
6779impl CreateTaxRegistrationCountryOptionsKhType {
6780 pub fn as_str(self) -> &'static str {
6781 use CreateTaxRegistrationCountryOptionsKhType::*;
6782 match self {
6783 Simplified => "simplified",
6784 }
6785 }
6786}
6787
6788impl std::str::FromStr for CreateTaxRegistrationCountryOptionsKhType {
6789 type Err = stripe_types::StripeParseError;
6790 fn from_str(s: &str) -> Result<Self, Self::Err> {
6791 use CreateTaxRegistrationCountryOptionsKhType::*;
6792 match s {
6793 "simplified" => Ok(Simplified),
6794 _ => Err(stripe_types::StripeParseError),
6795 }
6796 }
6797}
6798impl std::fmt::Display for CreateTaxRegistrationCountryOptionsKhType {
6799 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6800 f.write_str(self.as_str())
6801 }
6802}
6803
6804impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsKhType {
6805 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6806 f.write_str(self.as_str())
6807 }
6808}
6809impl serde::Serialize for CreateTaxRegistrationCountryOptionsKhType {
6810 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6811 where
6812 S: serde::Serializer,
6813 {
6814 serializer.serialize_str(self.as_str())
6815 }
6816}
6817#[cfg(feature = "deserialize")]
6818impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsKhType {
6819 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6820 use std::str::FromStr;
6821 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6822 Self::from_str(&s).map_err(|_| {
6823 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsKhType")
6824 })
6825 }
6826}
6827#[derive(Copy, Clone, Debug, serde::Serialize)]
6829pub struct CreateTaxRegistrationCountryOptionsKr {
6830 #[serde(rename = "type")]
6832 pub type_: CreateTaxRegistrationCountryOptionsKrType,
6833}
6834impl CreateTaxRegistrationCountryOptionsKr {
6835 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsKrType>) -> Self {
6836 Self { type_: type_.into() }
6837 }
6838}
6839#[derive(Copy, Clone, Eq, PartialEq)]
6841pub enum CreateTaxRegistrationCountryOptionsKrType {
6842 Simplified,
6843}
6844impl CreateTaxRegistrationCountryOptionsKrType {
6845 pub fn as_str(self) -> &'static str {
6846 use CreateTaxRegistrationCountryOptionsKrType::*;
6847 match self {
6848 Simplified => "simplified",
6849 }
6850 }
6851}
6852
6853impl std::str::FromStr for CreateTaxRegistrationCountryOptionsKrType {
6854 type Err = stripe_types::StripeParseError;
6855 fn from_str(s: &str) -> Result<Self, Self::Err> {
6856 use CreateTaxRegistrationCountryOptionsKrType::*;
6857 match s {
6858 "simplified" => Ok(Simplified),
6859 _ => Err(stripe_types::StripeParseError),
6860 }
6861 }
6862}
6863impl std::fmt::Display for CreateTaxRegistrationCountryOptionsKrType {
6864 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6865 f.write_str(self.as_str())
6866 }
6867}
6868
6869impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsKrType {
6870 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6871 f.write_str(self.as_str())
6872 }
6873}
6874impl serde::Serialize for CreateTaxRegistrationCountryOptionsKrType {
6875 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6876 where
6877 S: serde::Serializer,
6878 {
6879 serializer.serialize_str(self.as_str())
6880 }
6881}
6882#[cfg(feature = "deserialize")]
6883impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsKrType {
6884 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6885 use std::str::FromStr;
6886 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6887 Self::from_str(&s).map_err(|_| {
6888 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsKrType")
6889 })
6890 }
6891}
6892#[derive(Copy, Clone, Debug, serde::Serialize)]
6894pub struct CreateTaxRegistrationCountryOptionsKz {
6895 #[serde(rename = "type")]
6897 pub type_: CreateTaxRegistrationCountryOptionsKzType,
6898}
6899impl CreateTaxRegistrationCountryOptionsKz {
6900 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsKzType>) -> Self {
6901 Self { type_: type_.into() }
6902 }
6903}
6904#[derive(Copy, Clone, Eq, PartialEq)]
6906pub enum CreateTaxRegistrationCountryOptionsKzType {
6907 Simplified,
6908}
6909impl CreateTaxRegistrationCountryOptionsKzType {
6910 pub fn as_str(self) -> &'static str {
6911 use CreateTaxRegistrationCountryOptionsKzType::*;
6912 match self {
6913 Simplified => "simplified",
6914 }
6915 }
6916}
6917
6918impl std::str::FromStr for CreateTaxRegistrationCountryOptionsKzType {
6919 type Err = stripe_types::StripeParseError;
6920 fn from_str(s: &str) -> Result<Self, Self::Err> {
6921 use CreateTaxRegistrationCountryOptionsKzType::*;
6922 match s {
6923 "simplified" => Ok(Simplified),
6924 _ => Err(stripe_types::StripeParseError),
6925 }
6926 }
6927}
6928impl std::fmt::Display for CreateTaxRegistrationCountryOptionsKzType {
6929 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6930 f.write_str(self.as_str())
6931 }
6932}
6933
6934impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsKzType {
6935 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6936 f.write_str(self.as_str())
6937 }
6938}
6939impl serde::Serialize for CreateTaxRegistrationCountryOptionsKzType {
6940 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
6941 where
6942 S: serde::Serializer,
6943 {
6944 serializer.serialize_str(self.as_str())
6945 }
6946}
6947#[cfg(feature = "deserialize")]
6948impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsKzType {
6949 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
6950 use std::str::FromStr;
6951 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
6952 Self::from_str(&s).map_err(|_| {
6953 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsKzType")
6954 })
6955 }
6956}
6957#[derive(Copy, Clone, Debug, serde::Serialize)]
6959pub struct CreateTaxRegistrationCountryOptionsLa {
6960 #[serde(rename = "type")]
6962 pub type_: CreateTaxRegistrationCountryOptionsLaType,
6963}
6964impl CreateTaxRegistrationCountryOptionsLa {
6965 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsLaType>) -> Self {
6966 Self { type_: type_.into() }
6967 }
6968}
6969#[derive(Copy, Clone, Eq, PartialEq)]
6971pub enum CreateTaxRegistrationCountryOptionsLaType {
6972 Simplified,
6973}
6974impl CreateTaxRegistrationCountryOptionsLaType {
6975 pub fn as_str(self) -> &'static str {
6976 use CreateTaxRegistrationCountryOptionsLaType::*;
6977 match self {
6978 Simplified => "simplified",
6979 }
6980 }
6981}
6982
6983impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLaType {
6984 type Err = stripe_types::StripeParseError;
6985 fn from_str(s: &str) -> Result<Self, Self::Err> {
6986 use CreateTaxRegistrationCountryOptionsLaType::*;
6987 match s {
6988 "simplified" => Ok(Simplified),
6989 _ => Err(stripe_types::StripeParseError),
6990 }
6991 }
6992}
6993impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLaType {
6994 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
6995 f.write_str(self.as_str())
6996 }
6997}
6998
6999impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLaType {
7000 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7001 f.write_str(self.as_str())
7002 }
7003}
7004impl serde::Serialize for CreateTaxRegistrationCountryOptionsLaType {
7005 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7006 where
7007 S: serde::Serializer,
7008 {
7009 serializer.serialize_str(self.as_str())
7010 }
7011}
7012#[cfg(feature = "deserialize")]
7013impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLaType {
7014 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7015 use std::str::FromStr;
7016 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7017 Self::from_str(&s).map_err(|_| {
7018 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLaType")
7019 })
7020 }
7021}
7022#[derive(Copy, Clone, Debug, serde::Serialize)]
7024pub struct CreateTaxRegistrationCountryOptionsLt {
7025 #[serde(skip_serializing_if = "Option::is_none")]
7027 pub standard: Option<CreateTaxRegistrationCountryOptionsLtStandard>,
7028 #[serde(rename = "type")]
7030 pub type_: CreateTaxRegistrationCountryOptionsLtType,
7031}
7032impl CreateTaxRegistrationCountryOptionsLt {
7033 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsLtType>) -> Self {
7034 Self { standard: None, type_: type_.into() }
7035 }
7036}
7037#[derive(Copy, Clone, Debug, serde::Serialize)]
7039pub struct CreateTaxRegistrationCountryOptionsLtStandard {
7040 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme,
7042}
7043impl CreateTaxRegistrationCountryOptionsLtStandard {
7044 pub fn new(
7045 place_of_supply_scheme: impl Into<
7046 CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme,
7047 >,
7048 ) -> Self {
7049 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
7050 }
7051}
7052#[derive(Copy, Clone, Eq, PartialEq)]
7054pub enum CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme {
7055 InboundGoods,
7056 SmallSeller,
7057 Standard,
7058}
7059impl CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme {
7060 pub fn as_str(self) -> &'static str {
7061 use CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme::*;
7062 match self {
7063 InboundGoods => "inbound_goods",
7064 SmallSeller => "small_seller",
7065 Standard => "standard",
7066 }
7067 }
7068}
7069
7070impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme {
7071 type Err = stripe_types::StripeParseError;
7072 fn from_str(s: &str) -> Result<Self, Self::Err> {
7073 use CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme::*;
7074 match s {
7075 "inbound_goods" => Ok(InboundGoods),
7076 "small_seller" => Ok(SmallSeller),
7077 "standard" => Ok(Standard),
7078 _ => Err(stripe_types::StripeParseError),
7079 }
7080 }
7081}
7082impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme {
7083 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7084 f.write_str(self.as_str())
7085 }
7086}
7087
7088impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme {
7089 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7090 f.write_str(self.as_str())
7091 }
7092}
7093impl serde::Serialize for CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme {
7094 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7095 where
7096 S: serde::Serializer,
7097 {
7098 serializer.serialize_str(self.as_str())
7099 }
7100}
7101#[cfg(feature = "deserialize")]
7102impl<'de> serde::Deserialize<'de>
7103 for CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme
7104{
7105 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7106 use std::str::FromStr;
7107 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7108 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme"))
7109 }
7110}
7111#[derive(Copy, Clone, Eq, PartialEq)]
7113pub enum CreateTaxRegistrationCountryOptionsLtType {
7114 Ioss,
7115 OssNonUnion,
7116 OssUnion,
7117 Standard,
7118}
7119impl CreateTaxRegistrationCountryOptionsLtType {
7120 pub fn as_str(self) -> &'static str {
7121 use CreateTaxRegistrationCountryOptionsLtType::*;
7122 match self {
7123 Ioss => "ioss",
7124 OssNonUnion => "oss_non_union",
7125 OssUnion => "oss_union",
7126 Standard => "standard",
7127 }
7128 }
7129}
7130
7131impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLtType {
7132 type Err = stripe_types::StripeParseError;
7133 fn from_str(s: &str) -> Result<Self, Self::Err> {
7134 use CreateTaxRegistrationCountryOptionsLtType::*;
7135 match s {
7136 "ioss" => Ok(Ioss),
7137 "oss_non_union" => Ok(OssNonUnion),
7138 "oss_union" => Ok(OssUnion),
7139 "standard" => Ok(Standard),
7140 _ => Err(stripe_types::StripeParseError),
7141 }
7142 }
7143}
7144impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLtType {
7145 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7146 f.write_str(self.as_str())
7147 }
7148}
7149
7150impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLtType {
7151 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7152 f.write_str(self.as_str())
7153 }
7154}
7155impl serde::Serialize for CreateTaxRegistrationCountryOptionsLtType {
7156 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7157 where
7158 S: serde::Serializer,
7159 {
7160 serializer.serialize_str(self.as_str())
7161 }
7162}
7163#[cfg(feature = "deserialize")]
7164impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLtType {
7165 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7166 use std::str::FromStr;
7167 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7168 Self::from_str(&s).map_err(|_| {
7169 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLtType")
7170 })
7171 }
7172}
7173#[derive(Copy, Clone, Debug, serde::Serialize)]
7175pub struct CreateTaxRegistrationCountryOptionsLu {
7176 #[serde(skip_serializing_if = "Option::is_none")]
7178 pub standard: Option<CreateTaxRegistrationCountryOptionsLuStandard>,
7179 #[serde(rename = "type")]
7181 pub type_: CreateTaxRegistrationCountryOptionsLuType,
7182}
7183impl CreateTaxRegistrationCountryOptionsLu {
7184 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsLuType>) -> Self {
7185 Self { standard: None, type_: type_.into() }
7186 }
7187}
7188#[derive(Copy, Clone, Debug, serde::Serialize)]
7190pub struct CreateTaxRegistrationCountryOptionsLuStandard {
7191 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme,
7193}
7194impl CreateTaxRegistrationCountryOptionsLuStandard {
7195 pub fn new(
7196 place_of_supply_scheme: impl Into<
7197 CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme,
7198 >,
7199 ) -> Self {
7200 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
7201 }
7202}
7203#[derive(Copy, Clone, Eq, PartialEq)]
7205pub enum CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme {
7206 InboundGoods,
7207 SmallSeller,
7208 Standard,
7209}
7210impl CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme {
7211 pub fn as_str(self) -> &'static str {
7212 use CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme::*;
7213 match self {
7214 InboundGoods => "inbound_goods",
7215 SmallSeller => "small_seller",
7216 Standard => "standard",
7217 }
7218 }
7219}
7220
7221impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme {
7222 type Err = stripe_types::StripeParseError;
7223 fn from_str(s: &str) -> Result<Self, Self::Err> {
7224 use CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme::*;
7225 match s {
7226 "inbound_goods" => Ok(InboundGoods),
7227 "small_seller" => Ok(SmallSeller),
7228 "standard" => Ok(Standard),
7229 _ => Err(stripe_types::StripeParseError),
7230 }
7231 }
7232}
7233impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme {
7234 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7235 f.write_str(self.as_str())
7236 }
7237}
7238
7239impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme {
7240 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7241 f.write_str(self.as_str())
7242 }
7243}
7244impl serde::Serialize for CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme {
7245 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7246 where
7247 S: serde::Serializer,
7248 {
7249 serializer.serialize_str(self.as_str())
7250 }
7251}
7252#[cfg(feature = "deserialize")]
7253impl<'de> serde::Deserialize<'de>
7254 for CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme
7255{
7256 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7257 use std::str::FromStr;
7258 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7259 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme"))
7260 }
7261}
7262#[derive(Copy, Clone, Eq, PartialEq)]
7264pub enum CreateTaxRegistrationCountryOptionsLuType {
7265 Ioss,
7266 OssNonUnion,
7267 OssUnion,
7268 Standard,
7269}
7270impl CreateTaxRegistrationCountryOptionsLuType {
7271 pub fn as_str(self) -> &'static str {
7272 use CreateTaxRegistrationCountryOptionsLuType::*;
7273 match self {
7274 Ioss => "ioss",
7275 OssNonUnion => "oss_non_union",
7276 OssUnion => "oss_union",
7277 Standard => "standard",
7278 }
7279 }
7280}
7281
7282impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLuType {
7283 type Err = stripe_types::StripeParseError;
7284 fn from_str(s: &str) -> Result<Self, Self::Err> {
7285 use CreateTaxRegistrationCountryOptionsLuType::*;
7286 match s {
7287 "ioss" => Ok(Ioss),
7288 "oss_non_union" => Ok(OssNonUnion),
7289 "oss_union" => Ok(OssUnion),
7290 "standard" => Ok(Standard),
7291 _ => Err(stripe_types::StripeParseError),
7292 }
7293 }
7294}
7295impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLuType {
7296 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7297 f.write_str(self.as_str())
7298 }
7299}
7300
7301impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLuType {
7302 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7303 f.write_str(self.as_str())
7304 }
7305}
7306impl serde::Serialize for CreateTaxRegistrationCountryOptionsLuType {
7307 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7308 where
7309 S: serde::Serializer,
7310 {
7311 serializer.serialize_str(self.as_str())
7312 }
7313}
7314#[cfg(feature = "deserialize")]
7315impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLuType {
7316 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7317 use std::str::FromStr;
7318 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7319 Self::from_str(&s).map_err(|_| {
7320 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLuType")
7321 })
7322 }
7323}
7324#[derive(Copy, Clone, Debug, serde::Serialize)]
7326pub struct CreateTaxRegistrationCountryOptionsLv {
7327 #[serde(skip_serializing_if = "Option::is_none")]
7329 pub standard: Option<CreateTaxRegistrationCountryOptionsLvStandard>,
7330 #[serde(rename = "type")]
7332 pub type_: CreateTaxRegistrationCountryOptionsLvType,
7333}
7334impl CreateTaxRegistrationCountryOptionsLv {
7335 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsLvType>) -> Self {
7336 Self { standard: None, type_: type_.into() }
7337 }
7338}
7339#[derive(Copy, Clone, Debug, serde::Serialize)]
7341pub struct CreateTaxRegistrationCountryOptionsLvStandard {
7342 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme,
7344}
7345impl CreateTaxRegistrationCountryOptionsLvStandard {
7346 pub fn new(
7347 place_of_supply_scheme: impl Into<
7348 CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme,
7349 >,
7350 ) -> Self {
7351 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
7352 }
7353}
7354#[derive(Copy, Clone, Eq, PartialEq)]
7356pub enum CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme {
7357 InboundGoods,
7358 SmallSeller,
7359 Standard,
7360}
7361impl CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme {
7362 pub fn as_str(self) -> &'static str {
7363 use CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme::*;
7364 match self {
7365 InboundGoods => "inbound_goods",
7366 SmallSeller => "small_seller",
7367 Standard => "standard",
7368 }
7369 }
7370}
7371
7372impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme {
7373 type Err = stripe_types::StripeParseError;
7374 fn from_str(s: &str) -> Result<Self, Self::Err> {
7375 use CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme::*;
7376 match s {
7377 "inbound_goods" => Ok(InboundGoods),
7378 "small_seller" => Ok(SmallSeller),
7379 "standard" => Ok(Standard),
7380 _ => Err(stripe_types::StripeParseError),
7381 }
7382 }
7383}
7384impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme {
7385 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7386 f.write_str(self.as_str())
7387 }
7388}
7389
7390impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme {
7391 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7392 f.write_str(self.as_str())
7393 }
7394}
7395impl serde::Serialize for CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme {
7396 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7397 where
7398 S: serde::Serializer,
7399 {
7400 serializer.serialize_str(self.as_str())
7401 }
7402}
7403#[cfg(feature = "deserialize")]
7404impl<'de> serde::Deserialize<'de>
7405 for CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme
7406{
7407 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7408 use std::str::FromStr;
7409 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7410 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme"))
7411 }
7412}
7413#[derive(Copy, Clone, Eq, PartialEq)]
7415pub enum CreateTaxRegistrationCountryOptionsLvType {
7416 Ioss,
7417 OssNonUnion,
7418 OssUnion,
7419 Standard,
7420}
7421impl CreateTaxRegistrationCountryOptionsLvType {
7422 pub fn as_str(self) -> &'static str {
7423 use CreateTaxRegistrationCountryOptionsLvType::*;
7424 match self {
7425 Ioss => "ioss",
7426 OssNonUnion => "oss_non_union",
7427 OssUnion => "oss_union",
7428 Standard => "standard",
7429 }
7430 }
7431}
7432
7433impl std::str::FromStr for CreateTaxRegistrationCountryOptionsLvType {
7434 type Err = stripe_types::StripeParseError;
7435 fn from_str(s: &str) -> Result<Self, Self::Err> {
7436 use CreateTaxRegistrationCountryOptionsLvType::*;
7437 match s {
7438 "ioss" => Ok(Ioss),
7439 "oss_non_union" => Ok(OssNonUnion),
7440 "oss_union" => Ok(OssUnion),
7441 "standard" => Ok(Standard),
7442 _ => Err(stripe_types::StripeParseError),
7443 }
7444 }
7445}
7446impl std::fmt::Display for CreateTaxRegistrationCountryOptionsLvType {
7447 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7448 f.write_str(self.as_str())
7449 }
7450}
7451
7452impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsLvType {
7453 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7454 f.write_str(self.as_str())
7455 }
7456}
7457impl serde::Serialize for CreateTaxRegistrationCountryOptionsLvType {
7458 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7459 where
7460 S: serde::Serializer,
7461 {
7462 serializer.serialize_str(self.as_str())
7463 }
7464}
7465#[cfg(feature = "deserialize")]
7466impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLvType {
7467 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7468 use std::str::FromStr;
7469 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7470 Self::from_str(&s).map_err(|_| {
7471 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsLvType")
7472 })
7473 }
7474}
7475#[derive(Copy, Clone, Debug, serde::Serialize)]
7477pub struct CreateTaxRegistrationCountryOptionsMa {
7478 #[serde(rename = "type")]
7480 pub type_: CreateTaxRegistrationCountryOptionsMaType,
7481}
7482impl CreateTaxRegistrationCountryOptionsMa {
7483 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMaType>) -> Self {
7484 Self { type_: type_.into() }
7485 }
7486}
7487#[derive(Copy, Clone, Eq, PartialEq)]
7489pub enum CreateTaxRegistrationCountryOptionsMaType {
7490 Simplified,
7491}
7492impl CreateTaxRegistrationCountryOptionsMaType {
7493 pub fn as_str(self) -> &'static str {
7494 use CreateTaxRegistrationCountryOptionsMaType::*;
7495 match self {
7496 Simplified => "simplified",
7497 }
7498 }
7499}
7500
7501impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMaType {
7502 type Err = stripe_types::StripeParseError;
7503 fn from_str(s: &str) -> Result<Self, Self::Err> {
7504 use CreateTaxRegistrationCountryOptionsMaType::*;
7505 match s {
7506 "simplified" => Ok(Simplified),
7507 _ => Err(stripe_types::StripeParseError),
7508 }
7509 }
7510}
7511impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMaType {
7512 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7513 f.write_str(self.as_str())
7514 }
7515}
7516
7517impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMaType {
7518 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7519 f.write_str(self.as_str())
7520 }
7521}
7522impl serde::Serialize for CreateTaxRegistrationCountryOptionsMaType {
7523 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7524 where
7525 S: serde::Serializer,
7526 {
7527 serializer.serialize_str(self.as_str())
7528 }
7529}
7530#[cfg(feature = "deserialize")]
7531impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMaType {
7532 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7533 use std::str::FromStr;
7534 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7535 Self::from_str(&s).map_err(|_| {
7536 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMaType")
7537 })
7538 }
7539}
7540#[derive(Copy, Clone, Debug, serde::Serialize)]
7542pub struct CreateTaxRegistrationCountryOptionsMd {
7543 #[serde(rename = "type")]
7545 pub type_: CreateTaxRegistrationCountryOptionsMdType,
7546}
7547impl CreateTaxRegistrationCountryOptionsMd {
7548 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMdType>) -> Self {
7549 Self { type_: type_.into() }
7550 }
7551}
7552#[derive(Copy, Clone, Eq, PartialEq)]
7554pub enum CreateTaxRegistrationCountryOptionsMdType {
7555 Simplified,
7556}
7557impl CreateTaxRegistrationCountryOptionsMdType {
7558 pub fn as_str(self) -> &'static str {
7559 use CreateTaxRegistrationCountryOptionsMdType::*;
7560 match self {
7561 Simplified => "simplified",
7562 }
7563 }
7564}
7565
7566impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMdType {
7567 type Err = stripe_types::StripeParseError;
7568 fn from_str(s: &str) -> Result<Self, Self::Err> {
7569 use CreateTaxRegistrationCountryOptionsMdType::*;
7570 match s {
7571 "simplified" => Ok(Simplified),
7572 _ => Err(stripe_types::StripeParseError),
7573 }
7574 }
7575}
7576impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMdType {
7577 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7578 f.write_str(self.as_str())
7579 }
7580}
7581
7582impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMdType {
7583 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7584 f.write_str(self.as_str())
7585 }
7586}
7587impl serde::Serialize for CreateTaxRegistrationCountryOptionsMdType {
7588 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7589 where
7590 S: serde::Serializer,
7591 {
7592 serializer.serialize_str(self.as_str())
7593 }
7594}
7595#[cfg(feature = "deserialize")]
7596impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMdType {
7597 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7598 use std::str::FromStr;
7599 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7600 Self::from_str(&s).map_err(|_| {
7601 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMdType")
7602 })
7603 }
7604}
7605#[derive(Copy, Clone, Debug, serde::Serialize)]
7607pub struct CreateTaxRegistrationCountryOptionsMe {
7608 #[serde(skip_serializing_if = "Option::is_none")]
7610 pub standard: Option<CreateTaxRegistrationCountryOptionsMeStandard>,
7611 #[serde(rename = "type")]
7613 pub type_: CreateTaxRegistrationCountryOptionsMeType,
7614}
7615impl CreateTaxRegistrationCountryOptionsMe {
7616 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMeType>) -> Self {
7617 Self { standard: None, type_: type_.into() }
7618 }
7619}
7620#[derive(Copy, Clone, Debug, serde::Serialize)]
7622pub struct CreateTaxRegistrationCountryOptionsMeStandard {
7623 #[serde(skip_serializing_if = "Option::is_none")]
7625 pub place_of_supply_scheme:
7626 Option<CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme>,
7627}
7628impl CreateTaxRegistrationCountryOptionsMeStandard {
7629 pub fn new() -> Self {
7630 Self { place_of_supply_scheme: None }
7631 }
7632}
7633impl Default for CreateTaxRegistrationCountryOptionsMeStandard {
7634 fn default() -> Self {
7635 Self::new()
7636 }
7637}
7638#[derive(Copy, Clone, Eq, PartialEq)]
7640pub enum CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme {
7641 InboundGoods,
7642 Standard,
7643}
7644impl CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme {
7645 pub fn as_str(self) -> &'static str {
7646 use CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme::*;
7647 match self {
7648 InboundGoods => "inbound_goods",
7649 Standard => "standard",
7650 }
7651 }
7652}
7653
7654impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme {
7655 type Err = stripe_types::StripeParseError;
7656 fn from_str(s: &str) -> Result<Self, Self::Err> {
7657 use CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme::*;
7658 match s {
7659 "inbound_goods" => Ok(InboundGoods),
7660 "standard" => Ok(Standard),
7661 _ => Err(stripe_types::StripeParseError),
7662 }
7663 }
7664}
7665impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme {
7666 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7667 f.write_str(self.as_str())
7668 }
7669}
7670
7671impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme {
7672 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7673 f.write_str(self.as_str())
7674 }
7675}
7676impl serde::Serialize for CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme {
7677 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7678 where
7679 S: serde::Serializer,
7680 {
7681 serializer.serialize_str(self.as_str())
7682 }
7683}
7684#[cfg(feature = "deserialize")]
7685impl<'de> serde::Deserialize<'de>
7686 for CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme
7687{
7688 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7689 use std::str::FromStr;
7690 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7691 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMeStandardPlaceOfSupplyScheme"))
7692 }
7693}
7694#[derive(Copy, Clone, Eq, PartialEq)]
7696pub enum CreateTaxRegistrationCountryOptionsMeType {
7697 Standard,
7698}
7699impl CreateTaxRegistrationCountryOptionsMeType {
7700 pub fn as_str(self) -> &'static str {
7701 use CreateTaxRegistrationCountryOptionsMeType::*;
7702 match self {
7703 Standard => "standard",
7704 }
7705 }
7706}
7707
7708impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMeType {
7709 type Err = stripe_types::StripeParseError;
7710 fn from_str(s: &str) -> Result<Self, Self::Err> {
7711 use CreateTaxRegistrationCountryOptionsMeType::*;
7712 match s {
7713 "standard" => Ok(Standard),
7714 _ => Err(stripe_types::StripeParseError),
7715 }
7716 }
7717}
7718impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMeType {
7719 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7720 f.write_str(self.as_str())
7721 }
7722}
7723
7724impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMeType {
7725 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7726 f.write_str(self.as_str())
7727 }
7728}
7729impl serde::Serialize for CreateTaxRegistrationCountryOptionsMeType {
7730 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7731 where
7732 S: serde::Serializer,
7733 {
7734 serializer.serialize_str(self.as_str())
7735 }
7736}
7737#[cfg(feature = "deserialize")]
7738impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMeType {
7739 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7740 use std::str::FromStr;
7741 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7742 Self::from_str(&s).map_err(|_| {
7743 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMeType")
7744 })
7745 }
7746}
7747#[derive(Copy, Clone, Debug, serde::Serialize)]
7749pub struct CreateTaxRegistrationCountryOptionsMk {
7750 #[serde(skip_serializing_if = "Option::is_none")]
7752 pub standard: Option<CreateTaxRegistrationCountryOptionsMkStandard>,
7753 #[serde(rename = "type")]
7755 pub type_: CreateTaxRegistrationCountryOptionsMkType,
7756}
7757impl CreateTaxRegistrationCountryOptionsMk {
7758 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMkType>) -> Self {
7759 Self { standard: None, type_: type_.into() }
7760 }
7761}
7762#[derive(Copy, Clone, Debug, serde::Serialize)]
7764pub struct CreateTaxRegistrationCountryOptionsMkStandard {
7765 #[serde(skip_serializing_if = "Option::is_none")]
7767 pub place_of_supply_scheme:
7768 Option<CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme>,
7769}
7770impl CreateTaxRegistrationCountryOptionsMkStandard {
7771 pub fn new() -> Self {
7772 Self { place_of_supply_scheme: None }
7773 }
7774}
7775impl Default for CreateTaxRegistrationCountryOptionsMkStandard {
7776 fn default() -> Self {
7777 Self::new()
7778 }
7779}
7780#[derive(Copy, Clone, Eq, PartialEq)]
7782pub enum CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme {
7783 InboundGoods,
7784 Standard,
7785}
7786impl CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme {
7787 pub fn as_str(self) -> &'static str {
7788 use CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme::*;
7789 match self {
7790 InboundGoods => "inbound_goods",
7791 Standard => "standard",
7792 }
7793 }
7794}
7795
7796impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme {
7797 type Err = stripe_types::StripeParseError;
7798 fn from_str(s: &str) -> Result<Self, Self::Err> {
7799 use CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme::*;
7800 match s {
7801 "inbound_goods" => Ok(InboundGoods),
7802 "standard" => Ok(Standard),
7803 _ => Err(stripe_types::StripeParseError),
7804 }
7805 }
7806}
7807impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme {
7808 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7809 f.write_str(self.as_str())
7810 }
7811}
7812
7813impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme {
7814 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7815 f.write_str(self.as_str())
7816 }
7817}
7818impl serde::Serialize for CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme {
7819 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7820 where
7821 S: serde::Serializer,
7822 {
7823 serializer.serialize_str(self.as_str())
7824 }
7825}
7826#[cfg(feature = "deserialize")]
7827impl<'de> serde::Deserialize<'de>
7828 for CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme
7829{
7830 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7831 use std::str::FromStr;
7832 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7833 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMkStandardPlaceOfSupplyScheme"))
7834 }
7835}
7836#[derive(Copy, Clone, Eq, PartialEq)]
7838pub enum CreateTaxRegistrationCountryOptionsMkType {
7839 Standard,
7840}
7841impl CreateTaxRegistrationCountryOptionsMkType {
7842 pub fn as_str(self) -> &'static str {
7843 use CreateTaxRegistrationCountryOptionsMkType::*;
7844 match self {
7845 Standard => "standard",
7846 }
7847 }
7848}
7849
7850impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMkType {
7851 type Err = stripe_types::StripeParseError;
7852 fn from_str(s: &str) -> Result<Self, Self::Err> {
7853 use CreateTaxRegistrationCountryOptionsMkType::*;
7854 match s {
7855 "standard" => Ok(Standard),
7856 _ => Err(stripe_types::StripeParseError),
7857 }
7858 }
7859}
7860impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMkType {
7861 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7862 f.write_str(self.as_str())
7863 }
7864}
7865
7866impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMkType {
7867 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7868 f.write_str(self.as_str())
7869 }
7870}
7871impl serde::Serialize for CreateTaxRegistrationCountryOptionsMkType {
7872 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7873 where
7874 S: serde::Serializer,
7875 {
7876 serializer.serialize_str(self.as_str())
7877 }
7878}
7879#[cfg(feature = "deserialize")]
7880impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMkType {
7881 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7882 use std::str::FromStr;
7883 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7884 Self::from_str(&s).map_err(|_| {
7885 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMkType")
7886 })
7887 }
7888}
7889#[derive(Copy, Clone, Debug, serde::Serialize)]
7891pub struct CreateTaxRegistrationCountryOptionsMr {
7892 #[serde(skip_serializing_if = "Option::is_none")]
7894 pub standard: Option<CreateTaxRegistrationCountryOptionsMrStandard>,
7895 #[serde(rename = "type")]
7897 pub type_: CreateTaxRegistrationCountryOptionsMrType,
7898}
7899impl CreateTaxRegistrationCountryOptionsMr {
7900 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMrType>) -> Self {
7901 Self { standard: None, type_: type_.into() }
7902 }
7903}
7904#[derive(Copy, Clone, Debug, serde::Serialize)]
7906pub struct CreateTaxRegistrationCountryOptionsMrStandard {
7907 #[serde(skip_serializing_if = "Option::is_none")]
7909 pub place_of_supply_scheme:
7910 Option<CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme>,
7911}
7912impl CreateTaxRegistrationCountryOptionsMrStandard {
7913 pub fn new() -> Self {
7914 Self { place_of_supply_scheme: None }
7915 }
7916}
7917impl Default for CreateTaxRegistrationCountryOptionsMrStandard {
7918 fn default() -> Self {
7919 Self::new()
7920 }
7921}
7922#[derive(Copy, Clone, Eq, PartialEq)]
7924pub enum CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme {
7925 InboundGoods,
7926 Standard,
7927}
7928impl CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme {
7929 pub fn as_str(self) -> &'static str {
7930 use CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme::*;
7931 match self {
7932 InboundGoods => "inbound_goods",
7933 Standard => "standard",
7934 }
7935 }
7936}
7937
7938impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme {
7939 type Err = stripe_types::StripeParseError;
7940 fn from_str(s: &str) -> Result<Self, Self::Err> {
7941 use CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme::*;
7942 match s {
7943 "inbound_goods" => Ok(InboundGoods),
7944 "standard" => Ok(Standard),
7945 _ => Err(stripe_types::StripeParseError),
7946 }
7947 }
7948}
7949impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme {
7950 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7951 f.write_str(self.as_str())
7952 }
7953}
7954
7955impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme {
7956 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
7957 f.write_str(self.as_str())
7958 }
7959}
7960impl serde::Serialize for CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme {
7961 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
7962 where
7963 S: serde::Serializer,
7964 {
7965 serializer.serialize_str(self.as_str())
7966 }
7967}
7968#[cfg(feature = "deserialize")]
7969impl<'de> serde::Deserialize<'de>
7970 for CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme
7971{
7972 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
7973 use std::str::FromStr;
7974 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
7975 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMrStandardPlaceOfSupplyScheme"))
7976 }
7977}
7978#[derive(Copy, Clone, Eq, PartialEq)]
7980pub enum CreateTaxRegistrationCountryOptionsMrType {
7981 Standard,
7982}
7983impl CreateTaxRegistrationCountryOptionsMrType {
7984 pub fn as_str(self) -> &'static str {
7985 use CreateTaxRegistrationCountryOptionsMrType::*;
7986 match self {
7987 Standard => "standard",
7988 }
7989 }
7990}
7991
7992impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMrType {
7993 type Err = stripe_types::StripeParseError;
7994 fn from_str(s: &str) -> Result<Self, Self::Err> {
7995 use CreateTaxRegistrationCountryOptionsMrType::*;
7996 match s {
7997 "standard" => Ok(Standard),
7998 _ => Err(stripe_types::StripeParseError),
7999 }
8000 }
8001}
8002impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMrType {
8003 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8004 f.write_str(self.as_str())
8005 }
8006}
8007
8008impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMrType {
8009 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8010 f.write_str(self.as_str())
8011 }
8012}
8013impl serde::Serialize for CreateTaxRegistrationCountryOptionsMrType {
8014 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8015 where
8016 S: serde::Serializer,
8017 {
8018 serializer.serialize_str(self.as_str())
8019 }
8020}
8021#[cfg(feature = "deserialize")]
8022impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMrType {
8023 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8024 use std::str::FromStr;
8025 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8026 Self::from_str(&s).map_err(|_| {
8027 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMrType")
8028 })
8029 }
8030}
8031#[derive(Copy, Clone, Debug, serde::Serialize)]
8033pub struct CreateTaxRegistrationCountryOptionsMt {
8034 #[serde(skip_serializing_if = "Option::is_none")]
8036 pub standard: Option<CreateTaxRegistrationCountryOptionsMtStandard>,
8037 #[serde(rename = "type")]
8039 pub type_: CreateTaxRegistrationCountryOptionsMtType,
8040}
8041impl CreateTaxRegistrationCountryOptionsMt {
8042 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMtType>) -> Self {
8043 Self { standard: None, type_: type_.into() }
8044 }
8045}
8046#[derive(Copy, Clone, Debug, serde::Serialize)]
8048pub struct CreateTaxRegistrationCountryOptionsMtStandard {
8049 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme,
8051}
8052impl CreateTaxRegistrationCountryOptionsMtStandard {
8053 pub fn new(
8054 place_of_supply_scheme: impl Into<
8055 CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme,
8056 >,
8057 ) -> Self {
8058 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
8059 }
8060}
8061#[derive(Copy, Clone, Eq, PartialEq)]
8063pub enum CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme {
8064 InboundGoods,
8065 SmallSeller,
8066 Standard,
8067}
8068impl CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme {
8069 pub fn as_str(self) -> &'static str {
8070 use CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme::*;
8071 match self {
8072 InboundGoods => "inbound_goods",
8073 SmallSeller => "small_seller",
8074 Standard => "standard",
8075 }
8076 }
8077}
8078
8079impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme {
8080 type Err = stripe_types::StripeParseError;
8081 fn from_str(s: &str) -> Result<Self, Self::Err> {
8082 use CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme::*;
8083 match s {
8084 "inbound_goods" => Ok(InboundGoods),
8085 "small_seller" => Ok(SmallSeller),
8086 "standard" => Ok(Standard),
8087 _ => Err(stripe_types::StripeParseError),
8088 }
8089 }
8090}
8091impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme {
8092 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8093 f.write_str(self.as_str())
8094 }
8095}
8096
8097impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme {
8098 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8099 f.write_str(self.as_str())
8100 }
8101}
8102impl serde::Serialize for CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme {
8103 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8104 where
8105 S: serde::Serializer,
8106 {
8107 serializer.serialize_str(self.as_str())
8108 }
8109}
8110#[cfg(feature = "deserialize")]
8111impl<'de> serde::Deserialize<'de>
8112 for CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme
8113{
8114 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8115 use std::str::FromStr;
8116 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8117 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme"))
8118 }
8119}
8120#[derive(Copy, Clone, Eq, PartialEq)]
8122pub enum CreateTaxRegistrationCountryOptionsMtType {
8123 Ioss,
8124 OssNonUnion,
8125 OssUnion,
8126 Standard,
8127}
8128impl CreateTaxRegistrationCountryOptionsMtType {
8129 pub fn as_str(self) -> &'static str {
8130 use CreateTaxRegistrationCountryOptionsMtType::*;
8131 match self {
8132 Ioss => "ioss",
8133 OssNonUnion => "oss_non_union",
8134 OssUnion => "oss_union",
8135 Standard => "standard",
8136 }
8137 }
8138}
8139
8140impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMtType {
8141 type Err = stripe_types::StripeParseError;
8142 fn from_str(s: &str) -> Result<Self, Self::Err> {
8143 use CreateTaxRegistrationCountryOptionsMtType::*;
8144 match s {
8145 "ioss" => Ok(Ioss),
8146 "oss_non_union" => Ok(OssNonUnion),
8147 "oss_union" => Ok(OssUnion),
8148 "standard" => Ok(Standard),
8149 _ => Err(stripe_types::StripeParseError),
8150 }
8151 }
8152}
8153impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMtType {
8154 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8155 f.write_str(self.as_str())
8156 }
8157}
8158
8159impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMtType {
8160 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8161 f.write_str(self.as_str())
8162 }
8163}
8164impl serde::Serialize for CreateTaxRegistrationCountryOptionsMtType {
8165 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8166 where
8167 S: serde::Serializer,
8168 {
8169 serializer.serialize_str(self.as_str())
8170 }
8171}
8172#[cfg(feature = "deserialize")]
8173impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMtType {
8174 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8175 use std::str::FromStr;
8176 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8177 Self::from_str(&s).map_err(|_| {
8178 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMtType")
8179 })
8180 }
8181}
8182#[derive(Copy, Clone, Debug, serde::Serialize)]
8184pub struct CreateTaxRegistrationCountryOptionsMx {
8185 #[serde(rename = "type")]
8187 pub type_: CreateTaxRegistrationCountryOptionsMxType,
8188}
8189impl CreateTaxRegistrationCountryOptionsMx {
8190 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMxType>) -> Self {
8191 Self { type_: type_.into() }
8192 }
8193}
8194#[derive(Copy, Clone, Eq, PartialEq)]
8196pub enum CreateTaxRegistrationCountryOptionsMxType {
8197 Simplified,
8198}
8199impl CreateTaxRegistrationCountryOptionsMxType {
8200 pub fn as_str(self) -> &'static str {
8201 use CreateTaxRegistrationCountryOptionsMxType::*;
8202 match self {
8203 Simplified => "simplified",
8204 }
8205 }
8206}
8207
8208impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMxType {
8209 type Err = stripe_types::StripeParseError;
8210 fn from_str(s: &str) -> Result<Self, Self::Err> {
8211 use CreateTaxRegistrationCountryOptionsMxType::*;
8212 match s {
8213 "simplified" => Ok(Simplified),
8214 _ => Err(stripe_types::StripeParseError),
8215 }
8216 }
8217}
8218impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMxType {
8219 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8220 f.write_str(self.as_str())
8221 }
8222}
8223
8224impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMxType {
8225 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8226 f.write_str(self.as_str())
8227 }
8228}
8229impl serde::Serialize for CreateTaxRegistrationCountryOptionsMxType {
8230 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8231 where
8232 S: serde::Serializer,
8233 {
8234 serializer.serialize_str(self.as_str())
8235 }
8236}
8237#[cfg(feature = "deserialize")]
8238impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMxType {
8239 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8240 use std::str::FromStr;
8241 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8242 Self::from_str(&s).map_err(|_| {
8243 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMxType")
8244 })
8245 }
8246}
8247#[derive(Copy, Clone, Debug, serde::Serialize)]
8249pub struct CreateTaxRegistrationCountryOptionsMy {
8250 #[serde(rename = "type")]
8252 pub type_: CreateTaxRegistrationCountryOptionsMyType,
8253}
8254impl CreateTaxRegistrationCountryOptionsMy {
8255 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsMyType>) -> Self {
8256 Self { type_: type_.into() }
8257 }
8258}
8259#[derive(Copy, Clone, Eq, PartialEq)]
8261pub enum CreateTaxRegistrationCountryOptionsMyType {
8262 Simplified,
8263}
8264impl CreateTaxRegistrationCountryOptionsMyType {
8265 pub fn as_str(self) -> &'static str {
8266 use CreateTaxRegistrationCountryOptionsMyType::*;
8267 match self {
8268 Simplified => "simplified",
8269 }
8270 }
8271}
8272
8273impl std::str::FromStr for CreateTaxRegistrationCountryOptionsMyType {
8274 type Err = stripe_types::StripeParseError;
8275 fn from_str(s: &str) -> Result<Self, Self::Err> {
8276 use CreateTaxRegistrationCountryOptionsMyType::*;
8277 match s {
8278 "simplified" => Ok(Simplified),
8279 _ => Err(stripe_types::StripeParseError),
8280 }
8281 }
8282}
8283impl std::fmt::Display for CreateTaxRegistrationCountryOptionsMyType {
8284 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8285 f.write_str(self.as_str())
8286 }
8287}
8288
8289impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsMyType {
8290 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8291 f.write_str(self.as_str())
8292 }
8293}
8294impl serde::Serialize for CreateTaxRegistrationCountryOptionsMyType {
8295 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8296 where
8297 S: serde::Serializer,
8298 {
8299 serializer.serialize_str(self.as_str())
8300 }
8301}
8302#[cfg(feature = "deserialize")]
8303impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMyType {
8304 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8305 use std::str::FromStr;
8306 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8307 Self::from_str(&s).map_err(|_| {
8308 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsMyType")
8309 })
8310 }
8311}
8312#[derive(Copy, Clone, Debug, serde::Serialize)]
8314pub struct CreateTaxRegistrationCountryOptionsNg {
8315 #[serde(rename = "type")]
8317 pub type_: CreateTaxRegistrationCountryOptionsNgType,
8318}
8319impl CreateTaxRegistrationCountryOptionsNg {
8320 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsNgType>) -> Self {
8321 Self { type_: type_.into() }
8322 }
8323}
8324#[derive(Copy, Clone, Eq, PartialEq)]
8326pub enum CreateTaxRegistrationCountryOptionsNgType {
8327 Simplified,
8328}
8329impl CreateTaxRegistrationCountryOptionsNgType {
8330 pub fn as_str(self) -> &'static str {
8331 use CreateTaxRegistrationCountryOptionsNgType::*;
8332 match self {
8333 Simplified => "simplified",
8334 }
8335 }
8336}
8337
8338impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNgType {
8339 type Err = stripe_types::StripeParseError;
8340 fn from_str(s: &str) -> Result<Self, Self::Err> {
8341 use CreateTaxRegistrationCountryOptionsNgType::*;
8342 match s {
8343 "simplified" => Ok(Simplified),
8344 _ => Err(stripe_types::StripeParseError),
8345 }
8346 }
8347}
8348impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNgType {
8349 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8350 f.write_str(self.as_str())
8351 }
8352}
8353
8354impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNgType {
8355 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8356 f.write_str(self.as_str())
8357 }
8358}
8359impl serde::Serialize for CreateTaxRegistrationCountryOptionsNgType {
8360 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8361 where
8362 S: serde::Serializer,
8363 {
8364 serializer.serialize_str(self.as_str())
8365 }
8366}
8367#[cfg(feature = "deserialize")]
8368impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNgType {
8369 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8370 use std::str::FromStr;
8371 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8372 Self::from_str(&s).map_err(|_| {
8373 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNgType")
8374 })
8375 }
8376}
8377#[derive(Copy, Clone, Debug, serde::Serialize)]
8379pub struct CreateTaxRegistrationCountryOptionsNl {
8380 #[serde(skip_serializing_if = "Option::is_none")]
8382 pub standard: Option<CreateTaxRegistrationCountryOptionsNlStandard>,
8383 #[serde(rename = "type")]
8385 pub type_: CreateTaxRegistrationCountryOptionsNlType,
8386}
8387impl CreateTaxRegistrationCountryOptionsNl {
8388 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsNlType>) -> Self {
8389 Self { standard: None, type_: type_.into() }
8390 }
8391}
8392#[derive(Copy, Clone, Debug, serde::Serialize)]
8394pub struct CreateTaxRegistrationCountryOptionsNlStandard {
8395 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme,
8397}
8398impl CreateTaxRegistrationCountryOptionsNlStandard {
8399 pub fn new(
8400 place_of_supply_scheme: impl Into<
8401 CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme,
8402 >,
8403 ) -> Self {
8404 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
8405 }
8406}
8407#[derive(Copy, Clone, Eq, PartialEq)]
8409pub enum CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme {
8410 InboundGoods,
8411 SmallSeller,
8412 Standard,
8413}
8414impl CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme {
8415 pub fn as_str(self) -> &'static str {
8416 use CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme::*;
8417 match self {
8418 InboundGoods => "inbound_goods",
8419 SmallSeller => "small_seller",
8420 Standard => "standard",
8421 }
8422 }
8423}
8424
8425impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme {
8426 type Err = stripe_types::StripeParseError;
8427 fn from_str(s: &str) -> Result<Self, Self::Err> {
8428 use CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme::*;
8429 match s {
8430 "inbound_goods" => Ok(InboundGoods),
8431 "small_seller" => Ok(SmallSeller),
8432 "standard" => Ok(Standard),
8433 _ => Err(stripe_types::StripeParseError),
8434 }
8435 }
8436}
8437impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme {
8438 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8439 f.write_str(self.as_str())
8440 }
8441}
8442
8443impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme {
8444 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8445 f.write_str(self.as_str())
8446 }
8447}
8448impl serde::Serialize for CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme {
8449 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8450 where
8451 S: serde::Serializer,
8452 {
8453 serializer.serialize_str(self.as_str())
8454 }
8455}
8456#[cfg(feature = "deserialize")]
8457impl<'de> serde::Deserialize<'de>
8458 for CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme
8459{
8460 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8461 use std::str::FromStr;
8462 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8463 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme"))
8464 }
8465}
8466#[derive(Copy, Clone, Eq, PartialEq)]
8468pub enum CreateTaxRegistrationCountryOptionsNlType {
8469 Ioss,
8470 OssNonUnion,
8471 OssUnion,
8472 Standard,
8473}
8474impl CreateTaxRegistrationCountryOptionsNlType {
8475 pub fn as_str(self) -> &'static str {
8476 use CreateTaxRegistrationCountryOptionsNlType::*;
8477 match self {
8478 Ioss => "ioss",
8479 OssNonUnion => "oss_non_union",
8480 OssUnion => "oss_union",
8481 Standard => "standard",
8482 }
8483 }
8484}
8485
8486impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNlType {
8487 type Err = stripe_types::StripeParseError;
8488 fn from_str(s: &str) -> Result<Self, Self::Err> {
8489 use CreateTaxRegistrationCountryOptionsNlType::*;
8490 match s {
8491 "ioss" => Ok(Ioss),
8492 "oss_non_union" => Ok(OssNonUnion),
8493 "oss_union" => Ok(OssUnion),
8494 "standard" => Ok(Standard),
8495 _ => Err(stripe_types::StripeParseError),
8496 }
8497 }
8498}
8499impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNlType {
8500 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8501 f.write_str(self.as_str())
8502 }
8503}
8504
8505impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNlType {
8506 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8507 f.write_str(self.as_str())
8508 }
8509}
8510impl serde::Serialize for CreateTaxRegistrationCountryOptionsNlType {
8511 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8512 where
8513 S: serde::Serializer,
8514 {
8515 serializer.serialize_str(self.as_str())
8516 }
8517}
8518#[cfg(feature = "deserialize")]
8519impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNlType {
8520 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8521 use std::str::FromStr;
8522 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8523 Self::from_str(&s).map_err(|_| {
8524 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNlType")
8525 })
8526 }
8527}
8528#[derive(Copy, Clone, Debug, serde::Serialize)]
8530pub struct CreateTaxRegistrationCountryOptionsNo {
8531 #[serde(skip_serializing_if = "Option::is_none")]
8533 pub standard: Option<CreateTaxRegistrationCountryOptionsNoStandard>,
8534 #[serde(rename = "type")]
8536 pub type_: CreateTaxRegistrationCountryOptionsNoType,
8537}
8538impl CreateTaxRegistrationCountryOptionsNo {
8539 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsNoType>) -> Self {
8540 Self { standard: None, type_: type_.into() }
8541 }
8542}
8543#[derive(Copy, Clone, Debug, serde::Serialize)]
8545pub struct CreateTaxRegistrationCountryOptionsNoStandard {
8546 #[serde(skip_serializing_if = "Option::is_none")]
8548 pub place_of_supply_scheme:
8549 Option<CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme>,
8550}
8551impl CreateTaxRegistrationCountryOptionsNoStandard {
8552 pub fn new() -> Self {
8553 Self { place_of_supply_scheme: None }
8554 }
8555}
8556impl Default for CreateTaxRegistrationCountryOptionsNoStandard {
8557 fn default() -> Self {
8558 Self::new()
8559 }
8560}
8561#[derive(Copy, Clone, Eq, PartialEq)]
8563pub enum CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme {
8564 InboundGoods,
8565 Standard,
8566}
8567impl CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme {
8568 pub fn as_str(self) -> &'static str {
8569 use CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme::*;
8570 match self {
8571 InboundGoods => "inbound_goods",
8572 Standard => "standard",
8573 }
8574 }
8575}
8576
8577impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme {
8578 type Err = stripe_types::StripeParseError;
8579 fn from_str(s: &str) -> Result<Self, Self::Err> {
8580 use CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme::*;
8581 match s {
8582 "inbound_goods" => Ok(InboundGoods),
8583 "standard" => Ok(Standard),
8584 _ => Err(stripe_types::StripeParseError),
8585 }
8586 }
8587}
8588impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme {
8589 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8590 f.write_str(self.as_str())
8591 }
8592}
8593
8594impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme {
8595 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8596 f.write_str(self.as_str())
8597 }
8598}
8599impl serde::Serialize for CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme {
8600 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8601 where
8602 S: serde::Serializer,
8603 {
8604 serializer.serialize_str(self.as_str())
8605 }
8606}
8607#[cfg(feature = "deserialize")]
8608impl<'de> serde::Deserialize<'de>
8609 for CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme
8610{
8611 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8612 use std::str::FromStr;
8613 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8614 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNoStandardPlaceOfSupplyScheme"))
8615 }
8616}
8617#[derive(Copy, Clone, Eq, PartialEq)]
8619pub enum CreateTaxRegistrationCountryOptionsNoType {
8620 Standard,
8621}
8622impl CreateTaxRegistrationCountryOptionsNoType {
8623 pub fn as_str(self) -> &'static str {
8624 use CreateTaxRegistrationCountryOptionsNoType::*;
8625 match self {
8626 Standard => "standard",
8627 }
8628 }
8629}
8630
8631impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNoType {
8632 type Err = stripe_types::StripeParseError;
8633 fn from_str(s: &str) -> Result<Self, Self::Err> {
8634 use CreateTaxRegistrationCountryOptionsNoType::*;
8635 match s {
8636 "standard" => Ok(Standard),
8637 _ => Err(stripe_types::StripeParseError),
8638 }
8639 }
8640}
8641impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNoType {
8642 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8643 f.write_str(self.as_str())
8644 }
8645}
8646
8647impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNoType {
8648 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8649 f.write_str(self.as_str())
8650 }
8651}
8652impl serde::Serialize for CreateTaxRegistrationCountryOptionsNoType {
8653 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8654 where
8655 S: serde::Serializer,
8656 {
8657 serializer.serialize_str(self.as_str())
8658 }
8659}
8660#[cfg(feature = "deserialize")]
8661impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNoType {
8662 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8663 use std::str::FromStr;
8664 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8665 Self::from_str(&s).map_err(|_| {
8666 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNoType")
8667 })
8668 }
8669}
8670#[derive(Copy, Clone, Debug, serde::Serialize)]
8672pub struct CreateTaxRegistrationCountryOptionsNp {
8673 #[serde(rename = "type")]
8675 pub type_: CreateTaxRegistrationCountryOptionsNpType,
8676}
8677impl CreateTaxRegistrationCountryOptionsNp {
8678 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsNpType>) -> Self {
8679 Self { type_: type_.into() }
8680 }
8681}
8682#[derive(Copy, Clone, Eq, PartialEq)]
8684pub enum CreateTaxRegistrationCountryOptionsNpType {
8685 Simplified,
8686}
8687impl CreateTaxRegistrationCountryOptionsNpType {
8688 pub fn as_str(self) -> &'static str {
8689 use CreateTaxRegistrationCountryOptionsNpType::*;
8690 match self {
8691 Simplified => "simplified",
8692 }
8693 }
8694}
8695
8696impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNpType {
8697 type Err = stripe_types::StripeParseError;
8698 fn from_str(s: &str) -> Result<Self, Self::Err> {
8699 use CreateTaxRegistrationCountryOptionsNpType::*;
8700 match s {
8701 "simplified" => Ok(Simplified),
8702 _ => Err(stripe_types::StripeParseError),
8703 }
8704 }
8705}
8706impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNpType {
8707 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8708 f.write_str(self.as_str())
8709 }
8710}
8711
8712impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNpType {
8713 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8714 f.write_str(self.as_str())
8715 }
8716}
8717impl serde::Serialize for CreateTaxRegistrationCountryOptionsNpType {
8718 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8719 where
8720 S: serde::Serializer,
8721 {
8722 serializer.serialize_str(self.as_str())
8723 }
8724}
8725#[cfg(feature = "deserialize")]
8726impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNpType {
8727 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8728 use std::str::FromStr;
8729 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8730 Self::from_str(&s).map_err(|_| {
8731 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNpType")
8732 })
8733 }
8734}
8735#[derive(Copy, Clone, Debug, serde::Serialize)]
8737pub struct CreateTaxRegistrationCountryOptionsNz {
8738 #[serde(skip_serializing_if = "Option::is_none")]
8740 pub standard: Option<CreateTaxRegistrationCountryOptionsNzStandard>,
8741 #[serde(rename = "type")]
8743 pub type_: CreateTaxRegistrationCountryOptionsNzType,
8744}
8745impl CreateTaxRegistrationCountryOptionsNz {
8746 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsNzType>) -> Self {
8747 Self { standard: None, type_: type_.into() }
8748 }
8749}
8750#[derive(Copy, Clone, Debug, serde::Serialize)]
8752pub struct CreateTaxRegistrationCountryOptionsNzStandard {
8753 #[serde(skip_serializing_if = "Option::is_none")]
8755 pub place_of_supply_scheme:
8756 Option<CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme>,
8757}
8758impl CreateTaxRegistrationCountryOptionsNzStandard {
8759 pub fn new() -> Self {
8760 Self { place_of_supply_scheme: None }
8761 }
8762}
8763impl Default for CreateTaxRegistrationCountryOptionsNzStandard {
8764 fn default() -> Self {
8765 Self::new()
8766 }
8767}
8768#[derive(Copy, Clone, Eq, PartialEq)]
8770pub enum CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme {
8771 InboundGoods,
8772 Standard,
8773}
8774impl CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme {
8775 pub fn as_str(self) -> &'static str {
8776 use CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme::*;
8777 match self {
8778 InboundGoods => "inbound_goods",
8779 Standard => "standard",
8780 }
8781 }
8782}
8783
8784impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme {
8785 type Err = stripe_types::StripeParseError;
8786 fn from_str(s: &str) -> Result<Self, Self::Err> {
8787 use CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme::*;
8788 match s {
8789 "inbound_goods" => Ok(InboundGoods),
8790 "standard" => Ok(Standard),
8791 _ => Err(stripe_types::StripeParseError),
8792 }
8793 }
8794}
8795impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme {
8796 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8797 f.write_str(self.as_str())
8798 }
8799}
8800
8801impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme {
8802 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8803 f.write_str(self.as_str())
8804 }
8805}
8806impl serde::Serialize for CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme {
8807 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8808 where
8809 S: serde::Serializer,
8810 {
8811 serializer.serialize_str(self.as_str())
8812 }
8813}
8814#[cfg(feature = "deserialize")]
8815impl<'de> serde::Deserialize<'de>
8816 for CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme
8817{
8818 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8819 use std::str::FromStr;
8820 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8821 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNzStandardPlaceOfSupplyScheme"))
8822 }
8823}
8824#[derive(Copy, Clone, Eq, PartialEq)]
8826pub enum CreateTaxRegistrationCountryOptionsNzType {
8827 Standard,
8828}
8829impl CreateTaxRegistrationCountryOptionsNzType {
8830 pub fn as_str(self) -> &'static str {
8831 use CreateTaxRegistrationCountryOptionsNzType::*;
8832 match self {
8833 Standard => "standard",
8834 }
8835 }
8836}
8837
8838impl std::str::FromStr for CreateTaxRegistrationCountryOptionsNzType {
8839 type Err = stripe_types::StripeParseError;
8840 fn from_str(s: &str) -> Result<Self, Self::Err> {
8841 use CreateTaxRegistrationCountryOptionsNzType::*;
8842 match s {
8843 "standard" => Ok(Standard),
8844 _ => Err(stripe_types::StripeParseError),
8845 }
8846 }
8847}
8848impl std::fmt::Display for CreateTaxRegistrationCountryOptionsNzType {
8849 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8850 f.write_str(self.as_str())
8851 }
8852}
8853
8854impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsNzType {
8855 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8856 f.write_str(self.as_str())
8857 }
8858}
8859impl serde::Serialize for CreateTaxRegistrationCountryOptionsNzType {
8860 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8861 where
8862 S: serde::Serializer,
8863 {
8864 serializer.serialize_str(self.as_str())
8865 }
8866}
8867#[cfg(feature = "deserialize")]
8868impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNzType {
8869 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8870 use std::str::FromStr;
8871 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8872 Self::from_str(&s).map_err(|_| {
8873 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsNzType")
8874 })
8875 }
8876}
8877#[derive(Copy, Clone, Debug, serde::Serialize)]
8879pub struct CreateTaxRegistrationCountryOptionsOm {
8880 #[serde(skip_serializing_if = "Option::is_none")]
8882 pub standard: Option<CreateTaxRegistrationCountryOptionsOmStandard>,
8883 #[serde(rename = "type")]
8885 pub type_: CreateTaxRegistrationCountryOptionsOmType,
8886}
8887impl CreateTaxRegistrationCountryOptionsOm {
8888 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsOmType>) -> Self {
8889 Self { standard: None, type_: type_.into() }
8890 }
8891}
8892#[derive(Copy, Clone, Debug, serde::Serialize)]
8894pub struct CreateTaxRegistrationCountryOptionsOmStandard {
8895 #[serde(skip_serializing_if = "Option::is_none")]
8897 pub place_of_supply_scheme:
8898 Option<CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme>,
8899}
8900impl CreateTaxRegistrationCountryOptionsOmStandard {
8901 pub fn new() -> Self {
8902 Self { place_of_supply_scheme: None }
8903 }
8904}
8905impl Default for CreateTaxRegistrationCountryOptionsOmStandard {
8906 fn default() -> Self {
8907 Self::new()
8908 }
8909}
8910#[derive(Copy, Clone, Eq, PartialEq)]
8912pub enum CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme {
8913 InboundGoods,
8914 Standard,
8915}
8916impl CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme {
8917 pub fn as_str(self) -> &'static str {
8918 use CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme::*;
8919 match self {
8920 InboundGoods => "inbound_goods",
8921 Standard => "standard",
8922 }
8923 }
8924}
8925
8926impl std::str::FromStr for CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme {
8927 type Err = stripe_types::StripeParseError;
8928 fn from_str(s: &str) -> Result<Self, Self::Err> {
8929 use CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme::*;
8930 match s {
8931 "inbound_goods" => Ok(InboundGoods),
8932 "standard" => Ok(Standard),
8933 _ => Err(stripe_types::StripeParseError),
8934 }
8935 }
8936}
8937impl std::fmt::Display for CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme {
8938 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8939 f.write_str(self.as_str())
8940 }
8941}
8942
8943impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme {
8944 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8945 f.write_str(self.as_str())
8946 }
8947}
8948impl serde::Serialize for CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme {
8949 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
8950 where
8951 S: serde::Serializer,
8952 {
8953 serializer.serialize_str(self.as_str())
8954 }
8955}
8956#[cfg(feature = "deserialize")]
8957impl<'de> serde::Deserialize<'de>
8958 for CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme
8959{
8960 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
8961 use std::str::FromStr;
8962 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
8963 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsOmStandardPlaceOfSupplyScheme"))
8964 }
8965}
8966#[derive(Copy, Clone, Eq, PartialEq)]
8968pub enum CreateTaxRegistrationCountryOptionsOmType {
8969 Standard,
8970}
8971impl CreateTaxRegistrationCountryOptionsOmType {
8972 pub fn as_str(self) -> &'static str {
8973 use CreateTaxRegistrationCountryOptionsOmType::*;
8974 match self {
8975 Standard => "standard",
8976 }
8977 }
8978}
8979
8980impl std::str::FromStr for CreateTaxRegistrationCountryOptionsOmType {
8981 type Err = stripe_types::StripeParseError;
8982 fn from_str(s: &str) -> Result<Self, Self::Err> {
8983 use CreateTaxRegistrationCountryOptionsOmType::*;
8984 match s {
8985 "standard" => Ok(Standard),
8986 _ => Err(stripe_types::StripeParseError),
8987 }
8988 }
8989}
8990impl std::fmt::Display for CreateTaxRegistrationCountryOptionsOmType {
8991 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8992 f.write_str(self.as_str())
8993 }
8994}
8995
8996impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsOmType {
8997 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8998 f.write_str(self.as_str())
8999 }
9000}
9001impl serde::Serialize for CreateTaxRegistrationCountryOptionsOmType {
9002 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9003 where
9004 S: serde::Serializer,
9005 {
9006 serializer.serialize_str(self.as_str())
9007 }
9008}
9009#[cfg(feature = "deserialize")]
9010impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsOmType {
9011 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9012 use std::str::FromStr;
9013 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9014 Self::from_str(&s).map_err(|_| {
9015 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsOmType")
9016 })
9017 }
9018}
9019#[derive(Copy, Clone, Debug, serde::Serialize)]
9021pub struct CreateTaxRegistrationCountryOptionsPe {
9022 #[serde(rename = "type")]
9024 pub type_: CreateTaxRegistrationCountryOptionsPeType,
9025}
9026impl CreateTaxRegistrationCountryOptionsPe {
9027 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsPeType>) -> Self {
9028 Self { type_: type_.into() }
9029 }
9030}
9031#[derive(Copy, Clone, Eq, PartialEq)]
9033pub enum CreateTaxRegistrationCountryOptionsPeType {
9034 Simplified,
9035}
9036impl CreateTaxRegistrationCountryOptionsPeType {
9037 pub fn as_str(self) -> &'static str {
9038 use CreateTaxRegistrationCountryOptionsPeType::*;
9039 match self {
9040 Simplified => "simplified",
9041 }
9042 }
9043}
9044
9045impl std::str::FromStr for CreateTaxRegistrationCountryOptionsPeType {
9046 type Err = stripe_types::StripeParseError;
9047 fn from_str(s: &str) -> Result<Self, Self::Err> {
9048 use CreateTaxRegistrationCountryOptionsPeType::*;
9049 match s {
9050 "simplified" => Ok(Simplified),
9051 _ => Err(stripe_types::StripeParseError),
9052 }
9053 }
9054}
9055impl std::fmt::Display for CreateTaxRegistrationCountryOptionsPeType {
9056 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9057 f.write_str(self.as_str())
9058 }
9059}
9060
9061impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsPeType {
9062 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9063 f.write_str(self.as_str())
9064 }
9065}
9066impl serde::Serialize for CreateTaxRegistrationCountryOptionsPeType {
9067 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9068 where
9069 S: serde::Serializer,
9070 {
9071 serializer.serialize_str(self.as_str())
9072 }
9073}
9074#[cfg(feature = "deserialize")]
9075impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsPeType {
9076 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9077 use std::str::FromStr;
9078 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9079 Self::from_str(&s).map_err(|_| {
9080 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsPeType")
9081 })
9082 }
9083}
9084#[derive(Copy, Clone, Debug, serde::Serialize)]
9086pub struct CreateTaxRegistrationCountryOptionsPh {
9087 #[serde(rename = "type")]
9089 pub type_: CreateTaxRegistrationCountryOptionsPhType,
9090}
9091impl CreateTaxRegistrationCountryOptionsPh {
9092 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsPhType>) -> Self {
9093 Self { type_: type_.into() }
9094 }
9095}
9096#[derive(Copy, Clone, Eq, PartialEq)]
9098pub enum CreateTaxRegistrationCountryOptionsPhType {
9099 Simplified,
9100}
9101impl CreateTaxRegistrationCountryOptionsPhType {
9102 pub fn as_str(self) -> &'static str {
9103 use CreateTaxRegistrationCountryOptionsPhType::*;
9104 match self {
9105 Simplified => "simplified",
9106 }
9107 }
9108}
9109
9110impl std::str::FromStr for CreateTaxRegistrationCountryOptionsPhType {
9111 type Err = stripe_types::StripeParseError;
9112 fn from_str(s: &str) -> Result<Self, Self::Err> {
9113 use CreateTaxRegistrationCountryOptionsPhType::*;
9114 match s {
9115 "simplified" => Ok(Simplified),
9116 _ => Err(stripe_types::StripeParseError),
9117 }
9118 }
9119}
9120impl std::fmt::Display for CreateTaxRegistrationCountryOptionsPhType {
9121 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9122 f.write_str(self.as_str())
9123 }
9124}
9125
9126impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsPhType {
9127 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9128 f.write_str(self.as_str())
9129 }
9130}
9131impl serde::Serialize for CreateTaxRegistrationCountryOptionsPhType {
9132 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9133 where
9134 S: serde::Serializer,
9135 {
9136 serializer.serialize_str(self.as_str())
9137 }
9138}
9139#[cfg(feature = "deserialize")]
9140impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsPhType {
9141 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9142 use std::str::FromStr;
9143 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9144 Self::from_str(&s).map_err(|_| {
9145 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsPhType")
9146 })
9147 }
9148}
9149#[derive(Copy, Clone, Debug, serde::Serialize)]
9151pub struct CreateTaxRegistrationCountryOptionsPl {
9152 #[serde(skip_serializing_if = "Option::is_none")]
9154 pub standard: Option<CreateTaxRegistrationCountryOptionsPlStandard>,
9155 #[serde(rename = "type")]
9157 pub type_: CreateTaxRegistrationCountryOptionsPlType,
9158}
9159impl CreateTaxRegistrationCountryOptionsPl {
9160 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsPlType>) -> Self {
9161 Self { standard: None, type_: type_.into() }
9162 }
9163}
9164#[derive(Copy, Clone, Debug, serde::Serialize)]
9166pub struct CreateTaxRegistrationCountryOptionsPlStandard {
9167 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme,
9169}
9170impl CreateTaxRegistrationCountryOptionsPlStandard {
9171 pub fn new(
9172 place_of_supply_scheme: impl Into<
9173 CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme,
9174 >,
9175 ) -> Self {
9176 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
9177 }
9178}
9179#[derive(Copy, Clone, Eq, PartialEq)]
9181pub enum CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme {
9182 InboundGoods,
9183 SmallSeller,
9184 Standard,
9185}
9186impl CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme {
9187 pub fn as_str(self) -> &'static str {
9188 use CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme::*;
9189 match self {
9190 InboundGoods => "inbound_goods",
9191 SmallSeller => "small_seller",
9192 Standard => "standard",
9193 }
9194 }
9195}
9196
9197impl std::str::FromStr for CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme {
9198 type Err = stripe_types::StripeParseError;
9199 fn from_str(s: &str) -> Result<Self, Self::Err> {
9200 use CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme::*;
9201 match s {
9202 "inbound_goods" => Ok(InboundGoods),
9203 "small_seller" => Ok(SmallSeller),
9204 "standard" => Ok(Standard),
9205 _ => Err(stripe_types::StripeParseError),
9206 }
9207 }
9208}
9209impl std::fmt::Display for CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme {
9210 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9211 f.write_str(self.as_str())
9212 }
9213}
9214
9215impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme {
9216 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9217 f.write_str(self.as_str())
9218 }
9219}
9220impl serde::Serialize for CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme {
9221 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9222 where
9223 S: serde::Serializer,
9224 {
9225 serializer.serialize_str(self.as_str())
9226 }
9227}
9228#[cfg(feature = "deserialize")]
9229impl<'de> serde::Deserialize<'de>
9230 for CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme
9231{
9232 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9233 use std::str::FromStr;
9234 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9235 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme"))
9236 }
9237}
9238#[derive(Copy, Clone, Eq, PartialEq)]
9240pub enum CreateTaxRegistrationCountryOptionsPlType {
9241 Ioss,
9242 OssNonUnion,
9243 OssUnion,
9244 Standard,
9245}
9246impl CreateTaxRegistrationCountryOptionsPlType {
9247 pub fn as_str(self) -> &'static str {
9248 use CreateTaxRegistrationCountryOptionsPlType::*;
9249 match self {
9250 Ioss => "ioss",
9251 OssNonUnion => "oss_non_union",
9252 OssUnion => "oss_union",
9253 Standard => "standard",
9254 }
9255 }
9256}
9257
9258impl std::str::FromStr for CreateTaxRegistrationCountryOptionsPlType {
9259 type Err = stripe_types::StripeParseError;
9260 fn from_str(s: &str) -> Result<Self, Self::Err> {
9261 use CreateTaxRegistrationCountryOptionsPlType::*;
9262 match s {
9263 "ioss" => Ok(Ioss),
9264 "oss_non_union" => Ok(OssNonUnion),
9265 "oss_union" => Ok(OssUnion),
9266 "standard" => Ok(Standard),
9267 _ => Err(stripe_types::StripeParseError),
9268 }
9269 }
9270}
9271impl std::fmt::Display for CreateTaxRegistrationCountryOptionsPlType {
9272 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9273 f.write_str(self.as_str())
9274 }
9275}
9276
9277impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsPlType {
9278 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9279 f.write_str(self.as_str())
9280 }
9281}
9282impl serde::Serialize for CreateTaxRegistrationCountryOptionsPlType {
9283 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9284 where
9285 S: serde::Serializer,
9286 {
9287 serializer.serialize_str(self.as_str())
9288 }
9289}
9290#[cfg(feature = "deserialize")]
9291impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsPlType {
9292 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9293 use std::str::FromStr;
9294 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9295 Self::from_str(&s).map_err(|_| {
9296 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsPlType")
9297 })
9298 }
9299}
9300#[derive(Copy, Clone, Debug, serde::Serialize)]
9302pub struct CreateTaxRegistrationCountryOptionsPt {
9303 #[serde(skip_serializing_if = "Option::is_none")]
9305 pub standard: Option<CreateTaxRegistrationCountryOptionsPtStandard>,
9306 #[serde(rename = "type")]
9308 pub type_: CreateTaxRegistrationCountryOptionsPtType,
9309}
9310impl CreateTaxRegistrationCountryOptionsPt {
9311 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsPtType>) -> Self {
9312 Self { standard: None, type_: type_.into() }
9313 }
9314}
9315#[derive(Copy, Clone, Debug, serde::Serialize)]
9317pub struct CreateTaxRegistrationCountryOptionsPtStandard {
9318 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme,
9320}
9321impl CreateTaxRegistrationCountryOptionsPtStandard {
9322 pub fn new(
9323 place_of_supply_scheme: impl Into<
9324 CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme,
9325 >,
9326 ) -> Self {
9327 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
9328 }
9329}
9330#[derive(Copy, Clone, Eq, PartialEq)]
9332pub enum CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme {
9333 InboundGoods,
9334 SmallSeller,
9335 Standard,
9336}
9337impl CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme {
9338 pub fn as_str(self) -> &'static str {
9339 use CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme::*;
9340 match self {
9341 InboundGoods => "inbound_goods",
9342 SmallSeller => "small_seller",
9343 Standard => "standard",
9344 }
9345 }
9346}
9347
9348impl std::str::FromStr for CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme {
9349 type Err = stripe_types::StripeParseError;
9350 fn from_str(s: &str) -> Result<Self, Self::Err> {
9351 use CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme::*;
9352 match s {
9353 "inbound_goods" => Ok(InboundGoods),
9354 "small_seller" => Ok(SmallSeller),
9355 "standard" => Ok(Standard),
9356 _ => Err(stripe_types::StripeParseError),
9357 }
9358 }
9359}
9360impl std::fmt::Display for CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme {
9361 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9362 f.write_str(self.as_str())
9363 }
9364}
9365
9366impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme {
9367 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9368 f.write_str(self.as_str())
9369 }
9370}
9371impl serde::Serialize for CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme {
9372 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9373 where
9374 S: serde::Serializer,
9375 {
9376 serializer.serialize_str(self.as_str())
9377 }
9378}
9379#[cfg(feature = "deserialize")]
9380impl<'de> serde::Deserialize<'de>
9381 for CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme
9382{
9383 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9384 use std::str::FromStr;
9385 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9386 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme"))
9387 }
9388}
9389#[derive(Copy, Clone, Eq, PartialEq)]
9391pub enum CreateTaxRegistrationCountryOptionsPtType {
9392 Ioss,
9393 OssNonUnion,
9394 OssUnion,
9395 Standard,
9396}
9397impl CreateTaxRegistrationCountryOptionsPtType {
9398 pub fn as_str(self) -> &'static str {
9399 use CreateTaxRegistrationCountryOptionsPtType::*;
9400 match self {
9401 Ioss => "ioss",
9402 OssNonUnion => "oss_non_union",
9403 OssUnion => "oss_union",
9404 Standard => "standard",
9405 }
9406 }
9407}
9408
9409impl std::str::FromStr for CreateTaxRegistrationCountryOptionsPtType {
9410 type Err = stripe_types::StripeParseError;
9411 fn from_str(s: &str) -> Result<Self, Self::Err> {
9412 use CreateTaxRegistrationCountryOptionsPtType::*;
9413 match s {
9414 "ioss" => Ok(Ioss),
9415 "oss_non_union" => Ok(OssNonUnion),
9416 "oss_union" => Ok(OssUnion),
9417 "standard" => Ok(Standard),
9418 _ => Err(stripe_types::StripeParseError),
9419 }
9420 }
9421}
9422impl std::fmt::Display for CreateTaxRegistrationCountryOptionsPtType {
9423 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9424 f.write_str(self.as_str())
9425 }
9426}
9427
9428impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsPtType {
9429 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9430 f.write_str(self.as_str())
9431 }
9432}
9433impl serde::Serialize for CreateTaxRegistrationCountryOptionsPtType {
9434 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9435 where
9436 S: serde::Serializer,
9437 {
9438 serializer.serialize_str(self.as_str())
9439 }
9440}
9441#[cfg(feature = "deserialize")]
9442impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsPtType {
9443 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9444 use std::str::FromStr;
9445 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9446 Self::from_str(&s).map_err(|_| {
9447 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsPtType")
9448 })
9449 }
9450}
9451#[derive(Copy, Clone, Debug, serde::Serialize)]
9453pub struct CreateTaxRegistrationCountryOptionsRo {
9454 #[serde(skip_serializing_if = "Option::is_none")]
9456 pub standard: Option<CreateTaxRegistrationCountryOptionsRoStandard>,
9457 #[serde(rename = "type")]
9459 pub type_: CreateTaxRegistrationCountryOptionsRoType,
9460}
9461impl CreateTaxRegistrationCountryOptionsRo {
9462 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsRoType>) -> Self {
9463 Self { standard: None, type_: type_.into() }
9464 }
9465}
9466#[derive(Copy, Clone, Debug, serde::Serialize)]
9468pub struct CreateTaxRegistrationCountryOptionsRoStandard {
9469 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme,
9471}
9472impl CreateTaxRegistrationCountryOptionsRoStandard {
9473 pub fn new(
9474 place_of_supply_scheme: impl Into<
9475 CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme,
9476 >,
9477 ) -> Self {
9478 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
9479 }
9480}
9481#[derive(Copy, Clone, Eq, PartialEq)]
9483pub enum CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme {
9484 InboundGoods,
9485 SmallSeller,
9486 Standard,
9487}
9488impl CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme {
9489 pub fn as_str(self) -> &'static str {
9490 use CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme::*;
9491 match self {
9492 InboundGoods => "inbound_goods",
9493 SmallSeller => "small_seller",
9494 Standard => "standard",
9495 }
9496 }
9497}
9498
9499impl std::str::FromStr for CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme {
9500 type Err = stripe_types::StripeParseError;
9501 fn from_str(s: &str) -> Result<Self, Self::Err> {
9502 use CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme::*;
9503 match s {
9504 "inbound_goods" => Ok(InboundGoods),
9505 "small_seller" => Ok(SmallSeller),
9506 "standard" => Ok(Standard),
9507 _ => Err(stripe_types::StripeParseError),
9508 }
9509 }
9510}
9511impl std::fmt::Display for CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme {
9512 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9513 f.write_str(self.as_str())
9514 }
9515}
9516
9517impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme {
9518 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9519 f.write_str(self.as_str())
9520 }
9521}
9522impl serde::Serialize for CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme {
9523 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9524 where
9525 S: serde::Serializer,
9526 {
9527 serializer.serialize_str(self.as_str())
9528 }
9529}
9530#[cfg(feature = "deserialize")]
9531impl<'de> serde::Deserialize<'de>
9532 for CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme
9533{
9534 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9535 use std::str::FromStr;
9536 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9537 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme"))
9538 }
9539}
9540#[derive(Copy, Clone, Eq, PartialEq)]
9542pub enum CreateTaxRegistrationCountryOptionsRoType {
9543 Ioss,
9544 OssNonUnion,
9545 OssUnion,
9546 Standard,
9547}
9548impl CreateTaxRegistrationCountryOptionsRoType {
9549 pub fn as_str(self) -> &'static str {
9550 use CreateTaxRegistrationCountryOptionsRoType::*;
9551 match self {
9552 Ioss => "ioss",
9553 OssNonUnion => "oss_non_union",
9554 OssUnion => "oss_union",
9555 Standard => "standard",
9556 }
9557 }
9558}
9559
9560impl std::str::FromStr for CreateTaxRegistrationCountryOptionsRoType {
9561 type Err = stripe_types::StripeParseError;
9562 fn from_str(s: &str) -> Result<Self, Self::Err> {
9563 use CreateTaxRegistrationCountryOptionsRoType::*;
9564 match s {
9565 "ioss" => Ok(Ioss),
9566 "oss_non_union" => Ok(OssNonUnion),
9567 "oss_union" => Ok(OssUnion),
9568 "standard" => Ok(Standard),
9569 _ => Err(stripe_types::StripeParseError),
9570 }
9571 }
9572}
9573impl std::fmt::Display for CreateTaxRegistrationCountryOptionsRoType {
9574 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9575 f.write_str(self.as_str())
9576 }
9577}
9578
9579impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsRoType {
9580 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9581 f.write_str(self.as_str())
9582 }
9583}
9584impl serde::Serialize for CreateTaxRegistrationCountryOptionsRoType {
9585 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9586 where
9587 S: serde::Serializer,
9588 {
9589 serializer.serialize_str(self.as_str())
9590 }
9591}
9592#[cfg(feature = "deserialize")]
9593impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsRoType {
9594 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9595 use std::str::FromStr;
9596 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9597 Self::from_str(&s).map_err(|_| {
9598 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsRoType")
9599 })
9600 }
9601}
9602#[derive(Copy, Clone, Debug, serde::Serialize)]
9604pub struct CreateTaxRegistrationCountryOptionsRs {
9605 #[serde(skip_serializing_if = "Option::is_none")]
9607 pub standard: Option<CreateTaxRegistrationCountryOptionsRsStandard>,
9608 #[serde(rename = "type")]
9610 pub type_: CreateTaxRegistrationCountryOptionsRsType,
9611}
9612impl CreateTaxRegistrationCountryOptionsRs {
9613 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsRsType>) -> Self {
9614 Self { standard: None, type_: type_.into() }
9615 }
9616}
9617#[derive(Copy, Clone, Debug, serde::Serialize)]
9619pub struct CreateTaxRegistrationCountryOptionsRsStandard {
9620 #[serde(skip_serializing_if = "Option::is_none")]
9622 pub place_of_supply_scheme:
9623 Option<CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme>,
9624}
9625impl CreateTaxRegistrationCountryOptionsRsStandard {
9626 pub fn new() -> Self {
9627 Self { place_of_supply_scheme: None }
9628 }
9629}
9630impl Default for CreateTaxRegistrationCountryOptionsRsStandard {
9631 fn default() -> Self {
9632 Self::new()
9633 }
9634}
9635#[derive(Copy, Clone, Eq, PartialEq)]
9637pub enum CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme {
9638 InboundGoods,
9639 Standard,
9640}
9641impl CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme {
9642 pub fn as_str(self) -> &'static str {
9643 use CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme::*;
9644 match self {
9645 InboundGoods => "inbound_goods",
9646 Standard => "standard",
9647 }
9648 }
9649}
9650
9651impl std::str::FromStr for CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme {
9652 type Err = stripe_types::StripeParseError;
9653 fn from_str(s: &str) -> Result<Self, Self::Err> {
9654 use CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme::*;
9655 match s {
9656 "inbound_goods" => Ok(InboundGoods),
9657 "standard" => Ok(Standard),
9658 _ => Err(stripe_types::StripeParseError),
9659 }
9660 }
9661}
9662impl std::fmt::Display for CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme {
9663 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9664 f.write_str(self.as_str())
9665 }
9666}
9667
9668impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme {
9669 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9670 f.write_str(self.as_str())
9671 }
9672}
9673impl serde::Serialize for CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme {
9674 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9675 where
9676 S: serde::Serializer,
9677 {
9678 serializer.serialize_str(self.as_str())
9679 }
9680}
9681#[cfg(feature = "deserialize")]
9682impl<'de> serde::Deserialize<'de>
9683 for CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme
9684{
9685 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9686 use std::str::FromStr;
9687 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9688 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsRsStandardPlaceOfSupplyScheme"))
9689 }
9690}
9691#[derive(Copy, Clone, Eq, PartialEq)]
9693pub enum CreateTaxRegistrationCountryOptionsRsType {
9694 Standard,
9695}
9696impl CreateTaxRegistrationCountryOptionsRsType {
9697 pub fn as_str(self) -> &'static str {
9698 use CreateTaxRegistrationCountryOptionsRsType::*;
9699 match self {
9700 Standard => "standard",
9701 }
9702 }
9703}
9704
9705impl std::str::FromStr for CreateTaxRegistrationCountryOptionsRsType {
9706 type Err = stripe_types::StripeParseError;
9707 fn from_str(s: &str) -> Result<Self, Self::Err> {
9708 use CreateTaxRegistrationCountryOptionsRsType::*;
9709 match s {
9710 "standard" => Ok(Standard),
9711 _ => Err(stripe_types::StripeParseError),
9712 }
9713 }
9714}
9715impl std::fmt::Display for CreateTaxRegistrationCountryOptionsRsType {
9716 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9717 f.write_str(self.as_str())
9718 }
9719}
9720
9721impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsRsType {
9722 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9723 f.write_str(self.as_str())
9724 }
9725}
9726impl serde::Serialize for CreateTaxRegistrationCountryOptionsRsType {
9727 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9728 where
9729 S: serde::Serializer,
9730 {
9731 serializer.serialize_str(self.as_str())
9732 }
9733}
9734#[cfg(feature = "deserialize")]
9735impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsRsType {
9736 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9737 use std::str::FromStr;
9738 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9739 Self::from_str(&s).map_err(|_| {
9740 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsRsType")
9741 })
9742 }
9743}
9744#[derive(Copy, Clone, Debug, serde::Serialize)]
9746pub struct CreateTaxRegistrationCountryOptionsRu {
9747 #[serde(rename = "type")]
9749 pub type_: CreateTaxRegistrationCountryOptionsRuType,
9750}
9751impl CreateTaxRegistrationCountryOptionsRu {
9752 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsRuType>) -> Self {
9753 Self { type_: type_.into() }
9754 }
9755}
9756#[derive(Copy, Clone, Eq, PartialEq)]
9758pub enum CreateTaxRegistrationCountryOptionsRuType {
9759 Simplified,
9760}
9761impl CreateTaxRegistrationCountryOptionsRuType {
9762 pub fn as_str(self) -> &'static str {
9763 use CreateTaxRegistrationCountryOptionsRuType::*;
9764 match self {
9765 Simplified => "simplified",
9766 }
9767 }
9768}
9769
9770impl std::str::FromStr for CreateTaxRegistrationCountryOptionsRuType {
9771 type Err = stripe_types::StripeParseError;
9772 fn from_str(s: &str) -> Result<Self, Self::Err> {
9773 use CreateTaxRegistrationCountryOptionsRuType::*;
9774 match s {
9775 "simplified" => Ok(Simplified),
9776 _ => Err(stripe_types::StripeParseError),
9777 }
9778 }
9779}
9780impl std::fmt::Display for CreateTaxRegistrationCountryOptionsRuType {
9781 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9782 f.write_str(self.as_str())
9783 }
9784}
9785
9786impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsRuType {
9787 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9788 f.write_str(self.as_str())
9789 }
9790}
9791impl serde::Serialize for CreateTaxRegistrationCountryOptionsRuType {
9792 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9793 where
9794 S: serde::Serializer,
9795 {
9796 serializer.serialize_str(self.as_str())
9797 }
9798}
9799#[cfg(feature = "deserialize")]
9800impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsRuType {
9801 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9802 use std::str::FromStr;
9803 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9804 Self::from_str(&s).map_err(|_| {
9805 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsRuType")
9806 })
9807 }
9808}
9809#[derive(Copy, Clone, Debug, serde::Serialize)]
9811pub struct CreateTaxRegistrationCountryOptionsSa {
9812 #[serde(rename = "type")]
9814 pub type_: CreateTaxRegistrationCountryOptionsSaType,
9815}
9816impl CreateTaxRegistrationCountryOptionsSa {
9817 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSaType>) -> Self {
9818 Self { type_: type_.into() }
9819 }
9820}
9821#[derive(Copy, Clone, Eq, PartialEq)]
9823pub enum CreateTaxRegistrationCountryOptionsSaType {
9824 Simplified,
9825}
9826impl CreateTaxRegistrationCountryOptionsSaType {
9827 pub fn as_str(self) -> &'static str {
9828 use CreateTaxRegistrationCountryOptionsSaType::*;
9829 match self {
9830 Simplified => "simplified",
9831 }
9832 }
9833}
9834
9835impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSaType {
9836 type Err = stripe_types::StripeParseError;
9837 fn from_str(s: &str) -> Result<Self, Self::Err> {
9838 use CreateTaxRegistrationCountryOptionsSaType::*;
9839 match s {
9840 "simplified" => Ok(Simplified),
9841 _ => Err(stripe_types::StripeParseError),
9842 }
9843 }
9844}
9845impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSaType {
9846 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9847 f.write_str(self.as_str())
9848 }
9849}
9850
9851impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSaType {
9852 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9853 f.write_str(self.as_str())
9854 }
9855}
9856impl serde::Serialize for CreateTaxRegistrationCountryOptionsSaType {
9857 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9858 where
9859 S: serde::Serializer,
9860 {
9861 serializer.serialize_str(self.as_str())
9862 }
9863}
9864#[cfg(feature = "deserialize")]
9865impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSaType {
9866 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9867 use std::str::FromStr;
9868 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9869 Self::from_str(&s).map_err(|_| {
9870 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSaType")
9871 })
9872 }
9873}
9874#[derive(Copy, Clone, Debug, serde::Serialize)]
9876pub struct CreateTaxRegistrationCountryOptionsSe {
9877 #[serde(skip_serializing_if = "Option::is_none")]
9879 pub standard: Option<CreateTaxRegistrationCountryOptionsSeStandard>,
9880 #[serde(rename = "type")]
9882 pub type_: CreateTaxRegistrationCountryOptionsSeType,
9883}
9884impl CreateTaxRegistrationCountryOptionsSe {
9885 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSeType>) -> Self {
9886 Self { standard: None, type_: type_.into() }
9887 }
9888}
9889#[derive(Copy, Clone, Debug, serde::Serialize)]
9891pub struct CreateTaxRegistrationCountryOptionsSeStandard {
9892 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme,
9894}
9895impl CreateTaxRegistrationCountryOptionsSeStandard {
9896 pub fn new(
9897 place_of_supply_scheme: impl Into<
9898 CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme,
9899 >,
9900 ) -> Self {
9901 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
9902 }
9903}
9904#[derive(Copy, Clone, Eq, PartialEq)]
9906pub enum CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme {
9907 InboundGoods,
9908 SmallSeller,
9909 Standard,
9910}
9911impl CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme {
9912 pub fn as_str(self) -> &'static str {
9913 use CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme::*;
9914 match self {
9915 InboundGoods => "inbound_goods",
9916 SmallSeller => "small_seller",
9917 Standard => "standard",
9918 }
9919 }
9920}
9921
9922impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme {
9923 type Err = stripe_types::StripeParseError;
9924 fn from_str(s: &str) -> Result<Self, Self::Err> {
9925 use CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme::*;
9926 match s {
9927 "inbound_goods" => Ok(InboundGoods),
9928 "small_seller" => Ok(SmallSeller),
9929 "standard" => Ok(Standard),
9930 _ => Err(stripe_types::StripeParseError),
9931 }
9932 }
9933}
9934impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme {
9935 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9936 f.write_str(self.as_str())
9937 }
9938}
9939
9940impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme {
9941 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9942 f.write_str(self.as_str())
9943 }
9944}
9945impl serde::Serialize for CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme {
9946 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
9947 where
9948 S: serde::Serializer,
9949 {
9950 serializer.serialize_str(self.as_str())
9951 }
9952}
9953#[cfg(feature = "deserialize")]
9954impl<'de> serde::Deserialize<'de>
9955 for CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme
9956{
9957 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
9958 use std::str::FromStr;
9959 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
9960 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme"))
9961 }
9962}
9963#[derive(Copy, Clone, Eq, PartialEq)]
9965pub enum CreateTaxRegistrationCountryOptionsSeType {
9966 Ioss,
9967 OssNonUnion,
9968 OssUnion,
9969 Standard,
9970}
9971impl CreateTaxRegistrationCountryOptionsSeType {
9972 pub fn as_str(self) -> &'static str {
9973 use CreateTaxRegistrationCountryOptionsSeType::*;
9974 match self {
9975 Ioss => "ioss",
9976 OssNonUnion => "oss_non_union",
9977 OssUnion => "oss_union",
9978 Standard => "standard",
9979 }
9980 }
9981}
9982
9983impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSeType {
9984 type Err = stripe_types::StripeParseError;
9985 fn from_str(s: &str) -> Result<Self, Self::Err> {
9986 use CreateTaxRegistrationCountryOptionsSeType::*;
9987 match s {
9988 "ioss" => Ok(Ioss),
9989 "oss_non_union" => Ok(OssNonUnion),
9990 "oss_union" => Ok(OssUnion),
9991 "standard" => Ok(Standard),
9992 _ => Err(stripe_types::StripeParseError),
9993 }
9994 }
9995}
9996impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSeType {
9997 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9998 f.write_str(self.as_str())
9999 }
10000}
10001
10002impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSeType {
10003 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10004 f.write_str(self.as_str())
10005 }
10006}
10007impl serde::Serialize for CreateTaxRegistrationCountryOptionsSeType {
10008 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10009 where
10010 S: serde::Serializer,
10011 {
10012 serializer.serialize_str(self.as_str())
10013 }
10014}
10015#[cfg(feature = "deserialize")]
10016impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSeType {
10017 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10018 use std::str::FromStr;
10019 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10020 Self::from_str(&s).map_err(|_| {
10021 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSeType")
10022 })
10023 }
10024}
10025#[derive(Copy, Clone, Debug, serde::Serialize)]
10027pub struct CreateTaxRegistrationCountryOptionsSg {
10028 #[serde(skip_serializing_if = "Option::is_none")]
10030 pub standard: Option<CreateTaxRegistrationCountryOptionsSgStandard>,
10031 #[serde(rename = "type")]
10033 pub type_: CreateTaxRegistrationCountryOptionsSgType,
10034}
10035impl CreateTaxRegistrationCountryOptionsSg {
10036 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSgType>) -> Self {
10037 Self { standard: None, type_: type_.into() }
10038 }
10039}
10040#[derive(Copy, Clone, Debug, serde::Serialize)]
10042pub struct CreateTaxRegistrationCountryOptionsSgStandard {
10043 #[serde(skip_serializing_if = "Option::is_none")]
10045 pub place_of_supply_scheme:
10046 Option<CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme>,
10047}
10048impl CreateTaxRegistrationCountryOptionsSgStandard {
10049 pub fn new() -> Self {
10050 Self { place_of_supply_scheme: None }
10051 }
10052}
10053impl Default for CreateTaxRegistrationCountryOptionsSgStandard {
10054 fn default() -> Self {
10055 Self::new()
10056 }
10057}
10058#[derive(Copy, Clone, Eq, PartialEq)]
10060pub enum CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme {
10061 InboundGoods,
10062 Standard,
10063}
10064impl CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme {
10065 pub fn as_str(self) -> &'static str {
10066 use CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme::*;
10067 match self {
10068 InboundGoods => "inbound_goods",
10069 Standard => "standard",
10070 }
10071 }
10072}
10073
10074impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme {
10075 type Err = stripe_types::StripeParseError;
10076 fn from_str(s: &str) -> Result<Self, Self::Err> {
10077 use CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme::*;
10078 match s {
10079 "inbound_goods" => Ok(InboundGoods),
10080 "standard" => Ok(Standard),
10081 _ => Err(stripe_types::StripeParseError),
10082 }
10083 }
10084}
10085impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme {
10086 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10087 f.write_str(self.as_str())
10088 }
10089}
10090
10091impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme {
10092 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10093 f.write_str(self.as_str())
10094 }
10095}
10096impl serde::Serialize for CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme {
10097 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10098 where
10099 S: serde::Serializer,
10100 {
10101 serializer.serialize_str(self.as_str())
10102 }
10103}
10104#[cfg(feature = "deserialize")]
10105impl<'de> serde::Deserialize<'de>
10106 for CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme
10107{
10108 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10109 use std::str::FromStr;
10110 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10111 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSgStandardPlaceOfSupplyScheme"))
10112 }
10113}
10114#[derive(Copy, Clone, Eq, PartialEq)]
10116pub enum CreateTaxRegistrationCountryOptionsSgType {
10117 Standard,
10118}
10119impl CreateTaxRegistrationCountryOptionsSgType {
10120 pub fn as_str(self) -> &'static str {
10121 use CreateTaxRegistrationCountryOptionsSgType::*;
10122 match self {
10123 Standard => "standard",
10124 }
10125 }
10126}
10127
10128impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSgType {
10129 type Err = stripe_types::StripeParseError;
10130 fn from_str(s: &str) -> Result<Self, Self::Err> {
10131 use CreateTaxRegistrationCountryOptionsSgType::*;
10132 match s {
10133 "standard" => Ok(Standard),
10134 _ => Err(stripe_types::StripeParseError),
10135 }
10136 }
10137}
10138impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSgType {
10139 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10140 f.write_str(self.as_str())
10141 }
10142}
10143
10144impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSgType {
10145 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10146 f.write_str(self.as_str())
10147 }
10148}
10149impl serde::Serialize for CreateTaxRegistrationCountryOptionsSgType {
10150 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10151 where
10152 S: serde::Serializer,
10153 {
10154 serializer.serialize_str(self.as_str())
10155 }
10156}
10157#[cfg(feature = "deserialize")]
10158impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSgType {
10159 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10160 use std::str::FromStr;
10161 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10162 Self::from_str(&s).map_err(|_| {
10163 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSgType")
10164 })
10165 }
10166}
10167#[derive(Copy, Clone, Debug, serde::Serialize)]
10169pub struct CreateTaxRegistrationCountryOptionsSi {
10170 #[serde(skip_serializing_if = "Option::is_none")]
10172 pub standard: Option<CreateTaxRegistrationCountryOptionsSiStandard>,
10173 #[serde(rename = "type")]
10175 pub type_: CreateTaxRegistrationCountryOptionsSiType,
10176}
10177impl CreateTaxRegistrationCountryOptionsSi {
10178 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSiType>) -> Self {
10179 Self { standard: None, type_: type_.into() }
10180 }
10181}
10182#[derive(Copy, Clone, Debug, serde::Serialize)]
10184pub struct CreateTaxRegistrationCountryOptionsSiStandard {
10185 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme,
10187}
10188impl CreateTaxRegistrationCountryOptionsSiStandard {
10189 pub fn new(
10190 place_of_supply_scheme: impl Into<
10191 CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme,
10192 >,
10193 ) -> Self {
10194 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
10195 }
10196}
10197#[derive(Copy, Clone, Eq, PartialEq)]
10199pub enum CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme {
10200 InboundGoods,
10201 SmallSeller,
10202 Standard,
10203}
10204impl CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme {
10205 pub fn as_str(self) -> &'static str {
10206 use CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme::*;
10207 match self {
10208 InboundGoods => "inbound_goods",
10209 SmallSeller => "small_seller",
10210 Standard => "standard",
10211 }
10212 }
10213}
10214
10215impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme {
10216 type Err = stripe_types::StripeParseError;
10217 fn from_str(s: &str) -> Result<Self, Self::Err> {
10218 use CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme::*;
10219 match s {
10220 "inbound_goods" => Ok(InboundGoods),
10221 "small_seller" => Ok(SmallSeller),
10222 "standard" => Ok(Standard),
10223 _ => Err(stripe_types::StripeParseError),
10224 }
10225 }
10226}
10227impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme {
10228 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10229 f.write_str(self.as_str())
10230 }
10231}
10232
10233impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme {
10234 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10235 f.write_str(self.as_str())
10236 }
10237}
10238impl serde::Serialize for CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme {
10239 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10240 where
10241 S: serde::Serializer,
10242 {
10243 serializer.serialize_str(self.as_str())
10244 }
10245}
10246#[cfg(feature = "deserialize")]
10247impl<'de> serde::Deserialize<'de>
10248 for CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme
10249{
10250 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10251 use std::str::FromStr;
10252 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10253 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme"))
10254 }
10255}
10256#[derive(Copy, Clone, Eq, PartialEq)]
10258pub enum CreateTaxRegistrationCountryOptionsSiType {
10259 Ioss,
10260 OssNonUnion,
10261 OssUnion,
10262 Standard,
10263}
10264impl CreateTaxRegistrationCountryOptionsSiType {
10265 pub fn as_str(self) -> &'static str {
10266 use CreateTaxRegistrationCountryOptionsSiType::*;
10267 match self {
10268 Ioss => "ioss",
10269 OssNonUnion => "oss_non_union",
10270 OssUnion => "oss_union",
10271 Standard => "standard",
10272 }
10273 }
10274}
10275
10276impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSiType {
10277 type Err = stripe_types::StripeParseError;
10278 fn from_str(s: &str) -> Result<Self, Self::Err> {
10279 use CreateTaxRegistrationCountryOptionsSiType::*;
10280 match s {
10281 "ioss" => Ok(Ioss),
10282 "oss_non_union" => Ok(OssNonUnion),
10283 "oss_union" => Ok(OssUnion),
10284 "standard" => Ok(Standard),
10285 _ => Err(stripe_types::StripeParseError),
10286 }
10287 }
10288}
10289impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSiType {
10290 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10291 f.write_str(self.as_str())
10292 }
10293}
10294
10295impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSiType {
10296 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10297 f.write_str(self.as_str())
10298 }
10299}
10300impl serde::Serialize for CreateTaxRegistrationCountryOptionsSiType {
10301 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10302 where
10303 S: serde::Serializer,
10304 {
10305 serializer.serialize_str(self.as_str())
10306 }
10307}
10308#[cfg(feature = "deserialize")]
10309impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSiType {
10310 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10311 use std::str::FromStr;
10312 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10313 Self::from_str(&s).map_err(|_| {
10314 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSiType")
10315 })
10316 }
10317}
10318#[derive(Copy, Clone, Debug, serde::Serialize)]
10320pub struct CreateTaxRegistrationCountryOptionsSk {
10321 #[serde(skip_serializing_if = "Option::is_none")]
10323 pub standard: Option<CreateTaxRegistrationCountryOptionsSkStandard>,
10324 #[serde(rename = "type")]
10326 pub type_: CreateTaxRegistrationCountryOptionsSkType,
10327}
10328impl CreateTaxRegistrationCountryOptionsSk {
10329 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSkType>) -> Self {
10330 Self { standard: None, type_: type_.into() }
10331 }
10332}
10333#[derive(Copy, Clone, Debug, serde::Serialize)]
10335pub struct CreateTaxRegistrationCountryOptionsSkStandard {
10336 pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme,
10338}
10339impl CreateTaxRegistrationCountryOptionsSkStandard {
10340 pub fn new(
10341 place_of_supply_scheme: impl Into<
10342 CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme,
10343 >,
10344 ) -> Self {
10345 Self { place_of_supply_scheme: place_of_supply_scheme.into() }
10346 }
10347}
10348#[derive(Copy, Clone, Eq, PartialEq)]
10350pub enum CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme {
10351 InboundGoods,
10352 SmallSeller,
10353 Standard,
10354}
10355impl CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme {
10356 pub fn as_str(self) -> &'static str {
10357 use CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme::*;
10358 match self {
10359 InboundGoods => "inbound_goods",
10360 SmallSeller => "small_seller",
10361 Standard => "standard",
10362 }
10363 }
10364}
10365
10366impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme {
10367 type Err = stripe_types::StripeParseError;
10368 fn from_str(s: &str) -> Result<Self, Self::Err> {
10369 use CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme::*;
10370 match s {
10371 "inbound_goods" => Ok(InboundGoods),
10372 "small_seller" => Ok(SmallSeller),
10373 "standard" => Ok(Standard),
10374 _ => Err(stripe_types::StripeParseError),
10375 }
10376 }
10377}
10378impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme {
10379 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10380 f.write_str(self.as_str())
10381 }
10382}
10383
10384impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme {
10385 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10386 f.write_str(self.as_str())
10387 }
10388}
10389impl serde::Serialize for CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme {
10390 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10391 where
10392 S: serde::Serializer,
10393 {
10394 serializer.serialize_str(self.as_str())
10395 }
10396}
10397#[cfg(feature = "deserialize")]
10398impl<'de> serde::Deserialize<'de>
10399 for CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme
10400{
10401 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10402 use std::str::FromStr;
10403 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10404 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme"))
10405 }
10406}
10407#[derive(Copy, Clone, Eq, PartialEq)]
10409pub enum CreateTaxRegistrationCountryOptionsSkType {
10410 Ioss,
10411 OssNonUnion,
10412 OssUnion,
10413 Standard,
10414}
10415impl CreateTaxRegistrationCountryOptionsSkType {
10416 pub fn as_str(self) -> &'static str {
10417 use CreateTaxRegistrationCountryOptionsSkType::*;
10418 match self {
10419 Ioss => "ioss",
10420 OssNonUnion => "oss_non_union",
10421 OssUnion => "oss_union",
10422 Standard => "standard",
10423 }
10424 }
10425}
10426
10427impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSkType {
10428 type Err = stripe_types::StripeParseError;
10429 fn from_str(s: &str) -> Result<Self, Self::Err> {
10430 use CreateTaxRegistrationCountryOptionsSkType::*;
10431 match s {
10432 "ioss" => Ok(Ioss),
10433 "oss_non_union" => Ok(OssNonUnion),
10434 "oss_union" => Ok(OssUnion),
10435 "standard" => Ok(Standard),
10436 _ => Err(stripe_types::StripeParseError),
10437 }
10438 }
10439}
10440impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSkType {
10441 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10442 f.write_str(self.as_str())
10443 }
10444}
10445
10446impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSkType {
10447 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10448 f.write_str(self.as_str())
10449 }
10450}
10451impl serde::Serialize for CreateTaxRegistrationCountryOptionsSkType {
10452 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10453 where
10454 S: serde::Serializer,
10455 {
10456 serializer.serialize_str(self.as_str())
10457 }
10458}
10459#[cfg(feature = "deserialize")]
10460impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSkType {
10461 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10462 use std::str::FromStr;
10463 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10464 Self::from_str(&s).map_err(|_| {
10465 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSkType")
10466 })
10467 }
10468}
10469#[derive(Copy, Clone, Debug, serde::Serialize)]
10471pub struct CreateTaxRegistrationCountryOptionsSn {
10472 #[serde(rename = "type")]
10474 pub type_: CreateTaxRegistrationCountryOptionsSnType,
10475}
10476impl CreateTaxRegistrationCountryOptionsSn {
10477 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSnType>) -> Self {
10478 Self { type_: type_.into() }
10479 }
10480}
10481#[derive(Copy, Clone, Eq, PartialEq)]
10483pub enum CreateTaxRegistrationCountryOptionsSnType {
10484 Simplified,
10485}
10486impl CreateTaxRegistrationCountryOptionsSnType {
10487 pub fn as_str(self) -> &'static str {
10488 use CreateTaxRegistrationCountryOptionsSnType::*;
10489 match self {
10490 Simplified => "simplified",
10491 }
10492 }
10493}
10494
10495impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSnType {
10496 type Err = stripe_types::StripeParseError;
10497 fn from_str(s: &str) -> Result<Self, Self::Err> {
10498 use CreateTaxRegistrationCountryOptionsSnType::*;
10499 match s {
10500 "simplified" => Ok(Simplified),
10501 _ => Err(stripe_types::StripeParseError),
10502 }
10503 }
10504}
10505impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSnType {
10506 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10507 f.write_str(self.as_str())
10508 }
10509}
10510
10511impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSnType {
10512 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10513 f.write_str(self.as_str())
10514 }
10515}
10516impl serde::Serialize for CreateTaxRegistrationCountryOptionsSnType {
10517 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10518 where
10519 S: serde::Serializer,
10520 {
10521 serializer.serialize_str(self.as_str())
10522 }
10523}
10524#[cfg(feature = "deserialize")]
10525impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSnType {
10526 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10527 use std::str::FromStr;
10528 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10529 Self::from_str(&s).map_err(|_| {
10530 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSnType")
10531 })
10532 }
10533}
10534#[derive(Copy, Clone, Debug, serde::Serialize)]
10536pub struct CreateTaxRegistrationCountryOptionsSr {
10537 #[serde(skip_serializing_if = "Option::is_none")]
10539 pub standard: Option<CreateTaxRegistrationCountryOptionsSrStandard>,
10540 #[serde(rename = "type")]
10542 pub type_: CreateTaxRegistrationCountryOptionsSrType,
10543}
10544impl CreateTaxRegistrationCountryOptionsSr {
10545 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsSrType>) -> Self {
10546 Self { standard: None, type_: type_.into() }
10547 }
10548}
10549#[derive(Copy, Clone, Debug, serde::Serialize)]
10551pub struct CreateTaxRegistrationCountryOptionsSrStandard {
10552 #[serde(skip_serializing_if = "Option::is_none")]
10554 pub place_of_supply_scheme:
10555 Option<CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme>,
10556}
10557impl CreateTaxRegistrationCountryOptionsSrStandard {
10558 pub fn new() -> Self {
10559 Self { place_of_supply_scheme: None }
10560 }
10561}
10562impl Default for CreateTaxRegistrationCountryOptionsSrStandard {
10563 fn default() -> Self {
10564 Self::new()
10565 }
10566}
10567#[derive(Copy, Clone, Eq, PartialEq)]
10569pub enum CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme {
10570 InboundGoods,
10571 Standard,
10572}
10573impl CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme {
10574 pub fn as_str(self) -> &'static str {
10575 use CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme::*;
10576 match self {
10577 InboundGoods => "inbound_goods",
10578 Standard => "standard",
10579 }
10580 }
10581}
10582
10583impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme {
10584 type Err = stripe_types::StripeParseError;
10585 fn from_str(s: &str) -> Result<Self, Self::Err> {
10586 use CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme::*;
10587 match s {
10588 "inbound_goods" => Ok(InboundGoods),
10589 "standard" => Ok(Standard),
10590 _ => Err(stripe_types::StripeParseError),
10591 }
10592 }
10593}
10594impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme {
10595 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10596 f.write_str(self.as_str())
10597 }
10598}
10599
10600impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme {
10601 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10602 f.write_str(self.as_str())
10603 }
10604}
10605impl serde::Serialize for CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme {
10606 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10607 where
10608 S: serde::Serializer,
10609 {
10610 serializer.serialize_str(self.as_str())
10611 }
10612}
10613#[cfg(feature = "deserialize")]
10614impl<'de> serde::Deserialize<'de>
10615 for CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme
10616{
10617 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10618 use std::str::FromStr;
10619 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10620 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSrStandardPlaceOfSupplyScheme"))
10621 }
10622}
10623#[derive(Copy, Clone, Eq, PartialEq)]
10625pub enum CreateTaxRegistrationCountryOptionsSrType {
10626 Standard,
10627}
10628impl CreateTaxRegistrationCountryOptionsSrType {
10629 pub fn as_str(self) -> &'static str {
10630 use CreateTaxRegistrationCountryOptionsSrType::*;
10631 match self {
10632 Standard => "standard",
10633 }
10634 }
10635}
10636
10637impl std::str::FromStr for CreateTaxRegistrationCountryOptionsSrType {
10638 type Err = stripe_types::StripeParseError;
10639 fn from_str(s: &str) -> Result<Self, Self::Err> {
10640 use CreateTaxRegistrationCountryOptionsSrType::*;
10641 match s {
10642 "standard" => Ok(Standard),
10643 _ => Err(stripe_types::StripeParseError),
10644 }
10645 }
10646}
10647impl std::fmt::Display for CreateTaxRegistrationCountryOptionsSrType {
10648 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10649 f.write_str(self.as_str())
10650 }
10651}
10652
10653impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsSrType {
10654 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10655 f.write_str(self.as_str())
10656 }
10657}
10658impl serde::Serialize for CreateTaxRegistrationCountryOptionsSrType {
10659 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10660 where
10661 S: serde::Serializer,
10662 {
10663 serializer.serialize_str(self.as_str())
10664 }
10665}
10666#[cfg(feature = "deserialize")]
10667impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSrType {
10668 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10669 use std::str::FromStr;
10670 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10671 Self::from_str(&s).map_err(|_| {
10672 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsSrType")
10673 })
10674 }
10675}
10676#[derive(Copy, Clone, Debug, serde::Serialize)]
10678pub struct CreateTaxRegistrationCountryOptionsTh {
10679 #[serde(rename = "type")]
10681 pub type_: CreateTaxRegistrationCountryOptionsThType,
10682}
10683impl CreateTaxRegistrationCountryOptionsTh {
10684 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsThType>) -> Self {
10685 Self { type_: type_.into() }
10686 }
10687}
10688#[derive(Copy, Clone, Eq, PartialEq)]
10690pub enum CreateTaxRegistrationCountryOptionsThType {
10691 Simplified,
10692}
10693impl CreateTaxRegistrationCountryOptionsThType {
10694 pub fn as_str(self) -> &'static str {
10695 use CreateTaxRegistrationCountryOptionsThType::*;
10696 match self {
10697 Simplified => "simplified",
10698 }
10699 }
10700}
10701
10702impl std::str::FromStr for CreateTaxRegistrationCountryOptionsThType {
10703 type Err = stripe_types::StripeParseError;
10704 fn from_str(s: &str) -> Result<Self, Self::Err> {
10705 use CreateTaxRegistrationCountryOptionsThType::*;
10706 match s {
10707 "simplified" => Ok(Simplified),
10708 _ => Err(stripe_types::StripeParseError),
10709 }
10710 }
10711}
10712impl std::fmt::Display for CreateTaxRegistrationCountryOptionsThType {
10713 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10714 f.write_str(self.as_str())
10715 }
10716}
10717
10718impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsThType {
10719 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10720 f.write_str(self.as_str())
10721 }
10722}
10723impl serde::Serialize for CreateTaxRegistrationCountryOptionsThType {
10724 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10725 where
10726 S: serde::Serializer,
10727 {
10728 serializer.serialize_str(self.as_str())
10729 }
10730}
10731#[cfg(feature = "deserialize")]
10732impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsThType {
10733 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10734 use std::str::FromStr;
10735 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10736 Self::from_str(&s).map_err(|_| {
10737 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsThType")
10738 })
10739 }
10740}
10741#[derive(Copy, Clone, Debug, serde::Serialize)]
10743pub struct CreateTaxRegistrationCountryOptionsTj {
10744 #[serde(rename = "type")]
10746 pub type_: CreateTaxRegistrationCountryOptionsTjType,
10747}
10748impl CreateTaxRegistrationCountryOptionsTj {
10749 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsTjType>) -> Self {
10750 Self { type_: type_.into() }
10751 }
10752}
10753#[derive(Copy, Clone, Eq, PartialEq)]
10755pub enum CreateTaxRegistrationCountryOptionsTjType {
10756 Simplified,
10757}
10758impl CreateTaxRegistrationCountryOptionsTjType {
10759 pub fn as_str(self) -> &'static str {
10760 use CreateTaxRegistrationCountryOptionsTjType::*;
10761 match self {
10762 Simplified => "simplified",
10763 }
10764 }
10765}
10766
10767impl std::str::FromStr for CreateTaxRegistrationCountryOptionsTjType {
10768 type Err = stripe_types::StripeParseError;
10769 fn from_str(s: &str) -> Result<Self, Self::Err> {
10770 use CreateTaxRegistrationCountryOptionsTjType::*;
10771 match s {
10772 "simplified" => Ok(Simplified),
10773 _ => Err(stripe_types::StripeParseError),
10774 }
10775 }
10776}
10777impl std::fmt::Display for CreateTaxRegistrationCountryOptionsTjType {
10778 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10779 f.write_str(self.as_str())
10780 }
10781}
10782
10783impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsTjType {
10784 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10785 f.write_str(self.as_str())
10786 }
10787}
10788impl serde::Serialize for CreateTaxRegistrationCountryOptionsTjType {
10789 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10790 where
10791 S: serde::Serializer,
10792 {
10793 serializer.serialize_str(self.as_str())
10794 }
10795}
10796#[cfg(feature = "deserialize")]
10797impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsTjType {
10798 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10799 use std::str::FromStr;
10800 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10801 Self::from_str(&s).map_err(|_| {
10802 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsTjType")
10803 })
10804 }
10805}
10806#[derive(Copy, Clone, Debug, serde::Serialize)]
10808pub struct CreateTaxRegistrationCountryOptionsTr {
10809 #[serde(rename = "type")]
10811 pub type_: CreateTaxRegistrationCountryOptionsTrType,
10812}
10813impl CreateTaxRegistrationCountryOptionsTr {
10814 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsTrType>) -> Self {
10815 Self { type_: type_.into() }
10816 }
10817}
10818#[derive(Copy, Clone, Eq, PartialEq)]
10820pub enum CreateTaxRegistrationCountryOptionsTrType {
10821 Simplified,
10822}
10823impl CreateTaxRegistrationCountryOptionsTrType {
10824 pub fn as_str(self) -> &'static str {
10825 use CreateTaxRegistrationCountryOptionsTrType::*;
10826 match self {
10827 Simplified => "simplified",
10828 }
10829 }
10830}
10831
10832impl std::str::FromStr for CreateTaxRegistrationCountryOptionsTrType {
10833 type Err = stripe_types::StripeParseError;
10834 fn from_str(s: &str) -> Result<Self, Self::Err> {
10835 use CreateTaxRegistrationCountryOptionsTrType::*;
10836 match s {
10837 "simplified" => Ok(Simplified),
10838 _ => Err(stripe_types::StripeParseError),
10839 }
10840 }
10841}
10842impl std::fmt::Display for CreateTaxRegistrationCountryOptionsTrType {
10843 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10844 f.write_str(self.as_str())
10845 }
10846}
10847
10848impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsTrType {
10849 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10850 f.write_str(self.as_str())
10851 }
10852}
10853impl serde::Serialize for CreateTaxRegistrationCountryOptionsTrType {
10854 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10855 where
10856 S: serde::Serializer,
10857 {
10858 serializer.serialize_str(self.as_str())
10859 }
10860}
10861#[cfg(feature = "deserialize")]
10862impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsTrType {
10863 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10864 use std::str::FromStr;
10865 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10866 Self::from_str(&s).map_err(|_| {
10867 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsTrType")
10868 })
10869 }
10870}
10871#[derive(Copy, Clone, Debug, serde::Serialize)]
10873pub struct CreateTaxRegistrationCountryOptionsTw {
10874 #[serde(rename = "type")]
10876 pub type_: CreateTaxRegistrationCountryOptionsTwType,
10877}
10878impl CreateTaxRegistrationCountryOptionsTw {
10879 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsTwType>) -> Self {
10880 Self { type_: type_.into() }
10881 }
10882}
10883#[derive(Copy, Clone, Eq, PartialEq)]
10885pub enum CreateTaxRegistrationCountryOptionsTwType {
10886 Simplified,
10887}
10888impl CreateTaxRegistrationCountryOptionsTwType {
10889 pub fn as_str(self) -> &'static str {
10890 use CreateTaxRegistrationCountryOptionsTwType::*;
10891 match self {
10892 Simplified => "simplified",
10893 }
10894 }
10895}
10896
10897impl std::str::FromStr for CreateTaxRegistrationCountryOptionsTwType {
10898 type Err = stripe_types::StripeParseError;
10899 fn from_str(s: &str) -> Result<Self, Self::Err> {
10900 use CreateTaxRegistrationCountryOptionsTwType::*;
10901 match s {
10902 "simplified" => Ok(Simplified),
10903 _ => Err(stripe_types::StripeParseError),
10904 }
10905 }
10906}
10907impl std::fmt::Display for CreateTaxRegistrationCountryOptionsTwType {
10908 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10909 f.write_str(self.as_str())
10910 }
10911}
10912
10913impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsTwType {
10914 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10915 f.write_str(self.as_str())
10916 }
10917}
10918impl serde::Serialize for CreateTaxRegistrationCountryOptionsTwType {
10919 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10920 where
10921 S: serde::Serializer,
10922 {
10923 serializer.serialize_str(self.as_str())
10924 }
10925}
10926#[cfg(feature = "deserialize")]
10927impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsTwType {
10928 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10929 use std::str::FromStr;
10930 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10931 Self::from_str(&s).map_err(|_| {
10932 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsTwType")
10933 })
10934 }
10935}
10936#[derive(Copy, Clone, Debug, serde::Serialize)]
10938pub struct CreateTaxRegistrationCountryOptionsTz {
10939 #[serde(rename = "type")]
10941 pub type_: CreateTaxRegistrationCountryOptionsTzType,
10942}
10943impl CreateTaxRegistrationCountryOptionsTz {
10944 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsTzType>) -> Self {
10945 Self { type_: type_.into() }
10946 }
10947}
10948#[derive(Copy, Clone, Eq, PartialEq)]
10950pub enum CreateTaxRegistrationCountryOptionsTzType {
10951 Simplified,
10952}
10953impl CreateTaxRegistrationCountryOptionsTzType {
10954 pub fn as_str(self) -> &'static str {
10955 use CreateTaxRegistrationCountryOptionsTzType::*;
10956 match self {
10957 Simplified => "simplified",
10958 }
10959 }
10960}
10961
10962impl std::str::FromStr for CreateTaxRegistrationCountryOptionsTzType {
10963 type Err = stripe_types::StripeParseError;
10964 fn from_str(s: &str) -> Result<Self, Self::Err> {
10965 use CreateTaxRegistrationCountryOptionsTzType::*;
10966 match s {
10967 "simplified" => Ok(Simplified),
10968 _ => Err(stripe_types::StripeParseError),
10969 }
10970 }
10971}
10972impl std::fmt::Display for CreateTaxRegistrationCountryOptionsTzType {
10973 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10974 f.write_str(self.as_str())
10975 }
10976}
10977
10978impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsTzType {
10979 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10980 f.write_str(self.as_str())
10981 }
10982}
10983impl serde::Serialize for CreateTaxRegistrationCountryOptionsTzType {
10984 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10985 where
10986 S: serde::Serializer,
10987 {
10988 serializer.serialize_str(self.as_str())
10989 }
10990}
10991#[cfg(feature = "deserialize")]
10992impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsTzType {
10993 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10994 use std::str::FromStr;
10995 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
10996 Self::from_str(&s).map_err(|_| {
10997 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsTzType")
10998 })
10999 }
11000}
11001#[derive(Copy, Clone, Debug, serde::Serialize)]
11003pub struct CreateTaxRegistrationCountryOptionsUa {
11004 #[serde(rename = "type")]
11006 pub type_: CreateTaxRegistrationCountryOptionsUaType,
11007}
11008impl CreateTaxRegistrationCountryOptionsUa {
11009 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsUaType>) -> Self {
11010 Self { type_: type_.into() }
11011 }
11012}
11013#[derive(Copy, Clone, Eq, PartialEq)]
11015pub enum CreateTaxRegistrationCountryOptionsUaType {
11016 Simplified,
11017}
11018impl CreateTaxRegistrationCountryOptionsUaType {
11019 pub fn as_str(self) -> &'static str {
11020 use CreateTaxRegistrationCountryOptionsUaType::*;
11021 match self {
11022 Simplified => "simplified",
11023 }
11024 }
11025}
11026
11027impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUaType {
11028 type Err = stripe_types::StripeParseError;
11029 fn from_str(s: &str) -> Result<Self, Self::Err> {
11030 use CreateTaxRegistrationCountryOptionsUaType::*;
11031 match s {
11032 "simplified" => Ok(Simplified),
11033 _ => Err(stripe_types::StripeParseError),
11034 }
11035 }
11036}
11037impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUaType {
11038 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11039 f.write_str(self.as_str())
11040 }
11041}
11042
11043impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUaType {
11044 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11045 f.write_str(self.as_str())
11046 }
11047}
11048impl serde::Serialize for CreateTaxRegistrationCountryOptionsUaType {
11049 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11050 where
11051 S: serde::Serializer,
11052 {
11053 serializer.serialize_str(self.as_str())
11054 }
11055}
11056#[cfg(feature = "deserialize")]
11057impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsUaType {
11058 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11059 use std::str::FromStr;
11060 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11061 Self::from_str(&s).map_err(|_| {
11062 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsUaType")
11063 })
11064 }
11065}
11066#[derive(Copy, Clone, Debug, serde::Serialize)]
11068pub struct CreateTaxRegistrationCountryOptionsUg {
11069 #[serde(rename = "type")]
11071 pub type_: CreateTaxRegistrationCountryOptionsUgType,
11072}
11073impl CreateTaxRegistrationCountryOptionsUg {
11074 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsUgType>) -> Self {
11075 Self { type_: type_.into() }
11076 }
11077}
11078#[derive(Copy, Clone, Eq, PartialEq)]
11080pub enum CreateTaxRegistrationCountryOptionsUgType {
11081 Simplified,
11082}
11083impl CreateTaxRegistrationCountryOptionsUgType {
11084 pub fn as_str(self) -> &'static str {
11085 use CreateTaxRegistrationCountryOptionsUgType::*;
11086 match self {
11087 Simplified => "simplified",
11088 }
11089 }
11090}
11091
11092impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUgType {
11093 type Err = stripe_types::StripeParseError;
11094 fn from_str(s: &str) -> Result<Self, Self::Err> {
11095 use CreateTaxRegistrationCountryOptionsUgType::*;
11096 match s {
11097 "simplified" => Ok(Simplified),
11098 _ => Err(stripe_types::StripeParseError),
11099 }
11100 }
11101}
11102impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUgType {
11103 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11104 f.write_str(self.as_str())
11105 }
11106}
11107
11108impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUgType {
11109 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11110 f.write_str(self.as_str())
11111 }
11112}
11113impl serde::Serialize for CreateTaxRegistrationCountryOptionsUgType {
11114 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11115 where
11116 S: serde::Serializer,
11117 {
11118 serializer.serialize_str(self.as_str())
11119 }
11120}
11121#[cfg(feature = "deserialize")]
11122impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsUgType {
11123 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11124 use std::str::FromStr;
11125 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11126 Self::from_str(&s).map_err(|_| {
11127 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsUgType")
11128 })
11129 }
11130}
11131#[derive(Clone, Debug, serde::Serialize)]
11133pub struct CreateTaxRegistrationCountryOptionsUs {
11134 #[serde(skip_serializing_if = "Option::is_none")]
11136 pub local_amusement_tax: Option<CreateTaxRegistrationCountryOptionsUsLocalAmusementTax>,
11137 #[serde(skip_serializing_if = "Option::is_none")]
11139 pub local_lease_tax: Option<CreateTaxRegistrationCountryOptionsUsLocalLeaseTax>,
11140 pub state: String,
11142 #[serde(skip_serializing_if = "Option::is_none")]
11144 pub state_sales_tax: Option<CreateTaxRegistrationCountryOptionsUsStateSalesTax>,
11145 #[serde(rename = "type")]
11147 pub type_: CreateTaxRegistrationCountryOptionsUsType,
11148}
11149impl CreateTaxRegistrationCountryOptionsUs {
11150 pub fn new(
11151 state: impl Into<String>,
11152 type_: impl Into<CreateTaxRegistrationCountryOptionsUsType>,
11153 ) -> Self {
11154 Self {
11155 local_amusement_tax: None,
11156 local_lease_tax: None,
11157 state: state.into(),
11158 state_sales_tax: None,
11159 type_: type_.into(),
11160 }
11161 }
11162}
11163#[derive(Clone, Debug, serde::Serialize)]
11165pub struct CreateTaxRegistrationCountryOptionsUsLocalAmusementTax {
11166 pub jurisdiction: String,
11169}
11170impl CreateTaxRegistrationCountryOptionsUsLocalAmusementTax {
11171 pub fn new(jurisdiction: impl Into<String>) -> Self {
11172 Self { jurisdiction: jurisdiction.into() }
11173 }
11174}
11175#[derive(Clone, Debug, serde::Serialize)]
11177pub struct CreateTaxRegistrationCountryOptionsUsLocalLeaseTax {
11178 pub jurisdiction: String,
11181}
11182impl CreateTaxRegistrationCountryOptionsUsLocalLeaseTax {
11183 pub fn new(jurisdiction: impl Into<String>) -> Self {
11184 Self { jurisdiction: jurisdiction.into() }
11185 }
11186}
11187#[derive(Clone, Debug, serde::Serialize)]
11189pub struct CreateTaxRegistrationCountryOptionsUsStateSalesTax {
11190 pub elections: Vec<CreateTaxRegistrationCountryOptionsUsStateSalesTaxElections>,
11192}
11193impl CreateTaxRegistrationCountryOptionsUsStateSalesTax {
11194 pub fn new(
11195 elections: impl Into<Vec<CreateTaxRegistrationCountryOptionsUsStateSalesTaxElections>>,
11196 ) -> Self {
11197 Self { elections: elections.into() }
11198 }
11199}
11200#[derive(Clone, Debug, serde::Serialize)]
11202pub struct CreateTaxRegistrationCountryOptionsUsStateSalesTaxElections {
11203 #[serde(skip_serializing_if = "Option::is_none")]
11206 pub jurisdiction: Option<String>,
11207 #[serde(rename = "type")]
11209 pub type_: CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType,
11210}
11211impl CreateTaxRegistrationCountryOptionsUsStateSalesTaxElections {
11212 pub fn new(
11213 type_: impl Into<CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType>,
11214 ) -> Self {
11215 Self { jurisdiction: None, type_: type_.into() }
11216 }
11217}
11218#[derive(Copy, Clone, Eq, PartialEq)]
11220pub enum CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType {
11221 LocalUseTax,
11222 SimplifiedSellersUseTax,
11223 SingleLocalUseTax,
11224}
11225impl CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType {
11226 pub fn as_str(self) -> &'static str {
11227 use CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType::*;
11228 match self {
11229 LocalUseTax => "local_use_tax",
11230 SimplifiedSellersUseTax => "simplified_sellers_use_tax",
11231 SingleLocalUseTax => "single_local_use_tax",
11232 }
11233 }
11234}
11235
11236impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType {
11237 type Err = stripe_types::StripeParseError;
11238 fn from_str(s: &str) -> Result<Self, Self::Err> {
11239 use CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType::*;
11240 match s {
11241 "local_use_tax" => Ok(LocalUseTax),
11242 "simplified_sellers_use_tax" => Ok(SimplifiedSellersUseTax),
11243 "single_local_use_tax" => Ok(SingleLocalUseTax),
11244 _ => Err(stripe_types::StripeParseError),
11245 }
11246 }
11247}
11248impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType {
11249 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11250 f.write_str(self.as_str())
11251 }
11252}
11253
11254impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType {
11255 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11256 f.write_str(self.as_str())
11257 }
11258}
11259impl serde::Serialize for CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType {
11260 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11261 where
11262 S: serde::Serializer,
11263 {
11264 serializer.serialize_str(self.as_str())
11265 }
11266}
11267#[cfg(feature = "deserialize")]
11268impl<'de> serde::Deserialize<'de>
11269 for CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType
11270{
11271 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11272 use std::str::FromStr;
11273 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11274 Self::from_str(&s).map_err(|_| {
11275 serde::de::Error::custom(
11276 "Unknown value for CreateTaxRegistrationCountryOptionsUsStateSalesTaxElectionsType",
11277 )
11278 })
11279 }
11280}
11281#[derive(Copy, Clone, Eq, PartialEq)]
11283pub enum CreateTaxRegistrationCountryOptionsUsType {
11284 LocalAmusementTax,
11285 LocalLeaseTax,
11286 StateCommunicationsTax,
11287 StateRetailDeliveryFee,
11288 StateSalesTax,
11289}
11290impl CreateTaxRegistrationCountryOptionsUsType {
11291 pub fn as_str(self) -> &'static str {
11292 use CreateTaxRegistrationCountryOptionsUsType::*;
11293 match self {
11294 LocalAmusementTax => "local_amusement_tax",
11295 LocalLeaseTax => "local_lease_tax",
11296 StateCommunicationsTax => "state_communications_tax",
11297 StateRetailDeliveryFee => "state_retail_delivery_fee",
11298 StateSalesTax => "state_sales_tax",
11299 }
11300 }
11301}
11302
11303impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUsType {
11304 type Err = stripe_types::StripeParseError;
11305 fn from_str(s: &str) -> Result<Self, Self::Err> {
11306 use CreateTaxRegistrationCountryOptionsUsType::*;
11307 match s {
11308 "local_amusement_tax" => Ok(LocalAmusementTax),
11309 "local_lease_tax" => Ok(LocalLeaseTax),
11310 "state_communications_tax" => Ok(StateCommunicationsTax),
11311 "state_retail_delivery_fee" => Ok(StateRetailDeliveryFee),
11312 "state_sales_tax" => Ok(StateSalesTax),
11313 _ => Err(stripe_types::StripeParseError),
11314 }
11315 }
11316}
11317impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUsType {
11318 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11319 f.write_str(self.as_str())
11320 }
11321}
11322
11323impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUsType {
11324 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11325 f.write_str(self.as_str())
11326 }
11327}
11328impl serde::Serialize for CreateTaxRegistrationCountryOptionsUsType {
11329 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11330 where
11331 S: serde::Serializer,
11332 {
11333 serializer.serialize_str(self.as_str())
11334 }
11335}
11336#[cfg(feature = "deserialize")]
11337impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsUsType {
11338 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11339 use std::str::FromStr;
11340 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11341 Self::from_str(&s).map_err(|_| {
11342 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsUsType")
11343 })
11344 }
11345}
11346#[derive(Copy, Clone, Debug, serde::Serialize)]
11348pub struct CreateTaxRegistrationCountryOptionsUy {
11349 #[serde(skip_serializing_if = "Option::is_none")]
11351 pub standard: Option<CreateTaxRegistrationCountryOptionsUyStandard>,
11352 #[serde(rename = "type")]
11354 pub type_: CreateTaxRegistrationCountryOptionsUyType,
11355}
11356impl CreateTaxRegistrationCountryOptionsUy {
11357 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsUyType>) -> Self {
11358 Self { standard: None, type_: type_.into() }
11359 }
11360}
11361#[derive(Copy, Clone, Debug, serde::Serialize)]
11363pub struct CreateTaxRegistrationCountryOptionsUyStandard {
11364 #[serde(skip_serializing_if = "Option::is_none")]
11366 pub place_of_supply_scheme:
11367 Option<CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme>,
11368}
11369impl CreateTaxRegistrationCountryOptionsUyStandard {
11370 pub fn new() -> Self {
11371 Self { place_of_supply_scheme: None }
11372 }
11373}
11374impl Default for CreateTaxRegistrationCountryOptionsUyStandard {
11375 fn default() -> Self {
11376 Self::new()
11377 }
11378}
11379#[derive(Copy, Clone, Eq, PartialEq)]
11381pub enum CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme {
11382 InboundGoods,
11383 Standard,
11384}
11385impl CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme {
11386 pub fn as_str(self) -> &'static str {
11387 use CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme::*;
11388 match self {
11389 InboundGoods => "inbound_goods",
11390 Standard => "standard",
11391 }
11392 }
11393}
11394
11395impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme {
11396 type Err = stripe_types::StripeParseError;
11397 fn from_str(s: &str) -> Result<Self, Self::Err> {
11398 use CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme::*;
11399 match s {
11400 "inbound_goods" => Ok(InboundGoods),
11401 "standard" => Ok(Standard),
11402 _ => Err(stripe_types::StripeParseError),
11403 }
11404 }
11405}
11406impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme {
11407 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11408 f.write_str(self.as_str())
11409 }
11410}
11411
11412impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme {
11413 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11414 f.write_str(self.as_str())
11415 }
11416}
11417impl serde::Serialize for CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme {
11418 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11419 where
11420 S: serde::Serializer,
11421 {
11422 serializer.serialize_str(self.as_str())
11423 }
11424}
11425#[cfg(feature = "deserialize")]
11426impl<'de> serde::Deserialize<'de>
11427 for CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme
11428{
11429 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11430 use std::str::FromStr;
11431 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11432 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsUyStandardPlaceOfSupplyScheme"))
11433 }
11434}
11435#[derive(Copy, Clone, Eq, PartialEq)]
11437pub enum CreateTaxRegistrationCountryOptionsUyType {
11438 Standard,
11439}
11440impl CreateTaxRegistrationCountryOptionsUyType {
11441 pub fn as_str(self) -> &'static str {
11442 use CreateTaxRegistrationCountryOptionsUyType::*;
11443 match self {
11444 Standard => "standard",
11445 }
11446 }
11447}
11448
11449impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUyType {
11450 type Err = stripe_types::StripeParseError;
11451 fn from_str(s: &str) -> Result<Self, Self::Err> {
11452 use CreateTaxRegistrationCountryOptionsUyType::*;
11453 match s {
11454 "standard" => Ok(Standard),
11455 _ => Err(stripe_types::StripeParseError),
11456 }
11457 }
11458}
11459impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUyType {
11460 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11461 f.write_str(self.as_str())
11462 }
11463}
11464
11465impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUyType {
11466 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11467 f.write_str(self.as_str())
11468 }
11469}
11470impl serde::Serialize for CreateTaxRegistrationCountryOptionsUyType {
11471 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11472 where
11473 S: serde::Serializer,
11474 {
11475 serializer.serialize_str(self.as_str())
11476 }
11477}
11478#[cfg(feature = "deserialize")]
11479impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsUyType {
11480 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11481 use std::str::FromStr;
11482 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11483 Self::from_str(&s).map_err(|_| {
11484 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsUyType")
11485 })
11486 }
11487}
11488#[derive(Copy, Clone, Debug, serde::Serialize)]
11490pub struct CreateTaxRegistrationCountryOptionsUz {
11491 #[serde(rename = "type")]
11493 pub type_: CreateTaxRegistrationCountryOptionsUzType,
11494}
11495impl CreateTaxRegistrationCountryOptionsUz {
11496 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsUzType>) -> Self {
11497 Self { type_: type_.into() }
11498 }
11499}
11500#[derive(Copy, Clone, Eq, PartialEq)]
11502pub enum CreateTaxRegistrationCountryOptionsUzType {
11503 Simplified,
11504}
11505impl CreateTaxRegistrationCountryOptionsUzType {
11506 pub fn as_str(self) -> &'static str {
11507 use CreateTaxRegistrationCountryOptionsUzType::*;
11508 match self {
11509 Simplified => "simplified",
11510 }
11511 }
11512}
11513
11514impl std::str::FromStr for CreateTaxRegistrationCountryOptionsUzType {
11515 type Err = stripe_types::StripeParseError;
11516 fn from_str(s: &str) -> Result<Self, Self::Err> {
11517 use CreateTaxRegistrationCountryOptionsUzType::*;
11518 match s {
11519 "simplified" => Ok(Simplified),
11520 _ => Err(stripe_types::StripeParseError),
11521 }
11522 }
11523}
11524impl std::fmt::Display for CreateTaxRegistrationCountryOptionsUzType {
11525 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11526 f.write_str(self.as_str())
11527 }
11528}
11529
11530impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsUzType {
11531 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11532 f.write_str(self.as_str())
11533 }
11534}
11535impl serde::Serialize for CreateTaxRegistrationCountryOptionsUzType {
11536 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11537 where
11538 S: serde::Serializer,
11539 {
11540 serializer.serialize_str(self.as_str())
11541 }
11542}
11543#[cfg(feature = "deserialize")]
11544impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsUzType {
11545 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11546 use std::str::FromStr;
11547 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11548 Self::from_str(&s).map_err(|_| {
11549 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsUzType")
11550 })
11551 }
11552}
11553#[derive(Copy, Clone, Debug, serde::Serialize)]
11555pub struct CreateTaxRegistrationCountryOptionsVn {
11556 #[serde(rename = "type")]
11558 pub type_: CreateTaxRegistrationCountryOptionsVnType,
11559}
11560impl CreateTaxRegistrationCountryOptionsVn {
11561 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsVnType>) -> Self {
11562 Self { type_: type_.into() }
11563 }
11564}
11565#[derive(Copy, Clone, Eq, PartialEq)]
11567pub enum CreateTaxRegistrationCountryOptionsVnType {
11568 Simplified,
11569}
11570impl CreateTaxRegistrationCountryOptionsVnType {
11571 pub fn as_str(self) -> &'static str {
11572 use CreateTaxRegistrationCountryOptionsVnType::*;
11573 match self {
11574 Simplified => "simplified",
11575 }
11576 }
11577}
11578
11579impl std::str::FromStr for CreateTaxRegistrationCountryOptionsVnType {
11580 type Err = stripe_types::StripeParseError;
11581 fn from_str(s: &str) -> Result<Self, Self::Err> {
11582 use CreateTaxRegistrationCountryOptionsVnType::*;
11583 match s {
11584 "simplified" => Ok(Simplified),
11585 _ => Err(stripe_types::StripeParseError),
11586 }
11587 }
11588}
11589impl std::fmt::Display for CreateTaxRegistrationCountryOptionsVnType {
11590 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11591 f.write_str(self.as_str())
11592 }
11593}
11594
11595impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsVnType {
11596 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11597 f.write_str(self.as_str())
11598 }
11599}
11600impl serde::Serialize for CreateTaxRegistrationCountryOptionsVnType {
11601 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11602 where
11603 S: serde::Serializer,
11604 {
11605 serializer.serialize_str(self.as_str())
11606 }
11607}
11608#[cfg(feature = "deserialize")]
11609impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsVnType {
11610 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11611 use std::str::FromStr;
11612 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11613 Self::from_str(&s).map_err(|_| {
11614 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsVnType")
11615 })
11616 }
11617}
11618#[derive(Copy, Clone, Debug, serde::Serialize)]
11620pub struct CreateTaxRegistrationCountryOptionsZa {
11621 #[serde(skip_serializing_if = "Option::is_none")]
11623 pub standard: Option<CreateTaxRegistrationCountryOptionsZaStandard>,
11624 #[serde(rename = "type")]
11626 pub type_: CreateTaxRegistrationCountryOptionsZaType,
11627}
11628impl CreateTaxRegistrationCountryOptionsZa {
11629 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsZaType>) -> Self {
11630 Self { standard: None, type_: type_.into() }
11631 }
11632}
11633#[derive(Copy, Clone, Debug, serde::Serialize)]
11635pub struct CreateTaxRegistrationCountryOptionsZaStandard {
11636 #[serde(skip_serializing_if = "Option::is_none")]
11638 pub place_of_supply_scheme:
11639 Option<CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme>,
11640}
11641impl CreateTaxRegistrationCountryOptionsZaStandard {
11642 pub fn new() -> Self {
11643 Self { place_of_supply_scheme: None }
11644 }
11645}
11646impl Default for CreateTaxRegistrationCountryOptionsZaStandard {
11647 fn default() -> Self {
11648 Self::new()
11649 }
11650}
11651#[derive(Copy, Clone, Eq, PartialEq)]
11653pub enum CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme {
11654 InboundGoods,
11655 Standard,
11656}
11657impl CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme {
11658 pub fn as_str(self) -> &'static str {
11659 use CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme::*;
11660 match self {
11661 InboundGoods => "inbound_goods",
11662 Standard => "standard",
11663 }
11664 }
11665}
11666
11667impl std::str::FromStr for CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme {
11668 type Err = stripe_types::StripeParseError;
11669 fn from_str(s: &str) -> Result<Self, Self::Err> {
11670 use CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme::*;
11671 match s {
11672 "inbound_goods" => Ok(InboundGoods),
11673 "standard" => Ok(Standard),
11674 _ => Err(stripe_types::StripeParseError),
11675 }
11676 }
11677}
11678impl std::fmt::Display for CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme {
11679 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11680 f.write_str(self.as_str())
11681 }
11682}
11683
11684impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme {
11685 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11686 f.write_str(self.as_str())
11687 }
11688}
11689impl serde::Serialize for CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme {
11690 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11691 where
11692 S: serde::Serializer,
11693 {
11694 serializer.serialize_str(self.as_str())
11695 }
11696}
11697#[cfg(feature = "deserialize")]
11698impl<'de> serde::Deserialize<'de>
11699 for CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme
11700{
11701 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11702 use std::str::FromStr;
11703 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11704 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsZaStandardPlaceOfSupplyScheme"))
11705 }
11706}
11707#[derive(Copy, Clone, Eq, PartialEq)]
11709pub enum CreateTaxRegistrationCountryOptionsZaType {
11710 Standard,
11711}
11712impl CreateTaxRegistrationCountryOptionsZaType {
11713 pub fn as_str(self) -> &'static str {
11714 use CreateTaxRegistrationCountryOptionsZaType::*;
11715 match self {
11716 Standard => "standard",
11717 }
11718 }
11719}
11720
11721impl std::str::FromStr for CreateTaxRegistrationCountryOptionsZaType {
11722 type Err = stripe_types::StripeParseError;
11723 fn from_str(s: &str) -> Result<Self, Self::Err> {
11724 use CreateTaxRegistrationCountryOptionsZaType::*;
11725 match s {
11726 "standard" => Ok(Standard),
11727 _ => Err(stripe_types::StripeParseError),
11728 }
11729 }
11730}
11731impl std::fmt::Display for CreateTaxRegistrationCountryOptionsZaType {
11732 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11733 f.write_str(self.as_str())
11734 }
11735}
11736
11737impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsZaType {
11738 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11739 f.write_str(self.as_str())
11740 }
11741}
11742impl serde::Serialize for CreateTaxRegistrationCountryOptionsZaType {
11743 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11744 where
11745 S: serde::Serializer,
11746 {
11747 serializer.serialize_str(self.as_str())
11748 }
11749}
11750#[cfg(feature = "deserialize")]
11751impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsZaType {
11752 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11753 use std::str::FromStr;
11754 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11755 Self::from_str(&s).map_err(|_| {
11756 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsZaType")
11757 })
11758 }
11759}
11760#[derive(Copy, Clone, Debug, serde::Serialize)]
11762pub struct CreateTaxRegistrationCountryOptionsZm {
11763 #[serde(rename = "type")]
11765 pub type_: CreateTaxRegistrationCountryOptionsZmType,
11766}
11767impl CreateTaxRegistrationCountryOptionsZm {
11768 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsZmType>) -> Self {
11769 Self { type_: type_.into() }
11770 }
11771}
11772#[derive(Copy, Clone, Eq, PartialEq)]
11774pub enum CreateTaxRegistrationCountryOptionsZmType {
11775 Simplified,
11776}
11777impl CreateTaxRegistrationCountryOptionsZmType {
11778 pub fn as_str(self) -> &'static str {
11779 use CreateTaxRegistrationCountryOptionsZmType::*;
11780 match self {
11781 Simplified => "simplified",
11782 }
11783 }
11784}
11785
11786impl std::str::FromStr for CreateTaxRegistrationCountryOptionsZmType {
11787 type Err = stripe_types::StripeParseError;
11788 fn from_str(s: &str) -> Result<Self, Self::Err> {
11789 use CreateTaxRegistrationCountryOptionsZmType::*;
11790 match s {
11791 "simplified" => Ok(Simplified),
11792 _ => Err(stripe_types::StripeParseError),
11793 }
11794 }
11795}
11796impl std::fmt::Display for CreateTaxRegistrationCountryOptionsZmType {
11797 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11798 f.write_str(self.as_str())
11799 }
11800}
11801
11802impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsZmType {
11803 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11804 f.write_str(self.as_str())
11805 }
11806}
11807impl serde::Serialize for CreateTaxRegistrationCountryOptionsZmType {
11808 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11809 where
11810 S: serde::Serializer,
11811 {
11812 serializer.serialize_str(self.as_str())
11813 }
11814}
11815#[cfg(feature = "deserialize")]
11816impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsZmType {
11817 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11818 use std::str::FromStr;
11819 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11820 Self::from_str(&s).map_err(|_| {
11821 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsZmType")
11822 })
11823 }
11824}
11825#[derive(Copy, Clone, Debug, serde::Serialize)]
11827pub struct CreateTaxRegistrationCountryOptionsZw {
11828 #[serde(skip_serializing_if = "Option::is_none")]
11830 pub standard: Option<CreateTaxRegistrationCountryOptionsZwStandard>,
11831 #[serde(rename = "type")]
11833 pub type_: CreateTaxRegistrationCountryOptionsZwType,
11834}
11835impl CreateTaxRegistrationCountryOptionsZw {
11836 pub fn new(type_: impl Into<CreateTaxRegistrationCountryOptionsZwType>) -> Self {
11837 Self { standard: None, type_: type_.into() }
11838 }
11839}
11840#[derive(Copy, Clone, Debug, serde::Serialize)]
11842pub struct CreateTaxRegistrationCountryOptionsZwStandard {
11843 #[serde(skip_serializing_if = "Option::is_none")]
11845 pub place_of_supply_scheme:
11846 Option<CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme>,
11847}
11848impl CreateTaxRegistrationCountryOptionsZwStandard {
11849 pub fn new() -> Self {
11850 Self { place_of_supply_scheme: None }
11851 }
11852}
11853impl Default for CreateTaxRegistrationCountryOptionsZwStandard {
11854 fn default() -> Self {
11855 Self::new()
11856 }
11857}
11858#[derive(Copy, Clone, Eq, PartialEq)]
11860pub enum CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme {
11861 InboundGoods,
11862 Standard,
11863}
11864impl CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme {
11865 pub fn as_str(self) -> &'static str {
11866 use CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme::*;
11867 match self {
11868 InboundGoods => "inbound_goods",
11869 Standard => "standard",
11870 }
11871 }
11872}
11873
11874impl std::str::FromStr for CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme {
11875 type Err = stripe_types::StripeParseError;
11876 fn from_str(s: &str) -> Result<Self, Self::Err> {
11877 use CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme::*;
11878 match s {
11879 "inbound_goods" => Ok(InboundGoods),
11880 "standard" => Ok(Standard),
11881 _ => Err(stripe_types::StripeParseError),
11882 }
11883 }
11884}
11885impl std::fmt::Display for CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme {
11886 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11887 f.write_str(self.as_str())
11888 }
11889}
11890
11891impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme {
11892 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11893 f.write_str(self.as_str())
11894 }
11895}
11896impl serde::Serialize for CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme {
11897 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11898 where
11899 S: serde::Serializer,
11900 {
11901 serializer.serialize_str(self.as_str())
11902 }
11903}
11904#[cfg(feature = "deserialize")]
11905impl<'de> serde::Deserialize<'de>
11906 for CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme
11907{
11908 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11909 use std::str::FromStr;
11910 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11911 Self::from_str(&s).map_err(|_| serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsZwStandardPlaceOfSupplyScheme"))
11912 }
11913}
11914#[derive(Copy, Clone, Eq, PartialEq)]
11916pub enum CreateTaxRegistrationCountryOptionsZwType {
11917 Standard,
11918}
11919impl CreateTaxRegistrationCountryOptionsZwType {
11920 pub fn as_str(self) -> &'static str {
11921 use CreateTaxRegistrationCountryOptionsZwType::*;
11922 match self {
11923 Standard => "standard",
11924 }
11925 }
11926}
11927
11928impl std::str::FromStr for CreateTaxRegistrationCountryOptionsZwType {
11929 type Err = stripe_types::StripeParseError;
11930 fn from_str(s: &str) -> Result<Self, Self::Err> {
11931 use CreateTaxRegistrationCountryOptionsZwType::*;
11932 match s {
11933 "standard" => Ok(Standard),
11934 _ => Err(stripe_types::StripeParseError),
11935 }
11936 }
11937}
11938impl std::fmt::Display for CreateTaxRegistrationCountryOptionsZwType {
11939 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11940 f.write_str(self.as_str())
11941 }
11942}
11943
11944impl std::fmt::Debug for CreateTaxRegistrationCountryOptionsZwType {
11945 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
11946 f.write_str(self.as_str())
11947 }
11948}
11949impl serde::Serialize for CreateTaxRegistrationCountryOptionsZwType {
11950 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11951 where
11952 S: serde::Serializer,
11953 {
11954 serializer.serialize_str(self.as_str())
11955 }
11956}
11957#[cfg(feature = "deserialize")]
11958impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsZwType {
11959 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11960 use std::str::FromStr;
11961 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
11962 Self::from_str(&s).map_err(|_| {
11963 serde::de::Error::custom("Unknown value for CreateTaxRegistrationCountryOptionsZwType")
11964 })
11965 }
11966}
11967#[derive(Clone, Debug, serde::Serialize)]
11969pub struct CreateTaxRegistration {
11970 inner: CreateTaxRegistrationBuilder,
11971}
11972impl CreateTaxRegistration {
11973 pub fn new(
11975 active_from: impl Into<CreateTaxRegistrationActiveFrom>,
11976 country: impl Into<String>,
11977 country_options: impl Into<CreateTaxRegistrationCountryOptions>,
11978 ) -> Self {
11979 Self {
11980 inner: CreateTaxRegistrationBuilder::new(
11981 active_from.into(),
11982 country.into(),
11983 country_options.into(),
11984 ),
11985 }
11986 }
11987 pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
11989 self.inner.expand = Some(expand.into());
11990 self
11991 }
11992 pub fn expires_at(mut self, expires_at: impl Into<stripe_types::Timestamp>) -> Self {
11996 self.inner.expires_at = Some(expires_at.into());
11997 self
11998 }
11999}
12000impl CreateTaxRegistration {
12001 pub async fn send<C: StripeClient>(
12003 &self,
12004 client: &C,
12005 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
12006 self.customize().send(client).await
12007 }
12008
12009 pub fn send_blocking<C: StripeBlockingClient>(
12011 &self,
12012 client: &C,
12013 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
12014 self.customize().send_blocking(client)
12015 }
12016}
12017
12018impl StripeRequest for CreateTaxRegistration {
12019 type Output = stripe_misc::TaxRegistration;
12020
12021 fn build(&self) -> RequestBuilder {
12022 RequestBuilder::new(StripeMethod::Post, "/tax/registrations").form(&self.inner)
12023 }
12024}
12025#[derive(Clone, Debug, serde::Serialize)]
12026struct UpdateTaxRegistrationBuilder {
12027 #[serde(skip_serializing_if = "Option::is_none")]
12028 active_from: Option<UpdateTaxRegistrationActiveFrom>,
12029 #[serde(skip_serializing_if = "Option::is_none")]
12030 expand: Option<Vec<String>>,
12031 #[serde(skip_serializing_if = "Option::is_none")]
12032 expires_at: Option<UpdateTaxRegistrationExpiresAt>,
12033}
12034impl UpdateTaxRegistrationBuilder {
12035 fn new() -> Self {
12036 Self { active_from: None, expand: None, expires_at: None }
12037 }
12038}
12039#[derive(Copy, Clone, Debug, serde::Serialize)]
12042#[serde(rename_all = "snake_case")]
12043pub enum UpdateTaxRegistrationActiveFrom {
12044 Now,
12045 #[serde(untagged)]
12046 Timestamp(stripe_types::Timestamp),
12047}
12048#[derive(Copy, Clone, Debug, serde::Serialize)]
12052#[serde(rename_all = "snake_case")]
12053pub enum UpdateTaxRegistrationExpiresAt {
12054 Now,
12055 #[serde(untagged)]
12056 Timestamp(stripe_types::Timestamp),
12057}
12058#[derive(Clone, Debug, serde::Serialize)]
12063pub struct UpdateTaxRegistration {
12064 inner: UpdateTaxRegistrationBuilder,
12065 id: stripe_misc::TaxRegistrationId,
12066}
12067impl UpdateTaxRegistration {
12068 pub fn new(id: impl Into<stripe_misc::TaxRegistrationId>) -> Self {
12070 Self { id: id.into(), inner: UpdateTaxRegistrationBuilder::new() }
12071 }
12072 pub fn active_from(mut self, active_from: impl Into<UpdateTaxRegistrationActiveFrom>) -> Self {
12075 self.inner.active_from = Some(active_from.into());
12076 self
12077 }
12078 pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
12080 self.inner.expand = Some(expand.into());
12081 self
12082 }
12083 pub fn expires_at(mut self, expires_at: impl Into<UpdateTaxRegistrationExpiresAt>) -> Self {
12087 self.inner.expires_at = Some(expires_at.into());
12088 self
12089 }
12090}
12091impl UpdateTaxRegistration {
12092 pub async fn send<C: StripeClient>(
12094 &self,
12095 client: &C,
12096 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
12097 self.customize().send(client).await
12098 }
12099
12100 pub fn send_blocking<C: StripeBlockingClient>(
12102 &self,
12103 client: &C,
12104 ) -> Result<<Self as StripeRequest>::Output, C::Err> {
12105 self.customize().send_blocking(client)
12106 }
12107}
12108
12109impl StripeRequest for UpdateTaxRegistration {
12110 type Output = stripe_misc::TaxRegistration;
12111
12112 fn build(&self) -> RequestBuilder {
12113 let id = &self.id;
12114 RequestBuilder::new(StripeMethod::Post, format!("/tax/registrations/{id}"))
12115 .form(&self.inner)
12116 }
12117}