stripe_webhook/generated/
mod.rs

1#[derive(Clone, Debug)]
2#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
3#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
4#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
5pub enum AccountExternalAccountCreated {
6    #[cfg_attr(
7        any(feature = "deserialize", feature = "serialize"),
8        serde(rename = "bank_account")
9    )]
10    BankAccount(stripe_shared::BankAccount),
11    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
12    Card(stripe_shared::Card),
13    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
14    Source(stripe_shared::Source),
15}
16
17#[derive(Default)]
18pub struct AccountExternalAccountCreatedBuilder {
19    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
20}
21
22const _: () = {
23    use miniserde::de::{Map, Visitor};
24    use miniserde::json::Value;
25    use miniserde::{make_place, Deserialize, Result};
26    use stripe_types::miniserde_helpers::FromValueOpt;
27    use stripe_types::MapBuilder;
28
29    use super::*;
30
31    make_place!(Place);
32
33    struct Builder<'a> {
34        out: &'a mut Option<AccountExternalAccountCreated>,
35        builder: AccountExternalAccountCreatedBuilder,
36    }
37
38    impl Deserialize for AccountExternalAccountCreated {
39        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
40            Place::new(out)
41        }
42    }
43
44    impl Visitor for Place<AccountExternalAccountCreated> {
45        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
46            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
47        }
48    }
49
50    impl<'a> Map for Builder<'a> {
51        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
52            self.builder.key(k)
53        }
54
55        fn finish(&mut self) -> Result<()> {
56            *self.out = self.builder.take_out();
57            Ok(())
58        }
59    }
60
61    impl MapBuilder for AccountExternalAccountCreatedBuilder {
62        type Out = AccountExternalAccountCreated;
63        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
64            self.inner.key_inner(k)
65        }
66
67        fn deser_default() -> Self {
68            Self::default()
69        }
70
71        fn take_out(&mut self) -> Option<Self::Out> {
72            let (k, o) = self.inner.finish_inner()?;
73            AccountExternalAccountCreated::construct(&k, o)
74        }
75    }
76
77    impl stripe_types::ObjectDeser for AccountExternalAccountCreated {
78        type Builder = AccountExternalAccountCreatedBuilder;
79    }
80    impl AccountExternalAccountCreated {
81        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
82            Some(match key {
83                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
84                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
85                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
86
87                _ => return None,
88            })
89        }
90    }
91
92    impl FromValueOpt for AccountExternalAccountCreated {
93        fn from_value(v: Value) -> Option<Self> {
94            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
95            Self::construct(&typ, obj)
96        }
97    }
98};
99
100#[derive(Clone, Debug)]
101#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
102#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
103#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
104pub enum AccountExternalAccountDeleted {
105    #[cfg_attr(
106        any(feature = "deserialize", feature = "serialize"),
107        serde(rename = "bank_account")
108    )]
109    BankAccount(stripe_shared::BankAccount),
110    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
111    Card(stripe_shared::Card),
112    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
113    Source(stripe_shared::Source),
114}
115
116#[derive(Default)]
117pub struct AccountExternalAccountDeletedBuilder {
118    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
119}
120
121const _: () = {
122    use miniserde::de::{Map, Visitor};
123    use miniserde::json::Value;
124    use miniserde::{make_place, Deserialize, Result};
125    use stripe_types::miniserde_helpers::FromValueOpt;
126    use stripe_types::MapBuilder;
127
128    use super::*;
129
130    make_place!(Place);
131
132    struct Builder<'a> {
133        out: &'a mut Option<AccountExternalAccountDeleted>,
134        builder: AccountExternalAccountDeletedBuilder,
135    }
136
137    impl Deserialize for AccountExternalAccountDeleted {
138        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
139            Place::new(out)
140        }
141    }
142
143    impl Visitor for Place<AccountExternalAccountDeleted> {
144        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
145            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
146        }
147    }
148
149    impl<'a> Map for Builder<'a> {
150        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
151            self.builder.key(k)
152        }
153
154        fn finish(&mut self) -> Result<()> {
155            *self.out = self.builder.take_out();
156            Ok(())
157        }
158    }
159
160    impl MapBuilder for AccountExternalAccountDeletedBuilder {
161        type Out = AccountExternalAccountDeleted;
162        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
163            self.inner.key_inner(k)
164        }
165
166        fn deser_default() -> Self {
167            Self::default()
168        }
169
170        fn take_out(&mut self) -> Option<Self::Out> {
171            let (k, o) = self.inner.finish_inner()?;
172            AccountExternalAccountDeleted::construct(&k, o)
173        }
174    }
175
176    impl stripe_types::ObjectDeser for AccountExternalAccountDeleted {
177        type Builder = AccountExternalAccountDeletedBuilder;
178    }
179    impl AccountExternalAccountDeleted {
180        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
181            Some(match key {
182                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
183                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
184                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
185
186                _ => return None,
187            })
188        }
189    }
190
191    impl FromValueOpt for AccountExternalAccountDeleted {
192        fn from_value(v: Value) -> Option<Self> {
193            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
194            Self::construct(&typ, obj)
195        }
196    }
197};
198
199#[derive(Clone, Debug)]
200#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
201#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
202#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
203pub enum AccountExternalAccountUpdated {
204    #[cfg_attr(
205        any(feature = "deserialize", feature = "serialize"),
206        serde(rename = "bank_account")
207    )]
208    BankAccount(stripe_shared::BankAccount),
209    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
210    Card(stripe_shared::Card),
211    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
212    Source(stripe_shared::Source),
213}
214
215#[derive(Default)]
216pub struct AccountExternalAccountUpdatedBuilder {
217    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
218}
219
220const _: () = {
221    use miniserde::de::{Map, Visitor};
222    use miniserde::json::Value;
223    use miniserde::{make_place, Deserialize, Result};
224    use stripe_types::miniserde_helpers::FromValueOpt;
225    use stripe_types::MapBuilder;
226
227    use super::*;
228
229    make_place!(Place);
230
231    struct Builder<'a> {
232        out: &'a mut Option<AccountExternalAccountUpdated>,
233        builder: AccountExternalAccountUpdatedBuilder,
234    }
235
236    impl Deserialize for AccountExternalAccountUpdated {
237        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
238            Place::new(out)
239        }
240    }
241
242    impl Visitor for Place<AccountExternalAccountUpdated> {
243        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
244            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
245        }
246    }
247
248    impl<'a> Map for Builder<'a> {
249        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
250            self.builder.key(k)
251        }
252
253        fn finish(&mut self) -> Result<()> {
254            *self.out = self.builder.take_out();
255            Ok(())
256        }
257    }
258
259    impl MapBuilder for AccountExternalAccountUpdatedBuilder {
260        type Out = AccountExternalAccountUpdated;
261        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
262            self.inner.key_inner(k)
263        }
264
265        fn deser_default() -> Self {
266            Self::default()
267        }
268
269        fn take_out(&mut self) -> Option<Self::Out> {
270            let (k, o) = self.inner.finish_inner()?;
271            AccountExternalAccountUpdated::construct(&k, o)
272        }
273    }
274
275    impl stripe_types::ObjectDeser for AccountExternalAccountUpdated {
276        type Builder = AccountExternalAccountUpdatedBuilder;
277    }
278    impl AccountExternalAccountUpdated {
279        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
280            Some(match key {
281                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
282                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
283                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
284
285                _ => return None,
286            })
287        }
288    }
289
290    impl FromValueOpt for AccountExternalAccountUpdated {
291        fn from_value(v: Value) -> Option<Self> {
292            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
293            Self::construct(&typ, obj)
294        }
295    }
296};
297
298#[derive(Clone, Debug)]
299#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
300#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
301#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
302pub enum CustomerSourceCreated {
303    #[cfg_attr(
304        any(feature = "deserialize", feature = "serialize"),
305        serde(rename = "bank_account")
306    )]
307    BankAccount(stripe_shared::BankAccount),
308    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
309    Card(stripe_shared::Card),
310    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
311    Source(stripe_shared::Source),
312}
313
314#[derive(Default)]
315pub struct CustomerSourceCreatedBuilder {
316    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
317}
318
319const _: () = {
320    use miniserde::de::{Map, Visitor};
321    use miniserde::json::Value;
322    use miniserde::{make_place, Deserialize, Result};
323    use stripe_types::miniserde_helpers::FromValueOpt;
324    use stripe_types::MapBuilder;
325
326    use super::*;
327
328    make_place!(Place);
329
330    struct Builder<'a> {
331        out: &'a mut Option<CustomerSourceCreated>,
332        builder: CustomerSourceCreatedBuilder,
333    }
334
335    impl Deserialize for CustomerSourceCreated {
336        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
337            Place::new(out)
338        }
339    }
340
341    impl Visitor for Place<CustomerSourceCreated> {
342        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
343            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
344        }
345    }
346
347    impl<'a> Map for Builder<'a> {
348        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
349            self.builder.key(k)
350        }
351
352        fn finish(&mut self) -> Result<()> {
353            *self.out = self.builder.take_out();
354            Ok(())
355        }
356    }
357
358    impl MapBuilder for CustomerSourceCreatedBuilder {
359        type Out = CustomerSourceCreated;
360        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
361            self.inner.key_inner(k)
362        }
363
364        fn deser_default() -> Self {
365            Self::default()
366        }
367
368        fn take_out(&mut self) -> Option<Self::Out> {
369            let (k, o) = self.inner.finish_inner()?;
370            CustomerSourceCreated::construct(&k, o)
371        }
372    }
373
374    impl stripe_types::ObjectDeser for CustomerSourceCreated {
375        type Builder = CustomerSourceCreatedBuilder;
376    }
377    impl CustomerSourceCreated {
378        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
379            Some(match key {
380                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
381                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
382                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
383
384                _ => return None,
385            })
386        }
387    }
388
389    impl FromValueOpt for CustomerSourceCreated {
390        fn from_value(v: Value) -> Option<Self> {
391            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
392            Self::construct(&typ, obj)
393        }
394    }
395};
396
397#[derive(Clone, Debug)]
398#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
399#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
400#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
401pub enum CustomerSourceDeleted {
402    #[cfg_attr(
403        any(feature = "deserialize", feature = "serialize"),
404        serde(rename = "bank_account")
405    )]
406    BankAccount(stripe_shared::BankAccount),
407    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
408    Card(stripe_shared::Card),
409    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
410    Source(stripe_shared::Source),
411}
412
413#[derive(Default)]
414pub struct CustomerSourceDeletedBuilder {
415    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
416}
417
418const _: () = {
419    use miniserde::de::{Map, Visitor};
420    use miniserde::json::Value;
421    use miniserde::{make_place, Deserialize, Result};
422    use stripe_types::miniserde_helpers::FromValueOpt;
423    use stripe_types::MapBuilder;
424
425    use super::*;
426
427    make_place!(Place);
428
429    struct Builder<'a> {
430        out: &'a mut Option<CustomerSourceDeleted>,
431        builder: CustomerSourceDeletedBuilder,
432    }
433
434    impl Deserialize for CustomerSourceDeleted {
435        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
436            Place::new(out)
437        }
438    }
439
440    impl Visitor for Place<CustomerSourceDeleted> {
441        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
442            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
443        }
444    }
445
446    impl<'a> Map for Builder<'a> {
447        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
448            self.builder.key(k)
449        }
450
451        fn finish(&mut self) -> Result<()> {
452            *self.out = self.builder.take_out();
453            Ok(())
454        }
455    }
456
457    impl MapBuilder for CustomerSourceDeletedBuilder {
458        type Out = CustomerSourceDeleted;
459        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
460            self.inner.key_inner(k)
461        }
462
463        fn deser_default() -> Self {
464            Self::default()
465        }
466
467        fn take_out(&mut self) -> Option<Self::Out> {
468            let (k, o) = self.inner.finish_inner()?;
469            CustomerSourceDeleted::construct(&k, o)
470        }
471    }
472
473    impl stripe_types::ObjectDeser for CustomerSourceDeleted {
474        type Builder = CustomerSourceDeletedBuilder;
475    }
476    impl CustomerSourceDeleted {
477        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
478            Some(match key {
479                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
480                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
481                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
482
483                _ => return None,
484            })
485        }
486    }
487
488    impl FromValueOpt for CustomerSourceDeleted {
489        fn from_value(v: Value) -> Option<Self> {
490            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
491            Self::construct(&typ, obj)
492        }
493    }
494};
495
496#[derive(Clone, Debug)]
497#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
498#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
499#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
500pub enum CustomerSourceExpiring {
501    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
502    Card(stripe_shared::Card),
503    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
504    Source(stripe_shared::Source),
505}
506
507#[derive(Default)]
508pub struct CustomerSourceExpiringBuilder {
509    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
510}
511
512const _: () = {
513    use miniserde::de::{Map, Visitor};
514    use miniserde::json::Value;
515    use miniserde::{make_place, Deserialize, Result};
516    use stripe_types::miniserde_helpers::FromValueOpt;
517    use stripe_types::MapBuilder;
518
519    use super::*;
520
521    make_place!(Place);
522
523    struct Builder<'a> {
524        out: &'a mut Option<CustomerSourceExpiring>,
525        builder: CustomerSourceExpiringBuilder,
526    }
527
528    impl Deserialize for CustomerSourceExpiring {
529        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
530            Place::new(out)
531        }
532    }
533
534    impl Visitor for Place<CustomerSourceExpiring> {
535        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
536            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
537        }
538    }
539
540    impl<'a> Map for Builder<'a> {
541        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
542            self.builder.key(k)
543        }
544
545        fn finish(&mut self) -> Result<()> {
546            *self.out = self.builder.take_out();
547            Ok(())
548        }
549    }
550
551    impl MapBuilder for CustomerSourceExpiringBuilder {
552        type Out = CustomerSourceExpiring;
553        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
554            self.inner.key_inner(k)
555        }
556
557        fn deser_default() -> Self {
558            Self::default()
559        }
560
561        fn take_out(&mut self) -> Option<Self::Out> {
562            let (k, o) = self.inner.finish_inner()?;
563            CustomerSourceExpiring::construct(&k, o)
564        }
565    }
566
567    impl stripe_types::ObjectDeser for CustomerSourceExpiring {
568        type Builder = CustomerSourceExpiringBuilder;
569    }
570    impl CustomerSourceExpiring {
571        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
572            Some(match key {
573                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
574                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
575
576                _ => return None,
577            })
578        }
579    }
580
581    impl FromValueOpt for CustomerSourceExpiring {
582        fn from_value(v: Value) -> Option<Self> {
583            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
584            Self::construct(&typ, obj)
585        }
586    }
587};
588
589#[derive(Clone, Debug)]
590#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
591#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
592#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
593pub enum CustomerSourceUpdated {
594    #[cfg_attr(
595        any(feature = "deserialize", feature = "serialize"),
596        serde(rename = "bank_account")
597    )]
598    BankAccount(stripe_shared::BankAccount),
599    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
600    Card(stripe_shared::Card),
601    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
602    Source(stripe_shared::Source),
603}
604
605#[derive(Default)]
606pub struct CustomerSourceUpdatedBuilder {
607    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
608}
609
610const _: () = {
611    use miniserde::de::{Map, Visitor};
612    use miniserde::json::Value;
613    use miniserde::{make_place, Deserialize, Result};
614    use stripe_types::miniserde_helpers::FromValueOpt;
615    use stripe_types::MapBuilder;
616
617    use super::*;
618
619    make_place!(Place);
620
621    struct Builder<'a> {
622        out: &'a mut Option<CustomerSourceUpdated>,
623        builder: CustomerSourceUpdatedBuilder,
624    }
625
626    impl Deserialize for CustomerSourceUpdated {
627        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
628            Place::new(out)
629        }
630    }
631
632    impl Visitor for Place<CustomerSourceUpdated> {
633        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
634            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
635        }
636    }
637
638    impl<'a> Map for Builder<'a> {
639        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
640            self.builder.key(k)
641        }
642
643        fn finish(&mut self) -> Result<()> {
644            *self.out = self.builder.take_out();
645            Ok(())
646        }
647    }
648
649    impl MapBuilder for CustomerSourceUpdatedBuilder {
650        type Out = CustomerSourceUpdated;
651        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
652            self.inner.key_inner(k)
653        }
654
655        fn deser_default() -> Self {
656            Self::default()
657        }
658
659        fn take_out(&mut self) -> Option<Self::Out> {
660            let (k, o) = self.inner.finish_inner()?;
661            CustomerSourceUpdated::construct(&k, o)
662        }
663    }
664
665    impl stripe_types::ObjectDeser for CustomerSourceUpdated {
666        type Builder = CustomerSourceUpdatedBuilder;
667    }
668    impl CustomerSourceUpdated {
669        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
670            Some(match key {
671                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
672                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
673                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
674
675                _ => return None,
676            })
677        }
678    }
679
680    impl FromValueOpt for CustomerSourceUpdated {
681        fn from_value(v: Value) -> Option<Self> {
682            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
683            Self::construct(&typ, obj)
684        }
685    }
686};
687
688#[derive(Clone, Debug)]
689#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
690#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
691#[non_exhaustive]
692/// The event data for a webhook event.
693pub enum EventObject {
694    /// Occurs whenever a user authorizes an application. Sent to the related application only.
695    AccountApplicationAuthorized(stripe_shared::Application),
696    /// Occurs whenever a user deauthorizes an application. Sent to the related application only.
697    AccountApplicationDeauthorized(stripe_shared::Application),
698    /// Occurs whenever an external account is created.
699    AccountExternalAccountCreated(AccountExternalAccountCreated),
700    /// Occurs whenever an external account is deleted.
701    AccountExternalAccountDeleted(AccountExternalAccountDeleted),
702    /// Occurs whenever an external account is updated.
703    AccountExternalAccountUpdated(AccountExternalAccountUpdated),
704    /// Occurs whenever an account status or property has changed.
705    AccountUpdated(stripe_shared::Account),
706    /// Occurs whenever an application fee is created on a charge.
707    ApplicationFeeCreated(stripe_shared::ApplicationFee),
708    /// Occurs whenever an application fee refund is updated.
709    ApplicationFeeRefundUpdated(stripe_shared::ApplicationFeeRefund),
710    /// Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds).
711    /// This includes partial refunds.
712    ApplicationFeeRefunded(stripe_shared::ApplicationFee),
713    /// Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out).
714    /// By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis.
715    /// This event is not fired for negative transactions.
716    #[cfg(feature = "async-stripe-core")]
717    BalanceAvailable(stripe_core::Balance),
718    /// Occurs whenever your custom alert threshold is met.
719    #[cfg(feature = "async-stripe-billing")]
720    BillingAlertTriggered(stripe_billing::BillingAlertTriggered),
721    /// Occurs when a credit balance transaction is created
722    BillingCreditBalanceTransactionCreated(stripe_shared::BillingCreditBalanceTransaction),
723    /// Occurs when a credit grant is created
724    BillingCreditGrantCreated(stripe_shared::BillingCreditGrant),
725    /// Occurs when a credit grant is updated
726    BillingCreditGrantUpdated(stripe_shared::BillingCreditGrant),
727    /// Occurs when a meter is created
728    #[cfg(feature = "async-stripe-billing")]
729    BillingMeterCreated(stripe_billing::BillingMeter),
730    /// Occurs when a meter is deactivated
731    #[cfg(feature = "async-stripe-billing")]
732    BillingMeterDeactivated(stripe_billing::BillingMeter),
733    /// Occurs when a meter is reactivated
734    #[cfg(feature = "async-stripe-billing")]
735    BillingMeterReactivated(stripe_billing::BillingMeter),
736    /// Occurs when a meter is updated
737    #[cfg(feature = "async-stripe-billing")]
738    BillingMeterUpdated(stripe_billing::BillingMeter),
739    /// Occurs whenever a portal configuration is created.
740    #[cfg(feature = "async-stripe-billing")]
741    BillingPortalConfigurationCreated(stripe_billing::BillingPortalConfiguration),
742    /// Occurs whenever a portal configuration is updated.
743    #[cfg(feature = "async-stripe-billing")]
744    BillingPortalConfigurationUpdated(stripe_billing::BillingPortalConfiguration),
745    /// Occurs whenever a portal session is created.
746    #[cfg(feature = "async-stripe-billing")]
747    BillingPortalSessionCreated(stripe_billing::BillingPortalSession),
748    /// Occurs whenever a capability has new requirements or a new status.
749    CapabilityUpdated(stripe_shared::Capability),
750    /// Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance.
751    /// If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance.
752    CashBalanceFundsAvailable(stripe_shared::CashBalance),
753    /// Occurs whenever a previously uncaptured charge is captured.
754    ChargeCaptured(stripe_shared::Charge),
755    /// Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`.
756    ChargeDisputeClosed(stripe_shared::Dispute),
757    /// Occurs whenever a customer disputes a charge with their bank.
758    ChargeDisputeCreated(stripe_shared::Dispute),
759    /// Occurs when funds are reinstated to your account after a dispute is closed.
760    /// This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments).
761    ChargeDisputeFundsReinstated(stripe_shared::Dispute),
762    /// Occurs when funds are removed from your account due to a dispute.
763    ChargeDisputeFundsWithdrawn(stripe_shared::Dispute),
764    /// Occurs when the dispute is updated (usually with evidence).
765    ChargeDisputeUpdated(stripe_shared::Dispute),
766    /// Occurs whenever an uncaptured charge expires.
767    ChargeExpired(stripe_shared::Charge),
768    /// Occurs whenever a failed charge attempt occurs.
769    ChargeFailed(stripe_shared::Charge),
770    /// Occurs whenever a pending charge is created.
771    ChargePending(stripe_shared::Charge),
772    /// Occurs whenever a refund is updated on selected payment methods.
773    /// For updates on all refunds, listen to `refund.updated` instead.
774    ChargeRefundUpdated(stripe_shared::Refund),
775    /// Occurs whenever a charge is refunded, including partial refunds.
776    /// Listen to `refund.created` for information about the refund.
777    ChargeRefunded(stripe_shared::Charge),
778    /// Occurs whenever a charge is successful.
779    ChargeSucceeded(stripe_shared::Charge),
780    /// Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture.
781    ChargeUpdated(stripe_shared::Charge),
782    /// Occurs when a payment intent using a delayed payment method fails.
783    CheckoutSessionAsyncPaymentFailed(stripe_shared::CheckoutSession),
784    /// Occurs when a payment intent using a delayed payment method finally succeeds.
785    CheckoutSessionAsyncPaymentSucceeded(stripe_shared::CheckoutSession),
786    /// Occurs when a Checkout Session has been successfully completed.
787    CheckoutSessionCompleted(stripe_shared::CheckoutSession),
788    /// Occurs when a Checkout Session is expired.
789    CheckoutSessionExpired(stripe_shared::CheckoutSession),
790    /// Occurs when a Climate order is canceled.
791    #[cfg(feature = "async-stripe-misc")]
792    ClimateOrderCanceled(stripe_misc::ClimateOrder),
793    /// Occurs when a Climate order is created.
794    #[cfg(feature = "async-stripe-misc")]
795    ClimateOrderCreated(stripe_misc::ClimateOrder),
796    /// Occurs when a Climate order is delayed.
797    #[cfg(feature = "async-stripe-misc")]
798    ClimateOrderDelayed(stripe_misc::ClimateOrder),
799    /// Occurs when a Climate order is delivered.
800    #[cfg(feature = "async-stripe-misc")]
801    ClimateOrderDelivered(stripe_misc::ClimateOrder),
802    /// Occurs when a Climate order's product is substituted for another.
803    #[cfg(feature = "async-stripe-misc")]
804    ClimateOrderProductSubstituted(stripe_misc::ClimateOrder),
805    /// Occurs when a Climate product is created.
806    #[cfg(feature = "async-stripe-misc")]
807    ClimateProductCreated(stripe_misc::ClimateProduct),
808    /// Occurs when a Climate product is updated.
809    #[cfg(feature = "async-stripe-misc")]
810    ClimateProductPricingUpdated(stripe_misc::ClimateProduct),
811    /// Occurs whenever a coupon is created.
812    CouponCreated(stripe_shared::Coupon),
813    /// Occurs whenever a coupon is deleted.
814    CouponDeleted(stripe_shared::Coupon),
815    /// Occurs whenever a coupon is updated.
816    CouponUpdated(stripe_shared::Coupon),
817    /// Occurs whenever a credit note is created.
818    CreditNoteCreated(stripe_shared::CreditNote),
819    /// Occurs whenever a credit note is updated.
820    CreditNoteUpdated(stripe_shared::CreditNote),
821    /// Occurs whenever a credit note is voided.
822    CreditNoteVoided(stripe_shared::CreditNote),
823    /// Occurs whenever a new customer is created.
824    CustomerCreated(stripe_shared::Customer),
825    /// Occurs whenever a customer is deleted.
826    CustomerDeleted(stripe_shared::Customer),
827    /// Occurs whenever a coupon is attached to a customer.
828    CustomerDiscountCreated(stripe_shared::Discount),
829    /// Occurs whenever a coupon is removed from a customer.
830    CustomerDiscountDeleted(stripe_shared::Discount),
831    /// Occurs whenever a customer is switched from one coupon to another.
832    CustomerDiscountUpdated(stripe_shared::Discount),
833    /// Occurs whenever a new source is created for a customer.
834    CustomerSourceCreated(CustomerSourceCreated),
835    /// Occurs whenever a source is removed from a customer.
836    CustomerSourceDeleted(CustomerSourceDeleted),
837    /// Occurs whenever a card or source will expire at the end of the month.
838    /// This event only works with legacy integrations using Card or Source objects.
839    /// If you use the PaymentMethod API, this event won't occur.
840    CustomerSourceExpiring(CustomerSourceExpiring),
841    /// Occurs whenever a source's details are changed.
842    CustomerSourceUpdated(CustomerSourceUpdated),
843    /// Occurs whenever a customer is signed up for a new plan.
844    CustomerSubscriptionCreated(stripe_shared::Subscription),
845    /// Occurs whenever a customer's subscription ends.
846    CustomerSubscriptionDeleted(stripe_shared::Subscription),
847    /// Occurs whenever a customer's subscription is paused.
848    /// Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused.
849    CustomerSubscriptionPaused(stripe_shared::Subscription),
850    /// Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated.
851    CustomerSubscriptionPendingUpdateApplied(stripe_shared::Subscription),
852    /// Occurs whenever a customer's subscription's pending update expires before the related invoice is paid.
853    CustomerSubscriptionPendingUpdateExpired(stripe_shared::Subscription),
854    /// Occurs whenever a customer's subscription is no longer paused.
855    /// Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed.
856    CustomerSubscriptionResumed(stripe_shared::Subscription),
857    /// Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`).
858    CustomerSubscriptionTrialWillEnd(stripe_shared::Subscription),
859    /// Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).
860    CustomerSubscriptionUpdated(stripe_shared::Subscription),
861    /// Occurs whenever a tax ID is created for a customer.
862    CustomerTaxIdCreated(stripe_shared::TaxId),
863    /// Occurs whenever a tax ID is deleted from a customer.
864    CustomerTaxIdDeleted(stripe_shared::TaxId),
865    /// Occurs whenever a customer's tax ID is updated.
866    CustomerTaxIdUpdated(stripe_shared::TaxId),
867    /// Occurs whenever any property of a customer changes.
868    CustomerUpdated(stripe_shared::Customer),
869    /// Occurs whenever a new customer cash balance transactions is created.
870    CustomerCashBalanceTransactionCreated(stripe_shared::CustomerCashBalanceTransaction),
871    /// Occurs whenever a customer's entitlements change.
872    #[cfg(feature = "async-stripe-misc")]
873    EntitlementsActiveEntitlementSummaryUpdated(stripe_misc::EntitlementsActiveEntitlementSummary),
874    /// Occurs whenever a new Stripe-generated file is available for your account.
875    FileCreated(stripe_shared::File),
876    /// Occurs when a new Financial Connections account is created.
877    #[cfg(feature = "async-stripe-misc")]
878    FinancialConnectionsAccountCreated(stripe_misc::FinancialConnectionsAccount),
879    /// Occurs when a Financial Connections account's status is updated from `active` to `inactive`.
880    #[cfg(feature = "async-stripe-misc")]
881    FinancialConnectionsAccountDeactivated(stripe_misc::FinancialConnectionsAccount),
882    /// Occurs when a Financial Connections account is disconnected.
883    #[cfg(feature = "async-stripe-misc")]
884    FinancialConnectionsAccountDisconnected(stripe_misc::FinancialConnectionsAccount),
885    /// Occurs when a Financial Connections account's status is updated from `inactive` to `active`.
886    #[cfg(feature = "async-stripe-misc")]
887    FinancialConnectionsAccountReactivated(stripe_misc::FinancialConnectionsAccount),
888    /// Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`.
889    #[cfg(feature = "async-stripe-misc")]
890    FinancialConnectionsAccountRefreshedBalance(stripe_misc::FinancialConnectionsAccount),
891    /// Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`.
892    #[cfg(feature = "async-stripe-misc")]
893    FinancialConnectionsAccountRefreshedOwnership(stripe_misc::FinancialConnectionsAccount),
894    /// Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`.
895    #[cfg(feature = "async-stripe-misc")]
896    FinancialConnectionsAccountRefreshedTransactions(stripe_misc::FinancialConnectionsAccount),
897    /// Occurs whenever a VerificationSession is canceled
898    #[cfg(feature = "async-stripe-misc")]
899    IdentityVerificationSessionCanceled(stripe_misc::IdentityVerificationSession),
900    /// Occurs whenever a VerificationSession is created
901    #[cfg(feature = "async-stripe-misc")]
902    IdentityVerificationSessionCreated(stripe_misc::IdentityVerificationSession),
903    /// Occurs whenever a VerificationSession transitions to processing
904    #[cfg(feature = "async-stripe-misc")]
905    IdentityVerificationSessionProcessing(stripe_misc::IdentityVerificationSession),
906    /// Occurs whenever a VerificationSession is redacted.
907    #[cfg(feature = "async-stripe-misc")]
908    IdentityVerificationSessionRedacted(stripe_misc::IdentityVerificationSession),
909    /// Occurs whenever a VerificationSession transitions to require user input
910    #[cfg(feature = "async-stripe-misc")]
911    IdentityVerificationSessionRequiresInput(stripe_misc::IdentityVerificationSession),
912    /// Occurs whenever a VerificationSession transitions to verified
913    #[cfg(feature = "async-stripe-misc")]
914    IdentityVerificationSessionVerified(stripe_misc::IdentityVerificationSession),
915    /// Occurs whenever a new invoice is created.
916    /// To learn how webhooks can be used with this event, and how they can affect it, see [Using Webhooks with Subscriptions](https://docs.stripe.com/subscriptions/webhooks).
917    InvoiceCreated(stripe_shared::Invoice),
918    /// Occurs whenever a draft invoice is deleted.
919    /// Note: This event is not sent for [invoice previews](https://docs.stripe.com/api/invoices/create_preview).
920    InvoiceDeleted(stripe_shared::Invoice),
921    /// Occurs whenever a draft invoice cannot be finalized.
922    /// See the invoice’s [last finalization error](https://docs.stripe.com/api/invoices/object#invoice_object-last_finalization_error) for details.
923    InvoiceFinalizationFailed(stripe_shared::Invoice),
924    /// Occurs whenever a draft invoice is finalized and updated to be an open invoice.
925    InvoiceFinalized(stripe_shared::Invoice),
926    /// Occurs whenever an invoice is marked uncollectible.
927    InvoiceMarkedUncollectible(stripe_shared::Invoice),
928    /// Occurs X number of days after an invoice becomes due&mdash;where X is determined by Automations
929    InvoiceOverdue(stripe_shared::Invoice),
930    /// Occurs when an invoice transitions to paid with a non-zero amount_overpaid.
931    InvoiceOverpaid(stripe_shared::Invoice),
932    /// Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.
933    InvoicePaid(stripe_shared::Invoice),
934    /// Occurs whenever an invoice payment attempt requires further user action to complete.
935    InvoicePaymentActionRequired(stripe_shared::Invoice),
936    /// Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method.
937    InvoicePaymentFailed(stripe_shared::Invoice),
938    /// Occurs whenever an invoice payment attempt succeeds.
939    InvoicePaymentSucceeded(stripe_shared::Invoice),
940    /// Occurs whenever an invoice email is sent out.
941    InvoiceSent(stripe_shared::Invoice),
942    /// Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged&mdash;where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic).
943    /// Note: The received `Invoice` object will not have an invoice ID.
944    InvoiceUpcoming(stripe_shared::Invoice),
945    /// Occurs whenever an invoice changes (e.g., the invoice amount).
946    InvoiceUpdated(stripe_shared::Invoice),
947    /// Occurs whenever an invoice is voided.
948    InvoiceVoided(stripe_shared::Invoice),
949    /// Occurs X number of days before an invoice becomes due&mdash;where X is determined by Automations
950    InvoiceWillBeDue(stripe_shared::Invoice),
951    /// Occurs whenever an invoice item is created.
952    #[cfg(feature = "async-stripe-billing")]
953    InvoiceitemCreated(stripe_billing::InvoiceItem),
954    /// Occurs whenever an invoice item is deleted.
955    #[cfg(feature = "async-stripe-billing")]
956    InvoiceitemDeleted(stripe_billing::InvoiceItem),
957    /// Occurs whenever an authorization is created.
958    IssuingAuthorizationCreated(stripe_shared::IssuingAuthorization),
959    /// Represents a synchronous request for authorization, see [Using your integration to handle authorization requests](https://docs.stripe.com/issuing/purchases/authorizations#authorization-handling).
960    IssuingAuthorizationRequest(stripe_shared::IssuingAuthorization),
961    /// Occurs whenever an authorization is updated.
962    IssuingAuthorizationUpdated(stripe_shared::IssuingAuthorization),
963    /// Occurs whenever a card is created.
964    IssuingCardCreated(stripe_shared::IssuingCard),
965    /// Occurs whenever a card is updated.
966    IssuingCardUpdated(stripe_shared::IssuingCard),
967    /// Occurs whenever a cardholder is created.
968    IssuingCardholderCreated(stripe_shared::IssuingCardholder),
969    /// Occurs whenever a cardholder is updated.
970    IssuingCardholderUpdated(stripe_shared::IssuingCardholder),
971    /// Occurs whenever a dispute is won, lost or expired.
972    IssuingDisputeClosed(stripe_shared::IssuingDispute),
973    /// Occurs whenever a dispute is created.
974    IssuingDisputeCreated(stripe_shared::IssuingDispute),
975    /// Occurs whenever funds are reinstated to your account for an Issuing dispute.
976    IssuingDisputeFundsReinstated(stripe_shared::IssuingDispute),
977    /// Occurs whenever funds are deducted from your account for an Issuing dispute.
978    IssuingDisputeFundsRescinded(stripe_shared::IssuingDispute),
979    /// Occurs whenever a dispute is submitted.
980    IssuingDisputeSubmitted(stripe_shared::IssuingDispute),
981    /// Occurs whenever a dispute is updated.
982    IssuingDisputeUpdated(stripe_shared::IssuingDispute),
983    /// Occurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it.
984    IssuingPersonalizationDesignActivated(stripe_shared::IssuingPersonalizationDesign),
985    /// Occurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it.
986    IssuingPersonalizationDesignDeactivated(stripe_shared::IssuingPersonalizationDesign),
987    /// Occurs whenever a personalization design is rejected by design review.
988    IssuingPersonalizationDesignRejected(stripe_shared::IssuingPersonalizationDesign),
989    /// Occurs whenever a personalization design is updated.
990    IssuingPersonalizationDesignUpdated(stripe_shared::IssuingPersonalizationDesign),
991    /// Occurs whenever an issuing digital wallet token is created.
992    IssuingTokenCreated(stripe_shared::IssuingToken),
993    /// Occurs whenever an issuing digital wallet token is updated.
994    IssuingTokenUpdated(stripe_shared::IssuingToken),
995    /// Occurs whenever an issuing transaction is created.
996    IssuingTransactionCreated(stripe_shared::IssuingTransaction),
997    /// Occurs whenever an issuing transaction is updated with receipt data.
998    IssuingTransactionPurchaseDetailsReceiptUpdated(stripe_shared::IssuingTransaction),
999    /// Occurs whenever an issuing transaction is updated.
1000    IssuingTransactionUpdated(stripe_shared::IssuingTransaction),
1001    /// Occurs whenever a Mandate is updated.
1002    MandateUpdated(stripe_shared::Mandate),
1003    /// Occurs when a PaymentIntent has funds to be captured.
1004    /// Check the `amount_capturable` property on the PaymentIntent to determine the amount that can be captured.
1005    /// You may capture the PaymentIntent with an `amount_to_capture` value up to the specified amount.
1006    /// [Learn more about capturing PaymentIntents.](https://docs.stripe.com/api/payment_intents/capture).
1007    PaymentIntentAmountCapturableUpdated(stripe_shared::PaymentIntent),
1008    /// Occurs when a PaymentIntent is canceled.
1009    PaymentIntentCanceled(stripe_shared::PaymentIntent),
1010    /// Occurs when a new PaymentIntent is created.
1011    PaymentIntentCreated(stripe_shared::PaymentIntent),
1012    /// Occurs when funds are applied to a customer_balance PaymentIntent and the 'amount_remaining' changes.
1013    PaymentIntentPartiallyFunded(stripe_shared::PaymentIntent),
1014    /// Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment.
1015    PaymentIntentPaymentFailed(stripe_shared::PaymentIntent),
1016    /// Occurs when a PaymentIntent has started processing.
1017    PaymentIntentProcessing(stripe_shared::PaymentIntent),
1018    /// Occurs when a PaymentIntent transitions to requires_action state
1019    PaymentIntentRequiresAction(stripe_shared::PaymentIntent),
1020    /// Occurs when a PaymentIntent has successfully completed payment.
1021    PaymentIntentSucceeded(stripe_shared::PaymentIntent),
1022    /// Occurs when a payment link is created.
1023    PaymentLinkCreated(stripe_shared::PaymentLink),
1024    /// Occurs when a payment link is updated.
1025    PaymentLinkUpdated(stripe_shared::PaymentLink),
1026    /// Occurs whenever a new payment method is attached to a customer.
1027    PaymentMethodAttached(stripe_shared::PaymentMethod),
1028    /// Occurs whenever a payment method's details are automatically updated by the network.
1029    PaymentMethodAutomaticallyUpdated(stripe_shared::PaymentMethod),
1030    /// Occurs whenever a payment method is detached from a customer.
1031    PaymentMethodDetached(stripe_shared::PaymentMethod),
1032    /// Occurs whenever a payment method is updated via the [PaymentMethod update API](https://docs.stripe.com/api/payment_methods/update).
1033    PaymentMethodUpdated(stripe_shared::PaymentMethod),
1034    /// Occurs whenever a payout is canceled.
1035    PayoutCanceled(stripe_shared::Payout),
1036    /// Occurs whenever a payout is created.
1037    PayoutCreated(stripe_shared::Payout),
1038    /// Occurs whenever a payout attempt fails.
1039    PayoutFailed(stripe_shared::Payout),
1040    /// Occurs whenever a payout is *expected* to be available in the destination account.
1041    /// If the payout fails, a `payout.failed` notification is also sent, at a later time.
1042    PayoutPaid(stripe_shared::Payout),
1043    /// Occurs whenever balance transactions paid out in an automatic payout can be queried.
1044    PayoutReconciliationCompleted(stripe_shared::Payout),
1045    /// Occurs whenever a payout is updated.
1046    PayoutUpdated(stripe_shared::Payout),
1047    /// Occurs whenever a person associated with an account is created.
1048    PersonCreated(stripe_shared::Person),
1049    /// Occurs whenever a person associated with an account is deleted.
1050    PersonDeleted(stripe_shared::Person),
1051    /// Occurs whenever a person associated with an account is updated.
1052    PersonUpdated(stripe_shared::Person),
1053    /// Occurs whenever a plan is created.
1054    PlanCreated(stripe_shared::Plan),
1055    /// Occurs whenever a plan is deleted.
1056    PlanDeleted(stripe_shared::Plan),
1057    /// Occurs whenever a plan is updated.
1058    PlanUpdated(stripe_shared::Plan),
1059    /// Occurs whenever a price is created.
1060    PriceCreated(stripe_shared::Price),
1061    /// Occurs whenever a price is deleted.
1062    PriceDeleted(stripe_shared::Price),
1063    /// Occurs whenever a price is updated.
1064    PriceUpdated(stripe_shared::Price),
1065    /// Occurs whenever a product is created.
1066    ProductCreated(stripe_shared::Product),
1067    /// Occurs whenever a product is deleted.
1068    ProductDeleted(stripe_shared::Product),
1069    /// Occurs whenever a product is updated.
1070    ProductUpdated(stripe_shared::Product),
1071    /// Occurs whenever a promotion code is created.
1072    PromotionCodeCreated(stripe_shared::PromotionCode),
1073    /// Occurs whenever a promotion code is updated.
1074    PromotionCodeUpdated(stripe_shared::PromotionCode),
1075    /// Occurs whenever a quote is accepted.
1076    #[cfg(feature = "async-stripe-billing")]
1077    QuoteAccepted(stripe_billing::Quote),
1078    /// Occurs whenever a quote is canceled.
1079    #[cfg(feature = "async-stripe-billing")]
1080    QuoteCanceled(stripe_billing::Quote),
1081    /// Occurs whenever a quote is created.
1082    #[cfg(feature = "async-stripe-billing")]
1083    QuoteCreated(stripe_billing::Quote),
1084    /// Occurs whenever a quote is finalized.
1085    #[cfg(feature = "async-stripe-billing")]
1086    QuoteFinalized(stripe_billing::Quote),
1087    /// Occurs whenever an early fraud warning is created.
1088    #[cfg(feature = "async-stripe-fraud")]
1089    RadarEarlyFraudWarningCreated(stripe_fraud::RadarEarlyFraudWarning),
1090    /// Occurs whenever an early fraud warning is updated.
1091    #[cfg(feature = "async-stripe-fraud")]
1092    RadarEarlyFraudWarningUpdated(stripe_fraud::RadarEarlyFraudWarning),
1093    /// Occurs whenever a refund is created.
1094    RefundCreated(stripe_shared::Refund),
1095    /// Occurs whenever a refund has failed.
1096    RefundFailed(stripe_shared::Refund),
1097    /// Occurs whenever a refund is updated.
1098    RefundUpdated(stripe_shared::Refund),
1099    /// Occurs whenever a requested `ReportRun` failed to complete.
1100    #[cfg(feature = "async-stripe-misc")]
1101    ReportingReportRunFailed(stripe_misc::ReportingReportRun),
1102    /// Occurs whenever a requested `ReportRun` completed successfully.
1103    #[cfg(feature = "async-stripe-misc")]
1104    ReportingReportRunSucceeded(stripe_misc::ReportingReportRun),
1105    /// Occurs whenever a `ReportType` is updated (typically to indicate that a new day's data has come available).
1106    #[cfg(feature = "async-stripe-misc")]
1107    ReportingReportTypeUpdated(stripe_misc::ReportingReportType),
1108    /// Occurs whenever a review is closed.
1109    /// The review's `reason` field indicates why: `approved`, `disputed`, `refunded`, `refunded_as_fraud`, or `canceled`.
1110    ReviewClosed(stripe_shared::Review),
1111    /// Occurs whenever a review is opened.
1112    ReviewOpened(stripe_shared::Review),
1113    /// Occurs when a SetupIntent is canceled.
1114    SetupIntentCanceled(stripe_shared::SetupIntent),
1115    /// Occurs when a new SetupIntent is created.
1116    SetupIntentCreated(stripe_shared::SetupIntent),
1117    /// Occurs when a SetupIntent is in requires_action state.
1118    SetupIntentRequiresAction(stripe_shared::SetupIntent),
1119    /// Occurs when a SetupIntent has failed the attempt to setup a payment method.
1120    SetupIntentSetupFailed(stripe_shared::SetupIntent),
1121    /// Occurs when an SetupIntent has successfully setup a payment method.
1122    SetupIntentSucceeded(stripe_shared::SetupIntent),
1123    /// Occurs whenever a Sigma scheduled query run finishes.
1124    #[cfg(feature = "async-stripe-misc")]
1125    SigmaScheduledQueryRunCreated(stripe_misc::ScheduledQueryRun),
1126    /// Occurs whenever a source is canceled.
1127    SourceCanceled(stripe_shared::Source),
1128    /// Occurs whenever a source transitions to chargeable.
1129    SourceChargeable(stripe_shared::Source),
1130    /// Occurs whenever a source fails.
1131    SourceFailed(stripe_shared::Source),
1132    /// Occurs whenever a source mandate notification method is set to manual.
1133    #[cfg(feature = "async-stripe-payment")]
1134    SourceMandateNotification(stripe_payment::SourceMandateNotification),
1135    /// Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment.
1136    SourceRefundAttributesRequired(stripe_shared::Source),
1137    /// Occurs whenever a source transaction is created.
1138    SourceTransactionCreated(stripe_shared::SourceTransaction),
1139    /// Occurs whenever a source transaction is updated.
1140    SourceTransactionUpdated(stripe_shared::SourceTransaction),
1141    /// Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency.
1142    SubscriptionScheduleAborted(stripe_shared::SubscriptionSchedule),
1143    /// Occurs whenever a subscription schedule is canceled.
1144    SubscriptionScheduleCanceled(stripe_shared::SubscriptionSchedule),
1145    /// Occurs whenever a new subscription schedule is completed.
1146    SubscriptionScheduleCompleted(stripe_shared::SubscriptionSchedule),
1147    /// Occurs whenever a new subscription schedule is created.
1148    SubscriptionScheduleCreated(stripe_shared::SubscriptionSchedule),
1149    /// Occurs 7 days before a subscription schedule will expire.
1150    SubscriptionScheduleExpiring(stripe_shared::SubscriptionSchedule),
1151    /// Occurs whenever a new subscription schedule is released.
1152    SubscriptionScheduleReleased(stripe_shared::SubscriptionSchedule),
1153    /// Occurs whenever a subscription schedule is updated.
1154    SubscriptionScheduleUpdated(stripe_shared::SubscriptionSchedule),
1155    /// Occurs whenever tax settings is updated.
1156    #[cfg(feature = "async-stripe-misc")]
1157    TaxSettingsUpdated(stripe_misc::TaxSettings),
1158    /// Occurs whenever a new tax rate is created.
1159    TaxRateCreated(stripe_shared::TaxRate),
1160    /// Occurs whenever a tax rate is updated.
1161    TaxRateUpdated(stripe_shared::TaxRate),
1162    /// Occurs whenever an action sent to a Terminal reader failed.
1163    #[cfg(feature = "async-stripe-terminal")]
1164    TerminalReaderActionFailed(stripe_terminal::TerminalReader),
1165    /// Occurs whenever an action sent to a Terminal reader was successful.
1166    #[cfg(feature = "async-stripe-terminal")]
1167    TerminalReaderActionSucceeded(stripe_terminal::TerminalReader),
1168    /// Occurs whenever a test clock starts advancing.
1169    TestHelpersTestClockAdvancing(stripe_shared::TestHelpersTestClock),
1170    /// Occurs whenever a test clock is created.
1171    TestHelpersTestClockCreated(stripe_shared::TestHelpersTestClock),
1172    /// Occurs whenever a test clock is deleted.
1173    TestHelpersTestClockDeleted(stripe_shared::TestHelpersTestClock),
1174    /// Occurs whenever a test clock fails to advance its frozen time.
1175    TestHelpersTestClockInternalFailure(stripe_shared::TestHelpersTestClock),
1176    /// Occurs whenever a test clock transitions to a ready status.
1177    TestHelpersTestClockReady(stripe_shared::TestHelpersTestClock),
1178    /// Occurs whenever a top-up is canceled.
1179    TopupCanceled(stripe_shared::Topup),
1180    /// Occurs whenever a top-up is created.
1181    TopupCreated(stripe_shared::Topup),
1182    /// Occurs whenever a top-up fails.
1183    TopupFailed(stripe_shared::Topup),
1184    /// Occurs whenever a top-up is reversed.
1185    TopupReversed(stripe_shared::Topup),
1186    /// Occurs whenever a top-up succeeds.
1187    TopupSucceeded(stripe_shared::Topup),
1188    /// Occurs whenever a transfer is created.
1189    TransferCreated(stripe_shared::Transfer),
1190    /// Occurs whenever a transfer is reversed, including partial reversals.
1191    TransferReversed(stripe_shared::Transfer),
1192    /// Occurs whenever a transfer's description or metadata is updated.
1193    TransferUpdated(stripe_shared::Transfer),
1194    /// Occurs whenever an CreditReversal is submitted and created.
1195    #[cfg(feature = "async-stripe-treasury")]
1196    TreasuryCreditReversalCreated(stripe_treasury::TreasuryCreditReversal),
1197    /// Occurs whenever an CreditReversal post is posted.
1198    #[cfg(feature = "async-stripe-treasury")]
1199    TreasuryCreditReversalPosted(stripe_treasury::TreasuryCreditReversal),
1200    /// Occurs whenever a DebitReversal is completed.
1201    #[cfg(feature = "async-stripe-treasury")]
1202    TreasuryDebitReversalCompleted(stripe_treasury::TreasuryDebitReversal),
1203    /// Occurs whenever a DebitReversal is created.
1204    #[cfg(feature = "async-stripe-treasury")]
1205    TreasuryDebitReversalCreated(stripe_treasury::TreasuryDebitReversal),
1206    /// Occurs whenever an initial credit is granted on a DebitReversal.
1207    #[cfg(feature = "async-stripe-treasury")]
1208    TreasuryDebitReversalInitialCreditGranted(stripe_treasury::TreasuryDebitReversal),
1209    /// Occurs whenever the status of the FinancialAccount becomes closed.
1210    #[cfg(feature = "async-stripe-treasury")]
1211    TreasuryFinancialAccountClosed(stripe_treasury::TreasuryFinancialAccount),
1212    /// Occurs whenever a new FinancialAccount is created.
1213    #[cfg(feature = "async-stripe-treasury")]
1214    TreasuryFinancialAccountCreated(stripe_treasury::TreasuryFinancialAccount),
1215    /// Occurs whenever the statuses of any features within an existing FinancialAccount are updated.
1216    #[cfg(feature = "async-stripe-treasury")]
1217    TreasuryFinancialAccountFeaturesStatusUpdated(stripe_treasury::TreasuryFinancialAccount),
1218    /// Occurs whenever an InboundTransfer is canceled.
1219    #[cfg(feature = "async-stripe-treasury")]
1220    TreasuryInboundTransferCanceled(stripe_treasury::TreasuryInboundTransfer),
1221    /// Occurs whenever an InboundTransfer is created.
1222    #[cfg(feature = "async-stripe-treasury")]
1223    TreasuryInboundTransferCreated(stripe_treasury::TreasuryInboundTransfer),
1224    /// Occurs whenever an InboundTransfer has failed.
1225    #[cfg(feature = "async-stripe-treasury")]
1226    TreasuryInboundTransferFailed(stripe_treasury::TreasuryInboundTransfer),
1227    /// Occurs whenever an InboundTransfer has succeeded.
1228    #[cfg(feature = "async-stripe-treasury")]
1229    TreasuryInboundTransferSucceeded(stripe_treasury::TreasuryInboundTransfer),
1230    /// Occurs whenever an OutboundPayment is canceled.
1231    #[cfg(feature = "async-stripe-treasury")]
1232    TreasuryOutboundPaymentCanceled(stripe_treasury::TreasuryOutboundPayment),
1233    /// Occurs whenever a new OutboundPayment is successfully created.
1234    #[cfg(feature = "async-stripe-treasury")]
1235    TreasuryOutboundPaymentCreated(stripe_treasury::TreasuryOutboundPayment),
1236    /// Occurs whenever the arrival date on an OutboundPayment updates.
1237    #[cfg(feature = "async-stripe-treasury")]
1238    TreasuryOutboundPaymentExpectedArrivalDateUpdated(stripe_treasury::TreasuryOutboundPayment),
1239    /// Occurs whenever an OutboundPayment fails.
1240    #[cfg(feature = "async-stripe-treasury")]
1241    TreasuryOutboundPaymentFailed(stripe_treasury::TreasuryOutboundPayment),
1242    /// Occurs whenever an OutboundPayment posts.
1243    #[cfg(feature = "async-stripe-treasury")]
1244    TreasuryOutboundPaymentPosted(stripe_treasury::TreasuryOutboundPayment),
1245    /// Occurs whenever an OutboundPayment was returned.
1246    #[cfg(feature = "async-stripe-treasury")]
1247    TreasuryOutboundPaymentReturned(stripe_treasury::TreasuryOutboundPayment),
1248    /// Occurs whenever tracking_details on an OutboundPayment is updated.
1249    #[cfg(feature = "async-stripe-treasury")]
1250    TreasuryOutboundPaymentTrackingDetailsUpdated(stripe_treasury::TreasuryOutboundPayment),
1251    /// Occurs whenever an OutboundTransfer is canceled.
1252    #[cfg(feature = "async-stripe-treasury")]
1253    TreasuryOutboundTransferCanceled(stripe_treasury::TreasuryOutboundTransfer),
1254    /// Occurs whenever an OutboundTransfer is created.
1255    #[cfg(feature = "async-stripe-treasury")]
1256    TreasuryOutboundTransferCreated(stripe_treasury::TreasuryOutboundTransfer),
1257    /// Occurs whenever the arrival date on an OutboundTransfer updates.
1258    #[cfg(feature = "async-stripe-treasury")]
1259    TreasuryOutboundTransferExpectedArrivalDateUpdated(stripe_treasury::TreasuryOutboundTransfer),
1260    /// Occurs whenever an OutboundTransfer has failed.
1261    #[cfg(feature = "async-stripe-treasury")]
1262    TreasuryOutboundTransferFailed(stripe_treasury::TreasuryOutboundTransfer),
1263    /// Occurs whenever an OutboundTransfer is posted.
1264    #[cfg(feature = "async-stripe-treasury")]
1265    TreasuryOutboundTransferPosted(stripe_treasury::TreasuryOutboundTransfer),
1266    /// Occurs whenever an OutboundTransfer is returned.
1267    #[cfg(feature = "async-stripe-treasury")]
1268    TreasuryOutboundTransferReturned(stripe_treasury::TreasuryOutboundTransfer),
1269    /// Occurs whenever tracking_details on an OutboundTransfer is updated.
1270    #[cfg(feature = "async-stripe-treasury")]
1271    TreasuryOutboundTransferTrackingDetailsUpdated(stripe_treasury::TreasuryOutboundTransfer),
1272    /// Occurs whenever a received_credit is created as a result of funds being pushed by another account.
1273    #[cfg(feature = "async-stripe-treasury")]
1274    TreasuryReceivedCreditCreated(stripe_treasury::TreasuryReceivedCredit),
1275    /// Occurs whenever a received_credit transitions to failed state. Only applicable for check deposits.
1276    #[cfg(feature = "async-stripe-treasury")]
1277    TreasuryReceivedCreditFailed(stripe_treasury::TreasuryReceivedCredit),
1278    /// Occurs whenever a received_credit transitions to succeeded state.
1279    /// Only applicable for check deposits.
1280    #[cfg(feature = "async-stripe-treasury")]
1281    TreasuryReceivedCreditSucceeded(stripe_treasury::TreasuryReceivedCredit),
1282    /// Occurs whenever a received_debit is created as a result of funds being pulled by another account.
1283    #[cfg(feature = "async-stripe-treasury")]
1284    TreasuryReceivedDebitCreated(stripe_treasury::TreasuryReceivedDebit),
1285    #[cfg_attr(
1286        any(feature = "deserialize", feature = "serialize"),
1287        serde(with = "stripe_types::with_serde_json")
1288    )]
1289    Unknown(miniserde::json::Value),
1290}
1291impl EventObject {
1292    pub(crate) fn from_raw_data(typ: &str, data: miniserde::json::Value) -> Option<Self> {
1293        use stripe_types::miniserde_helpers::FromValueOpt;
1294        Some(match typ {
1295            "account.application.authorized" => {
1296                Self::AccountApplicationAuthorized(FromValueOpt::from_value(data)?)
1297            }
1298            "account.application.deauthorized" => {
1299                Self::AccountApplicationDeauthorized(FromValueOpt::from_value(data)?)
1300            }
1301            "account.external_account.created" => {
1302                Self::AccountExternalAccountCreated(FromValueOpt::from_value(data)?)
1303            }
1304            "account.external_account.deleted" => {
1305                Self::AccountExternalAccountDeleted(FromValueOpt::from_value(data)?)
1306            }
1307            "account.external_account.updated" => {
1308                Self::AccountExternalAccountUpdated(FromValueOpt::from_value(data)?)
1309            }
1310            "account.updated" => Self::AccountUpdated(FromValueOpt::from_value(data)?),
1311            "application_fee.created" => {
1312                Self::ApplicationFeeCreated(FromValueOpt::from_value(data)?)
1313            }
1314            "application_fee.refund.updated" => {
1315                Self::ApplicationFeeRefundUpdated(FromValueOpt::from_value(data)?)
1316            }
1317            "application_fee.refunded" => {
1318                Self::ApplicationFeeRefunded(FromValueOpt::from_value(data)?)
1319            }
1320            #[cfg(feature = "async-stripe-core")]
1321            "balance.available" => Self::BalanceAvailable(FromValueOpt::from_value(data)?),
1322            #[cfg(feature = "async-stripe-billing")]
1323            "billing.alert.triggered" => {
1324                Self::BillingAlertTriggered(FromValueOpt::from_value(data)?)
1325            }
1326            "billing.credit_balance_transaction.created" => {
1327                Self::BillingCreditBalanceTransactionCreated(FromValueOpt::from_value(data)?)
1328            }
1329            "billing.credit_grant.created" => {
1330                Self::BillingCreditGrantCreated(FromValueOpt::from_value(data)?)
1331            }
1332            "billing.credit_grant.updated" => {
1333                Self::BillingCreditGrantUpdated(FromValueOpt::from_value(data)?)
1334            }
1335            #[cfg(feature = "async-stripe-billing")]
1336            "billing.meter.created" => Self::BillingMeterCreated(FromValueOpt::from_value(data)?),
1337            #[cfg(feature = "async-stripe-billing")]
1338            "billing.meter.deactivated" => {
1339                Self::BillingMeterDeactivated(FromValueOpt::from_value(data)?)
1340            }
1341            #[cfg(feature = "async-stripe-billing")]
1342            "billing.meter.reactivated" => {
1343                Self::BillingMeterReactivated(FromValueOpt::from_value(data)?)
1344            }
1345            #[cfg(feature = "async-stripe-billing")]
1346            "billing.meter.updated" => Self::BillingMeterUpdated(FromValueOpt::from_value(data)?),
1347            #[cfg(feature = "async-stripe-billing")]
1348            "billing_portal.configuration.created" => {
1349                Self::BillingPortalConfigurationCreated(FromValueOpt::from_value(data)?)
1350            }
1351            #[cfg(feature = "async-stripe-billing")]
1352            "billing_portal.configuration.updated" => {
1353                Self::BillingPortalConfigurationUpdated(FromValueOpt::from_value(data)?)
1354            }
1355            #[cfg(feature = "async-stripe-billing")]
1356            "billing_portal.session.created" => {
1357                Self::BillingPortalSessionCreated(FromValueOpt::from_value(data)?)
1358            }
1359            "capability.updated" => Self::CapabilityUpdated(FromValueOpt::from_value(data)?),
1360            "cash_balance.funds_available" => {
1361                Self::CashBalanceFundsAvailable(FromValueOpt::from_value(data)?)
1362            }
1363            "charge.captured" => Self::ChargeCaptured(FromValueOpt::from_value(data)?),
1364            "charge.dispute.closed" => Self::ChargeDisputeClosed(FromValueOpt::from_value(data)?),
1365            "charge.dispute.created" => Self::ChargeDisputeCreated(FromValueOpt::from_value(data)?),
1366            "charge.dispute.funds_reinstated" => {
1367                Self::ChargeDisputeFundsReinstated(FromValueOpt::from_value(data)?)
1368            }
1369            "charge.dispute.funds_withdrawn" => {
1370                Self::ChargeDisputeFundsWithdrawn(FromValueOpt::from_value(data)?)
1371            }
1372            "charge.dispute.updated" => Self::ChargeDisputeUpdated(FromValueOpt::from_value(data)?),
1373            "charge.expired" => Self::ChargeExpired(FromValueOpt::from_value(data)?),
1374            "charge.failed" => Self::ChargeFailed(FromValueOpt::from_value(data)?),
1375            "charge.pending" => Self::ChargePending(FromValueOpt::from_value(data)?),
1376            "charge.refund.updated" => Self::ChargeRefundUpdated(FromValueOpt::from_value(data)?),
1377            "charge.refunded" => Self::ChargeRefunded(FromValueOpt::from_value(data)?),
1378            "charge.succeeded" => Self::ChargeSucceeded(FromValueOpt::from_value(data)?),
1379            "charge.updated" => Self::ChargeUpdated(FromValueOpt::from_value(data)?),
1380            "checkout.session.async_payment_failed" => {
1381                Self::CheckoutSessionAsyncPaymentFailed(FromValueOpt::from_value(data)?)
1382            }
1383            "checkout.session.async_payment_succeeded" => {
1384                Self::CheckoutSessionAsyncPaymentSucceeded(FromValueOpt::from_value(data)?)
1385            }
1386            "checkout.session.completed" => {
1387                Self::CheckoutSessionCompleted(FromValueOpt::from_value(data)?)
1388            }
1389            "checkout.session.expired" => {
1390                Self::CheckoutSessionExpired(FromValueOpt::from_value(data)?)
1391            }
1392            #[cfg(feature = "async-stripe-misc")]
1393            "climate.order.canceled" => Self::ClimateOrderCanceled(FromValueOpt::from_value(data)?),
1394            #[cfg(feature = "async-stripe-misc")]
1395            "climate.order.created" => Self::ClimateOrderCreated(FromValueOpt::from_value(data)?),
1396            #[cfg(feature = "async-stripe-misc")]
1397            "climate.order.delayed" => Self::ClimateOrderDelayed(FromValueOpt::from_value(data)?),
1398            #[cfg(feature = "async-stripe-misc")]
1399            "climate.order.delivered" => {
1400                Self::ClimateOrderDelivered(FromValueOpt::from_value(data)?)
1401            }
1402            #[cfg(feature = "async-stripe-misc")]
1403            "climate.order.product_substituted" => {
1404                Self::ClimateOrderProductSubstituted(FromValueOpt::from_value(data)?)
1405            }
1406            #[cfg(feature = "async-stripe-misc")]
1407            "climate.product.created" => {
1408                Self::ClimateProductCreated(FromValueOpt::from_value(data)?)
1409            }
1410            #[cfg(feature = "async-stripe-misc")]
1411            "climate.product.pricing_updated" => {
1412                Self::ClimateProductPricingUpdated(FromValueOpt::from_value(data)?)
1413            }
1414            "coupon.created" => Self::CouponCreated(FromValueOpt::from_value(data)?),
1415            "coupon.deleted" => Self::CouponDeleted(FromValueOpt::from_value(data)?),
1416            "coupon.updated" => Self::CouponUpdated(FromValueOpt::from_value(data)?),
1417            "credit_note.created" => Self::CreditNoteCreated(FromValueOpt::from_value(data)?),
1418            "credit_note.updated" => Self::CreditNoteUpdated(FromValueOpt::from_value(data)?),
1419            "credit_note.voided" => Self::CreditNoteVoided(FromValueOpt::from_value(data)?),
1420            "customer.created" => Self::CustomerCreated(FromValueOpt::from_value(data)?),
1421            "customer.deleted" => Self::CustomerDeleted(FromValueOpt::from_value(data)?),
1422            "customer.discount.created" => {
1423                Self::CustomerDiscountCreated(FromValueOpt::from_value(data)?)
1424            }
1425            "customer.discount.deleted" => {
1426                Self::CustomerDiscountDeleted(FromValueOpt::from_value(data)?)
1427            }
1428            "customer.discount.updated" => {
1429                Self::CustomerDiscountUpdated(FromValueOpt::from_value(data)?)
1430            }
1431            "customer.source.created" => {
1432                Self::CustomerSourceCreated(FromValueOpt::from_value(data)?)
1433            }
1434            "customer.source.deleted" => {
1435                Self::CustomerSourceDeleted(FromValueOpt::from_value(data)?)
1436            }
1437            "customer.source.expiring" => {
1438                Self::CustomerSourceExpiring(FromValueOpt::from_value(data)?)
1439            }
1440            "customer.source.updated" => {
1441                Self::CustomerSourceUpdated(FromValueOpt::from_value(data)?)
1442            }
1443            "customer.subscription.created" => {
1444                Self::CustomerSubscriptionCreated(FromValueOpt::from_value(data)?)
1445            }
1446            "customer.subscription.deleted" => {
1447                Self::CustomerSubscriptionDeleted(FromValueOpt::from_value(data)?)
1448            }
1449            "customer.subscription.paused" => {
1450                Self::CustomerSubscriptionPaused(FromValueOpt::from_value(data)?)
1451            }
1452            "customer.subscription.pending_update_applied" => {
1453                Self::CustomerSubscriptionPendingUpdateApplied(FromValueOpt::from_value(data)?)
1454            }
1455            "customer.subscription.pending_update_expired" => {
1456                Self::CustomerSubscriptionPendingUpdateExpired(FromValueOpt::from_value(data)?)
1457            }
1458            "customer.subscription.resumed" => {
1459                Self::CustomerSubscriptionResumed(FromValueOpt::from_value(data)?)
1460            }
1461            "customer.subscription.trial_will_end" => {
1462                Self::CustomerSubscriptionTrialWillEnd(FromValueOpt::from_value(data)?)
1463            }
1464            "customer.subscription.updated" => {
1465                Self::CustomerSubscriptionUpdated(FromValueOpt::from_value(data)?)
1466            }
1467            "customer.tax_id.created" => {
1468                Self::CustomerTaxIdCreated(FromValueOpt::from_value(data)?)
1469            }
1470            "customer.tax_id.deleted" => {
1471                Self::CustomerTaxIdDeleted(FromValueOpt::from_value(data)?)
1472            }
1473            "customer.tax_id.updated" => {
1474                Self::CustomerTaxIdUpdated(FromValueOpt::from_value(data)?)
1475            }
1476            "customer.updated" => Self::CustomerUpdated(FromValueOpt::from_value(data)?),
1477            "customer_cash_balance_transaction.created" => {
1478                Self::CustomerCashBalanceTransactionCreated(FromValueOpt::from_value(data)?)
1479            }
1480            #[cfg(feature = "async-stripe-misc")]
1481            "entitlements.active_entitlement_summary.updated" => {
1482                Self::EntitlementsActiveEntitlementSummaryUpdated(FromValueOpt::from_value(data)?)
1483            }
1484            "file.created" => Self::FileCreated(FromValueOpt::from_value(data)?),
1485            #[cfg(feature = "async-stripe-misc")]
1486            "financial_connections.account.created" => {
1487                Self::FinancialConnectionsAccountCreated(FromValueOpt::from_value(data)?)
1488            }
1489            #[cfg(feature = "async-stripe-misc")]
1490            "financial_connections.account.deactivated" => {
1491                Self::FinancialConnectionsAccountDeactivated(FromValueOpt::from_value(data)?)
1492            }
1493            #[cfg(feature = "async-stripe-misc")]
1494            "financial_connections.account.disconnected" => {
1495                Self::FinancialConnectionsAccountDisconnected(FromValueOpt::from_value(data)?)
1496            }
1497            #[cfg(feature = "async-stripe-misc")]
1498            "financial_connections.account.reactivated" => {
1499                Self::FinancialConnectionsAccountReactivated(FromValueOpt::from_value(data)?)
1500            }
1501            #[cfg(feature = "async-stripe-misc")]
1502            "financial_connections.account.refreshed_balance" => {
1503                Self::FinancialConnectionsAccountRefreshedBalance(FromValueOpt::from_value(data)?)
1504            }
1505            #[cfg(feature = "async-stripe-misc")]
1506            "financial_connections.account.refreshed_ownership" => {
1507                Self::FinancialConnectionsAccountRefreshedOwnership(FromValueOpt::from_value(data)?)
1508            }
1509            #[cfg(feature = "async-stripe-misc")]
1510            "financial_connections.account.refreshed_transactions" => {
1511                Self::FinancialConnectionsAccountRefreshedTransactions(FromValueOpt::from_value(
1512                    data,
1513                )?)
1514            }
1515            #[cfg(feature = "async-stripe-misc")]
1516            "identity.verification_session.canceled" => {
1517                Self::IdentityVerificationSessionCanceled(FromValueOpt::from_value(data)?)
1518            }
1519            #[cfg(feature = "async-stripe-misc")]
1520            "identity.verification_session.created" => {
1521                Self::IdentityVerificationSessionCreated(FromValueOpt::from_value(data)?)
1522            }
1523            #[cfg(feature = "async-stripe-misc")]
1524            "identity.verification_session.processing" => {
1525                Self::IdentityVerificationSessionProcessing(FromValueOpt::from_value(data)?)
1526            }
1527            #[cfg(feature = "async-stripe-misc")]
1528            "identity.verification_session.redacted" => {
1529                Self::IdentityVerificationSessionRedacted(FromValueOpt::from_value(data)?)
1530            }
1531            #[cfg(feature = "async-stripe-misc")]
1532            "identity.verification_session.requires_input" => {
1533                Self::IdentityVerificationSessionRequiresInput(FromValueOpt::from_value(data)?)
1534            }
1535            #[cfg(feature = "async-stripe-misc")]
1536            "identity.verification_session.verified" => {
1537                Self::IdentityVerificationSessionVerified(FromValueOpt::from_value(data)?)
1538            }
1539            "invoice.created" => Self::InvoiceCreated(FromValueOpt::from_value(data)?),
1540            "invoice.deleted" => Self::InvoiceDeleted(FromValueOpt::from_value(data)?),
1541            "invoice.finalization_failed" => {
1542                Self::InvoiceFinalizationFailed(FromValueOpt::from_value(data)?)
1543            }
1544            "invoice.finalized" => Self::InvoiceFinalized(FromValueOpt::from_value(data)?),
1545            "invoice.marked_uncollectible" => {
1546                Self::InvoiceMarkedUncollectible(FromValueOpt::from_value(data)?)
1547            }
1548            "invoice.overdue" => Self::InvoiceOverdue(FromValueOpt::from_value(data)?),
1549            "invoice.overpaid" => Self::InvoiceOverpaid(FromValueOpt::from_value(data)?),
1550            "invoice.paid" => Self::InvoicePaid(FromValueOpt::from_value(data)?),
1551            "invoice.payment_action_required" => {
1552                Self::InvoicePaymentActionRequired(FromValueOpt::from_value(data)?)
1553            }
1554            "invoice.payment_failed" => Self::InvoicePaymentFailed(FromValueOpt::from_value(data)?),
1555            "invoice.payment_succeeded" => {
1556                Self::InvoicePaymentSucceeded(FromValueOpt::from_value(data)?)
1557            }
1558            "invoice.sent" => Self::InvoiceSent(FromValueOpt::from_value(data)?),
1559            "invoice.upcoming" => Self::InvoiceUpcoming(FromValueOpt::from_value(data)?),
1560            "invoice.updated" => Self::InvoiceUpdated(FromValueOpt::from_value(data)?),
1561            "invoice.voided" => Self::InvoiceVoided(FromValueOpt::from_value(data)?),
1562            "invoice.will_be_due" => Self::InvoiceWillBeDue(FromValueOpt::from_value(data)?),
1563            #[cfg(feature = "async-stripe-billing")]
1564            "invoiceitem.created" => Self::InvoiceitemCreated(FromValueOpt::from_value(data)?),
1565            #[cfg(feature = "async-stripe-billing")]
1566            "invoiceitem.deleted" => Self::InvoiceitemDeleted(FromValueOpt::from_value(data)?),
1567            "issuing_authorization.created" => {
1568                Self::IssuingAuthorizationCreated(FromValueOpt::from_value(data)?)
1569            }
1570            "issuing_authorization.request" => {
1571                Self::IssuingAuthorizationRequest(FromValueOpt::from_value(data)?)
1572            }
1573            "issuing_authorization.updated" => {
1574                Self::IssuingAuthorizationUpdated(FromValueOpt::from_value(data)?)
1575            }
1576            "issuing_card.created" => Self::IssuingCardCreated(FromValueOpt::from_value(data)?),
1577            "issuing_card.updated" => Self::IssuingCardUpdated(FromValueOpt::from_value(data)?),
1578            "issuing_cardholder.created" => {
1579                Self::IssuingCardholderCreated(FromValueOpt::from_value(data)?)
1580            }
1581            "issuing_cardholder.updated" => {
1582                Self::IssuingCardholderUpdated(FromValueOpt::from_value(data)?)
1583            }
1584            "issuing_dispute.closed" => Self::IssuingDisputeClosed(FromValueOpt::from_value(data)?),
1585            "issuing_dispute.created" => {
1586                Self::IssuingDisputeCreated(FromValueOpt::from_value(data)?)
1587            }
1588            "issuing_dispute.funds_reinstated" => {
1589                Self::IssuingDisputeFundsReinstated(FromValueOpt::from_value(data)?)
1590            }
1591            "issuing_dispute.funds_rescinded" => {
1592                Self::IssuingDisputeFundsRescinded(FromValueOpt::from_value(data)?)
1593            }
1594            "issuing_dispute.submitted" => {
1595                Self::IssuingDisputeSubmitted(FromValueOpt::from_value(data)?)
1596            }
1597            "issuing_dispute.updated" => {
1598                Self::IssuingDisputeUpdated(FromValueOpt::from_value(data)?)
1599            }
1600            "issuing_personalization_design.activated" => {
1601                Self::IssuingPersonalizationDesignActivated(FromValueOpt::from_value(data)?)
1602            }
1603            "issuing_personalization_design.deactivated" => {
1604                Self::IssuingPersonalizationDesignDeactivated(FromValueOpt::from_value(data)?)
1605            }
1606            "issuing_personalization_design.rejected" => {
1607                Self::IssuingPersonalizationDesignRejected(FromValueOpt::from_value(data)?)
1608            }
1609            "issuing_personalization_design.updated" => {
1610                Self::IssuingPersonalizationDesignUpdated(FromValueOpt::from_value(data)?)
1611            }
1612            "issuing_token.created" => Self::IssuingTokenCreated(FromValueOpt::from_value(data)?),
1613            "issuing_token.updated" => Self::IssuingTokenUpdated(FromValueOpt::from_value(data)?),
1614            "issuing_transaction.created" => {
1615                Self::IssuingTransactionCreated(FromValueOpt::from_value(data)?)
1616            }
1617            "issuing_transaction.purchase_details_receipt_updated" => {
1618                Self::IssuingTransactionPurchaseDetailsReceiptUpdated(FromValueOpt::from_value(
1619                    data,
1620                )?)
1621            }
1622            "issuing_transaction.updated" => {
1623                Self::IssuingTransactionUpdated(FromValueOpt::from_value(data)?)
1624            }
1625            "mandate.updated" => Self::MandateUpdated(FromValueOpt::from_value(data)?),
1626            "payment_intent.amount_capturable_updated" => {
1627                Self::PaymentIntentAmountCapturableUpdated(FromValueOpt::from_value(data)?)
1628            }
1629            "payment_intent.canceled" => {
1630                Self::PaymentIntentCanceled(FromValueOpt::from_value(data)?)
1631            }
1632            "payment_intent.created" => Self::PaymentIntentCreated(FromValueOpt::from_value(data)?),
1633            "payment_intent.partially_funded" => {
1634                Self::PaymentIntentPartiallyFunded(FromValueOpt::from_value(data)?)
1635            }
1636            "payment_intent.payment_failed" => {
1637                Self::PaymentIntentPaymentFailed(FromValueOpt::from_value(data)?)
1638            }
1639            "payment_intent.processing" => {
1640                Self::PaymentIntentProcessing(FromValueOpt::from_value(data)?)
1641            }
1642            "payment_intent.requires_action" => {
1643                Self::PaymentIntentRequiresAction(FromValueOpt::from_value(data)?)
1644            }
1645            "payment_intent.succeeded" => {
1646                Self::PaymentIntentSucceeded(FromValueOpt::from_value(data)?)
1647            }
1648            "payment_link.created" => Self::PaymentLinkCreated(FromValueOpt::from_value(data)?),
1649            "payment_link.updated" => Self::PaymentLinkUpdated(FromValueOpt::from_value(data)?),
1650            "payment_method.attached" => {
1651                Self::PaymentMethodAttached(FromValueOpt::from_value(data)?)
1652            }
1653            "payment_method.automatically_updated" => {
1654                Self::PaymentMethodAutomaticallyUpdated(FromValueOpt::from_value(data)?)
1655            }
1656            "payment_method.detached" => {
1657                Self::PaymentMethodDetached(FromValueOpt::from_value(data)?)
1658            }
1659            "payment_method.updated" => Self::PaymentMethodUpdated(FromValueOpt::from_value(data)?),
1660            "payout.canceled" => Self::PayoutCanceled(FromValueOpt::from_value(data)?),
1661            "payout.created" => Self::PayoutCreated(FromValueOpt::from_value(data)?),
1662            "payout.failed" => Self::PayoutFailed(FromValueOpt::from_value(data)?),
1663            "payout.paid" => Self::PayoutPaid(FromValueOpt::from_value(data)?),
1664            "payout.reconciliation_completed" => {
1665                Self::PayoutReconciliationCompleted(FromValueOpt::from_value(data)?)
1666            }
1667            "payout.updated" => Self::PayoutUpdated(FromValueOpt::from_value(data)?),
1668            "person.created" => Self::PersonCreated(FromValueOpt::from_value(data)?),
1669            "person.deleted" => Self::PersonDeleted(FromValueOpt::from_value(data)?),
1670            "person.updated" => Self::PersonUpdated(FromValueOpt::from_value(data)?),
1671            "plan.created" => Self::PlanCreated(FromValueOpt::from_value(data)?),
1672            "plan.deleted" => Self::PlanDeleted(FromValueOpt::from_value(data)?),
1673            "plan.updated" => Self::PlanUpdated(FromValueOpt::from_value(data)?),
1674            "price.created" => Self::PriceCreated(FromValueOpt::from_value(data)?),
1675            "price.deleted" => Self::PriceDeleted(FromValueOpt::from_value(data)?),
1676            "price.updated" => Self::PriceUpdated(FromValueOpt::from_value(data)?),
1677            "product.created" => Self::ProductCreated(FromValueOpt::from_value(data)?),
1678            "product.deleted" => Self::ProductDeleted(FromValueOpt::from_value(data)?),
1679            "product.updated" => Self::ProductUpdated(FromValueOpt::from_value(data)?),
1680            "promotion_code.created" => Self::PromotionCodeCreated(FromValueOpt::from_value(data)?),
1681            "promotion_code.updated" => Self::PromotionCodeUpdated(FromValueOpt::from_value(data)?),
1682            #[cfg(feature = "async-stripe-billing")]
1683            "quote.accepted" => Self::QuoteAccepted(FromValueOpt::from_value(data)?),
1684            #[cfg(feature = "async-stripe-billing")]
1685            "quote.canceled" => Self::QuoteCanceled(FromValueOpt::from_value(data)?),
1686            #[cfg(feature = "async-stripe-billing")]
1687            "quote.created" => Self::QuoteCreated(FromValueOpt::from_value(data)?),
1688            #[cfg(feature = "async-stripe-billing")]
1689            "quote.finalized" => Self::QuoteFinalized(FromValueOpt::from_value(data)?),
1690            #[cfg(feature = "async-stripe-fraud")]
1691            "radar.early_fraud_warning.created" => {
1692                Self::RadarEarlyFraudWarningCreated(FromValueOpt::from_value(data)?)
1693            }
1694            #[cfg(feature = "async-stripe-fraud")]
1695            "radar.early_fraud_warning.updated" => {
1696                Self::RadarEarlyFraudWarningUpdated(FromValueOpt::from_value(data)?)
1697            }
1698            "refund.created" => Self::RefundCreated(FromValueOpt::from_value(data)?),
1699            "refund.failed" => Self::RefundFailed(FromValueOpt::from_value(data)?),
1700            "refund.updated" => Self::RefundUpdated(FromValueOpt::from_value(data)?),
1701            #[cfg(feature = "async-stripe-misc")]
1702            "reporting.report_run.failed" => {
1703                Self::ReportingReportRunFailed(FromValueOpt::from_value(data)?)
1704            }
1705            #[cfg(feature = "async-stripe-misc")]
1706            "reporting.report_run.succeeded" => {
1707                Self::ReportingReportRunSucceeded(FromValueOpt::from_value(data)?)
1708            }
1709            #[cfg(feature = "async-stripe-misc")]
1710            "reporting.report_type.updated" => {
1711                Self::ReportingReportTypeUpdated(FromValueOpt::from_value(data)?)
1712            }
1713            "review.closed" => Self::ReviewClosed(FromValueOpt::from_value(data)?),
1714            "review.opened" => Self::ReviewOpened(FromValueOpt::from_value(data)?),
1715            "setup_intent.canceled" => Self::SetupIntentCanceled(FromValueOpt::from_value(data)?),
1716            "setup_intent.created" => Self::SetupIntentCreated(FromValueOpt::from_value(data)?),
1717            "setup_intent.requires_action" => {
1718                Self::SetupIntentRequiresAction(FromValueOpt::from_value(data)?)
1719            }
1720            "setup_intent.setup_failed" => {
1721                Self::SetupIntentSetupFailed(FromValueOpt::from_value(data)?)
1722            }
1723            "setup_intent.succeeded" => Self::SetupIntentSucceeded(FromValueOpt::from_value(data)?),
1724            #[cfg(feature = "async-stripe-misc")]
1725            "sigma.scheduled_query_run.created" => {
1726                Self::SigmaScheduledQueryRunCreated(FromValueOpt::from_value(data)?)
1727            }
1728            "source.canceled" => Self::SourceCanceled(FromValueOpt::from_value(data)?),
1729            "source.chargeable" => Self::SourceChargeable(FromValueOpt::from_value(data)?),
1730            "source.failed" => Self::SourceFailed(FromValueOpt::from_value(data)?),
1731            #[cfg(feature = "async-stripe-payment")]
1732            "source.mandate_notification" => {
1733                Self::SourceMandateNotification(FromValueOpt::from_value(data)?)
1734            }
1735            "source.refund_attributes_required" => {
1736                Self::SourceRefundAttributesRequired(FromValueOpt::from_value(data)?)
1737            }
1738            "source.transaction.created" => {
1739                Self::SourceTransactionCreated(FromValueOpt::from_value(data)?)
1740            }
1741            "source.transaction.updated" => {
1742                Self::SourceTransactionUpdated(FromValueOpt::from_value(data)?)
1743            }
1744            "subscription_schedule.aborted" => {
1745                Self::SubscriptionScheduleAborted(FromValueOpt::from_value(data)?)
1746            }
1747            "subscription_schedule.canceled" => {
1748                Self::SubscriptionScheduleCanceled(FromValueOpt::from_value(data)?)
1749            }
1750            "subscription_schedule.completed" => {
1751                Self::SubscriptionScheduleCompleted(FromValueOpt::from_value(data)?)
1752            }
1753            "subscription_schedule.created" => {
1754                Self::SubscriptionScheduleCreated(FromValueOpt::from_value(data)?)
1755            }
1756            "subscription_schedule.expiring" => {
1757                Self::SubscriptionScheduleExpiring(FromValueOpt::from_value(data)?)
1758            }
1759            "subscription_schedule.released" => {
1760                Self::SubscriptionScheduleReleased(FromValueOpt::from_value(data)?)
1761            }
1762            "subscription_schedule.updated" => {
1763                Self::SubscriptionScheduleUpdated(FromValueOpt::from_value(data)?)
1764            }
1765            #[cfg(feature = "async-stripe-misc")]
1766            "tax.settings.updated" => Self::TaxSettingsUpdated(FromValueOpt::from_value(data)?),
1767            "tax_rate.created" => Self::TaxRateCreated(FromValueOpt::from_value(data)?),
1768            "tax_rate.updated" => Self::TaxRateUpdated(FromValueOpt::from_value(data)?),
1769            #[cfg(feature = "async-stripe-terminal")]
1770            "terminal.reader.action_failed" => {
1771                Self::TerminalReaderActionFailed(FromValueOpt::from_value(data)?)
1772            }
1773            #[cfg(feature = "async-stripe-terminal")]
1774            "terminal.reader.action_succeeded" => {
1775                Self::TerminalReaderActionSucceeded(FromValueOpt::from_value(data)?)
1776            }
1777            "test_helpers.test_clock.advancing" => {
1778                Self::TestHelpersTestClockAdvancing(FromValueOpt::from_value(data)?)
1779            }
1780            "test_helpers.test_clock.created" => {
1781                Self::TestHelpersTestClockCreated(FromValueOpt::from_value(data)?)
1782            }
1783            "test_helpers.test_clock.deleted" => {
1784                Self::TestHelpersTestClockDeleted(FromValueOpt::from_value(data)?)
1785            }
1786            "test_helpers.test_clock.internal_failure" => {
1787                Self::TestHelpersTestClockInternalFailure(FromValueOpt::from_value(data)?)
1788            }
1789            "test_helpers.test_clock.ready" => {
1790                Self::TestHelpersTestClockReady(FromValueOpt::from_value(data)?)
1791            }
1792            "topup.canceled" => Self::TopupCanceled(FromValueOpt::from_value(data)?),
1793            "topup.created" => Self::TopupCreated(FromValueOpt::from_value(data)?),
1794            "topup.failed" => Self::TopupFailed(FromValueOpt::from_value(data)?),
1795            "topup.reversed" => Self::TopupReversed(FromValueOpt::from_value(data)?),
1796            "topup.succeeded" => Self::TopupSucceeded(FromValueOpt::from_value(data)?),
1797            "transfer.created" => Self::TransferCreated(FromValueOpt::from_value(data)?),
1798            "transfer.reversed" => Self::TransferReversed(FromValueOpt::from_value(data)?),
1799            "transfer.updated" => Self::TransferUpdated(FromValueOpt::from_value(data)?),
1800            #[cfg(feature = "async-stripe-treasury")]
1801            "treasury.credit_reversal.created" => {
1802                Self::TreasuryCreditReversalCreated(FromValueOpt::from_value(data)?)
1803            }
1804            #[cfg(feature = "async-stripe-treasury")]
1805            "treasury.credit_reversal.posted" => {
1806                Self::TreasuryCreditReversalPosted(FromValueOpt::from_value(data)?)
1807            }
1808            #[cfg(feature = "async-stripe-treasury")]
1809            "treasury.debit_reversal.completed" => {
1810                Self::TreasuryDebitReversalCompleted(FromValueOpt::from_value(data)?)
1811            }
1812            #[cfg(feature = "async-stripe-treasury")]
1813            "treasury.debit_reversal.created" => {
1814                Self::TreasuryDebitReversalCreated(FromValueOpt::from_value(data)?)
1815            }
1816            #[cfg(feature = "async-stripe-treasury")]
1817            "treasury.debit_reversal.initial_credit_granted" => {
1818                Self::TreasuryDebitReversalInitialCreditGranted(FromValueOpt::from_value(data)?)
1819            }
1820            #[cfg(feature = "async-stripe-treasury")]
1821            "treasury.financial_account.closed" => {
1822                Self::TreasuryFinancialAccountClosed(FromValueOpt::from_value(data)?)
1823            }
1824            #[cfg(feature = "async-stripe-treasury")]
1825            "treasury.financial_account.created" => {
1826                Self::TreasuryFinancialAccountCreated(FromValueOpt::from_value(data)?)
1827            }
1828            #[cfg(feature = "async-stripe-treasury")]
1829            "treasury.financial_account.features_status_updated" => {
1830                Self::TreasuryFinancialAccountFeaturesStatusUpdated(FromValueOpt::from_value(data)?)
1831            }
1832            #[cfg(feature = "async-stripe-treasury")]
1833            "treasury.inbound_transfer.canceled" => {
1834                Self::TreasuryInboundTransferCanceled(FromValueOpt::from_value(data)?)
1835            }
1836            #[cfg(feature = "async-stripe-treasury")]
1837            "treasury.inbound_transfer.created" => {
1838                Self::TreasuryInboundTransferCreated(FromValueOpt::from_value(data)?)
1839            }
1840            #[cfg(feature = "async-stripe-treasury")]
1841            "treasury.inbound_transfer.failed" => {
1842                Self::TreasuryInboundTransferFailed(FromValueOpt::from_value(data)?)
1843            }
1844            #[cfg(feature = "async-stripe-treasury")]
1845            "treasury.inbound_transfer.succeeded" => {
1846                Self::TreasuryInboundTransferSucceeded(FromValueOpt::from_value(data)?)
1847            }
1848            #[cfg(feature = "async-stripe-treasury")]
1849            "treasury.outbound_payment.canceled" => {
1850                Self::TreasuryOutboundPaymentCanceled(FromValueOpt::from_value(data)?)
1851            }
1852            #[cfg(feature = "async-stripe-treasury")]
1853            "treasury.outbound_payment.created" => {
1854                Self::TreasuryOutboundPaymentCreated(FromValueOpt::from_value(data)?)
1855            }
1856            #[cfg(feature = "async-stripe-treasury")]
1857            "treasury.outbound_payment.expected_arrival_date_updated" => {
1858                Self::TreasuryOutboundPaymentExpectedArrivalDateUpdated(FromValueOpt::from_value(
1859                    data,
1860                )?)
1861            }
1862            #[cfg(feature = "async-stripe-treasury")]
1863            "treasury.outbound_payment.failed" => {
1864                Self::TreasuryOutboundPaymentFailed(FromValueOpt::from_value(data)?)
1865            }
1866            #[cfg(feature = "async-stripe-treasury")]
1867            "treasury.outbound_payment.posted" => {
1868                Self::TreasuryOutboundPaymentPosted(FromValueOpt::from_value(data)?)
1869            }
1870            #[cfg(feature = "async-stripe-treasury")]
1871            "treasury.outbound_payment.returned" => {
1872                Self::TreasuryOutboundPaymentReturned(FromValueOpt::from_value(data)?)
1873            }
1874            #[cfg(feature = "async-stripe-treasury")]
1875            "treasury.outbound_payment.tracking_details_updated" => {
1876                Self::TreasuryOutboundPaymentTrackingDetailsUpdated(FromValueOpt::from_value(data)?)
1877            }
1878            #[cfg(feature = "async-stripe-treasury")]
1879            "treasury.outbound_transfer.canceled" => {
1880                Self::TreasuryOutboundTransferCanceled(FromValueOpt::from_value(data)?)
1881            }
1882            #[cfg(feature = "async-stripe-treasury")]
1883            "treasury.outbound_transfer.created" => {
1884                Self::TreasuryOutboundTransferCreated(FromValueOpt::from_value(data)?)
1885            }
1886            #[cfg(feature = "async-stripe-treasury")]
1887            "treasury.outbound_transfer.expected_arrival_date_updated" => {
1888                Self::TreasuryOutboundTransferExpectedArrivalDateUpdated(FromValueOpt::from_value(
1889                    data,
1890                )?)
1891            }
1892            #[cfg(feature = "async-stripe-treasury")]
1893            "treasury.outbound_transfer.failed" => {
1894                Self::TreasuryOutboundTransferFailed(FromValueOpt::from_value(data)?)
1895            }
1896            #[cfg(feature = "async-stripe-treasury")]
1897            "treasury.outbound_transfer.posted" => {
1898                Self::TreasuryOutboundTransferPosted(FromValueOpt::from_value(data)?)
1899            }
1900            #[cfg(feature = "async-stripe-treasury")]
1901            "treasury.outbound_transfer.returned" => {
1902                Self::TreasuryOutboundTransferReturned(FromValueOpt::from_value(data)?)
1903            }
1904            #[cfg(feature = "async-stripe-treasury")]
1905            "treasury.outbound_transfer.tracking_details_updated" => {
1906                Self::TreasuryOutboundTransferTrackingDetailsUpdated(FromValueOpt::from_value(
1907                    data,
1908                )?)
1909            }
1910            #[cfg(feature = "async-stripe-treasury")]
1911            "treasury.received_credit.created" => {
1912                Self::TreasuryReceivedCreditCreated(FromValueOpt::from_value(data)?)
1913            }
1914            #[cfg(feature = "async-stripe-treasury")]
1915            "treasury.received_credit.failed" => {
1916                Self::TreasuryReceivedCreditFailed(FromValueOpt::from_value(data)?)
1917            }
1918            #[cfg(feature = "async-stripe-treasury")]
1919            "treasury.received_credit.succeeded" => {
1920                Self::TreasuryReceivedCreditSucceeded(FromValueOpt::from_value(data)?)
1921            }
1922            #[cfg(feature = "async-stripe-treasury")]
1923            "treasury.received_debit.created" => {
1924                Self::TreasuryReceivedDebitCreated(FromValueOpt::from_value(data)?)
1925            }
1926
1927            _ => Self::Unknown(data),
1928        })
1929    }
1930}